File indexing completed on 2024-04-28 03:52:02

0001 /*
0002  * BluezQt - Asynchronous BlueZ wrapper library
0003  *
0004  * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <mincequi@web.de>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007  */
0008 
0009 #ifndef BLUEZQT_GATTCHARACTERISTIC_P_H
0010 #define BLUEZQT_GATTCHARACTERISTIC_P_H
0011 
0012 #include "dbusproperties.h"
0013 #include "gattcharacteristic.h"
0014 
0015 #include <memory>
0016 
0017 namespace BluezQt
0018 {
0019 
0020 typedef org::freedesktop::DBus::Properties DBusProperties;
0021 
0022 class GattServicePrivate;
0023 
0024 class GattCharacterisiticPrivate
0025 {
0026 public:
0027     GattCharacterisiticPrivate(const QString &uuid, const QStringList &flags, const GattService *service);
0028 
0029     QString m_uuid;
0030     const GattService *m_service;
0031     bool m_notifying;
0032     QStringList m_flags;
0033 
0034     bool m_canNotify;
0035     QDBusObjectPath m_objectPath;
0036     QByteArray m_value;
0037     GattCharacteristic::ReadCallback m_readCallback = nullptr;
0038     std::unique_ptr<DBusProperties> m_dbusProperties;
0039 
0040     void emitPropertyChanged(QVariantMap updatedProperties);
0041 };
0042 
0043 } // namespace BluezQt
0044 
0045 #endif