Music Hub ..
A session-wide music playback service
 
Loading...
Searching...
No Matches
media_player2.h
Go to the documentation of this file.
1/*
2 * Copyright © 2014 Canonical Ltd.
3 * Copyright © 2022 UBports Foundation.
4 *
5 * Contact: Alberto Mardegan <mardy@users.sourceforge.net>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License version 3,
9 * as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Authored by: Thomas Voß <thomas.voss@canonical.com>
20 */
21
22#ifndef MPRIS_MEDIA_PLAYER2_H
23#define MPRIS_MEDIA_PLAYER2_H
24
25#include <QDBusContext>
26#include <QObject>
27
28namespace lomiri {
29namespace MediaHubService {
30
31class PlayerImplementation;
32
33}}
34
35namespace mpris
36{
37
38/* Adaptor class exposing the media-hub service through the D-Bus MPRIS
39 * interface.
40 */
41class MediaPlayer2Private;
42class MediaPlayer2: public QObject, protected QDBusContext
43{
44 Q_OBJECT
45
46public:
47 MediaPlayer2(QObject *parent = nullptr);
48 virtual ~MediaPlayer2();
49
53
54 bool registerObject();
55
56private:
57 Q_DECLARE_PRIVATE(MediaPlayer2)
58 QScopedPointer<MediaPlayer2Private> d_ptr;
59};
60
61} // namespace
62
63#endif // MPRIS_MEDIA_PLAYER2_H
virtual ~MediaPlayer2()
lomiri::MediaHubService::PlayerImplementation * player()
void setPlayer(lomiri::MediaHubService::PlayerImplementation *impl)
Definition mpris.h:28