| 1 |
/* |
| 2 |
* BluezQt - Asynchronous Bluez wrapper library |
| 3 |
* |
| 4 |
* SPDX-FileCopyrightText: 2015 David Rosca <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef BLUEZQT_MEDIAPLAYER_P_H |
| 10 |
#define BLUEZQT_MEDIAPLAYER_P_H |
| 11 |
|
| 12 |
#include <QObject> |
| 13 |
|
| 14 |
#include "bluezmediaplayer1.h" |
| 15 |
#include "dbusproperties.h" |
| 16 |
#include "mediaplayer.h" |
| 17 |
|
| 18 |
namespace BluezQt |
| 19 |
{ |
| 20 |
typedef org::bluez::MediaPlayer1 BluezMediaPlayer; |
| 21 |
typedef org::freedesktop::DBus::Properties DBusProperties; |
| 22 |
|
| 23 |
class MediaPlayerPrivate : public QObject |
| 24 |
{ |
| 25 |
Q_OBJECT |
| 26 |
|
| 27 |
public: |
| 28 |
explicit MediaPlayerPrivate(const QString &path, const QVariantMap &properties); |
| 29 |
|
| 30 |
void init(const QVariantMap &properties); |
| 31 |
|
| 32 |
QDBusPendingReply<> setDBusProperty(const QString &name, const QVariant &value); |
| 33 |
void propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalidated); |
| 34 |
|
| 35 |
MediaPlayerTrack variantToTrack(const QVariant &variant) const; |
| 36 |
|
| 37 |
QWeakPointer<MediaPlayer> q; |
| 38 |
BluezMediaPlayer *m_bluezMediaPlayer; |
| 39 |
DBusProperties *m_dbusProperties; |
| 40 |
|
| 41 |
QString m_path; |
| 42 |
QString m_name; |
| 43 |
MediaPlayer::Equalizer m_equalizer; |
| 44 |
MediaPlayer::Repeat m_repeat; |
| 45 |
MediaPlayer::Shuffle m_shuffle; |
| 46 |
MediaPlayer::Status m_status; |
| 47 |
MediaPlayerTrack m_track; |
| 48 |
quint32 m_position; |
| 49 |
}; |
| 50 |
|
| 51 |
} // namespace BluezQt |
| 52 |
|
| 53 |
#endif // BLUEZQT_MEDIAPLAYER_P_H |