File indexing completed on 2024-12-01 12:29:47
0001 /* 0002 * BluezQt - Asynchronous Bluez wrapper library 0003 * 0004 * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef BLUEZQT_GATTCHARACTERISTICADAPTOR_H 0010 #define BLUEZQT_GATTCHARACTERISTICADAPTOR_H 0011 0012 #include <QDBusAbstractAdaptor> 0013 0014 class QDBusObjectPath; 0015 0016 namespace BluezQt 0017 { 0018 class GattCharacteristic; 0019 0020 class GattCharacteristicAdaptor : public QDBusAbstractAdaptor 0021 { 0022 Q_OBJECT 0023 Q_CLASSINFO("D-Bus Interface", "org.bluez.GattCharacteristic1") 0024 Q_PROPERTY(QString UUID READ uuid) 0025 Q_PROPERTY(QDBusObjectPath Service READ service) 0026 Q_PROPERTY(QStringList Flags READ flags) 0027 0028 public: 0029 explicit GattCharacteristicAdaptor(GattCharacteristic *parent); 0030 0031 QString uuid() const; 0032 0033 QDBusObjectPath service() const; 0034 0035 QStringList flags() const; 0036 0037 public Q_SLOTS: 0038 QByteArray ReadValue(const QVariantMap &options); 0039 void WriteValue(const QByteArray &value, const QVariantMap &options); 0040 void StartNotify(); 0041 void StopNotify(); 0042 0043 private: 0044 GattCharacteristic *m_gattCharacteristic; 0045 }; 0046 0047 } // namespace BluezQt 0048 0049 #endif