18 #ifndef NURIA_TEMPORARYBUFFERDEVICE_HPP
19 #define NURIA_TEMPORARYBUFFERDEVICE_HPP
21 #include "essentials.hpp"
26 class TemporaryBufferDevicePrivate;
56 DefaultMemorySize = 4096 * 1024
85 int maximumMemorySize ()
const;
92 void setMaximumMemorySize (
int maximumSize);
95 StorageMode storageMode ()
const;
101 QIODevice *internalDevice ()
const;
108 QIODevice *stealInternalDevice ();
116 bool isSequential ()
const;
117 bool open (OpenMode mode);
124 qint64 size ()
const;
125 bool seek (qint64 pos);
128 qint64 bytesAvailable ()
const;
129 qint64 bytesToWrite ()
const;
130 bool canReadLine ()
const;
131 bool waitForReadyRead (
int msecs);
132 bool waitForBytesWritten (
int msecs);
142 qint64 readData(
char *data, qint64 maxlen);
143 qint64 readLineData(
char *data, qint64 maxlen);
144 qint64 writeData(
const char *data, qint64 len);
147 void decideStrategy (
int newSize);
148 void moveMemoryBufferToFileDevice (QIODevice *memory, QIODevice *file);
149 QIODevice *openMemoryBuffer ();
150 QIODevice *openFileBuffer ();
152 TemporaryBufferDevicePrivate *d_ptr;
160 #endif // NURIA_TEMPORARYBUFFERDEVICE_HPP
In-memory buffer device with fallback to a temporary file.
Definition: temporarybufferdevice.hpp:49
Definition: temporarybufferdevice.hpp:66
StorageMode
Definition: temporarybufferdevice.hpp:60