| 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 |
#include "mediatransportinterface.h" |
| 8 |
#include "objectmanager.h" |
| 9 |
|
| 10 |
#include <QDBusConnection> |
| 11 |
#include <QDBusMessage> |
| 12 |
|
| 13 |
MediaTransportObject::MediaTransportObject(const QDBusObjectPath &path, QObject *parent) |
| 14 |
: QObject(parent) |
| 15 |
{ |
| 16 |
QDBusConnection::sessionBus().registerObject(path.path(), this); |
| 17 |
} |
| 18 |
|
| 19 |
MediaTransportInterface::MediaTransportInterface(const QDBusObjectPath &path, const QVariantMap &properties, QObject *parent) |
| 20 |
: QDBusAbstractAdaptor(parent) |
| 21 |
{ |
| 22 |
setPath(path); |
| 23 |
setObjectParent(parent); |
| 24 |
setProperties(properties); |
| 25 |
setName(QStringLiteral("org.bluez.MediaTransport1")); |
| 26 |
} |
| 27 |
|
| 28 |
quint8 MediaTransportInterface::codec() const |
| 29 |
{ |
| 30 |
return Object::property(QStringLiteral("Codec")).toUInt(); |
| 31 |
} |
| 32 |
|
| 33 |
QByteArray MediaTransportInterface::configuration() const |
| 34 |
{ |
| 35 |
return Object::property(QStringLiteral("Configuration")).toByteArray(); |
| 36 |
} |
| 37 |
|
| 38 |
QString MediaTransportInterface::state() const |
| 39 |
{ |
| 40 |
return Object::property(QStringLiteral("State")).toString(); |
| 41 |
} |
| 42 |
|
| 43 |
quint16 MediaTransportInterface::volume() const |
| 44 |
{ |
| 45 |
return Object::property(QStringLiteral("Volume")).toUInt(); |
| 46 |
} |
| 47 |
|
| 48 |
void MediaTransportInterface::Acquire(const QDBusMessage &msg) |
| 49 |
{ |
| 50 |
} |
| 51 |
|
| 52 |
void MediaTransportInterface::TryAcquire(const QDBusMessage &msg) |
| 53 |
{ |
| 54 |
} |
| 55 |
|
| 56 |
void MediaTransportInterface::Release() |
| 57 |
{ |
| 58 |
} |
| 59 |
|
| 60 |
#include "moc_mediatransportinterface.cpp" |