Dbus Inspector & Introspect

Thiago Macieira thiago at kde.org
Fri Sep 12 14:50:26 PDT 2008


Sander Jansen wrote:
>Currently DBus Inspector won't list any of these methods, since it
>doesn't know about the object on path "/org/fifthplanet/gogglesmm". I
>see DBus Inspector calling "Introspect" on path "/". Would I have to
>respond with the following then?:
>
><!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection
> 1.0//EN"
> "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node
> name="/">
>  <interface name="org.freedesktop.DBus.Introspectable">
>    <method name="Introspect">
>      <arg name="xml_data" direction="out" type="s"/>
>    </method>
>  </interface>
>  <node name="/org/fifthplanet/gogglesmm"/>
></node>
>
>Would this be the correct and standard way of doing this?

No.

You have to reply with almost the same as above, but the inner <node> tag 
should be:

  <node name="org" />

Then the introspect on /org should reply with:

  <node name="fifthplanet" />

And so on.

>The last 
>response on my question on the list about object path naming
>conventions seems to discourage using the "/" path...

You misunderstood the problem. We were saying that using the / object for 
your purposes was probably wrong, if you were writing an interface that 
was meant to be implemented by other applications.

It could also be a bad practice even if it's just your application, since 
you may want in the future to do things differently.

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.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080912/33b3613d/attachment.pgp 


More information about the dbus mailing list