Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qleadvertiser_bluezdbus_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QLEADVERTISER_BLUEZDBUS_P_H
5#define QLEADVERTISER_BLUEZDBUS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
20
21QT_REQUIRE_CONFIG(bluez);
22
23#include <QtCore/QObject>
24
25namespace QtBluetoothPrivate {
26
29
30} // namespace QtBluetoothPrivate
31
32QT_BEGIN_NAMESPACE
33
34class QLeDBusAdvertiser : public QObject
35{
36 Q_OBJECT
37
38public:
39 QLeDBusAdvertiser(const QLowEnergyAdvertisingParameters &params,
40 const QLowEnergyAdvertisingData &advertisingData,
41 const QLowEnergyAdvertisingData &scanResponseData,
42 const QString &hostAdapterPath,
43 QObject* parent = nullptr);
44 ~QLeDBusAdvertiser() override;
45
46 void startAdvertising();
47 void stopAdvertising();
48
49 Q_INVOKABLE void Release();
50
51signals:
52 void errorOccurred();
53
54private:
55 void setDataForDBus();
56 void setAdvertisingParamsForDBus();
57 void setAdvertisementDataForDBus();
58
59private:
60 const QLowEnergyAdvertisingParameters m_advParams;
61 QLowEnergyAdvertisingData m_advData;
62 const QString m_advObjectPath;
63 QtBluetoothPrivate::OrgBluezLEAdvertisement1Adaptor* const m_advDataDBus;
64 QtBluetoothPrivate::OrgBluezLEAdvertisingManager1Interface* const m_advManager;
65 bool m_advertising = false;
66};
67
68QT_END_NAMESPACE
69
70#endif // QLEADVERTISER_BLUEZDBUS_P_H
static constexpr quint16 advDataMinIntervalMs
static constexpr auto advObjectPathTemplate
static constexpr auto advDataTypePeripheral
static constexpr auto advDataTypeBroadcast
static constexpr auto bluezErrorFailed
static constexpr quint16 advDataMaxIntervalMs
static constexpr auto bluezService
static constexpr auto advDataTXPower