Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
28
30
31namespace DarwinBluetooth {
32
33class DeviceInquiryDelegate
34{
35public:
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
43class PairingDelegate
44{
45public:
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
61class SDPInquiryDelegate {
62public:
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.
70class ChannelDelegate
71{
72public:
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
83class ConnectionMonitor {
84public:
85 virtual ~ConnectionMonitor();
86
87 virtual void deviceConnected(const QBluetoothAddress &address) = 0;
88 virtual void deviceDisconnected(const QBluetoothAddress &address) = 0;
89};
90
91class SocketListener
92{
93public:
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
104
105#endif // Q_OS_MACOS
106
107#endif // DARWINBTDELEGATES_P_H
\inmodule QtBluetooth
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint64EXT address