| 1 | /* This file is part of the KDE libraries |
| 2 | SPDX-FileCopyrightText: 2011 Mario Bensi <mbensi@ipsquad.net> |
| 3 | |
| 4 | Based on kbzip2filter: |
| 5 | SPDX-FileCopyrightText: 2000, 2009 David Faure <faure@kde.org> |
| 6 | |
| 7 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 8 | */ |
| 9 | |
| 10 | #ifndef __knonefilter__h |
| 11 | #define __knonefilter__h |
| 12 | |
| 13 | #include "kfilterbase.h" |
| 14 | |
| 15 | /*! |
| 16 | * Internal class used by KCompressionDevice |
| 17 | * |
| 18 | * This header is not installed. |
| 19 | * |
| 20 | * \internal |
| 21 | */ |
| 22 | class KNoneFilter : public KFilterBase |
| 23 | { |
| 24 | public: |
| 25 | KNoneFilter(); |
| 26 | ~KNoneFilter() override; |
| 27 | |
| 28 | bool init(int mode) override; |
| 29 | int mode() const override; |
| 30 | bool terminate() override; |
| 31 | void reset() override; |
| 32 | bool () override; // this is about the GZIP header |
| 33 | bool (const QByteArray &fileName) override; |
| 34 | void setOutBuffer(char *data, uint maxlen) override; |
| 35 | void setInBuffer(const char *data, uint size) override; |
| 36 | int inBufferAvailable() const override; |
| 37 | int outBufferAvailable() const override; |
| 38 | Result uncompress() override; |
| 39 | Result compress(bool finish) override; |
| 40 | |
| 41 | private: |
| 42 | Result copyData(); |
| 43 | |
| 44 | class Private; |
| 45 | Private *const d; |
| 46 | }; |
| 47 | |
| 48 | #endif |
| 49 | |