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
qbluetoothsocket_dummy.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 "qbluetoothsocket.h"
6#ifndef QT_IOS_BLUETOOTH
8#endif
9
11
19
23
29
36
38 const QBluetoothServiceInfo &service, QIODevice::OpenMode openMode)
39{
40 Q_UNUSED(service);
42
44
45 qWarning() << "Using non-functional QBluetoothSocketPrivateDummy";
46 errorString = QBluetoothSocket::tr("Socket type not supported");
48}
49
51 const QBluetoothAddress &address, const QBluetoothUuid &uuid, QIODevice::OpenMode openMode)
52{
54 Q_UNUSED(uuid);
56
58
59 qWarning() << "Using non-functional QBluetoothSocketPrivateDummy";
60 errorString = QBluetoothSocket::tr("Socket type not supported");
62}
63
65 const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode)
66{
70
72
73 qWarning() << "Using non-functional QBluetoothSocketPrivateDummy";
74 errorString = QBluetoothSocket::tr("Socket type not supported");
76}
77
81
86
91
96
101
106
108{
109 return 0;
110}
111
113{
114 Q_UNUSED(data);
115 Q_UNUSED(maxSize);
116
117 Q_Q(QBluetoothSocket);
118
120 errorString = QBluetoothSocket::tr("Cannot write while not connected");
122 return -1;
123 }
124 return -1;
125}
126
128{
129 Q_UNUSED(data);
130 Q_UNUSED(maxSize);
131
132 Q_Q(QBluetoothSocket);
133
135 errorString = QBluetoothSocket::tr("Cannot read while not connected");
137 return -1;
138 }
139
140 return -1;
141}
142
146
148 QBluetoothSocket::SocketState socketState, QBluetoothSocket::OpenMode openMode)
149{
150 Q_UNUSED(socketDescriptor);
152 Q_UNUSED(socketState);
154 return false;
155}
156
161
163{
164 return false;
165}
166
171
\inmodule QtBluetooth
\inmodule QtBluetooth
Protocol
This enum describes the socket protocol used by the service.
QBluetoothSocket::OpenMode openMode
QBluetooth::SecurityFlags secFlags
QBluetoothServiceInfo::Protocol socketType
QBluetoothSocket::SocketState state
QBluetoothAddress localAddress() const override
void connectToService(const QBluetoothServiceInfo &service, QIODevice::OpenMode openMode) override
void connectToServiceHelper(const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode) override
QBluetoothAddress peerAddress() const override
qint64 writeData(const char *data, qint64 maxSize) override
bool setSocketDescriptor(int socketDescriptor, QBluetoothServiceInfo::Protocol socketType, QBluetoothSocket::SocketState socketState=QBluetoothSocket::SocketState::ConnectedState, QBluetoothSocket::OpenMode openMode=QBluetoothSocket::ReadWrite) override
bool ensureNativeSocket(QBluetoothServiceInfo::Protocol type) override
qint64 readData(char *data, qint64 maxSize) override
\inmodule QtBluetooth
SocketState
This enum describes the state of the Bluetooth socket.
\inmodule QtBluetooth
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QT_BEGIN_NAMESPACE void printDummyWarning()
Combined button and popup list for selecting options.
EGLOutputPortEXT port
static QT_BEGIN_NAMESPACE const char * socketType(QSocketNotifier::Type type)
#define qWarning
Definition qlogging.h:166
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum type
GLuint GLuint64EXT address
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
#define Q_UNUSED(x)
unsigned short quint16
Definition qtypes.h:48
long long qint64
Definition qtypes.h:60