org.freedesktop.DBus.Error.UnknownObject

Lennart Poettering mzqohf at 0pointer.de
Wed Feb 9 06:41:44 PST 2011


Heya,

dbus-protocol.h from the main implementation of D-Bus knows no
UnknownMethod error code, and generates if no object was registered for
a requested object path org.freedesktop.DBus.Error.UnknownMethod. Which
is kinda a misnomer and inaccurate.

The Qt and the Java bindings however generated UnknownObject,
UnknownInterface and UnknownMethod depending on what is actually is
happening.

gdbus follows naked libdbus closely and also returns UnknownMethod in
all cases.

And then there is:

http://www.freedesktop.org/wiki/Software/DBusBindingErrors

This is chaotic and I do believe there are valid use cases for clients
to know what exactly happened (e.g. very common it is that clients need
to be able to deal with server objects disappearing in the middle of
everything, and they want to distuingish this form the case where they
just called a method that is unsupported by the server).

So, I wonder what we could do about this:

  a) change libdbus to distuingish these three errors and generate them
  under the right circumstances

  b) change gdbus to do the same

  c) add these three error codes to dbus-protocol.h

  d) change qt/java to return UnknownMethod for everything, like the other
  bindings do.

I think doing a) is probably too late: this would be quite a change of
behaviour for clients which might rely on specific error code. So
probably a bad idea.

However, given that gdbus is still young and gnome3 not out yet it might
make sense to clean this up and make the change b), to bring this in line
with the qt and java bindings? I'd say yes, please.

c) is something we definitely could do without ill effects. So, I'd say
yes, please, too.

d) I'd not do, since I actually believe the qt/java bindings do the
right thing here and the other bindings don't. So, I'd say: no.

What are your opinions?

David, would you be willing to do b)?

If there is agreement, I'd be happy to do c) and commit this.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the dbus mailing list