Data Engines [WAS: KDE/kdebase/workspace/plasma/dataengines/nowplaying]
Alex Merry
huntedhacker at tiscali.co.uk
Mon Jul 14 15:36:57 CEST 2008
On Monday 14 July 2008 13:51:38 Jason Stubbs wrote:
> Now, upon hearing of a data engine that reports information about the
> activity of an alpha piece of software (that uses plasma, mind you) living
> in kdebase, I instantly wondered why it doesn't live with the alpha piece
> of software. I'm guessing that "now playing" applets also don't live with
> the software and, by inference, that either the data engines API doesn't
> really handle a missing data engine well or that applets don't handle
> failures from the data engine well. Either of those are a problem.
Well, the now playing data engine abstracts away dealing with a hundred
different media player interfaces and quirks away, and just gives an applet a
standard way of accessing the relevant data. It deals with MPRIS (the new
standard for accessing media players over D-Bus), Juk and XMMS. MPD support
should follow shortly.
Long-term, I'd like to abstract the "accessing media players" bit out into a
library (it's already pretty abstracted internally) with optional plugins for
different players. Then the nowlistening plugin for Kopete could use it, for
example. But maybe MPRIS will make that pointless.
> I then wondered why a "now playing" applet should need to depend upon a
> specific data engine to be available. I also wondered if the "now playing"
> data engine is covering amarok, juk, etc, etc.. If it is? Bad. If not, is
> it up to the applet to follow several data engines to figure out which is
> playing what? If so, bad. If not, then my brain dump is irrelevant and I
> probably am too lazy. ;)
I made nowplaying so that they wouldn't have to deal with a dozen data
engines.
> Blah, this is getting to long. To ask a question and/or make a point, if
> there is currently no API to request all dataengines supporting a specific
> interface, perhaps there should be?
I think the problem is that there's no interface specification in data
engines. You just have to know what data to expect. Some sort of runtime
introspection is maybe the first step.
Alex
--
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
More information about the Panel-devel
mailing list