about object introspection for dbus

Matthew Johnson dbus at matthew.ath.cx
Thu May 21 03:06:37 PDT 2009


On Thu May 21 12:46, Ville M. Vainio wrote:
> > 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).

So, you aren't actually thrown off the bus for not doing it, and some
things might work some of the time. That's kinda not the point, it's
still required. Note that responding to _all_ method calls with at least
an error is also required.

> 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.

No, it's not, but it is an example of something which you need to get
right in the low level bindings which is done for you in the high-level
bindings. In general we do recommend using high level bindings precisely
because of these things it's easy to do wrong.

Matt

-- 
www.matthew.ath.cx
D-Bus Java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090521/3f62e395/attachment.pgp 


More information about the dbus mailing list