aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/mpris/rootobject.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-11-25 22:24:48 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-11-25 22:24:48 +0000
commitc55ed6ab2a2839be7f4bbd490268948d103d8a4a (patch)
tree8636626395b4e5fc5b06b54e906f44c8b03b8fb5 /src/plugins/General/mpris/rootobject.cpp
parentb232de14d10f6c09c7c15410fa468054695baaa6 (diff)
downloadqmmp-c55ed6ab2a2839be7f4bbd490268948d103d8a4a.tar.gz
qmmp-c55ed6ab2a2839be7f4bbd490268948d103d8a4a.tar.bz2
qmmp-c55ed6ab2a2839be7f4bbd490268948d103d8a4a.zip
some mpris plugin improvements
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@638 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris/rootobject.cpp')
-rw-r--r--src/plugins/General/mpris/rootobject.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/plugins/General/mpris/rootobject.cpp b/src/plugins/General/mpris/rootobject.cpp
index 4869fd862..d5dc1af9d 100644
--- a/src/plugins/General/mpris/rootobject.cpp
+++ b/src/plugins/General/mpris/rootobject.cpp
@@ -17,11 +17,36 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+
+#include <QDBusMetaType>
+#include <QDBusArgument>
+
#include "rootobject.h"
+//register << operator
+QDBusArgument &operator << (QDBusArgument &arg, const Version &v)
+{
+ arg.beginStructure();
+ arg << v.major;
+ arg << v.minor;
+ arg.endStructure();
+ return arg;
+}
+
+//register >> operator
+const QDBusArgument &operator >> (const QDBusArgument &arg, Version &v)
+{
+ arg.beginStructure();
+ arg >> v.major;
+ arg >> v.minor;
+ arg.endStructure();
+ return arg;
+}
+
RootObject::RootObject(QObject *parent)
- : QDBusAbstractAdaptor(parent)
+ : QObject(parent)
{
+ qDBusRegisterMetaType<Version>();
}