Qt 6.x
The Qt SDK
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
13{
15#ifndef QT_IOS_BLUETOOTH
17#endif
18}
19
21{
22}
23
25{
27 return false;
28}
29
31{
35}
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
79{
80}
81
83{
84 return QString();
85}
86
88{
89 return QBluetoothAddress();
90}
91
93{
94 return 0;
95}
96
98{
99 return QString();
100}
101
103{
104 return QBluetoothAddress();
105}
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
144{
145}
146
148 QBluetoothSocket::SocketState socketState, QBluetoothSocket::OpenMode openMode)
149{
150 Q_UNUSED(socketDescriptor);
152 Q_UNUSED(socketState);
154 return false;
155}
156
158{
159 return 0;
160}
161
163{
164 return false;
165}
166
168{
169 return 0;
170}
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:127
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:162
GLenum type
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint64EXT address
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
#define Q_UNUSED(x)
unsigned short quint16
Definition qtypes.h:43
long long qint64
Definition qtypes.h:55