KDECore
KFilterBase Class Reference
#include <kfilterbase.h>

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 35 of file 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 QByteArray &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 |
Member Enumeration Documentation
enum KFilterBase::Result |
Constructor & Destructor Documentation
KFilterBase::KFilterBase | ( | ) |
Definition at line 30 of file kfilterbase.cpp.
KFilterBase::~KFilterBase | ( | ) | [virtual] |
Definition at line 35 of file kfilterbase.cpp.
Member Function Documentation
Implemented in KGzipFilter.
QIODevice * KFilterBase::device | ( | ) |
Returns the device on which the filter will work.
- Returns:
- the device on which the filter will work
Definition at line 47 of file kfilterbase.cpp.
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 62 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 84 of file kfilterbase.cpp.
virtual int KFilterBase::inBufferAvailable | ( | ) | const [pure virtual] |
Implemented in KGzipFilter.
bool KFilterBase::inBufferEmpty | ( | ) | const [virtual] |
Definition at line 52 of file kfilterbase.cpp.
virtual void KFilterBase::init | ( | int | mode | ) | [pure virtual] |
Implemented in KGzipFilter.
virtual int KFilterBase::mode | ( | ) | const [pure virtual] |
Implemented in KGzipFilter.
virtual int KFilterBase::outBufferAvailable | ( | ) | const [pure virtual] |
Implemented in KGzipFilter.
bool KFilterBase::outBufferFull | ( | ) | const [virtual] |
Definition at line 57 of file kfilterbase.cpp.
virtual bool KFilterBase::readHeader | ( | ) | [pure virtual] |
Implemented in KGzipFilter.
void KFilterBase::reset | ( | ) | [virtual] |
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 41 of file kfilterbase.cpp.
virtual void KFilterBase::setInBuffer | ( | const char * | data, | |
uint | size | |||
) | [pure virtual] |
Implemented in KGzipFilter.
virtual void KFilterBase::setOutBuffer | ( | char * | data, | |
uint | maxlen | |||
) | [pure virtual] |
Implemented in KGzipFilter.
void KFilterBase::terminate | ( | ) | [virtual] |
virtual Result KFilterBase::uncompress | ( | ) | [pure virtual] |
Implemented in KGzipFilter.
void KFilterBase::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Unused in this class.
Definition at line 117 of file kfilterbase.cpp.
virtual bool KFilterBase::writeHeader | ( | const QByteArray & | filename | ) | [pure virtual] |
Implemented in KGzipFilter.
Member Data Documentation
bool KFilterBase::m_bAutoDel [protected] |
Definition at line 105 of file kfilterbase.h.
QIODevice* KFilterBase::m_dev [protected] |
Definition at line 104 of file kfilterbase.h.
The documentation for this class was generated from the following files: