In GDBus it's possible to watch for a particular name to appear on the bus with g_bus_watch_name_on_connection()
. It's also possible to be notified about new interfaces/objects added on objects implementing the org.freedesktop.DBus.ObjectManager
interface. I cannot however find a way to be notified about the appearance of the top-level ObjectManager on the bus. In other words:
We have a name org.foobar
which exports an ObjectManager
at /org/foobar
which manages /org/foobar/abc
and /org/foobar/xyz
.
I can get notified about the name acquisition of org.foobar
and about the addition of /org/foobar/abc
and /org/foobar/xyz
. However some time passes between when the org.foobar
name is taken and then the /org/foobar
object appears. How do I programmatically and correctly wait for it in GLib?