ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
quagzipfile.h
Go to the documentation of this file.
1 #ifndef QUAZIP_QUAGZIPFILE_H
2 #define QUAZIP_QUAGZIPFILE_H
3 
4 /*
5 Copyright (C) 2005-2014 Sergey A. Tachenov
6 
7 This file is part of QuaZIP.
8 
9 QuaZIP is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 2.1 of the License, or
12 (at your option) any later version.
13 
14 QuaZIP is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public License
20 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>.
21 
22 See COPYING file for the full LGPL text.
23 
24 Original ZIP package is copyrighted by Gilles Vollant and contributors,
25 see quazip/(un)zip.h files for details. Basically it's the zlib license.
26 */
27 
28 #include <zlib.h>
29 
30 #include <QIODevice>
31 
32 #include "quazip_global.h"
33 
34 class QuaGzipFilePrivate;
35 
37 
44 class QUAZIP_EXPORT QuaGzipFile : public QIODevice {
45  Q_OBJECT
46 public:
48 
51  QuaGzipFile();
53 
57  QuaGzipFile(QObject *parent);
59 
63  QuaGzipFile(const QString &fileName, QObject *parent = NULL);
65  virtual ~QuaGzipFile();
67  void setFileName(const QString &fileName);
69  QString getFileName() const;
71 
78  virtual bool isSequential() const;
80 
84  virtual bool open(QIODevice::OpenMode mode);
86 
92  virtual bool open(int fd, QIODevice::OpenMode mode);
94 
98  virtual bool flush();
100  virtual void close();
101 
102 protected:
104  virtual qint64 readData(char *data, qint64 maxSize);
106  virtual qint64 writeData(const char *data, qint64 maxSize);
107 
108 private:
109  // not implemented by design to disable copy
110  QuaGzipFile(const QuaGzipFile &that);
111  QuaGzipFile &operator=(const QuaGzipFile &that);
112  QuaGzipFilePrivate *d;
113 };
114 
115 #endif // QUAZIP_QUAGZIPFILE_H
#define NULL
GZIP file.
Definition: quagzipfile.h:44
#define QUAZIP_EXPORT
Definition: quazip_global.h:46