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
18namespace BluezQt
19{
20
21class GattDescriptor;
22
23class 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
32public:
33 explicit GattDescriptorAdaptor(GattDescriptor *parent);
34
35 QString uuid() const;
36 QDBusObjectPath characteristic() const;
37 QByteArray value() const;
38 QStringList flags() const;
39
40public Q_SLOTS:
41
42 QByteArray ReadValue(const QVariantMap &options);
43 void WriteValue(QByteArray value);
44
45private:
46 GattDescriptor *m_gattDescriptor;
47};
48
49}
50
51#endif
52

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