Commit 568843c1 authored by Michael Pyne's avatar Michael Pyne

Add some DCOP functions to PlayerManager.

* Get volume.
* Find out if a song is playing/paused/stopped.
* Get metadata on the currently playing song, including filename.

Fix spacing problems I introduced in my last commit (plus I just now
  triple-checked ;-) ).

Once the new Collection Manager is in place I'll do the rest of the DCOP
features and close the bugs.

CCMAIL:69083@bugs.kde.org
CCMAIL:80327@bugs.kde.org

svn path=/trunk/kdemultimedia/juk/; revision=313351
parent 6f275f8a
......@@ -16,6 +16,13 @@ class PlayerIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
virtual bool playing() const = 0;
virtual bool paused() const = 0;
virtual float volume() const = 0;
virtual QStringList trackProperties() = 0;
virtual QString trackProperty(const QString &property) const = 0;
virtual void play() = 0;
virtual void pause() = 0;
virtual void stop() = 0;
......
......@@ -147,6 +147,19 @@ int PlayerManager::position() const
return player()->position();
}
QStringList PlayerManager::trackProperties()
{
return FileHandle::properties();
}
QString PlayerManager::trackProperty(const QString &property) const
{
if(!playing())
return QString::null;
return m_file.property(property);
}
FileHandle PlayerManager::playingFile() const
{
return m_file;
......
......@@ -51,6 +51,9 @@ public:
int currentTime() const;
int position() const;
QStringList trackProperties();
QString trackProperty(const QString &property) const;
FileHandle playingFile() const;
QString playingString() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment