Fix a couple of warnings and remove an unused variable.
[maemo-rb.git] / rbutil / rbutilqt / base / ziputil.h
blob49a1bd3f062e8ed23f3d31629c05ca0917d85200
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2011 Dominik Riebeling
11 * All files in this archive are subject to the GNU General Public License.
12 * See the file COPYING in the source tree root for full license agreement.
14 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
15 * KIND, either express or implied.
17 ****************************************************************************/
19 #ifndef ZIPUTIL_H
20 #define ZIPUTIL_H
22 #include <QtCore>
23 #include "quazip/quazip.h"
24 #include "quazip/quazipfile.h"
25 #include "quazip/quazipfileinfo.h"
27 class ZipUtil : public QObject
29 Q_OBJECT
31 public:
32 ZipUtil(QObject* parent);
33 ~ZipUtil();
34 bool open(QString& zipfile, QuaZip::Mode mode = QuaZip::mdUnzip);
35 bool close(void);
36 bool extractArchive(QString& dest, QString file = "");
37 bool appendDirToArchive(QString& source, QString& basedir);
38 bool appendFileToArchive(QString& file, QString& basedir);
39 qint64 totalUncompressedSize(unsigned int clustersize = 0);
40 QStringList files(void);
42 signals:
43 void logProgress(int, int);
44 void logItem(QString, int);
46 private:
47 QList<QuaZipFileInfo> contentProperties();
48 QuaZip* m_zip;
51 #endif