JAN
29
2006

D-BUS getting into shape

The last few days saw a couple of threads on the dbus mailinglist about topics we KDE users got used to love in DCOP.
For example how to start browsing for interfaces on applications connected to the bus, in D-BUS terminology called introspection, how to know which session busses are currently active for a user and how to work with users session busses from the system bus.

The last two features are known to DCOP commandline client users as

dcop --all-sessions

and

dcop --all-users --all-sessions

where especially the second form is very nice to have in administrative scripts to inform the users about stuff going on, for example telling them via KNotify that the system is about to reboot and they better save or be sorry, or to save and logout all KDE sessions for those users who ignore you anyway :)

And as a personal note to the introspection thingy: if you have introspectable objects you are supposed to register one as a startingpoint at the object path "/" (the root of the path namespace), which is unfortunately not documented yet. (The Qt3 bindings API DOX do, but they in turn do not provide an easy way to generate introspection data yet)

Comments

Do you have any plans about whether/how to do documentation of functions? In my experience of doing user support, this is one of the most notable omissions in DCOP: if you want to find a function to do a particular task, you have to (semi-)randomly search through kdcop, and then hope you can guess the correct value for the three int arguments it takes. Having a description of the function (à la apidox) in kdcop would be very helpful.

I know DBUS can do the introspection you mention, so you could have an annotation with the doc string, but I guess it would be nicer (and more interoperable) if DBUS provided a element, or something similar. Do you know if the DBUS developers plan to add something like that? I was thinking of contacting them to suggest it, but if you have a different solution, I won't.


By philrod at Mon, 01/30/2006 - 10:40

and then hope you can guess the correct value for the three int arguments it takes

KSMServer's logout? :)

Do you know if the DBUS developers plan to add something like that?

Not that I am aware of, but I think the annotations in the introspection format should be used for that.

Not for transporting the actual documentation, but for transporting references, for example which chapter in the handbook a DBus method is documented in or a reference to an API documentation.

Actually I think there should also be generic documentation annotations for usual cases, i.e. manipulating window properties.
Their documentation could available directly from the introspection browser.

I was thinking of contacting them to suggest it, but if you have a different solution, I won't.

Can't hurt to have some discussion on this with a broader audience.

I think it might even be useful to contact the documentation teams beforehand, for example to get their ideas how such documentation could be structured, installed and loaded, without depending on a specification for transporting it or the references to them.


By krake at Mon, 01/30/2006 - 19:48