about object introspection for dbus
Ville M. Vainio
vivainio at gmail.com
Thu May 21 02:46:10 PDT 2009
On Thu, May 21, 2009 at 12:10 PM, Matthew Johnson <dbus at matthew.ath.cx> wrote:
>> If you are doing both the client and server sides yourself with the
>> plain C api, you don't need to add introspection support at all. You
>> can also use dbus-glib without introspection if you only need
>> dbus_connection_setup_with_g_main().
>
> No, this is wrong. If you are writing anything which connects to the
> system or session buses, or ideally anything at all, you _must_
> implement introspection. It is a requirement for writing a service on
> dbus. DBus is about interoperability, people will be writing things
> against your API in other languages even if you aren't.
But still, it doesn't appear to be mandatory, technically.
Intrerestingly, python-dbus binding also seems to work with a trivial
introspection (i.e. the introspection xml doesn't really need to
contain any of the methods you provide, as long as you reply to
"Introspect()" method call).
Note that this is actually something I learned by experimentation - I
had an app that provided dbus service (not intended for third party
consumption) without handling Introspect(), and it could connect to
session and system bus just fine. Adding trivial Introspect() enabled
using it from python-dbus.
So the original poster can probably whip up the dbus part of his app
without messing with introspection until the app is basically ready to
ship. In any case, introspection is not a bogeyman that should scare
you away from using the low level C bindings.
--
Ville M. Vainio
http://tinyurl.com/vainio
More information about the dbus
mailing list