kar.h
/* This file is part of the KDE libraries
Copyright (C) 2002 Laurence Anderson <l.d.anderson@warwick.ac.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __kar_h
#define __kar_h
#include <sys/stat.h>
#include <sys/types.h>
#include <qdatetime.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qdict.h>
#include <karchive.h>
class KIO_EXPORT KAr : public KArchive
{
public:
KAr( const QString& filename );
KAr( QIODevice * dev );
virtual ~KAr();
QString fileName() { return m_filename; }
/*
* Writing not supported by this class, will always fail.
* @return always false
*/
virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); Q_UNUSED(size); return false; }
/*
* Writing not supported by this class, will always fail.
* @return always false
*/
virtual bool doneWriting( uint size ) { Q_UNUSED(size); return false; }
/*
* Writing not supported by this class, will always fail.
* @return always false
*/
virtual bool writeDir( const QString& name, const QString& user, const QString& group ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return false; }
protected:
virtual bool openArchive( int mode );
virtual bool closeArchive();
protected:
virtual void virtual_hook( int id, void* data );
private:
QString m_filename;
class KArPrivate;
KArPrivate * d;
};
#endif
KAr::fileName
QString fileName()
The name of the ar file, as passed to the constructor.
Definition: kar.h:65
KArchive
KArchive is a base class for reading and writing archives.
Definition: karchive.h:42
KAr::writeDir
virtual bool writeDir(const QString &name, const QString &user, const QString &group)
If an archive is opened for writing then you can add new directories using this function.
Definition: kar.h:83
KAr
KAr is a class for reading archives in ar format.
Definition: kar.h:38
KArchive::openArchive
virtual bool openArchive(int mode)=0
Opens an archive for reading or writing.
KAr::doneWriting
virtual bool doneWriting(uint size)
Call doneWriting after writing the data.
Definition: kar.h:77
KArchive::closeArchive
virtual bool closeArchive()=0
Closes the archive.
KAr::prepareWriting
virtual bool prepareWriting(const QString &name, const QString &user, const QString &group, uint size)
Here's another way of writing a file into an archive: Call prepareWriting, then call writeData() as m...
Definition: kar.h:71

KDE Home | KDE Accessibility Home | Description of Access Keys