6#ifndef QT_IOS_BLUETOOTH
7#include "dummy/dummy_helper_p.h"
12QBluetoothSocketPrivateDummy::QBluetoothSocketPrivateDummy()
14 secFlags = QBluetooth::Security::NoSecurity;
15#ifndef QT_IOS_BLUETOOTH
38 const QBluetoothServiceInfo &service, QIODevice::OpenMode openMode)
43 Q_Q(QBluetoothSocket);
45 qWarning() <<
"Using non-functional QBluetoothSocketPrivateDummy";
46 errorString = QBluetoothSocket::tr(
"Socket type not supported");
47 q->setSocketError(QBluetoothSocket::SocketError::UnsupportedProtocolError);
51 const QBluetoothAddress &address,
const QBluetoothUuid &uuid, QIODevice::OpenMode openMode)
57 Q_Q(QBluetoothSocket);
59 qWarning() <<
"Using non-functional QBluetoothSocketPrivateDummy";
60 errorString = QBluetoothSocket::tr(
"Socket type not supported");
61 q->setSocketError(QBluetoothSocket::SocketError::UnsupportedProtocolError);
65 const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode)
71 Q_Q(QBluetoothSocket);
73 qWarning() <<
"Using non-functional QBluetoothSocketPrivateDummy";
74 errorString = QBluetoothSocket::tr(
"Socket type not supported");
75 q->setSocketError(QBluetoothSocket::SocketError::UnsupportedProtocolError);
89 return QBluetoothAddress();
104 return QBluetoothAddress();
117 Q_Q(QBluetoothSocket);
119 if (state != QBluetoothSocket::SocketState::ConnectedState) {
120 errorString = QBluetoothSocket::tr(
"Cannot write while not connected");
121 q->setSocketError(QBluetoothSocket::SocketError::OperationError);
132 Q_Q(QBluetoothSocket);
134 if (state != QBluetoothSocket::SocketState::ConnectedState) {
135 errorString = QBluetoothSocket::tr(
"Cannot read while not connected");
136 q->setSocketError(QBluetoothSocket::SocketError::OperationError);
148 QBluetoothSocket::SocketState socketState, QBluetoothSocket::OpenMode openMode)
150 Q_UNUSED(socketDescriptor);
151 Q_UNUSED(socketType);
152 Q_UNUSED(socketState);
QString peerName() const override
~QBluetoothSocketPrivateDummy() override
QBluetoothAddress localAddress() const override
void connectToService(const QBluetoothServiceInfo &service, QIODevice::OpenMode openMode) override
void connectToServiceHelper(const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode) override
bool canReadLine() const override
qint64 bytesAvailable() const override
friend class QBluetoothServerPrivate
QBluetoothAddress peerAddress() const override
void connectToService(const QBluetoothAddress &address, const QBluetoothUuid &uuid, QIODevice::OpenMode openMode) override
qint64 writeData(const char *data, qint64 maxSize) override
quint16 peerPort() const override
bool setSocketDescriptor(int socketDescriptor, QBluetoothServiceInfo::Protocol socketType, QBluetoothSocket::SocketState socketState=QBluetoothSocket::SocketState::ConnectedState, QBluetoothSocket::OpenMode openMode=QBluetoothSocket::ReadWrite) override
quint16 localPort() const override
void connectToService(const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode) override
qint64 readData(char *data, qint64 maxSize) override
QString localName() const override
qint64 bytesToWrite() const override