File indexing completed on 2024-07-14 03:50:57

0001 /*
0002  * SPDX-FileCopyrightText: 2018 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 MEDIAINTERFACE_H
0008 #define MEDIAINTERFACE_H
0009 
0010 #include "object.h"
0011 
0012 #include <QDBusAbstractAdaptor>
0013 
0014 class QDBusMessage;
0015 
0016 class MediaInterface : public QDBusAbstractAdaptor, public Object
0017 {
0018     Q_OBJECT
0019     Q_CLASSINFO("D-Bus Interface", "org.bluez.Media1")
0020 
0021 public:
0022     explicit MediaInterface(const QDBusObjectPath &path, QObject *parent = nullptr);
0023 
0024     void runAction(const QString &actionName, const QVariantMap &properties);
0025 
0026 public Q_SLOTS:
0027     void RegisterEndpoint(const QDBusObjectPath &path, const QVariantMap &properties, const QDBusMessage &msg);
0028     void UnregisterEndpoint(const QDBusObjectPath &path, const QDBusMessage &msg);
0029 
0030 private:
0031     void runSetConfigurationAction(const QVariantMap &properties);
0032     void runSelectConfigurationAction(const QVariantMap &properties);
0033     void runClearConfigurationAction(const QVariantMap &properties);
0034     void runReleaseAction();
0035 
0036     QDBusObjectPath m_endpoint;
0037     QString m_service;
0038     QVariantMap m_properties;
0039 };
0040 
0041 #endif