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_android_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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
5#ifndef QBLUETOOTHSOCKET_ANDROID_P_H
6#define QBLUETOOTHSOCKET_ANDROID_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20
21#include <QtCore/QJniObject>
22#include <QtCore/QPointer>
24#include <jni.h>
25
27
29{
32
33public:
36
37 //On Android we connect using the uuid not the port
39 QIODevice::OpenMode openMode) override;
40
41 void connectToService(const QBluetoothServiceInfo &service,
42 QIODevice::OpenMode openMode) override;
44 QIODevice::OpenMode openMode) override;
46 QIODevice::OpenMode openMode) override;
47
49
51
52 QString localName() const override;
53 QBluetoothAddress localAddress() const override;
54 quint16 localPort() const override;
55
56 QString peerName() const override;
57 QBluetoothAddress peerAddress() const override;
58 quint16 peerPort() const override;
59
60 void abort() override;
61 void close() override;
62
63 qint64 writeData(const char *data, qint64 maxSize) override;
64 qint64 readData(char *data, qint64 maxSize) override;
65
68 QBluetoothSocket::OpenMode openMode = QBluetoothSocket::ReadWrite) override;
69
72 QBluetoothSocket::OpenMode openMode = QBluetoothSocket::ReadWrite) override;
73
74 qint64 bytesAvailable() const override;
75 bool canReadLine() const override;
76 qint64 bytesToWrite() const override;
77
78 static QBluetoothUuid reverseUuid(const QBluetoothUuid &serviceUuid);
79
86
87public slots:
90 const QJniObject &targetUuid,
91 const QBluetoothUuid &qtTargetUuid);
93 const QJniObject &targetUuid);
94 void inputThreadError(int errorCode);
95
99
100};
101
102// QTBUG-61392 related
103// Private API to disable the silent behavior to reverse a remote service's
104// UUID. In rare cases the workaround behavior might not be desirable as
105// it may lead to connects to incorrect services.
107
109
110#endif // QBLUETOOTHSOCKET_ANDROID_P_H
\inmodule QtBluetooth
\inmodule QtBluetooth
Protocol
This enum describes the socket protocol used by the service.
QBluetoothSocket::OpenMode openMode
QBluetoothServiceInfo::Protocol socketType
void defaultSocketConnectFailed(const QJniObject &socket, const QJniObject &targetUuid, const QBluetoothUuid &qtTargetUuid)
void connectToServiceHelper(const QBluetoothAddress &address, const QBluetoothUuid &uuid, QIODevice::OpenMode openMode) override
static QBluetoothUuid reverseUuid(const QBluetoothUuid &serviceUuid)
bool ensureNativeSocket(QBluetoothServiceInfo::Protocol type) override
QBluetoothAddress peerAddress() const override
void fallbackSocketConnectFailed(const QJniObject &socket, const QJniObject &targetUuid)
bool setSocketDescriptor(const QJniObject &socket, QBluetoothServiceInfo::Protocol socketType, QBluetoothSocket::SocketState socketState=QBluetoothSocket::SocketState::ConnectedState, QBluetoothSocket::OpenMode openMode=QBluetoothSocket::ReadWrite) override
QBluetoothAddress localAddress() const override
void connectToService(const QBluetoothServiceInfo &service, QIODevice::OpenMode openMode) override
void socketConnectSuccess(const QJniObject &socket)
qint64 writeData(const char *data, qint64 maxSize) override
bool fallBackReversedConnect(const QBluetoothUuid &uuid)
SocketState
This enum describes the state of the Bluetooth socket.
\inmodule QtBluetooth
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
bool useReverseUuidWorkAroundConnect
EGLOutputPortEXT port
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum type
GLuint GLuint64EXT address
#define Q_OBJECT
#define slots
#define signals
unsigned short quint16
Definition qtypes.h:48
long long qint64
Definition qtypes.h:60
QByteArray readData()