\section{KIO::Transfer\-Job Class Reference}
\label{classKIO_1_1TransferJob}\index{KIO::TransferJob@{KIO::TransferJob}}
The transfer job pumps data into and/or out of a Slave.  


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

Inheritance diagram for KIO::Transfer\-Job:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=65pt]{classKIO_1_1TransferJob__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::Transfer\-Job:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=314pt]{classKIO_1_1TransferJob__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf data} ({\bf KIO::Job} $\ast$, const  {\bf QByte\-Array} \&data)
\begin{CompactList}\small\item\em Data from the slave has arrived. \item\end{CompactList}\item 
void {\bf data\-Req} ({\bf KIO::Job} $\ast$, {\bf QByte\-Array} \&data)
\begin{CompactList}\small\item\em Request for data. \item\end{CompactList}\item 
void {\bf redirection} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&url)
\begin{CompactList}\small\item\em Signals a redirection. \item\end{CompactList}\item 
void {\bf permanent\-Redirection} ({\bf KIO::Job} $\ast$, const  {\bf KURL} \&from\-Url, const  {\bf KURL} \&to\-Url)
\begin{CompactList}\small\item\em Signals a permanent redirection. \item\end{CompactList}\item 
void {\bf mimetype} ({\bf KIO::Job} $\ast$, const  {\bf QString} \&type)
\begin{CompactList}\small\item\em Mimetype determined. \item\end{CompactList}\item 
void {\bf can\-Resume} ({\bf KIO::Job} $\ast$, KIO::filesize\_\-t offset)\label{classKIO_1_1TransferJob_l5}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Transfer\-Job} (const  {\bf KURL} \&url, int command, const  {\bf QByte\-Array} \&packed\-Args, const  {\bf QByte\-Array} \&\_\-static\-Data, bool show\-Progress\-Info)\label{classKIO_1_1TransferJob_a0}

\item 
virtual void {\bf start} (Slave $\ast$slave)\label{classKIO_1_1TransferJob_a1}

\item 
virtual void {\bf slot\-Result} ({\bf KIO::Job} $\ast$job)
\begin{CompactList}\small\item\em Called when m\_\-sub\-Job finishes. \item\end{CompactList}\item 
void {\bf suspend} ()
\begin{CompactList}\small\item\em Flow control. \item\end{CompactList}\item 
void {\bf resume} ()
\begin{CompactList}\small\item\em Flow control. \item\end{CompactList}\item 
bool {\bf is\-Suspended} () const 
\begin{CompactList}\small\item\em Flow control. \item\end{CompactList}\item 
bool {\bf is\-Error\-Page} () const 
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Redirection} (const  {\bf KURL} \&url)\label{classKIO_1_1TransferJob_j0}

\item 
virtual void {\bf slot\-Finished} ()
\begin{CompactList}\small\item\em Called when the slave marks the job as finished. \item\end{CompactList}\item 
virtual void {\bf slot\-Data} (const  {\bf QByte\-Array} \&data)\label{classKIO_1_1TransferJob_j2}

\item 
virtual void {\bf slot\-Data\-Req} ()\label{classKIO_1_1TransferJob_j3}

\item 
virtual void {\bf slot\-Mimetype} (const  {\bf QString} \&mimetype)\label{classKIO_1_1TransferJob_j4}

\item 
virtual void {\bf slot\-Need\-Sub\-URLData} ()\label{classKIO_1_1TransferJob_j5}

\item 
virtual void {\bf slot\-Sub\-URLData} ({\bf KIO::Job} $\ast$, const  {\bf QByte\-Array} \&)\label{classKIO_1_1TransferJob_j6}

\item 
void {\bf slot\-Error\-Page} ()\label{classKIO_1_1TransferJob_j7}

\item 
void {\bf slot\-Can\-Resume} (KIO::filesize\_\-t offset)\label{classKIO_1_1TransferJob_j8}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIO_1_1TransferJob_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
bool {\bf m\_\-suspended}\label{classKIO_1_1TransferJob_p0}

\item 
bool {\bf m\_\-error\-Page}\label{classKIO_1_1TransferJob_p1}

\item 
{\bf QByte\-Array} {\bf static\-Data}\label{classKIO_1_1TransferJob_p2}

\item 
{\bf KURL} {\bf m\_\-redirection\-URL}\label{classKIO_1_1TransferJob_p3}

\item 
{\bf KURL::List} {\bf m\_\-redirection\-List}\label{classKIO_1_1TransferJob_p4}

\item 
{\bf QString} {\bf m\_\-mimetype}\label{classKIO_1_1TransferJob_p5}

\item 
{\bf Transfer\-Job} $\ast$ {\bf m\_\-sub\-Job}\label{classKIO_1_1TransferJob_p6}

\end{CompactItemize}


\subsection{Detailed Description}
The transfer job pumps data into and/or out of a Slave. 

Data is sent to the slave on request of the slave ({\bf data\-Req}{\rm (p.\,\pageref{classKIO_1_1TransferJob_l1})}). If data coming from the slave can not be handled, the reading of data from the slave should be suspended. 



Definition at line 565 of file jobclasses.h.

