Data Engines [WAS: KDE/kdebase/workspace/plasma/dataengines/nowplaying]

Jason Stubbs jasonbstubbs at gmail.com
Mon Jul 14 14:51:38 CEST 2008


On Monday 14 July 2008 21:16:16 JST, Alex Merry wrote:
> SVN commit 832338 by alexmerry:
>
> org.kde.Amarok.Player is dead.  Long live MPRIS.

A dataengine that lives in kdebase and reports information from a media player 
that is still in alpha stage kind of suprised me, so I'm going to do a little 
brain dump. Some or all of my points may be entirely covered by the current 
framework and, if so, you may rightfully call me an idiot and/or lazy. ;)

I haven't really touched upon data engines at all, so I'm not sure exactly how 
the interface works. From what I have seen, an applet says "gimme access to 
the data engine that reports FOO data". I believe there is also nothing to 
stop an applet from access both FOO and BAR data engines, but that's getting 
beside the point.

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.

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. ;)

But! If the above is correct, I wonder if it is not possible to make it so 
that a an applet can (only?) request a list of data engines that report "FOO" 
data. In the case of "now playing", each data engine (for each player) could 
report data such as:

QString playerName;
bool currentlyPlaying;
QDateTime playStartTime;
QString playingTitle;

And whatever other values (with better names ;)... An applet could choose the 
most recent playStartTime that is still currentlyPlaying and display that. Or 
it could give a list of last played playingTitle by playerName or whatever 
else...

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?

-- 
Jason Stubbs


More information about the Panel-devel mailing list