Proposal and RFC: DAL, the Desktop Abstraction Layer

Havoc Pennington hp@redhat.com
Wed Jan 19 15:50:22 PST 2005


On Wed, 2005-01-19 at 22:52 +0000, Jamie McCracken wrote:
> So perhaps the question I should have asked Havoc is "should Dbus 
> activation return an object then?"
> 

We've talked about this some (I think on the list, I'm not sure).

We could certainly do that at some point but essentially it just saves
typing. i.e. right now you would do this:

 proxy = proxy_new ("org.freedesktop.TextEditor",    // bus name
                    "/org/freedesktop/Application",  // object instance
                    "org.freedesktop.TextDocumentFactory") // interface

and that will create a proxy for the object
instance /org/freedesktop/Application.

We could devise various ways to avoid typing the bus name or object
name, i.e. 

 proxy = proxy_new_for_interface("org.freedesktop.TextDocumentFactory");

The object instance and bus name could then come from either
the .service files or some stock method that the launched app would
provide ("getObjectForInterface()" or something).

Or even simpler, we could say that in this case the instance is
_always_ /org/freedesktop/Application and the bus name is always the
same name as the interface. That would be the dead simple (and
efficient, no round trips) approach.

We could just say: if no object path is in a message, it defaults to the
Application singleton.

This could all be a little confusing, in particular it encourages
confusion about interface vs. object vs. bus name, but maybe it's good
to hide the details.

I don't think this changes anything fundamental about the D-BUS
architecture, it's just a matter of adding some new methods/features, so
we can add it post-1.0 if we want. For that matter, this feature could
even be done in a binding without changing dbus core.

But I'm not inherently opposed to it in 1.0 if we can get some
confidence we have the right model.

Havoc




More information about the dbus mailing list