Introspect method call
Havoc Pennington
hp at redhat.com
Wed Feb 28 06:58:15 PST 2007
Gaurav Roy wrote:
> What has to be done at the server object side to have a working version
> of the following call?
>
> dbus-send --system --type=method_call --print-reply --dest=[service]
> [object_path] org.freedesktop.DBus.Introspectable.Introspect
>
> Have seen for most DBUS objects of various types it works.
> However for one particular object it returns blank XML instead of method
> call descriptions, though the server is reactive to the method calls.
> Do only DBUS-GLIB ised server side codes support this method call? Can
> some insight be provided as to how the Introspect call works?
>
Some bindings will implement this for you, such as the glib bindings.
You have to look at the docs for your binding.
If someone is using straight libdbus with no binding, they have to
implement it themselves, because libdbus doesn't know the introspection
info.
hippo_dbus_handle_introspect_prefs() in
http://svn.mugshot.org/dumbhippo/trunk/client/linux/src/hippo-dbus-settings.c
is a random example of how you might implement it manually when not
using a binding.
You could also ship an xml file with your app, and load it at runtime,
instead of doing the huge string concatenation in the source code.
Havoc
More information about the dbus
mailing list