| 1 |
/* |
| 2 |
* BluezQt - Asynchronous Bluez wrapper library |
| 3 |
* |
| 4 |
* SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <[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_MEDIATRANSPORT_P_H |
| 10 |
#define BLUEZQT_MEDIATRANSPORT_P_H |
| 11 |
|
| 12 |
#include "bluezmediatransport1.h" |
| 13 |
#include "dbusproperties.h" |
| 14 |
#include "mediatransport.h" |
| 15 |
|
| 16 |
namespace BluezQt |
| 17 |
{ |
| 18 |
typedef org::bluez::MediaTransport1 BluezMediaTransport; |
| 19 |
typedef org::freedesktop::DBus::Properties DBusProperties; |
| 20 |
|
| 21 |
class MediaTransportPrivate : public QObject |
| 22 |
{ |
| 23 |
Q_OBJECT |
| 24 |
|
| 25 |
public: |
| 26 |
explicit MediaTransportPrivate(const QString &path, const QVariantMap &properties); |
| 27 |
|
| 28 |
void init(const QVariantMap &properties); |
| 29 |
|
| 30 |
QDBusPendingReply<> setDBusProperty(const QString &name, const QVariant &value); |
| 31 |
|
| 32 |
public Q_SLOTS: |
| 33 |
void onPropertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalidated); |
| 34 |
|
| 35 |
public: |
| 36 |
QWeakPointer<MediaTransport> q; |
| 37 |
OrgBluezMediaTransport1Interface m_dbusInterface; |
| 38 |
DBusProperties *m_dbusProperties; |
| 39 |
|
| 40 |
QString m_path; |
| 41 |
AudioConfiguration m_configuration; |
| 42 |
MediaTransport::State m_state = MediaTransport::State::Idle; |
| 43 |
quint16 m_volume = 0; |
| 44 |
}; |
| 45 |
|
| 46 |
} // namespace BluezQt |
| 47 |
|
| 48 |
#endif |