"default" object path

Colin Walters walters at verbum.org
Fri Oct 16 12:28:27 PDT 2009


Hi,

Random thought; this may have some up before, but a in a lot of cases
(system service, desktop app) there tends to be one "manager" object
which is the primary interface to the app.

People have complained about the verbosity of dbus-send before, and
they're not really wrong.  What if we added a flag in the
introspection XML (say) that denoted an object path as "primary"?
Bindings could expose this in some way; I could imagine a manual API
like gdbus_export_primary_object (const char *opath); for desktop apps
it could be done automatically for GApp/QApp type classes.

Then if you did say:

dbus-send --print-reply org.freedesktop.DBus.ListNames

It would could assume service name == interface name, grab the
introspection XML, find that the path /org/freedesktop/DBus is tagged
as primary and implements org.freedesktop.DBus. Or maybe it could be:

dbus-send --print-reply org.freedesktop.DBus ListNames

Where the subtle distinction here is that we take org.freedesktop.DBus
as the service name, and grab the first primary object that has a
method "ListNames".

Thoughts?


More information about the dbus mailing list