File indexing completed on 2024-09-29 03:34:19

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 #ifndef MEDIATRANSPORTINTERFACE_H
0008 #define MEDIATRANSPORTINTERFACE_H
0009 
0010 #include "object.h"
0011 
0012 #include <QDBusAbstractAdaptor>
0013 
0014 class QDBusMessage;
0015 
0016 class MediaTransportObject : public QObject
0017 {
0018 public:
0019     explicit MediaTransportObject(const QDBusObjectPath &path, QObject *parent = nullptr);
0020 };
0021 
0022 class MediaTransportInterface : public QDBusAbstractAdaptor, public Object
0023 {
0024     Q_OBJECT
0025     Q_CLASSINFO("D-Bus Interface", "org.bluez.MediaTransport1")
0026     Q_PROPERTY(quint8 Codec READ codec)
0027     Q_PROPERTY(QByteArray Configuration READ configuration)
0028     Q_PROPERTY(QString State READ state)
0029     Q_PROPERTY(quint16 Volume READ volume)
0030 
0031 public:
0032     explicit MediaTransportInterface(const QDBusObjectPath &path, const QVariantMap &properties, QObject *parent = nullptr);
0033 
0034     quint8 codec() const;
0035     QByteArray configuration() const;
0036     QString state() const;
0037     quint16 volume() const;
0038 
0039 public Q_SLOTS:
0040     void Acquire(const QDBusMessage &msg);
0041     void TryAcquire(const QDBusMessage &msg);
0042     void Release();
0043 };
0044 
0045 #endif