2 * SomePlayer - An alternate music player for Maemo 5
3 * Copyright (C) 2010 Nikolay (somebody) Tischenko <niktischenko@gmail.com>
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.
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.
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.
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>
30 * Implementation of adaptor class DBusAdaptop
33 DBusAdaptop::DBusAdaptop(QObject *parent)
34 : QDBusAbstractAdaptor(parent)
37 setAutoRelaySignals(true);
40 DBusAdaptop::~DBusAdaptop()
45 QString DBusAdaptop::album()
47 // handle method call ru.somebody.someplayer.album
49 QMetaObject::invokeMethod(parent(), "album", Q_RETURN_ARG(QString, out0));
53 QString DBusAdaptop::artist()
55 // handle method call ru.somebody.someplayer.artist
57 QMetaObject::invokeMethod(parent(), "artist", Q_RETURN_ARG(QString, out0));
61 void DBusAdaptop::next()
63 // handle method call ru.somebody.someplayer.next
64 QMetaObject::invokeMethod(parent(), "next");
67 void DBusAdaptop::prev()
69 // handle method call ru.somebody.someplayer.prev
70 QMetaObject::invokeMethod(parent(), "prev");
73 void DBusAdaptop::stop()
75 // handle method call ru.somebody.someplayer.stop
76 QMetaObject::invokeMethod(parent(), "stop");
79 QString DBusAdaptop::title()
81 // handle method call ru.somebody.someplayer.title
83 QMetaObject::invokeMethod(parent(), "title", Q_RETURN_ARG(QString, out0));
87 void DBusAdaptop::toggle()
89 // handle method call ru.somebody.someplayer.toggle
90 QMetaObject::invokeMethod(parent(), "toggle");