| 1 | /* |
| 2 | * BluezQt - Asynchronous Bluez wrapper library |
| 3 | * |
| 4 | * SPDX-FileCopyrightText: 2019 Manuel Weichselbaumer <mincequi@web.de> |
| 5 | * |
| 6 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 | */ |
| 8 | |
| 9 | #ifndef BLUEZQT_LEADVERTISEMENTADAPTOR_H |
| 10 | #define BLUEZQT_LEADVERTISEMENTADAPTOR_H |
| 11 | |
| 12 | #include <QDBusAbstractAdaptor> |
| 13 | #include <QDBusVariant> |
| 14 | |
| 15 | namespace BluezQt |
| 16 | { |
| 17 | class LEAdvertisement; |
| 18 | |
| 19 | class LEAdvertisementAdaptor : public QDBusAbstractAdaptor |
| 20 | { |
| 21 | Q_OBJECT |
| 22 | Q_CLASSINFO("D-Bus Interface" , "org.bluez.LEAdvertisement1" ) |
| 23 | Q_PROPERTY(QString Type READ type) |
| 24 | Q_PROPERTY(QStringList ServiceUUIDs READ serviceUuids) |
| 25 | Q_PROPERTY(QHash<QString, QVariant> ServiceData READ serviceData) |
| 26 | Q_PROPERTY(QHash<quint16, QDBusVariant> ManufacturerData READ manufacturerData) |
| 27 | |
| 28 | public: |
| 29 | explicit LEAdvertisementAdaptor(LEAdvertisement *parent); |
| 30 | |
| 31 | QString type() const; |
| 32 | |
| 33 | QStringList serviceUuids() const; |
| 34 | QHash<QString, QVariant> serviceData() const; |
| 35 | QHash<quint16, QDBusVariant> manufacturerData() const; |
| 36 | |
| 37 | public Q_SLOTS: |
| 38 | Q_NOREPLY void Release(); |
| 39 | |
| 40 | private: |
| 41 | LEAdvertisement *m_advertisement; |
| 42 | }; |
| 43 | |
| 44 | } // namespace BluezQt |
| 45 | |
| 46 | #endif // BLUEZQT_LEADVERTISEMENTADAPTOR_H |
| 47 | |