KIO::TransferJob Class Reference
The transfer job pumps data into and/or out of a Slave. More...
#include <jobclasses.h>
Inheritance diagram for KIO::TransferJob:

Signals | |
void | data (KIO::Job *job, const QByteArray &data) |
void | dataReq (KIO::Job *job, QByteArray &data) |
void | redirection (KIO::Job *job, const KURL &url) |
void | permanentRedirection (KIO::Job *job, const KURL &fromUrl, const KURL &toUrl) |
void | mimetype (KIO::Job *job, const QString &type) |
void | canResume (KIO::Job *job, KIO::filesize_t offset) |
Public Member Functions | |
TransferJob (const KURL &url, int command, const QByteArray &packedArgs, const QByteArray &_staticData, bool showProgressInfo) | |
virtual void | start (Slave *slave) |
virtual void | slotResult (KIO::Job *job) |
void | suspend () |
void | resume () |
bool | isSuspended () const |
bool | isErrorPage () const |
void | setAsyncDataEnabled (bool enabled) |
void | sendAsyncData (const QByteArray &data) |
void | setReportDataSent (bool enabled) |
bool | reportDataSent () |
Protected Slots | |
virtual void | slotRedirection (const KURL &url) |
virtual void | slotFinished () |
virtual void | slotData (const QByteArray &data) |
virtual void | slotDataReq () |
virtual void | slotMimetype (const QString &mimetype) |
virtual void | slotNeedSubURLData () |
virtual void | slotSubURLData (KIO::Job *, const QByteArray &) |
virtual void | slotMetaData (const KIO::MetaData &_metaData) |
void | slotErrorPage () |
void | slotCanResume (KIO::filesize_t offset) |
void | slotPostRedirection () |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
bool | m_suspended |
bool | m_errorPage |
QByteArray | staticData |
KURL | m_redirectionURL |
KURL::List | m_redirectionList |
QString | m_mimetype |
TransferJob * | m_subJob |
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 ( dataReq). If data coming from the slave can not be handled, the reading of data from the slave should be suspended.
Definition at line 834 of file jobclasses.h.
Constructor & Destructor Documentation
|
Do not create a TransferJob. Use KIO::get() or KIO::put() instead.
Definition at line 857 of file job.cpp. References m_errorPage, m_subJob, m_suspended, Observer::self(), and Observer::slotTransferring(). |
Member Function Documentation
|
Called when m_subJob finishes.
Reimplemented from KIO::Job. Definition at line 1139 of file job.cpp. References KIO::Job::emitResult(), KIO::Job::error(), KIO::Job::errorText(), KIO::Job::m_error, KIO::Job::m_errorText, m_subJob, KIO::Job::removeSubjob(), and resume(). |
|
Flow control. Suspend data processing from the slave. Definition at line 1056 of file job.cpp. References KIO::SimpleJob::m_slave, m_suspended, and KIO::Slave::suspend(). Referenced by slotDataReq(), slotNeedSubURLData(), and slotSubURLData(). |
|
Flow control. Resume data processing from the slave. Definition at line 1063 of file job.cpp. References KIO::SimpleJob::m_slave, m_suspended, and KIO::Slave::resume(). Referenced by slotDataReq(), slotResult(), and slotSubURLData(). |
|
Flow control.
Definition at line 880 of file jobclasses.h. |
|
Checks whether we got an error page. This currently only happens with HTTP urls. Call this from your slot connected to result().
Definition at line 890 of file jobclasses.h. |
|
Enable the async data mode. When async data is enabled, data should be provided to the job by calling sendAsyncData() instead of returning data in the dataReq() signal.
|
|
Provide data to the job when async data is enabled. Should be called exactly once after receiving a dataReq signal Sending an empty block indicates end of data.
Definition at line 977 of file job.cpp. References KIO::Job::emitPercent(), KIO::Job::getProcessedSize(), KIO::SimpleJob::m_slave, KIO::SimpleJob::m_totalSize, KIO::Job::processedSize(), KIO::Slave::send(), KIO::Job::setProcessedSize(), and KIO::SimpleJob::slotTotalSize(). Referenced by slotDataReq(). |
|
When enabled, the job reports the amount of data that has been sent, instead of the amount of data that that has been received.
|
|
Returns whether the job reports the amount of data that has been sent (true), or whether the job reports the amount of data that has been received (false).
|
|
Data from the slave has arrived.
Referenced by slotData(), slotNeedSubURLData(), and start(). |
|
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)
Referenced by slotDataReq(), start(), and KIO::StoredTransferJob::StoredTransferJob(). |
|
Signals a redirection. Use to update the URL shown to the user. The redirection itself is handled internally.
Referenced by slotPostRedirection(), slotRedirection(), and start(). |
|
Signals a permanent redirection. The redirection itself is handled internally.
Referenced by KIO::MimetypeJob::slotFinished(), and slotFinished(). |
|
Mimetype determined.
Referenced by KIO::MimetypeJob::slotFinished(), and slotMimetype(). |
|
Called when the slave marks the job as finished.
Reimplemented from KIO::SimpleJob. Reimplemented in KIO::DavJob, KIO::MultiGetJob, and KIO::MimetypeJob. Definition at line 908 of file job.cpp. References KIO::Job::addMetaData(), QMap::clear(), KIO::Scheduler::doJob(), KURL::isEmpty(), KURL::isValid(), KIO::SimpleJob::m_command, KIO::Job::m_incomingMetaData, KIO::SimpleJob::m_packedArgs, m_redirectionURL, m_suspended, KIO::SimpleJob::m_url, permanentRedirection(), KIO::Job::queryMetaData(), KIO::SimpleJob::slaveDone(), KIO::SimpleJob::slotFinished(), and staticData. Referenced by KIO::MultiGetJob::slotFinished(), and KIO::MimetypeJob::slotFinished(). |
|
MetaData from the slave is received.
Reimplemented from KIO::SimpleJob. Definition at line 1124 of file job.cpp. References m_redirectionURL, KIO::SimpleJob::slotMetaData(), and KIO::SimpleJob::storeSSLSessionFromJob(). |
The documentation for this class was generated from the following files: