#include <jobclasses.h>

Public Member Functions | |
StoredTransferJob (const KURL &url, int command, const TQByteArray &packedArgs, const TQByteArray &_staticData, bool showProgressInfo) | |
void | setData (const TQByteArray &arr) |
TQByteArray | data () const |
![]() | |
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 () |
![]() | |
SimpleJob (const KURL &url, int command, const TQByteArray &packedArgs, bool showProgressInfo) | |
const KURL & | url () const |
virtual void | kill (bool quietly=true) |
virtual void | putOnHold () |
void | slaveDone () |
Slave * | slave () const |
int | command () const |
![]() | |
int | error () const |
int | progressId () const |
const TQString & | errorText () const |
TQString | errorString () const |
TQStringList | detailedErrorStrings (const KURL *reqUrl=0L, int method=-1) const |
void | showErrorDialog (TQWidget *parent=0L) |
void | setAutoErrorHandlingEnabled (bool enable, TQWidget *parentWidget=0) |
bool | isAutoErrorHandlingEnabled () const |
void | setAutoWarningHandlingEnabled (bool enable) |
bool | isAutoWarningHandlingEnabled () const |
void | setInteractive (bool enable) |
bool | isInteractive () const |
void | setWindow (TQWidget *window) |
TQWidget * | window () const |
void | updateUserTimestamp (unsigned long time) |
void | setParentJob (Job *parentJob) |
Job * | parentJob () const |
void | setMetaData (const TDEIO::MetaData &metaData) |
void | addMetaData (const TQString &key, const TQString &value) |
void | addMetaData (const TQMap< TQString, TQString > &values) |
void | mergeMetaData (const TQMap< TQString, TQString > &values) |
MetaData | outgoingMetaData () const |
MetaData | metaData () const |
TQString | queryMetaData (const TQString &key) |
TDEIO::filesize_t | getProcessedSize () |
Additional Inherited Members | |
![]() | |
void | slotTotalSize (TDEIO::filesize_t data_size) |
virtual void | slotError (int, const TQString &) |
![]() | |
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) |
![]() | |
static void | removeOnHold () |
![]() | |
enum | { EF_TransferJobAsync = (1 << 0), EF_TransferJobNeedData = (1 << 1), EF_TransferJobDataSent = (1 << 2), EF_ListJobUnrestricted = (1 << 3) } |
![]() | |
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 () |
![]() | |
virtual void | virtual_hook (int id, void *data) |
![]() | |
bool | m_suspended |
bool | m_errorPage |
TQByteArray | staticData |
KURL | m_redirectionURL |
KURL::List | m_redirectionList |
TQString | m_mimetype |
TransferJob * | m_subJob |
Detailed Description
StoredTransferJob is a TransferJob (for downloading or uploading data) that also stores a TQByteArray with the data, making it simpler to use than the standard TransferJob.
For TDEIO::storedGet it puts the data into the member TQByteArray, so the user of this class can get hold of the whole data at once by calling data() when the result signal is emitted. You should only use StoredTransferJob to download data if you cannot process the data by chunks while it's being downloaded, since storing everything in a TQByteArray can potentially require a lot of memory.
For TDEIO::storedPut the user of this class simply provides the bytearray from the start, and the job takes care of uploading it. You should only use StoredTransferJob to upload data if you cannot provide the in chunks while it's being uploaded, since storing everything in a TQByteArray can potentially require a lot of memory.
- Since
- 3.3
Definition at line 1075 of file jobclasses.h.
Constructor & Destructor Documentation
StoredTransferJob::StoredTransferJob | ( | const KURL & | url, |
int | command, | ||
const TQByteArray & | packedArgs, | ||
const TQByteArray & | _staticData, | ||
bool | showProgressInfo | ||
) |
Do not create a StoredTransferJob.
Use storedGet() or storedPut() 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
|
inline |
Get hold of the downloaded data.
This is for get jobs. You're supposed to call this only from the slot connected to the result() signal.
Definition at line 1104 of file jobclasses.h.
void StoredTransferJob::setData | ( | const TQByteArray & | arr | ) |
Set data to be uploaded.
This is for put jobs. Automatically called by TDEIO::storedPut(const TQByteArray &, ...), do not call this yourself.
The documentation for this class was generated from the following files: