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
btdelegates_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
BTDELEGATES_P_H
5
#
define
BTDELEGATES_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
<
QtCore
/
private
/
qglobal_p
.
h
>
19
20
#
if
defined
(
Q_OS_MACOS
)
21
22
#
include
<
IOKit
/
IOReturn
.
h
>
23
24
#
include
<
cstddef
>
25
#
include
<
cstdint
>
26
27
QT_BEGIN_NAMESPACE
28
29
class
QBluetoothAddress;
30
31
namespace
DarwinBluetooth {
32
33
class
DeviceInquiryDelegate
34
{
35
public
:
36
virtual
~DeviceInquiryDelegate();
37
38
virtual
void
inquiryFinished() = 0;
39
virtual
void
error(IOReturn error) = 0;
40
virtual
void
classicDeviceFound(
void
*ioBluetoothDevice) = 0;
41
};
42
43
class
PairingDelegate
44
{
45
public
:
46
using
BluetoothNumericValue = uint32_t;
47
using
BluetoothPasskey = BluetoothNumericValue;
48
49
virtual
~PairingDelegate();
50
51
virtual
void
connecting(
void
*pair) = 0;
52
virtual
void
requestPIN(
void
*pair) = 0;
53
virtual
void
requestUserConfirmation(
void
*pair,
54
BluetoothNumericValue) = 0;
55
virtual
void
passkeyNotification(
void
*pair,
56
BluetoothPasskey passkey) = 0;
57
virtual
void
error(
void
*pair, IOReturn errorCode) = 0;
58
virtual
void
pairingFinished(
void
*pair) = 0;
59
};
60
61
class
SDPInquiryDelegate {
62
public
:
63
virtual
~SDPInquiryDelegate();
64
65
virtual
void
SDPInquiryFinished(
void
*ioBluetoothDevice) = 0;
66
virtual
void
SDPInquiryError(
void
*ioBluetoothDevice, IOReturn errorCode) = 0;
67
};
68
69
// L2CAP and RFCOMM.
70
class
ChannelDelegate
71
{
72
public
:
73
virtual
~ChannelDelegate();
74
75
virtual
void
setChannelError(IOReturn errorCode) = 0;
76
virtual
void
channelOpenComplete() = 0;
77
virtual
void
channelClosed() = 0;
78
79
virtual
void
readChannelData(
void
*data, std::size_t size) = 0;
80
virtual
void
writeComplete() = 0;
81
};
82
83
class
ConnectionMonitor {
84
public
:
85
virtual
~ConnectionMonitor();
86
87
virtual
void
deviceConnected(
const
QBluetoothAddress &address) = 0;
88
virtual
void
deviceDisconnected(
const
QBluetoothAddress &address) = 0;
89
};
90
91
class
SocketListener
92
{
93
public
:
94
virtual
~SocketListener();
95
96
virtual
void
openNotifyRFCOMM(
void
*rfcommChannel) = 0;
97
virtual
void
openNotifyL2CAP(
void
*l2capChannel) = 0;
98
};
99
100
101
}
// namespace DarwinBluetooth
102
103
QT_END_NAMESPACE
104
105
#
endif
// Q_OS_MACOS
106
107
#
endif
// DARWINBTDELEGATES_P_H
QT_BT_MAC_AUTORELEASEPOOL
#define QT_BT_MAC_AUTORELEASEPOOL
Definition
btutility_p.h:78
qtconnectivity
src
bluetooth
darwin
btdelegates_p.h
Generated on
for Qt by
1.18.0