Fixed broken image issue in taglib
[someplayer] / src / dbusadaptor.cpp
1 /*
2  * SomePlayer - An alternate music player for Maemo 5
3  * Copyright (C) 2010 Nikolay (somebody) Tischenko <niktischenko@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #include "dbusadaptor.h"
21 #include <QtCore/QMetaObject>
22 #include <QtCore/QByteArray>
23 #include <QtCore/QList>
24 #include <QtCore/QMap>
25 #include <QtCore/QString>
26 #include <QtCore/QStringList>
27 #include <QtCore/QVariant>
28
29 /*
30  * Implementation of adaptor class DBusAdaptop
31  */
32
33 DBusAdaptop::DBusAdaptop(QObject *parent)
34     : QDBusAbstractAdaptor(parent)
35 {
36     // constructor
37     setAutoRelaySignals(true);
38 }
39
40 DBusAdaptop::~DBusAdaptop()
41 {
42     // destructor
43 }
44
45 QString DBusAdaptop::album()
46 {
47     // handle method call ru.somebody.someplayer.album
48     QString out0;
49     QMetaObject::invokeMethod(parent(), "album", Q_RETURN_ARG(QString, out0));
50     return out0;
51 }
52
53 QString DBusAdaptop::artist()
54 {
55     // handle method call ru.somebody.someplayer.artist
56     QString out0;
57     QMetaObject::invokeMethod(parent(), "artist", Q_RETURN_ARG(QString, out0));
58     return out0;
59 }
60
61 void DBusAdaptop::next()
62 {
63     // handle method call ru.somebody.someplayer.next
64     QMetaObject::invokeMethod(parent(), "next");
65 }
66
67 void DBusAdaptop::prev()
68 {
69     // handle method call ru.somebody.someplayer.prev
70     QMetaObject::invokeMethod(parent(), "prev");
71 }
72
73 void DBusAdaptop::stop()
74 {
75     // handle method call ru.somebody.someplayer.stop
76     QMetaObject::invokeMethod(parent(), "stop");
77 }
78
79 QString DBusAdaptop::title()
80 {
81     // handle method call ru.somebody.someplayer.title
82     QString out0;
83     QMetaObject::invokeMethod(parent(), "title", Q_RETURN_ARG(QString, out0));
84     return out0;
85 }
86
87 void DBusAdaptop::toggle()
88 {
89     // handle method call ru.somebody.someplayer.toggle
90     QMetaObject::invokeMethod(parent(), "toggle");
91 }
92