File indexing completed on 2024-09-15 03:35:57
0001 /* 0002 * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <mincequi@web.de> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "mediatransportinterface.h" 0008 #include "objectmanager.h" 0009 0010 #include <QDBusConnection> 0011 #include <QDBusMessage> 0012 0013 MediaTransportObject::MediaTransportObject(const QDBusObjectPath &path, QObject *parent) 0014 : QObject(parent) 0015 { 0016 QDBusConnection::sessionBus().registerObject(path.path(), this); 0017 } 0018 0019 MediaTransportInterface::MediaTransportInterface(const QDBusObjectPath &path, const QVariantMap &properties, QObject *parent) 0020 : QDBusAbstractAdaptor(parent) 0021 { 0022 setPath(path); 0023 setObjectParent(parent); 0024 setProperties(properties); 0025 setName(QStringLiteral("org.bluez.MediaTransport1")); 0026 } 0027 0028 quint8 MediaTransportInterface::codec() const 0029 { 0030 return Object::property(QStringLiteral("Codec")).toUInt(); 0031 } 0032 0033 QByteArray MediaTransportInterface::configuration() const 0034 { 0035 return Object::property(QStringLiteral("Configuration")).toByteArray(); 0036 } 0037 0038 QString MediaTransportInterface::state() const 0039 { 0040 return Object::property(QStringLiteral("State")).toString(); 0041 } 0042 0043 quint16 MediaTransportInterface::volume() const 0044 { 0045 return Object::property(QStringLiteral("Volume")).toUInt(); 0046 } 0047 0048 void MediaTransportInterface::Acquire(const QDBusMessage &msg) 0049 { 0050 } 0051 0052 void MediaTransportInterface::TryAcquire(const QDBusMessage &msg) 0053 { 0054 } 0055 0056 void MediaTransportInterface::Release() 0057 { 0058 } 0059 0060 #include "moc_mediatransportinterface.cpp"