kio Library API Documentation

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]
Collaboration diagram for KFilterBase:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Result { OK, END, ERROR }

Public Member Functions

void setDevice (QIODevice *dev, bool autodelete=false)
 Sets the device on which the filter will work If autodelete is set to true, dev is deleted when the filter is deleted.

QIODevicedevice ()
virtual void init (int mode)=0
virtual int mode () const =0
virtual void terminate ()
virtual void reset ()
virtual bool readHeader ()=0
virtual bool writeHeader (const QCString &filename)=0
virtual void setOutBuffer (char *data, uint maxlen)=0
virtual void setInBuffer (const char *data, uint size)=0
virtual bool inBufferEmpty () const
virtual int inBufferAvailable () const =0
virtual bool outBufferFull () const
virtual int outBufferAvailable () const =0
virtual Result uncompress ()=0
virtual Result compress (bool finish)=0

Static Public Member Functions

KFilterBasefindFilterByFileName (const QString &fileName)
 Call this to create the appropriate filter for the file named fileName.

KFilterBasefindFilterByMimeType (const QString &mimeType)
 Call this to create the appropriate filter for the mimetype mimeType.


Protected Member Functions

virtual void virtual_hook (int id, void *data)

Protected Attributes

QIODevicem_dev
bool m_bAutoDel

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 31 of file kfilterbase.h.


Member Function Documentation

void KFilterBase::setDevice QIODevice dev,
bool  autodelete = false
 

Sets the device on which the filter will work If autodelete is set to true, dev is deleted when the filter is deleted.

Definition at line 36 of file kfilterbase.cpp.

Referenced by KFilterDev::createFilterDevice(), KFilterDev::device(), and KFilterDev::deviceForFile().

KFilterBase * KFilterBase::findFilterByFileName const QString fileName  )  [static]
 

Call this to create the appropriate filter for the file named fileName.

Definition at line 42 of file kfilterbase.cpp.

References KMimeType::findByPath(), and findFilterByMimeType().

Referenced by KFilterDev::deviceForFile().

KFilterBase * KFilterBase::findFilterByMimeType const QString mimeType  )  [static]
 

Call this to create the appropriate filter for the mimetype mimeType.

For instance application/x-gzip.

Definition at line 49 of file kfilterbase.cpp.

References QValueList::begin(), QValueList::count(), KLibFactory::create(), QValueList::end(), KStdAccel::end(), KLibLoader::factory(), KTrader::OfferList, KTrader::query(), KLibLoader::self(), and KTrader::self().

Referenced by KFilterDev::device(), KFilterDev::deviceForFile(), and findFilterByFileName().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:18:34 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001