KFilterBase

Search for usage in LXR

#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 KCompressionDevice instead.

Definition at line 26 of file kfilterbase.h.

Member Enumeration Documentation

◆ FilterFlags

Since
4.3

Definition at line 86 of file kfilterbase.h.

◆ Result

Definition at line 72 of file kfilterbase.h.

Constructor & Destructor Documentation

◆ KFilterBase()

KFilterBase::KFilterBase ( )

Definition at line 25 of file kfilterbase.cpp.

◆ ~KFilterBase()

KFilterBase::~KFilterBase ( )
virtual

Definition at line 30 of file kfilterbase.cpp.

Member Function Documentation

◆ compress()

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

Implemented in KGzipFilter, and KNoneFilter.

◆ device()

QIODevice * KFilterBase::device ( )

Returns the device on which the filter will work.

Returns
the device on which the filter will work

Definition at line 44 of file kfilterbase.cpp.

◆ filterFlags()

KFilterBase::FilterFlags KFilterBase::filterFlags ( ) const

Definition at line 73 of file kfilterbase.cpp.

◆ inBufferAvailable()

virtual int KFilterBase::inBufferAvailable ( ) const
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

◆ inBufferEmpty()

bool KFilterBase::inBufferEmpty ( ) const
virtual

Definition at line 49 of file kfilterbase.cpp.

◆ init()

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

Implemented in KGzipFilter, and KNoneFilter.

◆ mode()

virtual int KFilterBase::mode ( ) const
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

◆ outBufferAvailable()

virtual int KFilterBase::outBufferAvailable ( ) const
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

◆ outBufferFull()

bool KFilterBase::outBufferFull ( ) const
virtual

Definition at line 54 of file kfilterbase.cpp.

◆ readHeader()

virtual bool KFilterBase::readHeader ( )
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

◆ reset()

void KFilterBase::reset ( )
virtual

Reimplemented in KGzipFilter, and KNoneFilter.

Definition at line 64 of file kfilterbase.cpp.

◆ setDevice()

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 38 of file kfilterbase.cpp.

◆ setFilterFlags()

void KFilterBase::setFilterFlags ( FilterFlags flags)
Since
4.3

Definition at line 68 of file kfilterbase.cpp.

◆ setInBuffer()

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

Implemented in KGzipFilter, and KNoneFilter.

◆ setOutBuffer()

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

Implemented in KGzipFilter, and KNoneFilter.

◆ terminate()

bool KFilterBase::terminate ( )
virtual

Reimplemented in KGzipFilter, and KNoneFilter.

Definition at line 59 of file kfilterbase.cpp.

◆ uncompress()

virtual Result KFilterBase::uncompress ( )
pure virtual

Implemented in KGzipFilter, and KNoneFilter.

◆ virtual_hook()

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 78 of file kfilterbase.cpp.

◆ writeHeader()

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-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.