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
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"
6#include "qbluetoothsocket.h"
7#ifndef QT_IOS_BLUETOOTH
9#endif
10
12
14 QBluetoothServer *parent)
15 : serverType(sType),
16 q_ptr(parent)
17{
18#ifndef QT_IOS_BLUETOOTH
20#endif
23 else
25}
26
28{
29 delete socket;
30}
31
33{
34}
35
37{
41 d->m_lastError = UnsupportedProtocolError;
42 emit errorOccurred(d->m_lastError);
43 return false;
44}
45
46void QBluetoothServer::setMaxPendingConnections(int numConnections)
47{
48 Q_UNUSED(numConnections);
49}
50
52{
53 return false;
54}
55
57{
58 return nullptr;
59}
60
62{
63 return QBluetoothAddress();
64}
65
67{
68 return 0;
69}
70
71void QBluetoothServer::setSecurityFlags(QBluetooth::SecurityFlags security)
72{
73 Q_UNUSED(security);
74}
75
76QBluetooth::SecurityFlags QBluetoothServer::securityFlags() const
77{
79}
80
\inmodule QtBluetooth
QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol serverType, QBluetoothServer *parent)
QBluetoothSocket * socket
\inmodule QtBluetooth
bool hasPendingConnections() const
Returns true if a connection is pending, otherwise false.
void setSecurityFlags(QBluetooth::SecurityFlags security)
Sets the Bluetooth security flags to security.
QBluetoothSocket * nextPendingConnection()
Returns a pointer to the QBluetoothSocket for the next pending connection.
bool listen(const QBluetoothAddress &address=QBluetoothAddress(), quint16 port=0)
Start listening for incoming connections to address on port.
void close()
Closes and resets the listening socket.
void errorOccurred(QBluetoothServer::Error error)
This signal is emitted when an error occurs.
quint16 serverPort() const
Returns the server port number.
QBluetoothAddress serverAddress() const
Returns the server address.
QBluetooth::SecurityFlags securityFlags() const
Returns the Bluetooth security flags.
void setMaxPendingConnections(int numConnections)
Sets the maximum number of pending connections to numConnections.
Protocol
This enum describes the socket protocol used by the service.
\inmodule QtBluetooth
QT_BEGIN_NAMESPACE void printDummyWarning()
Combined button and popup list for selecting options.
EGLOutputPortEXT port
GLuint GLuint64EXT address
#define emit
#define Q_UNUSED(x)
unsigned short quint16
Definition qtypes.h:48
QTcpSocket * socket
[1]