Subversion Repositories Scribus

Rev

Rev 22635 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18595 fschmid 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
7
/***************************************************************************
8
*                                                                         *
9
*   This program is free software; you can redistribute it and/or modify  *
10
*   it under the terms of the GNU General Public License as published by  *
11
*   the Free Software Foundation; either version 2 of the License, or     *
12
*   (at your option) any later version.                                   *
13
*                                                                         *
14
***************************************************************************/
15
/***************************************************************************
16
                                                         -------------------
17
        begin                : Sat Nov 23 2013
18
        copyright            : (C) 2013 by Franz Schmid
19
        email                : Franz.Schmid@altmuehlnet.de
20
 ***************************************************************************/
21
#ifndef SCZIPHANDLER_H
22
#define SCZIPHANDLER_H
23
 
24
#include <QtCore>
25
class Zip;
26
class UnZip;
27
 
28
class ScZipHandler
29
{
30
        public:
21054 craig 31
                enum ExtractionOption
32
                {
33
                        ExtractPaths = 0x0001,
34
                        SkipPaths = 0x0002,
35
                        VerifyOnly = 0x0004,
36
                        NoSilentDirectoryCreation = 0x0008
37
                };
38
 
18595 fschmid 39
                ScZipHandler(bool forWrite = false);
40
                virtual ~ScZipHandler();
24710 jghali 41
 
22635 craig 42
                bool open(const QString& fileName);
18595 fschmid 43
                bool close();
22635 craig 44
                bool contains(const QString& fileName);
45
                bool read(const QString& fileName, QByteArray &buf);
46
                bool write(const QString& dirName);
47
                bool extract(const QString& name, const QString& path, ExtractionOption eo);
18595 fschmid 48
                QStringList files();
24710 jghali 49
 
18595 fschmid 50
        private:
24710 jghali 51
                UnZip* m_uz { nullptr };
52
                Zip* m_zi { nullptr };
18595 fschmid 53
};
54
 
55
#endif