[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdebase/workspace/plasma/dataengines/nowplaying
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2008-07-28 23:16:06
Message-ID: 200807290016.10668.huntedhacker () tiscali ! co ! uk
[Download RAW message or body]


On Monday 28 July 2008 23:52:35 Aaron J. Seigo wrote:
> On Monday 28 July 2008, Alex Merry wrote:
> > +    setData(source, "Can seek", player->canSeek());
> > +    setData(source, "Can set volume", player->canSetVolume());
> >
> >      return true;
> >  }
>
> hm.. should this be going into the Service instead?

If you give me a nice API for getting that info out of a Plasma::Service 
(without doing operation calls to see if I can do other operation calls), I'll 
take it.  It does seem the natural place for it.

Something like
bool operationValid(const QString& operation)
might work (not sure about the name), but the following have to be borne in 
mind:
* even if this returns true, the operation might still fail (bad arguments, or
  the Service didn't know until it tried)
* whether an operation is valid or not can change frequently.  In this case,
  moving to the next track or starting, pausing or stopping the player can
  all affect the operations that can be performed.

Alex


-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic