KDECore
ktar.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000-2005 David Faure <faure@kde.org> 00003 Copyright (C) 2003 Leo Savernik <l.savernik@aon.at> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 #ifndef KTAR_H 00020 #define KTAR_H 00021 00022 #include <karchive.h> 00023 00032 class KDECORE_EXPORT KTar : public KArchive 00033 { 00034 public: 00046 explicit KTar( const QString& filename, 00047 const QString& mimetype = QString() ); 00048 00057 explicit KTar( QIODevice * dev ); 00058 00063 virtual ~KTar(); 00064 00071 void setOrigFileName( const QByteArray & fileName ); 00072 00073 protected: 00074 00076 virtual bool doWriteSymLink(const QString &name, const QString &target, 00077 const QString &user, const QString &group, 00078 mode_t perm, time_t atime, time_t mtime, time_t ctime); 00080 virtual bool doWriteDir( const QString& name, const QString& user, const QString& group, 00081 mode_t perm, time_t atime, time_t mtime, time_t ctime ); 00083 virtual bool doPrepareWriting( const QString& name, const QString& user, 00084 const QString& group, qint64 size, mode_t perm, 00085 time_t atime, time_t mtime, time_t ctime ); 00087 virtual bool doFinishWriting( qint64 size ); 00088 00095 virtual bool openArchive( QIODevice::OpenMode mode ); 00096 virtual bool closeArchive(); 00097 00098 virtual bool createDevice( QIODevice::OpenMode mode ); 00099 00100 private: 00101 00102 protected: 00103 virtual void virtual_hook( int id, void* data ); 00104 private: 00105 class KTarPrivate; 00106 KTarPrivate* const d; 00107 }; 00108 00109 #endif
KDE 4.6 API Reference