diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-11-24 18:17:51 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-11-24 18:17:51 +0000 |
| commit | aa3f57c0236c77f2fd90415fc1f3062a93b25b93 (patch) | |
| tree | d9ab905b952cf9289239b95db99f39321a54e65b /src/plugins/General/mpris/mpris.cpp | |
| parent | 5c2f5798c6222d35e08fa0853812e2390181e735 (diff) | |
| download | qmmp-aa3f57c0236c77f2fd90415fc1f3062a93b25b93.tar.gz qmmp-aa3f57c0236c77f2fd90415fc1f3062a93b25b93.tar.bz2 qmmp-aa3f57c0236c77f2fd90415fc1f3062a93b25b93.zip | |
some api changes, partial mpris 2.0 implementation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1991 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris/mpris.cpp')
| -rw-r--r-- | src/plugins/General/mpris/mpris.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/General/mpris/mpris.cpp b/src/plugins/General/mpris/mpris.cpp index 4c6474311..d355f7f7f 100644 --- a/src/plugins/General/mpris/mpris.cpp +++ b/src/plugins/General/mpris/mpris.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -19,28 +19,28 @@ ***************************************************************************/ #include <QtDBus> - #include "playerobject.h" #include "rootobject.h" #include "tracklistobject.h" +#include "root2object.h" #include "mpris.h" -MPRIS::MPRIS(QObject *parent) - : General(parent) +MPRIS::MPRIS(QObject *parent) : General(parent) { - PlayerObject *player = new PlayerObject(this); - RootObject *root = new RootObject(this); - TrackListObject *trackList = new TrackListObject(this); QDBusConnection connection = QDBusConnection::sessionBus(); - connection.registerObject("/TrackList", trackList, QDBusConnection::ExportAllContents); - connection.registerObject("/Player", player, QDBusConnection::ExportAllContents); - connection.registerObject("/", root, QDBusConnection::ExportAllContents); + //MPRISv1 + connection.registerObject("/TrackList", new TrackListObject(this), QDBusConnection::ExportAllContents); + connection.registerObject("/Player", new PlayerObject(this), QDBusConnection::ExportAllContents); + connection.registerObject("/", new RootObject(this), QDBusConnection::ExportAllContents); + //MPRISv2 + connection.registerObject("/org/mpris/MediaPlayer2", new Root2Object(this), + QDBusConnection::ExportAllContents); connection.registerService("org.mpris.qmmp"); + connection.registerService("org.mpris.MediaPlayer2.qmmp"); } - MPRIS::~MPRIS() { + QDBusConnection::sessionBus().unregisterService("org.mpris.qmmp"); + QDBusConnection::sessionBus().unregisterService("org.mpris.MediaPlayer2.qmmp"); } - - |
