File indexing completed on 2024-10-06 03:36:44

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 GATTMANAGERINTERFACE_H
0008 #define GATTMANAGERINTERFACE_H
0009 
0010 #include "object.h"
0011 
0012 #include <QDBusAbstractAdaptor>
0013 
0014 class QDBusMessage;
0015 
0016 class GattManagerInterface : public QDBusAbstractAdaptor, public Object
0017 {
0018     Q_OBJECT
0019     Q_CLASSINFO("D-Bus Interface", "org.bluez.GattManager1")
0020 
0021 public:
0022     explicit GattManagerInterface(const QDBusObjectPath &path, QObject *parent = nullptr);
0023 
0024     void runAction(const QString &actionName, const QVariantMap &properties);
0025 
0026 public Q_SLOTS:
0027     void RegisterApplication(const QDBusObjectPath &path, const QVariantMap &options, const QDBusMessage &msg);
0028     void UnregisterApplication(const QDBusObjectPath &path, const QDBusMessage &msg);
0029 
0030 private:
0031     void runGetObjectsAction();
0032     void runReadCharcAction(const QVariantMap &properties);
0033     void runWriteCharcAction(const QVariantMap &properties);
0034 
0035     QDBusObjectPath m_application;
0036     QDBusObjectPath m_characteristic;
0037     QString m_service;
0038     QVariantMap m_properties;
0039 };
0040 
0041 #endif