Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
serveracceptancethread_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 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
#
ifndef
SERVERACCEPTANCETHREAD_H
5
#
define
SERVERACCEPTANCETHREAD_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtCore
/
QMutex
>
19
#
include
<
QtCore
/
QJniObject
>
20
#
include
<
QtBluetooth
/
QBluetoothServer
>
21
#
include
<
QtBluetooth
/
QBluetoothUuid
>
22
#
include
"qbluetooth.h"
23
#
include
"private/qglobal_p.h"
24
25
QT_BEGIN_NAMESPACE
26
27
class
ServerAcceptanceThread
:
public
QObject
28
{
29
Q_OBJECT
30
public
:
31
explicit
ServerAcceptanceThread
(
QObject
*
parent
=
nullptr
);
32
~
ServerAcceptanceThread
();
33
void
setServiceDetails
(
const
QBluetoothUuid &uuid,
const
QString &serviceName,
34
QBluetooth::SecurityFlags securityFlags);
35
36
37
bool
hasPendingConnections
()
const
;
38
QJniObject
nextPendingConnection
();
39
void
setMaxPendingConnections
(
int
maximumCount);
40
41
void
javaThreadErrorOccurred
(
int
errorCode);
42
void
javaNewSocket
(jobject socket);
43
44
void
run
();
45
void
stop
();
46
bool
isRunning
()
const
;
47
48
signals
:
49
void
newConnection
();
50
void
errorOccurred
(
QBluetoothServer
::
Error
);
51
52
private
:
53
bool
validSetup()
const
;
54
void
shutdownPendingConnections();
55
56
QList<QJniObject> pendingSockets;
57
mutable
QMutex m_mutex;
58
QString m_serviceName;
59
QBluetoothUuid m_uuid;
60
int
maxPendingConnections;
61
QBluetooth::SecurityFlags secFlags;
62
63
QJniObject javaThread;
64
65
};
66
67
QT_END_NAMESPACE
68
69
#
endif
// SERVERACCEPTANCETHREAD_H
QtBroadcastReceiver_jniOnReceive
QT_BEGIN_NAMESPACE void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong, QtJniTypes::Context, QtJniTypes::Intent)
Definition
jni_android.cpp:47
FIND_AND_CHECK_CLASS
#define FIND_AND_CHECK_CLASS(CLASS_NAME)
Definition
androidjnimain.cpp:781
AndroidBroadcastReceiver
Definition
androidbroadcastreceiver_p.h:32
AndroidBroadcastReceiver::QtBluetoothLE_leScanResult
friend void QtBluetoothLE_leScanResult(JNIEnv *, jobject, jlong, QtJniTypes::BluetoothDevice, jint, jbyteArray)
Definition
jni_android.cpp:83
InputStreamThread
Definition
inputstreamthread_p.h:30
InputStreamThread::javaThreadErrorOccurred
void javaThreadErrorOccurred(int errorCode)
Definition
inputstreamthread.cpp:62
ServerAcceptanceThread
Definition
serveracceptancethread_p.h:28
ServerAcceptanceThread::nextPendingConnection
QJniObject nextPendingConnection()
Definition
serveracceptancethread.cpp:49
ServerAcceptanceThread::setServiceDetails
void setServiceDetails(const QBluetoothUuid &uuid, const QString &serviceName, QBluetooth::SecurityFlags securityFlags)
Definition
serveracceptancethread.cpp:27
ServerAcceptanceThread::errorOccurred
void errorOccurred(QBluetoothServer::Error)
ServerAcceptanceThread::javaNewSocket
void javaNewSocket(jobject socket)
Definition
serveracceptancethread.cpp:122
ServerAcceptanceThread::run
void run()
Definition
serveracceptancethread.cpp:64
ServerAcceptanceThread::isRunning
bool isRunning() const
Definition
serveracceptancethread.cpp:106
ServerAcceptanceThread::hasPendingConnections
bool hasPendingConnections() const
Definition
serveracceptancethread.cpp:37
ServerAcceptanceThread::javaThreadErrorOccurred
void javaThreadErrorOccurred(int errorCode)
Definition
serveracceptancethread.cpp:115
ServerAcceptanceThread::stop
void stop()
Definition
serveracceptancethread.cpp:98
ServerAcceptanceThread::~ServerAcceptanceThread
~ServerAcceptanceThread()
Definition
serveracceptancethread.cpp:20
ServerAcceptanceThread::setMaxPendingConnections
void setMaxPendingConnections(int maximumCount)
Definition
serveracceptancethread.cpp:58
LEHUB_SCOPED_METHOD
#define LEHUB_SCOPED_METHOD(Method)
Definition
jni_android.cpp:107
classErrorMsg
static const char classErrorMsg[]
Definition
jni_android.cpp:97
logTag
static const char logTag[]
Definition
jni_android.cpp:96
QtBluetoothInputStreamThread_errorOccurred
static void QtBluetoothInputStreamThread_errorOccurred(JNIEnv *, jobject, jlong qtObject, jint errorCode)
Definition
jni_android.cpp:69
QtBluetoothInputStreamThread_readyData
static void QtBluetoothInputStreamThread_readyData(JNIEnv *, jobject, jlong qtObject, jbyteArray buffer, jint bufferLength)
Definition
jni_android.cpp:76
QtBluetoothSocketServer_newSocket
static void QtBluetoothSocketServer_newSocket(JNIEnv *, jobject, jlong qtObject, QtJniTypes::BluetoothSocket socket)
Definition
jni_android.cpp:62
QtBluetoothSocketServer_errorOccurred
static void QtBluetoothSocketServer_errorOccurred(JNIEnv *, jobject, jlong qtObject, jint errorCode)
Definition
jni_android.cpp:55
registerNatives
static bool registerNatives()
Definition
jni_android.cpp:109
valueFromStaticFieldCache
QString valueFromStaticFieldCache(const char *key, const char *className, const char *fieldName)
Definition
jni_android.cpp:27
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtconnectivity
src
bluetooth
android
serveracceptancethread_p.h
Generated on
for Qt by
1.18.0