On Mon, 10.02.14 16:38, David Herrmann (dh.herrm...@gmail.com) wrote: > Hi > > I stumbled over this when trying to use the ObjectManager interface > with sd-bus. Whenever I add new objects, I'm supposed to advertise > them with all supported interfaces. However, sd-bus implements the > org.freedesktop.DBus.XY interfaces internally so I cannot add vtables > for it. This means, sd_bus_emit_interfaces_added() cannot take these > into account. For sd_bus_emit_interfaces_removed() this works as it is > just a shallow wrapper. > > I tried fixing that but it's not very easy. > sd_bus_emit_interfaces_added() is also used whenever an existing > object *gains* additional interfaces. So we cannot set the standard > interfaces by default. > > I'm now stuck trying to fix it. I have a few ideas: > > 1) add sd_bus_emit_object_added() which is exactly the same as > sd_bus_emit_interfaces_added() but automatically adds the > org.freedesktop.DBus.XY interfaces supported on the object.
Yeah, I am figure this is the way to go. There should be an sd_bus_emit_object_removed() call too I figure, to match it. It's probably better to never make the daemon developers bother explicitly with the built-in interfaces... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel