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
inputstreamthread_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 Lauri Laanmets (Proekspert AS) <lauri.laanmets@eesti.ee>
2
// Copyright (C) 2021 The Qt Company Ltd.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5
#
ifndef
INPUTSTREAMTHREAD_H
6
#
define
INPUTSTREAMTHREAD_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
19
#
include
<
QtCore
/
QObject
>
20
#
include
<
QtCore
/
QMutex
>
21
#
include
<
QtCore
/
QJniObject
>
22
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
23
#
include
<
jni
.
h
>
24
25
QT_BEGIN_NAMESPACE
26
27
class
QBluetoothSocketPrivateAndroid;
28
29
class
InputStreamThread
:
public
QObject
30
{
31
Q_OBJECT
32
public
:
33
explicit
InputStreamThread
(
QBluetoothSocketPrivateAndroid
*
socket_p
);
34
35
qint64
bytesAvailable
()
const
;
36
bool
canReadLine
()
const
;
37
bool
run
();
38
39
qint64
readData
(
char
*data, qint64 maxSize);
40
void
javaThreadErrorOccurred
(
int
errorCode);
41
void
javaReadyRead
(jbyteArray buffer,
int
bufferLength);
42
43
void
prepareForClosure
();
44
45
signals
:
46
void
dataAvailable
();
47
void
errorOccurred
(
int
errorCode);
48
49
private
:
50
QBluetoothSocketPrivateAndroid
*m_socket_p;
51
QJniObject javaInputStreamThread;
52
mutable
QMutex m_mutex;
53
bool
expectClosure;
54
};
55
56
QT_END_NAMESPACE
57
58
#
endif
// INPUTSTREAMTHREAD_H
InputStreamThread
Definition
inputstreamthread_p.h:30
InputStreamThread::errorOccurred
void errorOccurred(int errorCode)
InputStreamThread::javaThreadErrorOccurred
void javaThreadErrorOccurred(int errorCode)
Definition
inputstreamthread.cpp:62
InputStreamThread::prepareForClosure
void prepareForClosure()
Definition
inputstreamthread.cpp:83
InputStreamThread::bytesAvailable
qint64 bytesAvailable() const
Definition
inputstreamthread.cpp:39
InputStreamThread::readData
qint64 readData(char *data, qint64 maxSize)
Definition
inputstreamthread.cpp:51
InputStreamThread::run
bool run()
Definition
inputstreamthread.cpp:21
InputStreamThread::javaReadyRead
void javaReadyRead(jbyteArray buffer, int bufferLength)
Definition
inputstreamthread.cpp:73
InputStreamThread::canReadLine
bool canReadLine() const
Definition
inputstreamthread.cpp:45
QBluetoothSocketPrivateAndroid::QBluetoothServerPrivate
friend class QBluetoothServerPrivate
Definition
qbluetoothsocket_android_p.h:31
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtconnectivity
src
bluetooth
android
inputstreamthread_p.h
Generated on
for Qt by
1.18.0