Introspect method call

Havoc Pennington hp at redhat.com
Wed Feb 28 08:21:38 PST 2007


Thiago Macieira wrote:
> Which actually reminds me: how does libdbus handle introspections for 
> objects with sub-objects? Does the library modify the XML to append the 
> <node> tags? Or does it require the introspected object to do that?
>

libdbus doesn't know anything about Introspect() or the xml format, that 
I can remember. At most it has the Introspect method in a #define in 
dbus-protocol.h ... maybe it implements a simple Introspect() for the 
one or two built-in methods, not sure.

> I don't see a way of retrieving the sub-objects present at a given object 
> path (I am notoriously bad at finding stuff, so it might be there and I 
> didn't see it).


dbus_connection_list_registered() maybe? I think I tried to ensure 
dbus-glib could just use the existing tree of objects tracked by 
DBusConnection, so I thought I added enough stuff to enable this. I 
don't know if dbus-glib still gets by without mirroring its own object 
tree, but it'd be nice to keep the DBusConnection API sufficient to 
enable bindings to avoid duplicating this data structure.

Anyway, iirc dbus-glib used to use list_registered() to recurse the 
object tree in order to build the recursive introspect info.

Havoc


More information about the dbus mailing list