kio
KFilterBase Class Reference
This is the base class for compression filters such as gzip and bzip2. More...
#include <kfilterbase.h>
Public Types | |
enum | Result { OK, END, ERROR } |
Public Member Functions | |
virtual Result | compress (bool finish)=0 |
QIODevice * | device () |
virtual int | inBufferAvailable () const =0 |
virtual bool | inBufferEmpty () const |
virtual void | init (int mode)=0 |
KFilterBase () | |
virtual int | mode () const =0 |
virtual int | outBufferAvailable () const =0 |
virtual bool | outBufferFull () const |
virtual bool | readHeader ()=0 |
virtual void | reset () |
void | setDevice (QIODevice *dev, bool autodelete=false) |
virtual void | setInBuffer (const char *data, uint size)=0 |
virtual void | setOutBuffer (char *data, uint maxlen)=0 |
virtual void | terminate () |
virtual Result | uncompress ()=0 |
virtual bool | writeHeader (const QCString &filename)=0 |
virtual | ~KFilterBase () |
Static Public Member Functions | |
static KFilterBase * | findFilterByFileName (const QString &fileName) |
static KFilterBase * | findFilterByMimeType (const QString &mimeType) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
bool | m_bAutoDel |
QIODevice * | m_dev |
Detailed Description
This is the base class for compression filters such as gzip and bzip2.It's pretty much internal. Don't use directly, use KFilterDev instead.
Definition at line 38 of file kfilterbase.h.
Member Enumeration Documentation
enum KFilterBase::Result |
Constructor & Destructor Documentation
KFilterBase::KFilterBase | ( | ) |
Definition at line 25 of file kfilterbase.cpp.
KFilterBase::~KFilterBase | ( | ) | [virtual] |
Definition at line 30 of file kfilterbase.cpp.
Member Function Documentation
virtual Result KFilterBase::compress | ( | bool | finish | ) | [pure virtual] |
For internal use only.
QIODevice* KFilterBase::device | ( | ) | [inline] |
Returns the device on which the filter will work.
- Returns:
- the device on which the filter will work
Definition at line 58 of file kfilterbase.h.
KFilterBase * KFilterBase::findFilterByFileName | ( | const QString & | fileName | ) | [static] |
Call this to create the appropriate filter for the file named fileName
.
- Parameters:
-
fileName the name of the file to filter
- Returns:
- the filter for the
fileName
, or 0 if not found
Definition at line 42 of file kfilterbase.cpp.
KFilterBase * KFilterBase::findFilterByMimeType | ( | const QString & | mimeType | ) | [static] |
Call this to create the appropriate filter for the mimetype mimeType
.
For instance application/x-gzip.
- Parameters:
-
mimeType the mime type of the file to filter
- Returns:
- the filter for the
mimeType
, or 0 if not found
Definition at line 49 of file kfilterbase.cpp.
virtual int KFilterBase::inBufferAvailable | ( | ) | const [pure virtual] |
For internal use only.
virtual bool KFilterBase::inBufferEmpty | ( | ) | const [inline, virtual] |
virtual void KFilterBase::init | ( | int | mode | ) | [pure virtual] |
For internal use only.
virtual int KFilterBase::mode | ( | ) | const [pure virtual] |
For internal use only.
virtual int KFilterBase::outBufferAvailable | ( | ) | const [pure virtual] |
For internal use only.
virtual bool KFilterBase::outBufferFull | ( | ) | const [inline, virtual] |
virtual bool KFilterBase::readHeader | ( | ) | [pure virtual] |
For internal use only.
virtual void KFilterBase::reset | ( | ) | [inline, virtual] |
void KFilterBase::setDevice | ( | QIODevice * | dev, | |
bool | autodelete = false | |||
) |
Sets the device on which the filter will work.
- Parameters:
-
dev the device on which the filter will work autodelete if true, dev
is deleted when the filter is deleted
Definition at line 36 of file kfilterbase.cpp.
virtual void KFilterBase::setInBuffer | ( | const char * | data, | |
uint | size | |||
) | [pure virtual] |
For internal use only.
virtual void KFilterBase::setOutBuffer | ( | char * | data, | |
uint | maxlen | |||
) | [pure virtual] |
For internal use only.
virtual void KFilterBase::terminate | ( | ) | [inline, virtual] |
virtual Result KFilterBase::uncompress | ( | ) | [pure virtual] |
For internal use only.
void KFilterBase::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Definition at line 73 of file kfilterbase.cpp.
virtual bool KFilterBase::writeHeader | ( | const QCString & | filename | ) | [pure virtual] |
For internal use only.
Member Data Documentation
bool KFilterBase::m_bAutoDel [protected] |
Definition at line 109 of file kfilterbase.h.
QIODevice* KFilterBase::m_dev [protected] |
Definition at line 108 of file kfilterbase.h.
The documentation for this class was generated from the following files: