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
qpacketprotocol_p.h
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
// Qt-Security score:significant
4
5
#
ifndef
QPACKETPROTOCOL_P_H
6
#
define
QPACKETPROTOCOL_P_H
7
8
#
include
<
QtCore
/
qobject
.
h
>
9
10
//
11
// W A R N I N G
12
// -------------
13
//
14
// This file is not part of the Qt API. It exists purely as an
15
// implementation detail. This header file may change from version to
16
// version without notice, or even be removed.
17
//
18
// We mean it.
19
//
20
21
QT_BEGIN_NAMESPACE
22
23
class
QIODevice;
24
25
class
QPacketProtocolPrivate
;
26
class
QPacketProtocol
:
public
QObject
27
{
28
Q_OBJECT
29
Q_DECLARE_PRIVATE(
QPacketProtocol
)
30
public
:
31
explicit
QPacketProtocol
(
QIODevice
*
dev
,
QObject
*
parent
=
nullptr
);
32
33
void
send
(
const
QByteArray &data);
34
qint64
packetsAvailable
()
const
;
35
QByteArray
read
();
36
bool
waitForReadyRead
(
int
msecs = 3000);
37
38
Q_SIGNALS
:
39
void
readyRead
();
40
void
error
();
41
42
private
:
43
void
bytesWritten(qint64 bytes);
44
void
readyToRead();
45
};
46
47
QT_END_NAMESPACE
48
49
#
endif
// QPACKETPROTOCOL_P_H
QImageReader::error
ImageReaderError error() const
Returns the type of error that occurred last.
Definition
qimagereader.cpp:1415
QPacketProtocolPrivate
Definition
qpacketprotocol.cpp:69
QPacketProtocolPrivate::packets
QList< QByteArray > packets
Definition
qpacketprotocol.cpp:78
QPacketProtocolPrivate::inProgress
QByteArray inProgress
Definition
qpacketprotocol.cpp:79
QPacketProtocolPrivate::writeToDevice
bool writeToDevice(const char *bytes, qint64 size)
Definition
qpacketprotocol.cpp:252
QPacketProtocolPrivate::inProgressSize
qint32 inProgressSize
Definition
qpacketprotocol.cpp:80
QPacketProtocolPrivate::waitingForPacket
bool waitingForPacket
Definition
qpacketprotocol.cpp:81
QPacketProtocolPrivate::dev
QIODevice * dev
Definition
qpacketprotocol.cpp:82
QPacketProtocolPrivate::sendingPackets
QList< qint32 > sendingPackets
Definition
qpacketprotocol.cpp:77
QPacketProtocolPrivate::readFromDevice
bool readFromDevice(char *buffer, qint64 size)
Definition
qpacketprotocol.cpp:264
QPacketProtocol
The QPacketProtocol class encapsulates communicating discrete packets across fragmented IO channels,...
Definition
qpacketprotocol_p.h:27
QPacketProtocol::send
void send(const QByteArray &data)
Transmit the packet.
Definition
qpacketprotocol.cpp:104
QPacketProtocol::waitForReadyRead
bool waitForReadyRead(int msecs=3000)
This function locks until a new packet is available for reading and the \l{QIODevice::}...
Definition
qpacketprotocol.cpp:157
QPacketProtocol::packetsAvailable
qint64 packetsAvailable() const
Returns the number of received packets yet to be read.
Definition
qpacketprotocol.cpp:130
QPacketProtocol::read
QByteArray read()
Return the next unread packet, or an empty QByteArray if no packets are available.
Definition
qpacketprotocol.cpp:140
QPacketProtocol::error
void error()
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
plugins
qmltooling
packetprotocol
qpacketprotocol_p.h
Generated on
for Qt by
1.18.0