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
qpacket_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
4#ifndef QPACKET_H
5#define QPACKET_H
6
7#include <QtCore/qdatastream.h>
8#include <QtCore/qbuffer.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
22
23class QPacket : public QDataStream
24{
25public:
26 QPacket(int version);
27 explicit QPacket(int version, const QByteArray &ba);
28 const QByteArray &data() const;
30 void clear();
31
32private:
33 void init(QIODevice::OpenMode mode);
35};
36
38
39#endif // QPACKET_H
\inmodule QtCore \reentrant
Definition qbuffer.h:16
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore\reentrant
Definition qdatastream.h:46
int version() const
Returns the version number of the data serialization format.
The QPacket class encapsulates an unfragmentable packet of data to be transmitted by QPacketProtocol.
Definition qpacket_p.h:24
QByteArray squeezedData() const
Returns a copy of the raw packet data, with extra reserved space removed.
Definition qpacket.cpp:86
QPacket(int version)
Constructs an empty write-only packet.
Definition qpacket.cpp:56
void clear()
Clears the packet, discarding any data.
Definition qpacket.cpp:96
const QByteArray & data() const
Returns a reference to the raw packet data.
Definition qpacket.cpp:77
Combined button and popup list for selecting options.
GLenum mode
GLenum GLuint GLenum GLsizei const GLchar * buf
QByteArray ba
[0]