summaryrefslogtreecommitdiffstats
path: root/quazip/quagzipfile.h
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-01-25 12:35:14 -0600
committerAndrew <forkk@forkk.net>2013-01-25 12:35:14 -0600
commitf5ee069ea989a07915eb20c62ec4e812dfa9e701 (patch)
tree7d2895bf49925aa6ef7cc91caf9a01de694b2eee /quazip/quagzipfile.h
parent3b422b54aa13be4eb59c80b1f7bb2a514aac583f (diff)
parent00893b3cfc68f12c09e84643d255044a488b0eb6 (diff)
downloadMultiMC-f5ee069ea989a07915eb20c62ec4e812dfa9e701.tar
MultiMC-f5ee069ea989a07915eb20c62ec4e812dfa9e701.tar.gz
MultiMC-f5ee069ea989a07915eb20c62ec4e812dfa9e701.tar.lz
MultiMC-f5ee069ea989a07915eb20c62ec4e812dfa9e701.tar.xz
MultiMC-f5ee069ea989a07915eb20c62ec4e812dfa9e701.zip
Merge branch 'master' of git://github.com/peterix/MultiMC5
Diffstat (limited to 'quazip/quagzipfile.h')
-rw-r--r--quazip/quagzipfile.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/quazip/quagzipfile.h b/quazip/quagzipfile.h
new file mode 100644
index 00000000..211ceadb
--- /dev/null
+++ b/quazip/quagzipfile.h
@@ -0,0 +1,35 @@
+#ifndef QUAZIP_QUAGZIPFILE_H
+#define QUAZIP_QUAGZIPFILE_H
+
+#include <QIODevice>
+#include "quazip_global.h"
+
+#include <zlib.h>
+
+class QuaGzipFilePrivate;
+
+class QUAZIP_EXPORT QuaGzipFile: public QIODevice {
+ Q_OBJECT
+public:
+ QuaGzipFile();
+ QuaGzipFile(QObject *parent);
+ QuaGzipFile(const QString &fileName, QObject *parent = NULL);
+ virtual ~QuaGzipFile();
+ void setFileName(const QString& fileName);
+ QString getFileName() const;
+ virtual bool isSequential() const;
+ virtual bool open(QIODevice::OpenMode mode);
+ virtual bool open(int fd, QIODevice::OpenMode mode);
+ virtual bool flush();
+ virtual void close();
+protected:
+ virtual qint64 readData(char *data, qint64 maxSize);
+ virtual qint64 writeData(const char *data, qint64 maxSize);
+private:
+ // not implemented by design to disable copy
+ QuaGzipFile(const QuaGzipFile &that);
+ QuaGzipFile& operator=(const QuaGzipFile &that);
+ QuaGzipFilePrivate *d;
+};
+
+#endif // QUAZIP_QUAGZIPFILE_H