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
btsocketlistener_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 BTSOCKETLISTENER_P_H
5#define BTSOCKETLISTENER_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
27namespace DarwinBluetooth {
28
29class SocketListener;
30
31}
32
33QT_END_NAMESPACE
34
35// A single DarwinBTSocketListener can be started only once with
36// RFCOMM or L2CAP protocol. It must be deleted to stop listening.
37
38@interface QT_MANGLE_NAMESPACE(DarwinBTSocketListener) : NSObject
39
40- (id)initWithListener:(QT_PREPEND_NAMESPACE(DarwinBluetooth::SocketListener) *)aDelegate;
41- (void)dealloc;
42
43- (bool)listenRFCOMMConnectionsWithChannelID:(BluetoothRFCOMMChannelID)channelID;
44- (bool)listenL2CAPConnectionsWithPSM:(BluetoothL2CAPPSM)psm;
45
46- (void)rfcommOpenNotification:(IOBluetoothUserNotification *)notification
47 channel:(IOBluetoothRFCOMMChannel *)newChannel;
48
49- (void)l2capOpenNotification:(IOBluetoothUserNotification *)notification
50 channel:(IOBluetoothL2CAPChannel *)newChannel;
51
52- (quint16)port;
53
54@end
55
56QT_NAMESPACE_ALIAS_OBJC_CLASS(DarwinBTSocketListener);
57
58#endif