Introspection

John (J5) Palmieri johnp at redhat.com
Mon Jul 18 05:46:03 EST 2005


On Sun, 2005-07-17 at 15:25 -0400, Colin Walters wrote:
> On Mon, 2005-07-18 at 03:16 +0800, Grahame Bowland wrote:
> 
> > So I want to write a simple gui/console program that will show available 
> > names, and then the a representation of the interfaces / methods available on 
> > each of the names. 
> 
> > If someone has already done this, please tell me so I'm 
> > not pointlessly duplicating effort! 
> 
> See tools/dbus-viewer.
> 
> > Once I have called ListNames() on /org/freedesktop/DBus I'm trying to call 
> > Introspect() from org.freedesktop.DBus.Introspectable on each of the names. 
> > This seems to work OK for org.freedesktop.DBus, com.redhat.dhcp, 
> > org.freedesktop.NetworkManager and many other things. Yet for 
> > org.freedesktop.Hal my call times out:
> > dbus_bindings.DBusException: No reply within specified time
> 
> I don't think HAL implements introspection.  Or maybe it tries to but
> you're crashing it =)
> 
> Introspection support is something apps written with the GLib bindings
> get for free, hopefully HAL will use them soon.

Python apps get it for free too though the lower level bindings do not
because you don't actually specify interfaces.  In the low level
bindings you simply handle messages so unless the program handles
Introspection directly you won't get it.  As for HAL timing out it sound
like it is either crashing or not handling unknown messages correctly.

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list