.TH "KFilterBase" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFilterBase \- This is the base class for compression filters such as gzip and bzip2.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kfilterbase.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBResult\fP { \fBOK\fP, \fBEND\fP, \fBERROR\fP }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "void \fBsetDevice\fP (\fBQIODevice\fP *dev, bool autodelete=false)"
.br
.ti -1c
.RI "\fBQIODevice\fP * \fBdevice\fP ()"
.br
.ti -1c
.RI "virtual void \fBinit\fP (int mode)=0"
.br
.ti -1c
.RI "virtual int \fBmode\fP () const =0"
.br
.ti -1c
.RI "virtual void \fBterminate\fP ()"
.br
.ti -1c
.RI "virtual void \fBreset\fP ()"
.br
.ti -1c
.RI "virtual bool \fBreadHeader\fP ()=0"
.br
.ti -1c
.RI "virtual bool \fBwriteHeader\fP (const \fBQCString\fP &filename)=0"
.br
.ti -1c
.RI "virtual void \fBsetOutBuffer\fP (char *data, uint maxlen)=0"
.br
.ti -1c
.RI "virtual void \fBsetInBuffer\fP (const char *data, uint size)=0"
.br
.ti -1c
.RI "virtual bool \fBinBufferEmpty\fP () const "
.br
.ti -1c
.RI "virtual int \fBinBufferAvailable\fP () const =0"
.br
.ti -1c
.RI "virtual bool \fBoutBufferFull\fP () const "
.br
.ti -1c
.RI "virtual int \fBoutBufferAvailable\fP () const =0"
.br
.ti -1c
.RI "virtual Result \fBuncompress\fP ()=0"
.br
.ti -1c
.RI "virtual Result \fBcompress\fP (bool finish)=0"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBKFilterBase\fP * \fBfindFilterByFileName\fP (const \fBQString\fP &fileName)"
.br
.ti -1c
.RI "static \fBKFilterBase\fP * \fBfindFilterByMimeType\fP (const \fBQString\fP &mimeType)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQIODevice\fP * \fBm_dev\fP"
.br
.ti -1c
.RI "bool \fBm_bAutoDel\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is the base class for compression filters such as gzip and bzip2. 

It's pretty much internal. Don't use directly, use \fBKFilterDev\fP instead. 
.PP
Definition at line 38 of file kfilterbase.h.
.SH "Member Function Documentation"
.PP 
.SS "void KFilterBase::setDevice (\fBQIODevice\fP * dev, bool autodelete = \fCfalse\fP)"
.PP
Sets the device on which the filter will work. 
.PP
\fBParameters:\fP
.RS 4
\fIdev\fP the device on which the filter will work 
.br
\fIautodelete\fP if true, \fCdev\fP is deleted when the filter is deleted 
.RE
.PP

.PP
Definition at line 36 of file kfilterbase.cpp.
.PP
Referenced by KFilterDev::device(), and KFilterDev::deviceForFile().
.SS "\fBQIODevice\fP* KFilterBase::device ()\fC [inline]\fP"
.PP
Returns the device on which the filter will work. 
.PP
\fBReturns:\fP
.RS 4
the device on which the filter will work 
.RE
.PP

.PP
Definition at line 58 of file kfilterbase.h.
.PP
Referenced by KFilterDev::at(), KFilterDev::close(), and KFilterDev::open().
.SS "\fBKFilterBase\fP * KFilterBase::findFilterByFileName (const \fBQString\fP & fileName)\fC [static]\fP"
.PP
Call this to create the appropriate filter for the file named \fCfileName\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIfileName\fP the name of the file to filter 
.RE
.PP
\fBReturns:\fP
.RS 4
the filter for the \fCfileName\fP, or 0 if not found 
.RE
.PP

.PP
Definition at line 42 of file kfilterbase.cpp.
.PP
References endl(), KMimeType::findByPath(), findFilterByMimeType(), and kdDebug().
.PP
Referenced by KFilterDev::deviceForFile().
.SS "\fBKFilterBase\fP * KFilterBase::findFilterByMimeType (const \fBQString\fP & mimeType)\fC [static]\fP"
.PP
Call this to create the appropriate filter for the mimetype \fCmimeType\fP. 
.PP
For instance application/x-gzip. 
.PP
\fBParameters:\fP
.RS 4
\fImimeType\fP the mime type of the file to filter 
.RE
.PP
\fBReturns:\fP
.RS 4
the filter for the \fCmimeType\fP, or 0 if not found 
.RE
.PP

.PP
Definition at line 49 of file kfilterbase.cpp.
.PP
References QValueList::begin(), QValueList::count(), KLibFactory::create(), QValueList::end(), endl(), KLibLoader::factory(), kdDebug(), kdWarning(), KTrader::query(), KLibLoader::self(), and KTrader::self().
.PP
Referenced by KFilterDev::device(), KFilterDev::deviceForFile(), and findFilterByFileName().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
