lib

KoTarStore.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 koTarStore_h
21#define koTarStore_h
22
23#include "KoStoreBase.h"
24
25class KTar;
26class KArchiveDirectory;
27class KURL;
28
29class KoTarStore : public KoStoreBase
30{
31public:
32 KoTarStore( const TQString & _filename, Mode _mode, const TQCString & appIdentification );
33 KoTarStore( TQIODevice *dev, Mode mode, const TQCString & appIdentification );
39 KoTarStore( TQWidget* window, const KURL& url, const TQString & _filename, Mode _mode, const TQCString & appIdentification );
40 ~KoTarStore();
41protected:
42 virtual bool init( Mode _mode );
43 virtual bool openWrite( const TQString& name );
44 virtual bool openRead( const TQString& name );
45 virtual bool closeWrite();
46 virtual bool closeRead() { return true; }
47 virtual bool enterRelativeDirectory( const TQString& dirName );
48 virtual bool enterAbsoluteDirectory( const TQString& path );
49 virtual bool fileExists( const TQString& absPath ) const;
50
51 static TQCString completeMagic( const TQCString& appMimetype );
52
54 KTar * m_pTar;
55
58 const KArchiveDirectory* m_currentDir;
59
61 TQByteArray m_byteArray;
62
63};
64
65#endif
Helper class for KoStore (mainly for remote file support).
Definition KoStoreBase.h:33
virtual bool closeRead()=0
virtual bool closeWrite()=0
Mode mode() const
Definition KoStore.h:163