Proposal and RFC: DAL, the Desktop Abstraction Layer
Jamie McCracken
jamiemcc at blueyonder.co.uk
Sat Jan 15 15:33:41 EET 2005
Ikke wrote:
>>But the service names are unique so what happens if you have gedit and
>>kwrite - they cant both be called org.freedesktop.TextEditor. So would
>>gedit be /org/gnome/gedit then? If so how will I know it has a certain
>>interface without *knowing* about the app?
>
>
> My opinion:
> If applications announce themselves on the DBUS session bus, they should
> use one strict interface. In the case of kwrite and gedit, this could be
> org.freedesktop.TextEditor. If an application want to use the services
> of a TextEditor, it can find out which one to use like this:
> 1. Check whether multiple apps offering the same interface are started.
> If none is started, start the default one. If only one is started, use
> that one.
> 2. If multiple apps are started, use a desktop-specific method (or maybe
> non-desktop-specific, if such a standard exists?) to find out what the
> "default" handler is. If the default handler is started, use that one.
> If not,
> 3. Create a dialog box where the user can choose what app to use.
There are only 2 use cases that I know of using Dbus:
1) You want to communicate with a specific app
2) You want to communicate with an interface and you dont care what the
app is
With your suggestion option 1 would not be possible.
The way to solve this is to make service name = app name and then make
org.freedesktop.TextEditor an interface.
jamie.
More information about the xdg
mailing list