lib

KoZipStore.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 David Faure <faure@kde.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 koZipStore_h
21#define koZipStore_h
22
23#include "KoStoreBase.h"
24
25class KZip;
26class KArchiveDirectory;
27class KURL;
28
29class KoZipStore : public KoStoreBase
30{
31public:
32 KoZipStore( const TQString & _filename, Mode _mode, const TQCString & appIdentification );
33 KoZipStore( TQIODevice *dev, Mode mode, const TQCString & appIdentification );
39 KoZipStore( TQWidget* window, const KURL& _url, const TQString & _filename, Mode _mode, const TQCString & appIdentification );
40 ~KoZipStore();
41
42 virtual TQ_LONG write( const char* _data, TQ_ULONG _len );
43protected:
44 virtual bool init( Mode _mode, const TQCString& appIdentification );
45 virtual bool openWrite( const TQString& name );
46 virtual bool openRead( const TQString& name );
47 virtual bool closeWrite();
48 virtual bool closeRead() { return true; }
49 virtual bool enterRelativeDirectory( const TQString& dirName );
50 virtual bool enterAbsoluteDirectory( const TQString& path );
51 virtual bool fileExists( const TQString& absPath ) const;
52
54 KZip * m_pZip;
55
58 const KArchiveDirectory* m_currentDir;
59};
60
61#endif
Helper class for KoStore (mainly for remote file support)
Definition KoStoreBase.h:33
virtual bool closeRead()=0
virtual bool openRead(const TQString &name)=0
Open the file name in the store, for reading.
virtual bool closeWrite()=0
virtual bool openWrite(const TQString &name)=0
Open the file name in the store, for writing On success, this method must set m_stream to a stream in...
virtual bool fileExists(const TQString &absPath) const =0
Check if a file exists inside the store.
virtual bool init(Mode mode)
Init store - called by constructor.
Definition KoStore.cpp:171
virtual bool enterRelativeDirectory(const TQString &dirName)=0
Enter a subdirectory of the current directory.
virtual bool enterAbsoluteDirectory(const TQString &path)=0
Enter a directory where we've been before.
TQ_LONG write(const TQByteArray &_data)
Write data into the currently opened file.
Definition KoStore.cpp:308
Mode mode() const
Definition KoStore.h:163