Proposal and RFC: DAL, the Desktop Abstraction Layer
John (J5) Palmieri
johnp@redhat.com
Wed Jan 19 06:22:46 PST 2005
On Wed, 2005-01-19 at 06:31, Ikke wrote:
> > A few things:
> >
> > Interfaces:
> >
> > <Interface>org.freedesktop.DIS.MusicPlayer</Interface>
> >
> > This would be better as :
> > <Interfaces>
> > <Interface name="org.freedesktop.MusicPlayerInterface">Interface
> > Description here </Interface>
> > </Interfaces>
> >
> > Bear in mind a service can have multiple interfaces and I believe
> > interfaces should be in A.B.C format (not A.B.C.D).
> Actually, no. One application can implement multiple services (I am a
> MusicPlayer AND a VideoPlayer, for example), but one service (the
> MusicPlayer service) is bound to one interface. I can't think of a case
> where it wouldn't be (or where it should be necessary to assign multiple
> interfaces to a service).
Services are just for routing. Objects and interfaces should be used
for identifying what piece of code should be run. Try not to use
multiple services in an application unless you can come up with a really
good reason. We also use services to track life-cycles of an
application so if a service goes down we can assume the application has
been closed. Things get confusing if you have multiple services.
>
> > Events:
> >
> > <Event name="NewTrackStarted">
> >
> > I am used to events having the word "On" prefixed to them so as to
> > distinguish them from methods so it would be nice if it where:
> >
> > <Event name="OnNewTrackStarted">
> To Java- or (even worse) VisualBasic-ish ;) It's an event sent by the
> app delivering the service, the "On" should be inside the name of a
> function reacting on the event.
>
> > Also you have a method called "OnTurntable" could you not replace that
> > with "GetCurrentTrackURI"
> True. Couldn't figure out a better name at the moment of writing :)
>
> > (I would also think you would need SetCurrentTrackURI instead of PlaybackURI too - its a good idea to use
> > Get/Set methods where relevant as these would then translate nicely into
> > GObject properties and in this case CurrentTrackURI would be such a
> > read/write property)
> SetCurrentTrackUri isn't really a "logical" name IMHO, caus it doesnt
> says we also request the player to start playback.
> Maybe there should be 2 functions: SetCurrentTrackUri, and StartPlayback
> (next to PausePlayback etc). ResumePlayback could be obsoleted then too.
>
> I'll update the thing today, if possible.
>
> > jamie.
>
> Ikke
> http://www.eikke.com
--
J5
More information about the dbus
mailing list