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 | Q_PROPERTY(QString UUID READ uuid) |
25 | Q_PROPERTY(QDBusObjectPath Service READ service) |
26 | Q_PROPERTY(QStringList Flags READ flags) |
27 | |
28 | public: |
29 | explicit GattCharacteristicAdaptor(GattCharacteristic *parent); |
30 | |
31 | QString uuid() const; |
32 | |
33 | QDBusObjectPath service() const; |
34 | |
35 | QStringList flags() const; |
36 | |
37 | public Q_SLOTS: |
38 | QByteArray ReadValue(const QVariantMap &options); |
39 | void WriteValue(const QByteArray &value, const QVariantMap &options); |
40 | void StartNotify(); |
41 | void StopNotify(); |
42 | |
43 | private: |
44 | GattCharacteristic *m_gattCharacteristic; |
45 | }; |
46 | |
47 | } // namespace BluezQt |
48 | |
49 | #endif |
50 | |