.TH "KIO::TransferJob" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIO::TransferJob \- The transfer job pumps data into and/or out of a Slave.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <jobclasses.h>\fP
.PP
Inherits \fBKIO::SimpleJob\fP.
.PP
Inherited by \fBKIO::DavJob\fP, KIO::MimetypeJob, KIO::MultiGetJob, and PostErrorJob.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBdata\fP (\fBKIO::Job\fP *, const  \fBQByteArray\fP &data)"
.br
.RI "\fIData from the slave has arrived. \fP"
.ti -1c
.RI "void \fBdataReq\fP (\fBKIO::Job\fP *, \fBQByteArray\fP &data)"
.br
.RI "\fIRequest for data. \fP"
.ti -1c
.RI "void \fBredirection\fP (\fBKIO::Job\fP *, const  \fBKURL\fP &url)"
.br
.RI "\fISignals a redirection. \fP"
.ti -1c
.RI "void \fBpermanentRedirection\fP (\fBKIO::Job\fP *, const  \fBKURL\fP &fromUrl, const  \fBKURL\fP &toUrl)"
.br
.RI "\fISignals a permanent redirection. \fP"
.ti -1c
.RI "void \fBmimetype\fP (\fBKIO::Job\fP *, const  \fBQString\fP &type)"
.br
.RI "\fIMimetype determined. \fP"
.ti -1c
.RI "void \fBcanResume\fP (\fBKIO::Job\fP *, KIO::filesize_t offset)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBTransferJob\fP (const  \fBKURL\fP &url, int command, const  \fBQByteArray\fP &packedArgs, const  \fBQByteArray\fP &_staticData, bool showProgressInfo)"
.br
.ti -1c
.RI "virtual void \fBstart\fP (Slave *slave)"
.br
.ti -1c
.RI "virtual void \fBslotResult\fP (\fBKIO::Job\fP *job)"
.br
.RI "\fICalled when m_subJob finishes. \fP"
.ti -1c
.RI "void \fBsuspend\fP ()"
.br
.RI "\fIFlow control. \fP"
.ti -1c
.RI "void \fBresume\fP ()"
.br
.RI "\fIFlow control. \fP"
.ti -1c
.RI "bool \fBisSuspended\fP () const "
.br
.RI "\fIFlow control. \fP"
.ti -1c
.RI "bool \fBisErrorPage\fP () const "
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBslotRedirection\fP (const  \fBKURL\fP &url)"
.br
.ti -1c
.RI "virtual void \fBslotFinished\fP ()"
.br
.RI "\fICalled when the slave marks the job as finished. \fP"
.ti -1c
.RI "virtual void \fBslotData\fP (const  \fBQByteArray\fP &data)"
.br
.ti -1c
.RI "virtual void \fBslotDataReq\fP ()"
.br
.ti -1c
.RI "virtual void \fBslotMimetype\fP (const  \fBQString\fP &mimetype)"
.br
.ti -1c
.RI "virtual void \fBslotNeedSubURLData\fP ()"
.br
.ti -1c
.RI "virtual void \fBslotSubURLData\fP (\fBKIO::Job\fP *, const  \fBQByteArray\fP &)"
.br
.ti -1c
.RI "void \fBslotErrorPage\fP ()"
.br
.ti -1c
.RI "void \fBslotCanResume\fP (KIO::filesize_t offset)"
.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 "bool \fBm_suspended\fP"
.br
.ti -1c
.RI "bool \fBm_errorPage\fP"
.br
.ti -1c
.RI "\fBQByteArray\fP \fBstaticData\fP"
.br
.ti -1c
.RI "\fBKURL\fP \fBm_redirectionURL\fP"
.br
.ti -1c
.RI "\fBKURL::List\fP \fBm_redirectionList\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_mimetype\fP"
.br
.ti -1c
.RI "\fBTransferJob\fP * \fBm_subJob\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The transfer job pumps data into and/or out of a Slave. 

Data is sent to the slave on request of the slave (\fBdataReq\fP). If data coming from the slave can not be handled, the reading of data from the slave should be suspended. 
.PP
Definition at line 565 of file jobclasses.h.
.SH "Member Function Documentation"
.PP 
.SS "void TransferJob::slotResult (\fBKIO::Job\fP * job)\fC [virtual]\fP"
.PP
Called when m_subJob finishes. Reimplemented from \fBKIO::Job\fP.
.PP
Definition at line 950 of file job.cpp.
.PP
References KIO::Job::emitResult(), KIO::Job::error(), KIO::Job::errorText(), QPtrList< Job >::remove(), and resume().
.SS "void TransferJob::suspend ()"
.PP
Flow control. Suspend data processing from the slave. Definition at line 872 of file job.cpp.
.SS "void TransferJob::resume ()"
.PP
Flow control. Resume data processing from the slave. Definition at line 879 of file job.cpp.
.PP
Referenced by slotResult().
.SS "bool KIO::TransferJob::isSuspended () const\fC [inline]\fP"
.PP
Flow control. Returns true if the job is suspended. Definition at line 594 of file jobclasses.h.
.SS "bool KIO::TransferJob::isErrorPage () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
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 \fBresult()\fP. 
.RE
.PP
Definition at line 602 of file jobclasses.h.
.SS "void KIO::TransferJob::data (\fBKIO::Job\fP *, const \fBQByteArray\fP & data)\fC [signal]\fP"
.PP
Data from the slave has arrived. \fBParameters:\fP
.RS 4
\fIdata\fP data received from the slave. End of data (EOD) has been reached if data.size() == 0 
.RE
.PP

.SS "void KIO::TransferJob::dataReq (\fBKIO::Job\fP *, \fBQByteArray\fP & data)\fC [signal]\fP"
.PP
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)
.PP
\fBParameters:\fP
.RS 4
\fIdata\fP buffer to fill with data to send to the slave. An empty buffer indicates end of data. (EOD) 
.RE
.PP

.SS "void KIO::TransferJob::redirection (\fBKIO::Job\fP *, const \fBKURL\fP & url)\fC [signal]\fP"
.PP
Signals a redirection. Use to update the URL shown to the user. The redirection itself is handled internally. 
.SS "void KIO::TransferJob::permanentRedirection (\fBKIO::Job\fP *, const \fBKURL\fP & fromUrl, const \fBKURL\fP & toUrl)\fC [signal]\fP"
.PP
Signals a permanent redirection. The redirection itself is handled internally. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Referenced by slotFinished().
.SS "void KIO::TransferJob::mimetype (\fBKIO::Job\fP *, const \fBQString\fP & type)\fC [signal]\fP"
.PP
Mimetype determined. 
.SS "void TransferJob::slotFinished ()\fC [protected, virtual, slot]\fP"
.PP
Called when the slave marks the job as finished. Reimplemented from \fBKIO::SimpleJob\fP.
.PP
Reimplemented in \fBKIO::DavJob\fP.
.PP
Definition at line 776 of file job.cpp.
.PP
References KIO::Job::addMetaData(), KURL::isEmpty(), KURL::isMalformed(), permanentRedirection(), and KIO::Job::queryMetaData().

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