Dbus Inspector & Introspect

Havoc Pennington hp at pobox.com
Fri Sep 12 15:02:43 PDT 2008


Hi,

On Fri, Sep 12, 2008 at 5:50 PM, Thiago Macieira <thiago at kde.org> wrote:
> However, the / object is the root object in the object tree. It's always
> present and the introspection starts by it. You have to provide the
> correct tree leading to your objects.
>

Clarifying a bit, if using libdbus, DBusConnection already implements
Introspect() for any path that just has child nodes; you only have to
implement introspect for the leaf node where you registered your
object. If you register /a/b/c then you need to introspect for /a/b/c,
but DBusConnection will automatically implement introspecting /, /a,
and /a/b - supposed to, at least.

In some cases, when you implement introspection on /a/b/c you should
use dbus_connection_list_registered() to get the child nodes of /a/b/c
and include those in the introspection xml. You do this if your child
nodes may be registered with DBusConnection. If you put a fallback
handler on /a/b/c then you may have other ways of routing to child
nodes that don't use DBusConnection registration though.

Havoc


More information about the dbus mailing list