BluezQt 5.109.0
leadvertisement.h
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_LEADVERTISEMENT_H
10#define BLUEZQT_LEADVERTISEMENT_H
11
12#include <QObject>
13
14#include "bluezqt_export.h"
15
16class QDBusObjectPath;
17
18namespace BluezQt
19{
27class BLUEZQT_EXPORT LEAdvertisement : public QObject
28{
29 Q_OBJECT
30
31public:
37 explicit LEAdvertisement(const QStringList &serviceUuids, QObject *parent = nullptr);
38
42 ~LEAdvertisement() override;
43
49 virtual QStringList serviceUuids() const;
50
56 QHash<QString, QByteArray> serviceData() const;
57
64 void setServiceData(const QHash<QString, QByteArray> &data);
65
74 virtual void release();
75
76protected:
86 virtual QDBusObjectPath objectPath() const;
87
88private:
89 class LEAdvertisementPrivate *const d;
90
91 friend class LEAdvertisingManager;
92};
93
94} // namespace BluezQt
95
96#endif // BLUEZQT_LEADVERTISEMENT_H
Bluetooth LE advertisement.
Definition leadvertisement.h:28
QHash< QString, QByteArray > serviceData() const
Returns the service data included in the advertisement.
virtual void release()
Indicates that the LEAdvertisement was unregistered.
void setServiceData(const QHash< QString, QByteArray > &data)
Sets the service data to include in the advertisement.
~LEAdvertisement() override
Destroys a LEAdvertisement object.
virtual QStringList serviceUuids() const
List of UUIDs to include in the "Service UUID" field of the Advertising Data.
LEAdvertisement(const QStringList &serviceUuids, QObject *parent=nullptr)
Creates a new LEAdvertisement object.
virtual QDBusObjectPath objectPath() const
D-Bus object path of the advertisement.
Bluetooth LE advertising manager.
Definition leadvertisingmanager.h:33