about signals

Havoc Pennington hp at redhat.com
Fri May 28 20:50:51 PDT 2004


On Fri, 2004-05-28 at 18:07, Tako Schotanus wrote:
> This is the first time that I encounter this "introspect" thing in 
> relation to DBus. Does this mean that DBus does have (or will have) the 
> ability for auto-discovery of services/objects/interfaces/methods and 
> signals? Or is this about something else?

Yes. The idea for returning introspection data as an XML string is from
Matthias Ettrich. I did this by having any object path implement a
method Introspect() which returns the interfaces, methods, signals, and
child nodes for that object path. See dbus-gobject.c:handle_introspect()
for the glib implementation.

The XML format is not documented but a parser for it is implemented in
dbus/glib/dbus-gparser.c and you can see what the handle_introspect()
function builds. It is pretty simple:

<node>
 <interface name="org.freedesktop.Introspectable">
   <method name="Introspect">
     <arg type="string" direction="out"/>
   </method>
 </interface>
</node>

Along these lines.

This needs to be added to the spec, obviously.

> Ok and while you're being honest: are the ideas you just talked about 
> only your own or is there some consensus that this should be more or 
> less the way to go? (Being new I have no idea yet who are the great 
> minds behind DBus, so I have no idea who makes the decisions around 
> here, sorry :-)

I designed and implemented much of the code in dbus, based on a lot of
input from others. What I'm talking about for bindings is what I
intended the current implementation to support and I think what Matthias
wanted to see for the Qt bindings (at least as well as I understood him,
the mistakes are my fault). AFAIK the idea is pretty similar to DCOP.

I don't know if the current implementation is right or not, but we won't
know that for sure until we start using it some more. So this is my
opinion on what we should do but I have been pretty firm that we can't
freeze the API and protocol until we have more real world usage and get
the major elements all working (including the bindings, using it in the
desktops, and so forth).

If you discover in trying to hack on things that the current stuff is
wrong, by all means bring up the issues.

Havoc





More information about the dbus mailing list