\section{KFilter\-Base Class Reference}
\label{classKFilterBase}\index{KFilterBase@{KFilterBase}}
This is the base class for compression filters such as gzip and bzip2.  


{\tt \#include $<$kfilterbase.h$>$}

Inheritance diagram for KFilter\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=52pt]{classKFilterBase__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KFilter\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=91pt]{classKFilterBase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Result} \{ {\bf OK}, 
{\bf END}, 
{\bf ERROR}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Device} ({\bf QIODevice} $\ast$dev, bool autodelete=false)
\begin{CompactList}\small\item\em Sets the device on which the filter will work If {\tt autodelete} is set to true, {\tt dev} is deleted when the filter is deleted. \item\end{CompactList}\item 
{\bf QIODevice} $\ast$ {\bf device} ()\label{classKFilterBase_a3}

\item 
virtual void {\bf init} (int mode)=0\label{classKFilterBase_a4}

\item 
virtual int {\bf mode} () const =0\label{classKFilterBase_a5}

\item 
virtual void {\bf terminate} ()\label{classKFilterBase_a6}

\item 
virtual void {\bf reset} ()\label{classKFilterBase_a7}

\item 
virtual bool {\bf read\-Header} ()=0\label{classKFilterBase_a8}

\item 
virtual bool {\bf write\-Header} (const  {\bf QCString} \&filename)=0\label{classKFilterBase_a9}

\item 
virtual void {\bf set\-Out\-Buffer} (char $\ast$data, uint maxlen)=0\label{classKFilterBase_a10}

\item 
virtual void {\bf set\-In\-Buffer} (const  char $\ast$data, uint size)=0\label{classKFilterBase_a11}

\item 
virtual bool {\bf in\-Buffer\-Empty} () const \label{classKFilterBase_a12}

\item 
virtual int {\bf in\-Buffer\-Available} () const =0\label{classKFilterBase_a13}

\item 
virtual bool {\bf out\-Buffer\-Full} () const \label{classKFilterBase_a14}

\item 
virtual int {\bf out\-Buffer\-Available} () const =0\label{classKFilterBase_a15}

\item 
virtual Result {\bf uncompress} ()=0\label{classKFilterBase_a16}

\item 
virtual Result {\bf compress} (bool finish)=0\label{classKFilterBase_a17}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KFilter\-Base} $\ast$ {\bf find\-Filter\-By\-File\-Name} (const  {\bf QString} \&file\-Name)
\begin{CompactList}\small\item\em Call this to create the appropriate filter for the file named {\tt file\-Name}. \item\end{CompactList}\item 
{\bf KFilter\-Base} $\ast$ {\bf find\-Filter\-By\-Mime\-Type} (const  {\bf QString} \&mime\-Type)
\begin{CompactList}\small\item\em Call this to create the appropriate filter for the mimetype {\tt mime\-Type}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKFilterBase_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QIODevice} $\ast$ {\bf m\_\-dev}\label{classKFilterBase_p0}

\item 
bool {\bf m\_\-b\-Auto\-Del}\label{classKFilterBase_p1}

\end{CompactItemize}


\subsection{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 {\bf KFilter\-Dev}{\rm (p.\,\pageref{classKFilterDev})} instead. 



Definition at line 31 of file kfilterbase.h.

\subsection{Member Function Documentation}
\index{KFilterBase@{KFilter\-Base}!setDevice@{setDevice}}
\index{setDevice@{setDevice}!KFilterBase@{KFilter\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFilter\-Base::set\-Device ({\bf QIODevice} $\ast$ {\em dev}, bool {\em autodelete} = false)}\label{classKFilterBase_a2}


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



Definition at line 36 of file kfilterbase.cpp.

Referenced by KFilter\-Dev::create\-Filter\-Device(), KFilter\-Dev::device(), and KFilter\-Dev::device\-For\-File().\index{KFilterBase@{KFilter\-Base}!findFilterByFileName@{findFilterByFileName}}
\index{findFilterByFileName@{findFilterByFileName}!KFilterBase@{KFilter\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFilter\-Base} $\ast$ KFilter\-Base::find\-Filter\-By\-File\-Name (const {\bf QString} \& {\em file\-Name})\hspace{0.3cm}{\tt  [static]}}\label{classKFilterBase_e0}


Call this to create the appropriate filter for the file named {\tt file\-Name}. 



Definition at line 42 of file kfilterbase.cpp.

References KMime\-Type::find\-By\-Path(), and find\-Filter\-By\-Mime\-Type().

Referenced by KFilter\-Dev::device\-For\-File().\index{KFilterBase@{KFilter\-Base}!findFilterByMimeType@{findFilterByMimeType}}
\index{findFilterByMimeType@{findFilterByMimeType}!KFilterBase@{KFilter\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFilter\-Base} $\ast$ KFilter\-Base::find\-Filter\-By\-Mime\-Type (const {\bf QString} \& {\em mime\-Type})\hspace{0.3cm}{\tt  [static]}}\label{classKFilterBase_e1}


Call this to create the appropriate filter for the mimetype {\tt mime\-Type}. 

For instance application/x-gzip. 

Definition at line 49 of file kfilterbase.cpp.

References QValue\-List::begin(), QValue\-List::count(), KLib\-Factory::create(), QValue\-List::end(), KStd\-Accel::end(), KLib\-Loader::factory(), KTrader::Offer\-List, KTrader::query(), KLib\-Loader::self(), and KTrader::self().

Referenced by KFilter\-Dev::device(), KFilter\-Dev::device\-For\-File(), and find\-Filter\-By\-File\-Name().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kfilterbase.h\item 
kfilterbase.cpp\end{CompactItemize}
