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

KDECore

KFilterBase Class Reference

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

#include <kfilterbase.h>

Inheritance diagram for KFilterBase:
KGzipFilter

List of all members.

Public Types

enum  FilterFlags { NoHeaders = 0, WithHeaders = 1 }
enum  Result { Ok, End, Error }

Public Member Functions

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
 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)
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
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.

For internal use only.

Definition at line 36 of file kfilterbase.h.


Member Enumeration Documentation

enum KFilterBase::FilterFlags

For internal use only.

Since:
4.3

Enumerator:
NoHeaders 
WithHeaders 

Definition at line 92 of file kfilterbase.h.

enum KFilterBase::Result

For internal use only.

Enumerator:
Ok 
End 
Error 

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]

For internal use only.

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]

For internal use only.

Implemented in KGzipFilter.

bool KFilterBase::inBufferEmpty (  )  const [virtual]

For internal use only.

Definition at line 65 of file kfilterbase.cpp.

virtual void KFilterBase::init ( int  mode  )  [pure virtual]

For internal use only.

Implemented in KGzipFilter.

virtual int KFilterBase::mode (  )  const [pure virtual]

For internal use only.

Implemented in KGzipFilter.

virtual int KFilterBase::outBufferAvailable (  )  const [pure virtual]

For internal use only.

Implemented in KGzipFilter.

bool KFilterBase::outBufferFull (  )  const [virtual]

For internal use only.

Definition at line 70 of file kfilterbase.cpp.

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

For internal use only.

Implemented in KGzipFilter.

void KFilterBase::reset (  )  [virtual]

For internal use only.

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, dev is deleted when the filter is deleted

Definition at line 54 of file kfilterbase.cpp.

void KFilterBase::setFilterFlags ( FilterFlags  flags  ) 

For internal use only.

Since:
4.3

Definition at line 157 of file kfilterbase.cpp.

virtual void KFilterBase::setInBuffer ( const char *  data,
uint  size 
) [pure virtual]

For internal use only.

Implemented in KGzipFilter.

virtual void KFilterBase::setOutBuffer ( char *  data,
uint  maxlen 
) [pure virtual]

For internal use only.

Implemented in KGzipFilter.

void KFilterBase::terminate (  )  [virtual]

For internal use only.

Reimplemented in KGzipFilter.

Definition at line 149 of file kfilterbase.cpp.

virtual Result KFilterBase::uncompress (  )  [pure virtual]

For internal use only.

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]

For internal use only.

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

KDECore

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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