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_GATTSERVICEREMOTE_P_H
10#define BLUEZQT_GATTSERVICEREMOTE_P_H
11
12#include <QObject>
13#include <QStringList>
14
15#include "types.h"
16#include "bluezgattservice1.h"
17#include "dbusproperties.h"
18#include "bluezqt_dbustypes.h"
19
20namespace BluezQt
21{
22
23typedef org::bluez::GattService1 BluezGattService;
24typedef org::freedesktop::DBus::Properties DBusProperties;
25
26class GattServiceRemotePrivate : public QObject
27{
28 Q_OBJECT
29
30public:
31 explicit GattServiceRemotePrivate(const QString &path, const QVariantMap &properties, const DevicePtr &device);
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 addGattCharacteristic(const QString &gattCharacteristicPath, const QVariantMap &properties);
39 void removeGattCharacteristic(const QString &gattCharacteristicPath);
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<GattServiceRemote> q;
45 BluezGattService *m_bluezGattService;
46 DBusProperties *m_dbusProperties;
47
48 QString m_uuid;
49 bool m_primary;
50 const DevicePtr m_device;
51 QList<QDBusObjectPath> m_includes;
52 quint16 m_handle;
53 QList<GattCharacteristicRemotePtr> m_characteristics;
54};
55
56} // namespace BluezQt
57
58#endif // BLUEZQT_GATTSERVICEREMOTE_P_H
59

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