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
btl2capchannel_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 BTL2CAPCHANNEL_P_H
5#define BTL2CAPCHANNEL_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/qcore_mac_p.h>
19#include <QtCore/private/qglobal_p.h>
20
21#include <Foundation/Foundation.h>
22
23#include <IOBluetooth/IOBluetooth.h>
24
25#include <cstddef>
26
28
30
31namespace DarwinBluetooth {
32
33class ChannelDelegate;
34
35}
36
38
39@interface QT_MANGLE_NAMESPACE(DarwinBTL2CAPChannel) : NSObject<IOBluetoothL2CAPChannelDelegate>
40
41- (id)initWithDelegate:(QT_PREPEND_NAMESPACE(DarwinBluetooth)::ChannelDelegate *)aDelegate;
42- (id)initWithDelegate:(QT_PREPEND_NAMESPACE(DarwinBluetooth)::ChannelDelegate *)aDelegate
43 channel:(IOBluetoothL2CAPChannel *)aChannel;
44
45- (void)dealloc;
46
47// Async. connection (connect can be called only once).
48- (IOReturn)connectAsyncToDevice:(const QT_PREPEND_NAMESPACE(QBluetoothAddress) &)address
49 withPSM:(BluetoothL2CAPChannelID)psm;
50
51// IOBluetoothL2CAPChannelDelegate:
52- (void)l2capChannelData:(IOBluetoothL2CAPChannel*)l2capChannel
53 data:(void *)dataPointer length:(size_t)dataLength;
54- (void)l2capChannelOpenComplete:(IOBluetoothL2CAPChannel*)
55 l2capChannel status:(IOReturn)error;
56- (void)l2capChannelClosed:(IOBluetoothL2CAPChannel*)l2capChannel;
57- (void)l2capChannelReconfigured:(IOBluetoothL2CAPChannel*)l2capChannel;
58- (void)l2capChannelWriteComplete:(IOBluetoothL2CAPChannel*)l2capChannel
59 refcon:(void*)refcon status:(IOReturn)error;
60- (void)l2capChannelQueueSpaceAvailable:(IOBluetoothL2CAPChannel*)l2capChannel;
61
62//
63- (BluetoothL2CAPPSM)getPSM;
64- (BluetoothDeviceAddress)peerAddress;
65- (NSString *)peerName;
66- (bool)isConnected;
67
68// Writes the given data synchronously over the target L2CAP channel to the remote
69// device.
70// The length of the data may not exceed the L2CAP channel's outgoing MTU.
71// This method will block until the data has been successfully sent to the
72// hardware for transmission (or an error occurs).
73- (IOReturn) writeSync:(void*)data length:(UInt16)length;
74
75// The length of the data may not exceed the L2CAP channel's outgoing MTU.
76// When the data has been successfully passed to the hardware to be transmitted,
77// the delegate method -l2capChannelWriteComplete:refcon:status: will be called.
78// Returns kIOReturnSuccess if the data was buffered successfully.
79- (IOReturn) writeAsync:(void*)data length:(UInt16)length;
80
81@end
82
84
85#endif
\inmodule QtBluetooth
Combined button and popup list for selecting options.
#define QT_NAMESPACE_ALIAS_OBJC_CLASS(__KLASS__)
Definition qcore_mac_p.h:58
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLenum GLuint id
[7]