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