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
qbluetoothserver_p.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 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
#
include
"qbluetoothserver.h"
5
#
include
"qbluetoothserver_p.h"
6
#
include
"qbluetoothsocket.h"
7
#
ifndef
QT_IOS_BLUETOOTH
8
#
include
"dummy/dummy_helper_p.h"
9
#
endif
10
11
QT_BEGIN_NAMESPACE
12
13
QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType,
14
QBluetoothServer *parent)
15
: serverType(sType),
16
q_ptr(parent)
17
{
18
#
ifndef
QT_IOS_BLUETOOTH
19
printDummyWarning();
20
#
endif
21
if
(sType == QBluetoothServiceInfo::RfcommProtocol)
22
socket =
new
QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
23
else
24
socket =
new
QBluetoothSocket(QBluetoothServiceInfo::L2capProtocol);
25
}
26
27
QBluetoothServerPrivate
::~
QBluetoothServerPrivate
()
28
{
29
delete
socket
;
30
}
31
32
void
QBluetoothServer::close()
33
{
34
}
35
36
bool
QBluetoothServer::listen(
const
QBluetoothAddress &address, quint16 port)
37
{
38
Q_UNUSED(address);
39
Q_UNUSED(port);
40
Q_D(QBluetoothServer);
41
d->m_lastError = UnsupportedProtocolError;
42
emit errorOccurred(d->m_lastError);
43
return
false
;
44
}
45
46
void
QBluetoothServer::setMaxPendingConnections(
int
numConnections)
47
{
48
Q_UNUSED(numConnections);
49
}
50
51
bool
QBluetoothServer::hasPendingConnections()
const
52
{
53
return
false
;
54
}
55
56
QBluetoothSocket *QBluetoothServer::nextPendingConnection()
57
{
58
return
nullptr
;
59
}
60
61
QBluetoothAddress QBluetoothServer::serverAddress()
const
62
{
63
return
QBluetoothAddress();
64
}
65
66
quint16 QBluetoothServer::serverPort()
const
67
{
68
return
0;
69
}
70
71
void
QBluetoothServer::setSecurityFlags(QBluetooth::SecurityFlags security)
72
{
73
Q_UNUSED(security);
74
}
75
76
QBluetooth::SecurityFlags QBluetoothServer::securityFlags()
const
77
{
78
return
QBluetooth::Security::NoSecurity;
79
}
80
81
QT_END_NAMESPACE
QBluetoothServerPrivate
Definition
qbluetoothserver_p.h:69
QBluetoothServerPrivate::~QBluetoothServerPrivate
~QBluetoothServerPrivate()
Definition
qbluetoothserver_android.cpp:30
QBluetoothServerPrivate::socket
QBluetoothSocket * socket
Definition
qbluetoothserver_p.h:85
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtconnectivity
src
bluetooth
qbluetoothserver_p.cpp
Generated on
for Qt by
1.18.0