#include <jobclasses.h>

Signals | |
void | data (TDEIO::Job *job, const TQByteArray &data) |
void | dataReq (TDEIO::Job *job, TQByteArray &data) |
void | redirection (TDEIO::Job *job, const KURL &url) |
void | permanentRedirection (TDEIO::Job *job, const KURL &fromUrl, const KURL &toUrl) |
void | mimetype (TDEIO::Job *job, const TQString &type) |
void | canResume (TDEIO::Job *job, TDEIO::filesize_t offset) |
Public Member Functions | |
TransferJob (const KURL &url, int command, const TQByteArray &packedArgs, const TQByteArray &_staticData, bool showProgressInfo) | |
virtual void | start (Slave *slave) |
virtual void | slotResult (TDEIO::Job *job) |
void | suspend () |
void | resume () |
bool | isSuspended () const |
bool | isErrorPage () const |
void | setAsyncDataEnabled (bool enabled) |
void | sendAsyncData (const TQByteArray &data) |
void | setReportDataSent (bool enabled) |
bool | reportDataSent () |
Protected Slots | |
virtual void | slotRedirection (const KURL &url) |
virtual void | slotFinished () |
virtual void | slotData (const TQByteArray &data) |
virtual void | slotDataReq () |
virtual void | slotMimetype (const TQString &mimetype) |
virtual void | slotNeedSubURLData () |
virtual void | slotSubURLData (TDEIO::Job *, const TQByteArray &) |
virtual void | slotMetaData (const TDEIO::MetaData &_metaData) |
void | slotErrorPage () |
void | slotCanResume (TDEIO::filesize_t offset) |
void | slotPostRedirection () |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
bool | m_suspended |
bool | m_errorPage |
TQByteArray | staticData |
KURL | m_redirectionURL |
KURL::List | m_redirectionList |
TQString | 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 875 of file jobclasses.h.
Constructor & Destructor Documentation
TransferJob::TransferJob | ( | const KURL & | url, |
int | command, | ||
const TQByteArray & | packedArgs, | ||
const TQByteArray & | _staticData, | ||
bool | showProgressInfo | ||
) |
Do not create a TransferJob.
Use TDEIO::get() or TDEIO::put() instead.
- Parameters:
-
url the url to get or put command the command to issue packedArgs the arguments _staticData additional data to transmit (e.g. in a HTTP Post) showProgressInfo true to show progress information to the user
Member Function Documentation
void TDEIO::TransferJob::data | ( | TDEIO::Job * | job, |
const TQByteArray & | data | ||
) | [signal] |
Data from the slave has arrived.
- Parameters:
-
job the job that emitted this signal data data received from the slave.
End of data (EOD) has been reached if data.size() == 0, however, you should not be certain of data.size() == 0 ever happening (e.g. in case of an error), so you should rely on result() instead.
void TDEIO::TransferJob::dataReq | ( | TDEIO::Job * | job, |
TQByteArray & | data | ||
) | [signal] |
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)
- Parameters:
-
job the job that emitted this signal data buffer to fill with data to send to the slave. An empty buffer indicates end of data. (EOD)
bool TDEIO::TransferJob::isErrorPage | ( | ) | const [inline] |
Checks whether we got an error page.
This currently only happens with HTTP urls. Call this from your slot connected to result().
- Returns:
- true if we got an (HTML) error page from the server instead of what we asked for.
Definition at line 931 of file jobclasses.h.
bool TDEIO::TransferJob::isSuspended | ( | ) | const [inline] |
void TDEIO::TransferJob::mimetype | ( | TDEIO::Job * | job, |
const TQString & | type | ||
) | [signal] |
Mimetype determined.
- Parameters:
-
job the job that emitted this signal type the mime type
void TDEIO::TransferJob::permanentRedirection | ( | TDEIO::Job * | job, |
const KURL & | fromUrl, | ||
const KURL & | toUrl | ||
) | [signal] |
Signals a permanent redirection.
The redirection itself is handled internally.
- Parameters:
-
job the job that emitted this signal fromUrl the original URL toUrl the new URL
- Since:
- 3.1
void TDEIO::TransferJob::redirection | ( | TDEIO::Job * | job, |
const KURL & | url | ||
) | [signal] |
Signals a redirection.
Use to update the URL shown to the user. The redirection itself is handled internally.
- Parameters:
-
job the job that emitted this signal url the new URL
bool TransferJob::reportDataSent | ( | ) |
void TransferJob::resume | ( | ) |
void TransferJob::sendAsyncData | ( | const TQByteArray & | data | ) |
void TransferJob::setAsyncDataEnabled | ( | bool | enabled | ) |
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.
- Since:
- 3.2
void TransferJob::setReportDataSent | ( | bool | enabled | ) |
When enabled, the job reports the amount of data that has been sent, instead of the amount of data that that has been received.
- See also:
- slotProcessedSize
- slotSpeed
- Since:
- 3.2
void TransferJob::slotFinished | ( | ) | [protected, virtual, slot] |
Called when the slave marks the job as finished.
Reimplemented from TDEIO::SimpleJob.
Reimplemented in TDEIO::MimetypeJob, TDEIO::MultiGetJob, and TDEIO::DavJob.
void TransferJob::slotMetaData | ( | const TDEIO::MetaData & | _metaData | ) | [protected, virtual, slot] |
MetaData from the slave is received.
- Parameters:
-
_metaData the meta data
- See also:
- metaData()
Reimplemented from TDEIO::SimpleJob.
void TransferJob::slotResult | ( | TDEIO::Job * | job | ) | [virtual] |
void TransferJob::suspend | ( | ) |
The documentation for this class was generated from the following files: