1
/***********************************************************************
2
* Copyright 2012 Eike Hein <hein@kde.org>
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; either version 2 of
7
* the License or (at your option) version 3 or any later version
8
* accepted by the membership of KDE e.V. (or its successor approved
9
* by the membership of KDE e.V.), which shall act as a proxy
10
* defined in Section 14 of version 3 of the license.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
***********************************************************************/
21
#ifndef JUK_MEDIAPLAYRER2_H
22
#define JUK_MEDIAPLAYRER2_H
24
#include <QDBusAbstractAdaptor>
26
class MediaPlayer2 : public QDBusAbstractAdaptor
29
Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2") // Docs: http://www.mpris.org/2.1/spec/Root_Node.html
31
Q_PROPERTY(bool CanRaise READ CanRaise)
32
Q_PROPERTY(bool CanQuit READ CanQuit)
34
Q_PROPERTY(bool HasTrackList READ HasTrackList)
36
Q_PROPERTY(QString Identity READ Identity)
37
Q_PROPERTY(QString DesktopEntry READ DesktopEntry)
39
Q_PROPERTY(QStringList SupportedUriSchemes READ SupportedUriSchemes)
40
Q_PROPERTY(QStringList SupportedMimeTypes READ SupportedMimeTypes)
43
explicit MediaPlayer2(QObject* parent);
46
bool CanRaise() const;
49
bool HasTrackList() const;
51
QString Identity() const;
52
QString DesktopEntry() const;
54
QStringList SupportedUriSchemes() const;
55
QStringList SupportedMimeTypes() const;