Object paths naming conventions?

Havoc Pennington hp at pobox.com
Fri Jul 18 09:26:01 PDT 2008


Hi,

Another important point here. The find-object-by-interface hack only
works for _singletons_. Not all object instances are singletons. A
special case find-singleton-by-interface behavior is maybe nice to
have, but it's a special case. What you really want, if allowing
find-singleton-by-interface, is to not specify an object path at
all... to just have the message contain an interface, and then
dynamically find the object from the interface. dbus won't allow this,
but if we did allow it, the right way would be to allow omitting the
object path, rather than having everyone use a conflicting object
path.

I think what's "meant" by using "/" as the object path is "I don't
want to have an object path in the message, find me the singleton
implementing this interface" - but, that just doesn't work with the
current spec. "/" is not the same as leaving the object path out -
it's like using an arbitrary pointer when you mean NULL. If you want
to ignore the object path and just switch on interface, it would be
better to use something like /org/bluez/everything as the object path.

Otherwise you're interfering with the non-singleton case, which
clearly does _require_ the object path, since it can't be deduced from
the interface.

Havoc


More information about the dbus mailing list