Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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"
19
#
include
"qbluetoothaddress.h"
20
#
include
"qbluetoothdeviceinfo.h"
21
#
include
"qbluetoothserviceinfo.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
35
namespace
QtBluetoothPrivate
{
36
37
class
OrgBluezServiceInterface;
38
class
OrgBluezProfileManager1Interface
;
39
40
}
// namespace QtBluetoothPrivate
41
42
#
ifdef
QT_WINRT_BLUETOOTH
43
#
include
<
wrl
.
h
>
44
45
namespace
ABI {
46
namespace
Windows {
47
namespace
Devices {
48
namespace
Bluetooth {
49
namespace
Rfcomm {
50
struct
IRfcommServiceProvider;
51
}
52
}
53
}
54
}
55
}
56
#
endif
57
58
QT_BEGIN_NAMESPACE
59
60
class
QBluetoothServiceInfo;
61
62
#
ifdef
QT_HARMONY_BLUETOOTH
63
namespace
QtOhosBluetooth {
64
class
QOhosBluetoothServerProxy;
65
}
66
#
endif
67
68
class
QBluetoothServiceInfoPrivate
69
:
public
QObject
70
{
71
Q_OBJECT
72
public
:
73
QBluetoothServiceInfoPrivate
();
74
~
QBluetoothServiceInfoPrivate
();
75
76
bool
registerService
(
const
QBluetoothAddress &localAdapter = QBluetoothAddress());
77
78
bool
isRegistered
()
const
;
79
80
bool
unregisterService
();
81
82
QBluetoothDeviceInfo
deviceInfo
;
83
QMap
<
quint16
,
QVariant
>
attributes
;
84
85
QBluetoothServiceInfo
::
Sequence
protocolDescriptor
(QBluetoothUuid::ProtocolUuid protocol)
const
;
86
int
serverChannel
()
const
;
87
private
:
88
#
if
QT_CONFIG
(
bluez
)
89
QtBluetoothPrivate
::
OrgBluezProfileManager1Interface
*
service
=
nullptr
;
90
quint32
serviceRecord
;
91
QBluetoothAddress
currentLocalAdapter
;
92
QString
profilePath
;
93
#
endif
94
95
#
ifdef
QT_WINRT_BLUETOOTH
96
Microsoft
::
WRL
::
ComPtr
<
ABI
::
Windows
::
Devices
::
Bluetooth
::
Rfcomm
::
IRfcommServiceProvider
>
serviceProvider
;
97
98
bool
writeSdpAttributes
();
99
#
endif
100
101
#
if
QT_OSX_BLUETOOTH
102
public
:
103
bool
registerService
(
const
QBluetoothServiceInfo
&
info
);
104
105
private
:
106
107
using
SDPRecord
=
DarwinBluetooth
::
ScopedPointer
;
108
SDPRecord
serviceRecord
;
109
quint32
serviceRecordHandle
= 0;
110
#
endif
// QT_OSX_BLUETOOTH
111
112
#
ifdef
QT_HARMONY_BLUETOOTH
113
bool
isRegisteredWithServerProxy
()
const
;
114
115
std
::
weak_ptr
<
QtOhosBluetooth
::
QOhosBluetoothServerProxy
>
registeredServerProxy
;
116
std
::
optional
<
quint64
>
optRegisteredServiceId
;
117
#
endif
118
119
mutable
bool
registered =
false
;
120
};
121
122
QT_END_NAMESPACE
123
124
#
endif
// QBLUETOOTHSERVICEINFO_P_H
QBluetoothServiceInfoPrivate
Definition
qbluetoothserviceinfo_p.h:70
QBluetoothServiceInfoPrivate::protocolDescriptor
QBluetoothServiceInfo::Sequence protocolDescriptor(QBluetoothUuid::ProtocolUuid protocol) const
Definition
qbluetoothserviceinfo.cpp:622
QBluetoothServiceInfoPrivate::attributes
QMap< quint16, QVariant > attributes
Definition
qbluetoothserviceinfo_p.h:83
QBluetoothServiceInfoPrivate::registerService
bool registerService(const QBluetoothAddress &localAdapter=QBluetoothAddress())
Definition
qbluetoothserviceinfo_android.cpp:56
QBluetoothServiceInfoPrivate::unregisterService
bool unregisterService()
Definition
qbluetoothserviceinfo_android.cpp:35
QBluetoothServiceInfoPrivate::serverChannel
int serverChannel() const
Definition
qbluetoothserviceinfo.cpp:642
QBluetoothServiceInfoPrivate::isRegistered
bool isRegistered() const
Definition
qbluetoothserviceinfo_android.cpp:30
QBluetoothServiceInfoPrivate::~QBluetoothServiceInfoPrivate
~QBluetoothServiceInfoPrivate()
Definition
qbluetoothserviceinfo_android.cpp:26
QBluetoothServiceInfoPrivate::deviceInfo
QBluetoothDeviceInfo deviceInfo
Definition
qbluetoothserviceinfo_p.h:82
QtBluetoothPrivate::OrgBluezProfileManager1Interface
Definition
profilemanager1_p.h:41
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtBluetoothPrivate
Definition
adapter1_bluez5.cpp:14
dumpAttributeVariant
static void dumpAttributeVariant(QDebug dbg, const QVariant &var, const QString &indent)
Definition
qbluetoothserviceinfo.cpp:532
qtconnectivity
src
bluetooth
qbluetoothserviceinfo_p.h
Generated on
for Qt by
1.18.0