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
btrfcommchannel_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 BTRFCOMMCHANNEL_P_H
5#define BTRFCOMMCHANNEL_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#include <QtCore/private/qcore_mac_p.h>
20
21#include <Foundation/Foundation.h>
22
23#include <IOBluetooth/IOBluetooth.h>
24
25QT_BEGIN_NAMESPACE
26
27class QBluetoothAddress;
28
29namespace DarwinBluetooth {
30
31class ChannelDelegate;
32
33}
34
35QT_END_NAMESPACE
36
37@interface QT_MANGLE_NAMESPACE(DarwinBTRFCOMMChannel) : NSObject<IOBluetoothRFCOMMChannelDelegate>
38
39- (id)initWithDelegate:(QT_PREPEND_NAMESPACE(DarwinBluetooth)::ChannelDelegate *)aDelegate;
40- (id)initWithDelegate:(QT_PREPEND_NAMESPACE(DarwinBluetooth)::ChannelDelegate *)aDelegate
41 channel:(IOBluetoothRFCOMMChannel *)aChannel;
42
43- (void)dealloc;
44
45// A single async connection (can connect only once).
46- (IOReturn)connectAsyncToDevice:(const QT_PREPEND_NAMESPACE(QBluetoothAddress) &)address
47 withChannelID:(BluetoothRFCOMMChannelID)channelID;
48
49- (void)rfcommChannelData:(IOBluetoothRFCOMMChannel*)rfcommChannel
50 data:(void *)dataPointer length:(size_t)dataLength;
51- (void)rfcommChannelOpenComplete:(IOBluetoothRFCOMMChannel*)rfcommChannel
52 status:(IOReturn)error;
53- (void)rfcommChannelClosed:(IOBluetoothRFCOMMChannel*)rfcommChannel;
54- (void)rfcommChannelControlSignalsChanged:(IOBluetoothRFCOMMChannel*)rfcommChannel;
55- (void)rfcommChannelFlowControlChanged:(IOBluetoothRFCOMMChannel*)rfcommChannel;
56- (void)rfcommChannelWriteComplete:(IOBluetoothRFCOMMChannel*)rfcommChannel
57 refcon:(void*)refcon status:(IOReturn)error;
58- (void)rfcommChannelQueueSpaceAvailable:(IOBluetoothRFCOMMChannel*)rfcommChannel;
59
60//
61- (BluetoothRFCOMMChannelID)getChannelID;
62- (BluetoothDeviceAddress)peerAddress;
63- (NSString *)peerName;
64
65- (BluetoothRFCOMMMTU)getMTU;
66
67- (IOReturn) writeSync:(void*)data length:(UInt16)length;
68- (IOReturn) writeAsync:(void*)data length:(UInt16)length;
69
70- (void)handleChannelOpenTimeout;
71
72@end
73
74QT_NAMESPACE_ALIAS_OBJC_CLASS(DarwinBTRFCOMMChannel);
75
76#endif
#define QT_BT_MAC_AUTORELEASEPOOL
Definition btutility_p.h:78
static constexpr auto channelOpenTimeoutMs
Q_FORWARD_DECLARE_OBJC_CLASS(NSString)