QuaZIP  quazip-0-5
quagzipfile.h
1 #ifndef QUAZIP_QUAGZIPFILE_H
2 #define QUAZIP_QUAGZIPFILE_H
3 
4 #include <QIODevice>
5 #include "quazip_global.h"
6 
7 #include <zlib.h>
8 
10 
11 class QUAZIP_EXPORT QuaGzipFile: public QIODevice {
12  Q_OBJECT
13 public:
14  QuaGzipFile();
15  QuaGzipFile(QObject *parent);
16  QuaGzipFile(const QString &fileName, QObject *parent = NULL);
17  virtual ~QuaGzipFile();
18  void setFileName(const QString& fileName);
19  QString getFileName() const;
20  virtual bool isSequential() const;
21  virtual bool open(QIODevice::OpenMode mode);
22  virtual bool open(int fd, QIODevice::OpenMode mode);
23  virtual bool flush();
24  virtual void close();
25 protected:
26  virtual qint64 readData(char *data, qint64 maxSize);
27  virtual qint64 writeData(const char *data, qint64 maxSize);
28 private:
29  // not implemented by design to disable copy
30  QuaGzipFile(const QuaGzipFile &that);
31  QuaGzipFile& operator=(const QuaGzipFile &that);
33 };
34 
35 #endif // QUAZIP_QUAGZIPFILE_H