| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2018 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 MEDIAINTERFACE_H |
| 8 |
#define MEDIAINTERFACE_H |
| 9 |
|
| 10 |
#include "object.h" |
| 11 |
|
| 12 |
#include <QDBusAbstractAdaptor> |
| 13 |
|
| 14 |
class QDBusMessage; |
| 15 |
|
| 16 |
class MediaInterface : public QDBusAbstractAdaptor, public Object |
| 17 |
{ |
| 18 |
Q_OBJECT |
| 19 |
Q_CLASSINFO("D-Bus Interface", "org.bluez.Media1") |
| 20 |
|
| 21 |
public: |
| 22 |
explicit MediaInterface(const QDBusObjectPath &path, QObject *parent = nullptr); |
| 23 |
|
| 24 |
void runAction(const QString &actionName, const QVariantMap &properties); |
| 25 |
|
| 26 |
public Q_SLOTS: |
| 27 |
void RegisterEndpoint(const QDBusObjectPath &path, const QVariantMap &properties, const QDBusMessage &msg); |
| 28 |
void UnregisterEndpoint(const QDBusObjectPath &path, const QDBusMessage &msg); |
| 29 |
|
| 30 |
private: |
| 31 |
void runSetConfigurationAction(const QVariantMap &properties); |
| 32 |
void runSelectConfigurationAction(const QVariantMap &properties); |
| 33 |
void runClearConfigurationAction(const QVariantMap &properties); |
| 34 |
void runReleaseAction(); |
| 35 |
|
| 36 |
QDBusObjectPath m_endpoint; |
| 37 |
QString m_service; |
| 38 |
QVariantMap m_properties; |
| 39 |
}; |
| 40 |
|
| 41 |
#endif |