Changeset View
Changeset View
Standalone View
Standalone View
libs/store/KoQuaZipStore.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2019 Boudewijn Rempt <boud@valdyas.org> | ||||
3 | * | ||||
4 | * This library is free software; you can redistribute it and/or | ||||
5 | * modify it under the terms of the GNU Library General Public | ||||
6 | * License as published by the Free Software Foundation; either | ||||
7 | * version 2 of the License, or (at your option) any later version. | ||||
8 | * | ||||
9 | * This library is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
12 | * Library General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU Library General Public License | ||||
15 | * along with this library; see the file COPYING.LIB. If not, write to | ||||
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||||
17 | * Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | #ifndef KoQuaZipStore_h | ||||
21 | #define KoQuaZipStore_h | ||||
22 | | ||||
23 | #include "KoStore.h" | ||||
24 | #include <QScopedPointer> | ||||
25 | | ||||
26 | class QUrl; | ||||
27 | | ||||
28 | class KoQuaZipStore : public KoStore | ||||
29 | { | ||||
30 | public: | ||||
31 | KoQuaZipStore(const QString & _filename, Mode _mode, const QByteArray & appIdentification, | ||||
32 | bool writeMimetype = true); | ||||
33 | | ||||
34 | KoQuaZipStore(QIODevice *dev, Mode mode, const QByteArray & appIdentification, | ||||
35 | bool writeMimetype = true); | ||||
36 | | ||||
37 | ~KoQuaZipStore() override; | ||||
38 | | ||||
39 | void setCompressionEnabled(bool enabled) override; | ||||
40 | qint64 write(const char* _data, qint64 _len) override; | ||||
41 | | ||||
42 | QStringList directoryList() const override; | ||||
43 | | ||||
44 | protected: | ||||
45 | void init(const QByteArray& appIdentification); | ||||
46 | bool doFinalize() override; | ||||
47 | bool openWrite(const QString& name) override; | ||||
48 | bool openRead(const QString& name) override; | ||||
49 | bool closeWrite() override; | ||||
50 | bool closeRead() override; | ||||
51 | bool enterRelativeDirectory(const QString& dirName) override; | ||||
52 | bool enterAbsoluteDirectory(const QString& path) override; | ||||
53 | bool fileExists(const QString& absPath) const override; | ||||
54 | | ||||
55 | private: | ||||
56 | struct Private; | ||||
57 | const QScopedPointer<Private> dd; | ||||
58 | Q_DECLARE_PRIVATE(KoStore) | ||||
59 | | ||||
60 | }; | ||||
61 | | ||||
62 | #endif |