4#ifndef QBLUETOOTHSOCKET_H
5#define QBLUETOOTHSOCKET_H
7#include <QtBluetooth/qtbluetoothglobal.h>
9#include <QtBluetooth/qbluetooth.h>
10#include <QtBluetooth/qbluetoothaddress.h>
11#include <QtBluetooth/qbluetoothuuid.h>
12#include <QtBluetooth/qbluetoothserviceinfo.h>
14#include <QtCore/qiodevice.h>
25 Q_DECLARE_PRIVATE(QBluetoothSocketBase)
29 friend class QBluetoothSocketPrivateDarwin;
34 friend class QBluetoothSocketPrivateWin;
53 RemoteHostClosedError,
57 UnsupportedProtocolError,
59 MissingPermissionsError
69 void close()
override;
71 bool isSequential()
const override;
73 qint64 bytesAvailable()
const override;
74 qint64 bytesToWrite()
const override;
76 bool canReadLine()
const override;
82 OpenMode
mode = ReadWrite)
86 void disconnectFromService();
104 SocketState socketState = SocketState::ConnectedState,
105 OpenMode openMode = ReadWrite);
106 int socketDescriptor()
const;
109 SocketState
state()
const;
110 SocketError
error()
const;
117 void setPreferredSecurityFlags(QBluetooth::SecurityFlags
flags);
118 QBluetooth::SecurityFlags preferredSecurityFlags()
const;
137 void discoveryFinished();
Protocol
This enum describes the socket protocol used by the service.
void connectToService(const QBluetoothAddress &address, QBluetoothUuid::ServiceClassUuid uuid, OpenMode mode=ReadWrite)
void connected()
This signal is emitted when a connection is established.
void stateChanged(QBluetoothSocket::SocketState state)
This signal is emitted when the socket state changes to state.
void errorOccurred(QBluetoothSocket::SocketError error)
This signal is emitted when an error occurs.
QBluetoothSocketBasePrivate * d_ptr
SocketState
This enum describes the state of the Bluetooth socket.
SocketError
This enum describes Bluetooth socket error types.
void disconnected()
This signal is emitted when the socket is disconnected.
ServiceClassUuid
This enum is a convienience type for Bluetooth service class and profile UUIDs.
\inmodule QtCore \reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
static QT_BEGIN_NAMESPACE const char * socketType(QSocketNotifier::Type type)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint64EXT address
void writeData(const QByteArray &data)