\subsection{Member Function Documentation}
\index{KIO::TransferJob@{KIO::Transfer\-Job}!slotResult@{slotResult}}
\index{slotResult@{slotResult}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Transfer\-Job::slot\-Result ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [virtual]}}\label{classKIO_1_1TransferJob_a2}


Called when m\_\-sub\-Job finishes. 



Reimplemented from {\bf KIO::Job} {\rm (p.\,\pageref{classKIO_1_1Job_j0})}.

Definition at line 950 of file job.cpp.

References KIO::Job::emit\-Result(), KIO::Job::error(), KIO::Job::error\-Text(), QPtr\-List$<$ Job $>$::remove(), and resume().\index{KIO::TransferJob@{KIO::Transfer\-Job}!suspend@{suspend}}
\index{suspend@{suspend}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Transfer\-Job::suspend ()}\label{classKIO_1_1TransferJob_a3}


Flow control. 

Suspend data processing from the slave. 

Definition at line 872 of file job.cpp.\index{KIO::TransferJob@{KIO::Transfer\-Job}!resume@{resume}}
\index{resume@{resume}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Transfer\-Job::resume ()}\label{classKIO_1_1TransferJob_a4}


Flow control. 

Resume data processing from the slave. 

Definition at line 879 of file job.cpp.

Referenced by slot\-Result().\index{KIO::TransferJob@{KIO::Transfer\-Job}!isSuspended@{isSuspended}}
\index{isSuspended@{isSuspended}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::Transfer\-Job::is\-Suspended () const\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1TransferJob_a5}


Flow control. 

Returns true if the job is suspended. 

Definition at line 594 of file jobclasses.h.\index{KIO::TransferJob@{KIO::Transfer\-Job}!isErrorPage@{isErrorPage}}
\index{isErrorPage@{isErrorPage}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::Transfer\-Job::is\-Error\-Page () const\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1TransferJob_a6}


\begin{Desc}
\item[Returns:]true if we got an (HTML) error page from the server instead of what we asked for. This currently only happens with HTTP urls. Call this from your slot connected to {\bf result()}{\rm (p.\,\pageref{classKIO_1_1Job_l0})}. \end{Desc}


Definition at line 602 of file jobclasses.h.\index{KIO::TransferJob@{KIO::Transfer\-Job}!data@{data}}
\index{data@{data}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Transfer\-Job::data ({\bf KIO::Job} $\ast$, const {\bf QByte\-Array} \& {\em data})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1TransferJob_l0}


Data from the slave has arrived. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]data received from the slave. End of data (EOD) has been reached if data.size() == 0 \end{description}
\end{Desc}
\index{KIO::TransferJob@{KIO::Transfer\-Job}!dataReq@{dataReq}}
\index{dataReq@{dataReq}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Transfer\-Job::data\-Req ({\bf KIO::Job} $\ast$, {\bf QByte\-Array} \& {\em data})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1TransferJob_l1}


Request for data. 

Please note, that you shouldn't put too large chunks of data in it as this requires copies within the frame work, so you should rather split the data you want to pass here in reasonable chunks (about 1MB maximum)

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]buffer to fill with data to send to the slave. An empty buffer indicates end of data. (EOD) \end{description}
\end{Desc}
\index{KIO::TransferJob@{KIO::Transfer\-Job}!redirection@{redirection}}
\index{redirection@{redirection}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Transfer\-Job::redirection ({\bf KIO::Job} $\ast$, const {\bf KURL} \& {\em url})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1TransferJob_l2}


Signals a redirection. 

Use to update the URL shown to the user. The redirection itself is handled internally. \index{KIO::TransferJob@{KIO::Transfer\-Job}!permanentRedirection@{permanentRedirection}}
\index{permanentRedirection@{permanentRedirection}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Transfer\-Job::permanent\-Redirection ({\bf KIO::Job} $\ast$, const {\bf KURL} \& {\em from\-Url}, const {\bf KURL} \& {\em to\-Url})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1TransferJob_l3}


Signals a permanent redirection. 

The redirection itself is handled internally. \begin{Desc}
\item[Since:]3.1 \end{Desc}


Referenced by slot\-Finished().\index{KIO::TransferJob@{KIO::Transfer\-Job}!mimetype@{mimetype}}
\index{mimetype@{mimetype}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Transfer\-Job::mimetype ({\bf KIO::Job} $\ast$, const {\bf QString} \& {\em type})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1TransferJob_l4}


Mimetype determined. 

\index{KIO::TransferJob@{KIO::Transfer\-Job}!slotFinished@{slotFinished}}
\index{slotFinished@{slotFinished}!KIO::TransferJob@{KIO::Transfer\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Transfer\-Job::slot\-Finished ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKIO_1_1TransferJob_j1}


Called when the slave marks the job as finished. 



Reimplemented from {\bf KIO::Simple\-Job} {\rm (p.\,\pageref{classKIO_1_1SimpleJob_j0})}.

Reimplemented in {\bf KIO::Dav\-Job} {\rm (p.\,\pageref{classKIO_1_1DavJob_j0})}.

Definition at line 776 of file job.cpp.

References KIO::Job::add\-Meta\-Data(), KURL::is\-Empty(), KURL::is\-Malformed(), permanent\-Redirection(), and KIO::Job::query\-Meta\-Data().

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