Re: org.gnome.Application DBus Interface

(It seems some of my mail is going missing. This will screw up the
threading but whatever.)

Rodrigo Moya wrote:
> On Fri, 2007-08-10 at 17:45 +0100, Alex Jones wrote:
> > Hi list
> > 
> > the org.gnome.Application DBus interface provides a way for
> applications
> > to expose common application functionality in a standardised way.
> > 
> sounds pretty good... it would indeed be very useful to start using
> this
> for apps to export actions, so, what about adding a:
> InvokeAction (action_name, arguments)
> method? That way, we could use this interface for calling actions (not
> based on (complicated) URIs) on the app. Rhythmbox could just have
> several actions, like Play/Pause/Volume up-down/etc
> That would be very useful (as we tried to do on the CORBA days) for
> automation

Actually what is a better solution here is to use a different interface,
such as the common media player interface described here:
<>. That way,
making Rhythmbox "pause" becomes a case of calling
(org.gnome.MediaPlayer).Pause() rather than

> > Issues to be worked on:
> > 
> >      1. Startup notification
> >
> can't this be done on gnome-application-exec? It can just do the
> startup
> notification for the duration of the Launch call

Right, this is exactly what I want to do (use the Launch call as the
startup procedure). Eventually though, clients won't be using
gnome-application-exec -- it is simply a backwards compatibility thing
for now. Panel and Nautilus will be invoking the DBus methods directly,
and it is for this use case that we need to find a way to support
startup notification. I personally feel that we can tidy up the
situation eventually (we're using a weird X IPC mechanism (su-n) to
supplement the DBus IPC mechanism...?), but that's for another day.

> >      2. Multiple screen scenarios
> >      3. Actions on multiple URIs
> >      4. GObject API to wrap the DBus API
> >
> what do you mean here? Are the dbus-glib bindings not enough?

Even with Python DBus, it is still nicer to do:

app = org_gnome_Application("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Shell")
app.invoke_uri_action("Play", "file:///home/alex/Desktop/tune.ogg")


bus = dbus.SessionBus()
obj = bus.get_object("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Shell")
app = dbus.Interface(obj, "org.gnome.Application")
app.InvokeURIAction("Play", "file:///home/alex/Desktop/tune.ogg")

But that's up to you. :)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]