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
30namespace QtBluetoothPrivate {
31
32class OrgBluezServiceInterface;
34
35} // namespace QtBluetoothPrivate
36
37#ifdef QT_WINRT_BLUETOOTH
38#include <wrl.h>
39
40namespace ABI {
41 namespace Windows {
42 namespace Devices {
43 namespace Bluetooth {
44 namespace Rfcomm {
45 struct IRfcommServiceProvider;
46 }
47 }
48 }
49 }
50}
51#endif
52
53QT_BEGIN_NAMESPACE
54
55class QBluetoothServiceInfo;
56
57
59 : public QObject
60{
62public:
65
66 bool registerService(const QBluetoothAddress &localAdapter = QBluetoothAddress());
67
68 bool isRegistered() const;
69
70 bool unregisterService();
71
72 QBluetoothDeviceInfo deviceInfo;
74
75 QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const;
76 int serverChannel() const;
77private:
78#if QT_CONFIG(bluez)
83#endif
84
85#ifdef QT_WINRT_BLUETOOTH
87
88 bool writeSdpAttributes();
89#endif
90
91#if QT_OSX_BLUETOOTH
92public:
94
95private:
96
100#endif // QT_OSX_BLUETOOTH
101
102 mutable bool registered = false;
103};
104
105QT_END_NAMESPACE
106
107#endif // QBLUETOOTHSERVICEINFO_P_H
QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const
QMap< quint16, QVariant > attributes
bool registerService(const QBluetoothAddress &localAdapter=QBluetoothAddress())
static void dumpAttributeVariant(QDebug dbg, const QVariant &var, const QString &indent)