How to chek the presence of an object on dbus
remi at remlab.net
Mon Aug 30 22:32:07 PDT 2010
Le mardi 31 août 2010, tomw a écrit :
> I was wondering how to check the presence of an object on the dbus
> the most elegant way. Of course, one could create a proxy object on
> the path and call the Introspect method. If this returns proper
> introspect data the object is available. However, are there any
> better ways?
Objects are not present "on the bus". They are instantiated in ways
specific to DBus client process, or at least its DBus implementation.
Not all DBus clients implement introspection. And even when they do
implement it (correctly), there is no race-free nor poll-free way to be
notified of objects tree changes.
In my opinion, the most "elegant" way to check that an object exists is
to query it. This is interface-specific, but you should know what you
are talking with anyway.
More information about the dbus