17 #ifndef NURIA_REFERENCEDEVICE_HPP
18 #define NURIA_REFERENCEDEVICE_HPP
21 #include "essentials.hpp"
25 class ReferenceDevicePrivate;
56 explicit ReferenceDevice (QIODevice *referencedDevice, QObject *parent = 0);
62 QIODevice *referencedDevice ()
const;
65 qint64 rangeBegin ()
const;
68 qint64 rangeEnd ()
const;
85 void setRange (qint64 begin, qint64 end = -1);
92 void extendRange (qint64 bytes);
95 bool isSequential ()
const override;
96 bool open (OpenMode mode)
override;
97 void close ()
override;
98 qint64 pos ()
const override;
99 qint64 size ()
const override;
100 bool seek (qint64 pos)
override;
101 bool atEnd ()
const override;
102 bool reset ()
override;
103 qint64 bytesAvailable ()
const override;
106 qint64 readData(
char *data, qint64 maxlen);
107 qint64 writeData(
const char *data, qint64 len);
110 void referencedDeviceDestroyed ();
111 void autoExtendRange ();
113 ReferenceDevicePrivate *d_ptr;
119 #endif // NURIA_REFERENCEDEVICE_HPP
Operates on a part of another QIODevice.
Definition: referencedevice.hpp:48
Definition: abstractsessionmanager.hpp:24