-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZippedBuffer.hh
35 lines (27 loc) · 933 Bytes
/
ZippedBuffer.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef ZIPPEDBUFFER_HH
# define ZIPPEDBUFFER_HH
# include <QString>
# include <QByteArray>
# include <QDataStream>
# include <QDebug>
class ZippedBuffer
{
private:
QString m_filepath;
QByteArray m_data;
bool m_valid;
public:
ZippedBuffer();
ZippedBuffer(const QString &filepath, const QByteArray &data);
void read(QDataStream &stream);
void write(QDataStream &stream) const;
const QString filepath() const;
void filepath(const QString &filepath);
const QByteArray data() const;
void data(const QByteArray &data);
bool valid() const;
void valid(bool isValid);
};
QDataStream &operator <<(QDataStream &out, const ZippedBuffer &zippedBuffer);
QDataStream &operator >>(QDataStream &in, ZippedBuffer &zippedBuffer);
#endif // ZIPPEDBUFFER_HH