1 | /* |
2 | * BluezQt - Asynchronous Bluez wrapper library |
3 | * |
4 | * SPDX-FileCopyrightText: 2022 Pontus Sjögren |
5 | * |
6 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
7 | */ |
8 | |
9 | #ifndef GATTDESCRIPTORADAPTOR_H |
10 | #define GATTDESCRIPTORADAPTOR_H |
11 | |
12 | #include <QObject> |
13 | #include <QStringList> |
14 | |
15 | #include <QDBusAbstractAdaptor> |
16 | #include <QDBusObjectPath> |
17 | |
18 | namespace BluezQt |
19 | { |
20 | |
21 | class GattDescriptor; |
22 | |
23 | class GattDescriptorAdaptor : public QDBusAbstractAdaptor |
24 | { |
25 | Q_OBJECT |
26 | Q_CLASSINFO("D-Bus Interface" , "org.bluez.GattDescriptor1" ) |
27 | Q_PROPERTY(QString UUID READ uuid) |
28 | Q_PROPERTY(QDBusObjectPath Characteristic READ characteristic) |
29 | Q_PROPERTY(QByteArray Value READ value) |
30 | Q_PROPERTY(QStringList Flags READ flags) |
31 | |
32 | public: |
33 | explicit GattDescriptorAdaptor(GattDescriptor *parent); |
34 | |
35 | QString uuid() const; |
36 | QDBusObjectPath characteristic() const; |
37 | QByteArray value() const; |
38 | QStringList flags() const; |
39 | |
40 | public Q_SLOTS: |
41 | |
42 | QByteArray ReadValue(const QVariantMap &options); |
43 | void WriteValue(QByteArray value); |
44 | |
45 | private: |
46 | GattDescriptor *m_gattDescriptor; |
47 | }; |
48 | |
49 | } |
50 | |
51 | #endif |
52 | |