Hi,
as an experiment I've tried porting a toy dbus daemon over to sd-bus. It
seems to be working well so far and I have to say I really like the
sd-bus API over the gdbus one (sd-bus feels like I'm still writing
C...can't say the same thing about gdbus).
Now, a question...how is an object manager supposed to be implemented in
sd-bus?
I've seen that there's a sd_bus_add_object_manager() function in
sd-bus.h, but how would I notify the object manager when objects are
added and removed?
Two likely candidates seemed to be:
sd_bus_emit_object_added()
sd_bus_emit_object_removed()
But calling them did not seem to do the right thing. And there seems to
be zero usage of sd_bus_add_object_manager() in the systemd tree itself
(though plenty of calls to sd_bus_add_node_enumerator() which might be
related?).
So, could anyone provide me with an example of how to use
sd_bus_add_object_manager()?
Regards,
David
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel