Net::DBus and qdbus disagreement
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Jan 4 04:10:05 PST 2012
On Sun, 18 Dec 2011 at 21:29:42 +0000, Daniel P. Berrange wrote:
> Ok, so this is showing that there are 3 methods exported in the same
> interface, all with the same name. I did not realize that this is
> allowed by DBus.
D-Bus is both a message passing system, and an object model built on that
message passing system. I've been trying to make the layering clearer in the
spec, but am still rather held up by lack of reviews for my queue of pending
patches - reviews on Bugzilla welcome, even from non-committers!
Any call is allowed by the message passing system, which operates at a
considerably lower level than the object model used by most bindings.
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.
> The Net::DBus code is assuming that method names
> are unique within the scope of a single interface, so it is only
> able to show you a single method.
Many other bindings, particularly those that try to "hide" D-Bus signatures
(at least dbus-glib and dbus-python), have the same problem. I believe the
only "signature-hiding" binding that supports method overloading like this
is Qt.
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.
S
More information about the dbus
mailing list