Net::DBus and qdbus disagreement

David Zeuthen zeuthen at gmail.com
Wed Jan 4 08:37:11 PST 2012


Hi,

On Wed, Jan 4, 2012 at 7:10 AM, Simon McVittie
<simon.mcvittie at collabora.co.uk> wrote:


> It's ambiguous whether the object model is meant to allow overloading
> (two methods with the same name and different "in" arguments) or not.
> In my opinion, there is a "portable subset" of D-Bus that interface
> designers should use, and that portable subset doesn't include
> overloading.

I agree. Btw, this is similar to back when a KDE developer (a QtDBus
user) complained on the list that a D-Bus property name in udisks
contained dashes. This ended with us recommending that property names
SHOULD be CamelCase (but still allowing any UTF-8 string).

> GDBus avoids this by having the signature appear explicitly in every method
> call. I think dbus-python might also cope if you use an explicit signature.

It's true that the two lowest levels (essentially
g_dbus_connection_send_message(), g_dbus_proxy_call()) in GDBus allow
this, however the highest layer (which involves generating code),
gdbus-codegen, see

 http://developer.gnome.org/gio/unstable/gdbus-codegen.html

does not. You can, however, use the org.gtk.GDBus.C.Name annotation to
work around this.

In addition to the "portable subset", it's probably also worth
pointing out somewhere that it's useful for a D-Bus binding to have
facilities for override names. This way users are not stuck if
something unforeseen by the binding author happens.

     David


More information about the dbus mailing list