#include <kfilterbase.h>

Public Types | |
| enum | FilterFlags { NoHeaders = 0, WithHeaders = 1 } |
| enum | Result { Ok, End, Error } |
Public Member Functions | |
| KFilterBase () | |
| virtual | ~KFilterBase () |
| virtual Result | compress (bool finish)=0 |
| QIODevice * | device () |
| FilterFlags | filterFlags () const |
| virtual int | inBufferAvailable () const =0 |
| virtual bool | inBufferEmpty () const |
| virtual void | init (int mode)=0 |
| 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) |
| void | setFilterFlags (FilterFlags flags) |
| 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 |
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.
Member Enumeration Documentation
| enum KFilterBase::Result |
Definition at line 82 of file kfilterbase.h.
Constructor & Destructor Documentation
| KFilterBase::KFilterBase | ( | ) |
Definition at line 42 of file kfilterbase.cpp.
| KFilterBase::~KFilterBase | ( | ) | [virtual] |
Definition at line 47 of file kfilterbase.cpp.
Member Function Documentation
| virtual Result KFilterBase::compress | ( | bool | finish | ) | [pure virtual] |
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 60 of file kfilterbase.cpp.
| KFilterBase::FilterFlags KFilterBase::filterFlags | ( | ) | const |
Definition at line 162 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 75 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 103 of file kfilterbase.cpp.
| virtual int KFilterBase::inBufferAvailable | ( | ) | const [pure virtual] |
Implemented in KGzipFilter.
| bool KFilterBase::inBufferEmpty | ( | ) | const [virtual] |
Definition at line 65 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 70 of file kfilterbase.cpp.
| virtual bool KFilterBase::readHeader | ( | ) | [pure virtual] |
Implemented in KGzipFilter.
| void KFilterBase::reset | ( | ) | [virtual] |
Reimplemented in KGzipFilter.
Definition at line 153 of file kfilterbase.cpp.
| 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, devis deleted when the filter is deleted
Definition at line 54 of file kfilterbase.cpp.
| void KFilterBase::setFilterFlags | ( | FilterFlags | flags | ) |
- Since:
- 4.3
Definition at line 157 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] |
Reimplemented in KGzipFilter.
Definition at line 149 of file kfilterbase.cpp.
| 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 167 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 121 of file kfilterbase.h.
QIODevice* KFilterBase::m_dev [protected] |
Definition at line 120 of file kfilterbase.h.
The documentation for this class was generated from the following files:
KDE 4.7 API Reference