1/*
2 * BluezQt - Asynchronous Bluez wrapper library
3 *
4 * SPDX-FileCopyrightText: 2021 Ivan Podkurkov <podkiva2@gmail.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#ifndef BLUEZQT_GATTCHARACTERISTICREMOTE_P_H
10#define BLUEZQT_GATTCHARACTERISTICREMOTE_P_H
11
12#include <QObject>
13#include <QStringList>
14
15#include "types.h"
16#include "bluezgattcharacteristic1.h"
17#include "dbusproperties.h"
18#include "bluezqt_dbustypes.h"
19
20namespace BluezQt
21{
22
23typedef org::bluez::GattCharacteristic1 BluezGattCharacteristic;
24typedef org::freedesktop::DBus::Properties DBusProperties;
25
26class GattCharacteristicRemotePrivate : public QObject
27{
28 Q_OBJECT
29
30public:
31 explicit GattCharacteristicRemotePrivate(const QString &path, const QVariantMap &properties, const GattServiceRemotePtr &service);
32
33 void init(const QVariantMap &properties);
34
35 void interfacesAdded(const QString &path, const QVariantMapMap &interfaces);
36 void interfacesRemoved(const QString &path, const QStringList &interfaces);
37
38 void addGattDescriptor(const QString &gattDescriptorPath, const QVariantMap &properties);
39 void removeGattDescriptor(const QString &gattDescriptorPath);
40
41 QDBusPendingReply<> setDBusProperty(const QString &name, const QVariant &value);
42 void propertiesChanged(const QString &path, const QString &interface, const QVariantMap &changed, const QStringList &invalidated);
43
44 QWeakPointer<GattCharacteristicRemote> q;
45 BluezGattCharacteristic *m_bluezGattCharacteristic;
46 DBusProperties *m_dbusProperties;
47
48 QString m_uuid;
49 QByteArray m_value;
50 bool m_writeAcquired;
51 bool m_notifyAcquired;
52 bool m_notifying;
53 QStringList m_flags;
54 quint16 m_handle;
55 quint16 m_MTU;
56 const GattServiceRemotePtr m_service;
57 QList<GattDescriptorRemotePtr> m_descriptors;
58};
59
60} // namespace BluezQt
61
62#endif // BLUEZQT_GATTCHARACTERISTIC_P_H
63

source code of bluez-qt/src/gattcharacteristicremote_p.h