18#include "QtCore/qbytearray.h"
19#include "QtCore/qiodevice.h"
20#include "QtCore/qobjectdefs.h"
21#include "QtCore/qstring.h"
22#include "QtCore/qvarlengtharray.h"
23#include "private/qringbuffer_p.h"
25#include "private/qobject_p.h"
30#ifndef QIODEVICE_BUFFERSIZE
31#define QIODEVICE_BUFFERSIZE 16384
95 int readChannelCount = 0;
96 int writeChannelCount = 0;
97 int currentReadChannel = 0;
98 int currentWriteChannel = 0;
100 int writeBufferChunkSize = 0;
107 bool transactionStarted =
false;
108 bool baseReadLineDataCalled =
false;
110 virtual bool putCharHelper(
char c);
120 if (accessMode == Unset)
121 accessMode = q_func()->isSequential() ? Sequential : RandomAccess;
122 return accessMode == Sequential;
127 return buffer.isEmpty() || (transactionStarted && isSequential()
128 && transactionPos ==
buffer.size());
130 bool allWriteBuffersEmpty()
const;
132 void seekBuffer(
qint64 newPos);
144 void setReadChannelCount(
int count);
145 void setWriteChannelCount(
int count);
156 return currentWriteChunk !=
nullptr
158 && currentWriteChunk->
size() ==
size;
IOBluetoothL2CAPChannel * channel
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
char * reserve(qint64 bytes)
qint64 read(char *data, qint64 maxLength)
char * reserveFront(qint64 bytes)
void append(const QByteArray &qba)
void truncate(qint64 pos)
qint64 indexOf(char c) const
qint64 indexOf(char c, qint64 maxLength, qint64 pos=0) const
qint64 readLine(char *data, qint64 maxLength)
qint64 peek(char *data, qint64 maxLength, qint64 pos=0) const
qint64 skip(qint64 length)
void setChunkSize(int size)
const char * readPointerAtPosition(qint64 pos, qint64 &length) const
void append(const char *data, qint64 size)
qint64 nextDataBlockSize() const
const char * readPointer() const
void setCurrentWriteChannel(int channel)
QVarLengthArray< QRingBuffer, 1 > writeBuffers
bool isBufferEmpty() const
bool isSequential() const
QVarLengthArray< QRingBuffer, 2 > readBuffers
void setCurrentReadChannel(int channel)
bool isWriteChunkCached(const char *data, qint64 size) const
QRingBufferRef writeBuffer
\inmodule QtCore \reentrant
Q_CORE_EXPORT void free(qint64 bytes)
Q_CORE_EXPORT qint64 peek(char *data, qint64 maxLength, qint64 pos=0) const
Q_CORE_EXPORT qint64 readLine(char *data, qint64 maxLength)
const char * readPointer() const
Q_CORE_EXPORT const char * readPointerAtPosition(qint64 pos, qint64 &length) const
qint64 skip(qint64 length)
Q_CORE_EXPORT void chop(qint64 bytes)
Q_CORE_EXPORT char * reserve(qint64 bytes)
void setChunkSize(int size)
void truncate(qint64 pos)
Q_CORE_EXPORT void append(const char *data, qint64 size)
Q_CORE_EXPORT char * reserveFront(qint64 bytes)
qint64 indexOf(char c) const
Q_CORE_EXPORT void clear()
qint64 nextDataBlockSize() const
Q_CORE_EXPORT qint64 read(char *data, qint64 maxLength)
\macro QT_RESTRICTED_CAST_FROM_ASCII
constexpr size_type size() const noexcept
Combined button and popup list for selecting options.
#define QIODEVICE_BUFFERSIZE
Q_CORE_EXPORT int qt_subtract_from_timeout(int timeout, int elapsed)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLbitfield GLuint64 timeout
[4]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static double elapsed(qint64 after, qint64 before)
ReturnedValue read(const char *data)
gzip write("uncompressed data")