Fixed broken image issue in taglib
[someplayer] / src / dbusadaptor.h
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 #ifndef DBUSADAPTOR
21 #define DBUSADAPTOR
22
23 #include <QtCore/QObject>
24 #include <QtDBus/QtDBus>
25 class QByteArray;
26 template<class T> class QList;
27 template<class Key, class Value> class QMap;
28 class QString;
29 class QStringList;
30 class QVariant;
31
32 /*
33  * Adaptor class for interface ru.somebody.someplayer
34  */
35 class DBusAdaptop: public QDBusAbstractAdaptor
36 {
37     Q_OBJECT
38     Q_CLASSINFO("D-Bus Interface", "ru.somebody.someplayer")
39     Q_CLASSINFO("D-Bus Introspection", ""
40 "  <interface name=\"ru.somebody.someplayer\">\n"
41 "    <method name=\"prev\">\n"
42 "      <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
43 "    </method>\n"
44 "    <method name=\"next\">\n"
45 "      <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
46 "    </method>\n"
47 "    <method name=\"toggle\">\n"
48 "      <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
49 "    </method>\n"
50 "    <method name=\"stop\">\n"
51 "      <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n"
52 "    </method>\n"
53 "    <method name=\"artist\">\n"
54 "      <arg direction=\"out\" type=\"s\"/>\n"
55 "    </method>\n"
56 "    <method name=\"album\">\n"
57 "      <arg direction=\"out\" type=\"s\"/>\n"
58 "    </method>\n"
59 "    <method name=\"title\">\n"
60 "      <arg direction=\"out\" type=\"s\"/>\n"
61 "    </method>\n"
62 "  </interface>\n"
63         "")
64 public:
65     DBusAdaptop(QObject *parent);
66     virtual ~DBusAdaptop();
67
68 public: // PROPERTIES
69 public Q_SLOTS: // METHODS
70     QString album();
71     QString artist();
72     Q_NOREPLY void next();
73     Q_NOREPLY void prev();
74     Q_NOREPLY void stop();
75     QString title();
76     Q_NOREPLY void toggle();
77 Q_SIGNALS: // SIGNALS
78 };
79
80 #endif