File indexing completed on 2024-09-15 03:35:57
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Ivan Podkurkov <podkiva2@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef GATTSERVICEINTERFACE_H 0008 #define GATTSERVICEINTERFACE_H 0009 0010 #include "object.h" 0011 0012 #include <QDBusAbstractAdaptor> 0013 #include <QStringList> 0014 0015 class QDBusObjectPath; 0016 0017 class GattServiceObject : public QObject 0018 { 0019 public: 0020 explicit GattServiceObject(const QDBusObjectPath &path, QObject *parent = nullptr); 0021 }; 0022 0023 class GattServiceInterface : public QDBusAbstractAdaptor, public Object 0024 { 0025 Q_OBJECT 0026 Q_CLASSINFO("D-Bus Interface", "org.bluez.GattService1") 0027 Q_PROPERTY(QString UUID READ UUID) 0028 Q_PROPERTY(bool Primary READ primary) 0029 Q_PROPERTY(QDBusObjectPath Device READ device) 0030 Q_PROPERTY(QList<QDBusObjectPath> Includes READ includes) 0031 Q_PROPERTY(quint16 Handle READ handle WRITE setHandle) 0032 0033 public: 0034 explicit GattServiceInterface(const QDBusObjectPath &path, const QVariantMap &properties, QObject *parent = nullptr); 0035 0036 QString UUID() const; 0037 0038 bool primary() const; 0039 0040 QDBusObjectPath device() const; 0041 0042 QList<QDBusObjectPath> includes() const; 0043 0044 quint16 handle() const; 0045 void setHandle(const quint16 handle); 0046 0047 private: 0048 0049 friend class DeviceManager; 0050 }; 0051 0052 #endif // GATTSERVICEINTERFACE_H