source: smplayer/trunk/src/mpris2/mediaplayer2.h@ 188

Last change on this file since 188 was 188, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update trunk to version 17.1.0

File size: 3.3 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18
19
20/***********************************************************************
21 * Copyright 2012 Eike Hein <hein@kde.org>
22 *
23 * This program is free software; you can redistribute it and/or
24 * modify it under the terms of the GNU General Public License as
25 * published by the Free Software Foundation; either version 2 of
26 * the License or (at your option) version 3 or any later version
27 * accepted by the membership of KDE e.V. (or its successor approved
28 * by the membership of KDE e.V.), which shall act as a proxy
29 * defined in Section 14 of version 3 of the license.
30 *
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
35 *
36 * You should have received a copy of the GNU General Public License
37 * along with this program. If not, see <http://www.gnu.org/licenses/>.
38 ***********************************************************************/
39
40#ifndef MEDIAPLAYER2_H
41#define MEDIAPLAYER2_H
42
43#include <QDBusAbstractAdaptor>
44#include <QStringList>
45
46class BaseGui;
47
48class MediaPlayer2 : public QDBusAbstractAdaptor
49{
50 Q_OBJECT
51 Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2") // Docs: http://www.mpris.org/2.1/spec/Root_Node.html
52
53 Q_PROPERTY(bool CanQuit READ CanQuit)
54 Q_PROPERTY(bool CanRaise READ CanRaise)
55
56 Q_PROPERTY(bool Fullscreen READ Fullscreen WRITE setFullscreen)
57 Q_PROPERTY(bool CanSetFullscreen READ CanSetFullscreen)
58
59 Q_PROPERTY(bool HasTrackList READ HasTrackList)
60
61 Q_PROPERTY(QString Identity READ Identity)
62 Q_PROPERTY(QString DesktopEntry READ DesktopEntry)
63
64 Q_PROPERTY(QStringList SupportedUriSchemes READ SupportedUriSchemes)
65 Q_PROPERTY(QStringList SupportedMimeTypes READ SupportedMimeTypes)
66
67 public:
68 explicit MediaPlayer2(BaseGui* gui, QObject* parent);
69 ~MediaPlayer2();
70
71 bool CanQuit() const;
72 bool CanRaise() const;
73
74 bool Fullscreen() const;
75 void setFullscreen(bool fullscreen) const;
76 bool CanSetFullscreen() const;
77
78 bool HasTrackList() const;
79
80 QString Identity() const;
81 QString DesktopEntry() const;
82
83 QStringList SupportedUriSchemes() const;
84 QStringList SupportedMimeTypes() const;
85
86 public slots:
87 void Raise() const;
88 void Quit() const;
89
90 private slots:
91 void emitFullscreenChange(bool fullscreen) const;
92 private:
93 BaseGui* m_gui;
94};
95
96#endif
Note: See TracBrowser for help on using the repository browser.