• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KFilterBase Class Reference

This is the base class for compression filters such as gzip and bzip2. More...

#include <kfilterbase.h>

Inheritance diagram for KFilterBase:

Inheritance graph
[legend]

List of all members.


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

For internal use only.

Enumerator:
OK 
END 
ERROR 

Definition at line 85 of file kfilterbase.h.


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]

For internal use only.

Definition at line 76 of file kfilterbase.h.

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]

For internal use only.

Definition at line 80 of file kfilterbase.h.

virtual bool KFilterBase::readHeader (  )  [pure virtual]

For internal use only.

virtual void KFilterBase::reset (  )  [inline, virtual]

For internal use only.

Definition at line 66 of file kfilterbase.h.

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]

For internal use only.

Definition at line 64 of file kfilterbase.h.

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:
  • kfilterbase.h
  • kfilterbase.cpp

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal