KFilterBase

#include <KFilterBase>

Inheritance diagram for KFilterBase:

Public Types

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

Public Member Functions

virtual Result compress (bool finish)=0
 
QIODevicedevice ()
 
FilterFlags filterFlags () const
 
virtual int inBufferAvailable () const =0
 
virtual bool inBufferEmpty () const
 
virtual bool 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 bool terminate ()
 
virtual Result uncompress ()=0
 
virtual bool writeHeader (const QByteArray &filename)=0
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 

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

Member Enumeration Documentation

Since
4.3

Definition at line 86 of file kfilterbase.h.

Definition at line 72 of file kfilterbase.h.

Member Function Documentation

virtual Result KFilterBase::compress ( bool  finish)
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

QIODevice * KFilterBase::device ( )

Returns the device on which the filter will work.

Returns
the device on which the filter will work

Definition at line 43 of file kfilterbase.cpp.

virtual int KFilterBase::inBufferAvailable ( ) const
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

bool KFilterBase::inBufferEmpty ( ) const
virtual

Definition at line 48 of file kfilterbase.cpp.

virtual bool KFilterBase::init ( int  mode)
pure virtual

Implemented in KNoneFilter, and KGzipFilter.

virtual int KFilterBase::mode ( ) const
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

virtual int KFilterBase::outBufferAvailable ( ) const
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

bool KFilterBase::outBufferFull ( ) const
virtual

Definition at line 53 of file kfilterbase.cpp.

virtual bool KFilterBase::readHeader ( )
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

void KFilterBase::reset ( )
virtual

Reimplemented in KGzipFilter, and KNoneFilter.

Definition at line 63 of file kfilterbase.cpp.

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

Sets the device on which the filter will work.

Parameters
devthe device on which the filter will work
autodeleteif true, dev is deleted when the filter is deleted

Definition at line 37 of file kfilterbase.cpp.

void KFilterBase::setFilterFlags ( FilterFlags  flags)
Since
4.3

Definition at line 67 of file kfilterbase.cpp.

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

Implemented in KGzipFilter, and KNoneFilter.

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

Implemented in KGzipFilter, and KNoneFilter.

bool KFilterBase::terminate ( )
virtual

Reimplemented in KGzipFilter, and KNoneFilter.

Definition at line 58 of file kfilterbase.cpp.

virtual Result KFilterBase::uncompress ( )
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

void KFilterBase::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.

Unused in this class.

Definition at line 77 of file kfilterbase.cpp.

virtual bool KFilterBase::writeHeader ( const QByteArray filename)
pure virtual

Implemented in KGzipFilter, and KNoneFilter.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 2 2020 23:01:12 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.