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
qbluetoothserviceinfo_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QBLUETOOTHSERVICEINFO_P_H
5#define QBLUETOOTHSERVICEINFO_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
18#include "qbluetoothuuid.h"
22
23#include <QMap>
24#include <QVariant>
25
26#ifdef Q_OS_MACOS
27#include "darwin/btraii_p.h"
28#endif
29
30#ifdef QT_HARMONY_BLUETOOTH
31#include <memory>
32#include <optional>
33#endif
34
35namespace QtBluetoothPrivate {
36
37class OrgBluezServiceInterface;
39
40} // namespace QtBluetoothPrivate
41
42#ifdef QT_WINRT_BLUETOOTH
43#include <wrl.h>
44
45namespace ABI {
46 namespace Windows {
47 namespace Devices {
48 namespace Bluetooth {
49 namespace Rfcomm {
50 struct IRfcommServiceProvider;
51 }
52 }
53 }
54 }
55}
56#endif
57
58QT_BEGIN_NAMESPACE
59
60class QBluetoothServiceInfo;
61
62#ifdef QT_HARMONY_BLUETOOTH
63namespace QtOhosBluetooth {
64class QOhosBluetoothServerProxy;
65}
66#endif
67
69 : public QObject
70{
72public:
75
76 bool registerService(const QBluetoothAddress &localAdapter = QBluetoothAddress());
77
78 bool isRegistered() const;
79
80 bool unregisterService();
81
82 QBluetoothDeviceInfo deviceInfo;
84
85 QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const;
86 int serverChannel() const;
87private:
88#if QT_CONFIG(bluez)
93#endif
94
95#ifdef QT_WINRT_BLUETOOTH
97
98 bool writeSdpAttributes();
99#endif
100
101#if QT_OSX_BLUETOOTH
102public:
104
105private:
106
110#endif // QT_OSX_BLUETOOTH
111
112#ifdef QT_HARMONY_BLUETOOTH
113 bool isRegisteredWithServerProxy() const;
114
117#endif
118
119 mutable bool registered = false;
120};
121
122QT_END_NAMESPACE
123
124#endif // QBLUETOOTHSERVICEINFO_P_H
QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const
QMap< quint16, QVariant > attributes
bool registerService(const QBluetoothAddress &localAdapter=QBluetoothAddress())
Combined button and popup list for selecting options.
static void dumpAttributeVariant(QDebug dbg, const QVariant &var, const QString &indent)