kfilterdev.h
/* This file is part of the KDE libraries
Copyright (C) 2000 David Faure <faure@kde.org>
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 __kfilterdev_h
#define __kfilterdev_h
#include <qiodevice.h>
#include <qstring.h>
#include <kdelibs_export.h>
class QFile;
class KFilterBase;
class KIO_EXPORT KFilterDev : public QIODevice
{
public:
KFilterDev( KFilterBase * filter, bool autoDeleteFilterBase = false );
virtual ~KFilterDev();
virtual bool open( int mode );
virtual void close();
virtual void flush();
void setOrigFileName( const QCString & fileName );
void setSkipHeaders();
// Not implemented
virtual QIODevice::Offset size() const;
virtual QIODevice::Offset at() const;
virtual bool at( QIODevice::Offset );
virtual bool atEnd() const;
virtual Q_LONG readBlock( char *data, Q_ULONG maxlen );
virtual Q_LONG writeBlock( const char *data, Q_ULONG len );
//int readLine( char *data, uint maxlen );
virtual int getch();
virtual int putch( int );
virtual int ungetch( int );
#ifdef KDE_NO_COMPAT
private:
#endif
static QIODevice* createFilterDevice(KFilterBase* base, QFile* file) KDE_DEPRECATED;
public:
static QIODevice * deviceForFile( const QString & fileName, const QString & mimetype = QString::null,
bool forceFilter = false );
static QIODevice * device( QIODevice* inDevice, const QString & mimetype);
// BIC: merge with device() method below, using default value for autoDeleteInDevice
static QIODevice * device( QIODevice* inDevice, const QString & mimetype, bool autoDeleteInDevice );
private:
KFilterBase *filter;
class KFilterDevPrivate;
KFilterDevPrivate * d;
};
#endif
KFilterDev
A class for reading and writing compressed data onto a device (e.g.
Definition: kfilterdev.h:36
KFilterBase
This is the base class for compression filters such as gzip and bzip2.
Definition: kfilterbase.h:38

KDE Home | KDE Accessibility Home | Description of Access Keys