| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef MEDIATRANSPORTINTERFACE_H |
| 8 |
#define MEDIATRANSPORTINTERFACE_H |
| 9 |
|
| 10 |
#include "object.h" |
| 11 |
|
| 12 |
#include <QDBusAbstractAdaptor> |
| 13 |
|
| 14 |
class QDBusMessage; |
| 15 |
|
| 16 |
class MediaTransportObject : public QObject |
| 17 |
{ |
| 18 |
public: |
| 19 |
explicit MediaTransportObject(const QDBusObjectPath &path, QObject *parent = nullptr); |
| 20 |
}; |
| 21 |
|
| 22 |
class MediaTransportInterface : public QDBusAbstractAdaptor, public Object |
| 23 |
{ |
| 24 |
Q_OBJECT |
| 25 |
Q_CLASSINFO("D-Bus Interface", "org.bluez.MediaTransport1") |
| 26 |
Q_PROPERTY(quint8 Codec READ codec) |
| 27 |
Q_PROPERTY(QByteArray Configuration READ configuration) |
| 28 |
Q_PROPERTY(QString State READ state) |
| 29 |
Q_PROPERTY(quint16 Volume READ volume) |
| 30 |
|
| 31 |
public: |
| 32 |
explicit MediaTransportInterface(const QDBusObjectPath &path, const QVariantMap &properties, QObject *parent = nullptr); |
| 33 |
|
| 34 |
quint8 codec() const; |
| 35 |
QByteArray configuration() const; |
| 36 |
QString state() const; |
| 37 |
quint16 volume() const; |
| 38 |
|
| 39 |
public Q_SLOTS: |
| 40 |
void Acquire(const QDBusMessage &msg); |
| 41 |
void TryAcquire(const QDBusMessage &msg); |
| 42 |
void Release(); |
| 43 |
}; |
| 44 |
|
| 45 |
#endif |