KIO::StoredTransferJob Class Reference

`#include <jobclasses.h>`

Inheritance diagram for KIO::StoredTransferJob:

## Public Member Functions

| StoredTransferJob (const KURL &url, int command, const QByteArray &packedArgs, const QByteArray &_staticData, bool showProgressInfo)
void | setData (const QByteArray &arr)
QByteArray | data () const
Public Member Functions inherited from KIO::TransferJob
| 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 ()
Public Member Functions inherited from KIO::SimpleJob
| SimpleJob (const KURL &url, int command, const QByteArray &packedArgs, bool showProgressInfo)
const KURL & | url () const
virtual void | kill (bool quietly=true)
virtual void | putOnHold ()
void | slaveDone ()
Slave * | slave () const
int | command () const
Public Member Functions inherited from KIO::Job
int | error () const
int | progressId () const
const QString & | errorText () const
QString | errorString () const
QStringList | detailedErrorStrings (const KURL *reqUrl=0L, int method=-1) const
void | showErrorDialog (QWidget *parent=0L)
void | setAutoErrorHandlingEnabled (bool enable, QWidget *parentWidget=0)
bool | isAutoErrorHandlingEnabled () const
void | setAutoWarningHandlingEnabled (bool enable)
bool | isAutoWarningHandlingEnabled () const
void | setInteractive (bool enable)
bool | isInteractive () const
void | setWindow (QWidget *window)
QWidget * | window () const
void | updateUserTimestamp (unsigned long time)
void | setParentJob (Job *parentJob)
Job * | parentJob () const
void | setMetaData (const KIO::MetaData &metaData)
void | addMetaData (const QString &key, const QString &value)
void | addMetaData (const QMap< QString, QString > &values)
void | mergeMetaData (const QMap< QString, QString > &values)
MetaData | outgoingMetaData () const
MetaData | metaData () const
QString | queryMetaData (const QString &key)
KIO::filesize_t | getProcessedSize ()

## Additional Inherited Members

Public Slots inherited from KIO::SimpleJob
void | slotTotalSize (KIO::filesize_t data_size)
virtual void | slotError (int, const QString &)
Signals inherited from KIO::TransferJob
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)
Signals inherited from KIO::Job
void | result (KIO::Job *job)
void | canceled (KIO::Job *job)
void | infoMessage (KIO::Job *job, const QString &msg)
void | warning (KIO::Job *job, const QString &msg)
void | connected (KIO::Job *job)
void | percent (KIO::Job *job, unsigned long percent)
void | totalSize (KIO::Job *job, KIO::filesize_t size)
void | processedSize (KIO::Job *job, KIO::filesize_t size)
void | speed (KIO::Job *job, unsigned long speed)
Static Public Member Functions inherited from KIO::SimpleJob
static void | removeOnHold ()
Protected Types inherited from KIO::Job
enum | { EF_TransferJobAsync = (1 << 0), EF_TransferJobNeedData = (1 << 1), EF_TransferJobDataSent = (1 << 2), EF_ListJobUnrestricted = (1 << 3) }
Protected Slots inherited from KIO::TransferJob
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 Slots inherited from KIO::SimpleJob
virtual void | slotFinished ()
void | slotWarning (const QString &)
void | slotInfoMessage (const QString &s)
void | slotConnected ()
void | slotProcessedSize (KIO::filesize_t data_size)
void | slotSpeed (unsigned long speed)
virtual void | slotMetaData (const KIO::MetaData &_metaData)
void | slotNeedProgressId ()
Protected Slots inherited from KIO::Job
void | slotSpeed (KIO::Job *job, unsigned long speed)
void | slotInfoMessage (KIO::Job *job, const QString &msg)
void | slotSpeedTimeout ()
Protected Member Functions inherited from KIO::TransferJob
virtual void | virtual_hook (int id, void *data)
Protected Member Functions inherited from KIO::SimpleJob
void | storeSSLSessionFromJob (const KURL &m_redirectionURL)
Protected Member Functions inherited from KIO::Job
| Job (bool showProgressInfo)
virtual void | addSubjob (Job *job, bool inheritMetaData=true)
virtual void | removeSubjob (Job *job)
void | removeSubjob (Job *job, bool mergeMetaData, bool emitResultIfLast)
void | emitPercent (KIO::filesize_t processedSize, KIO::filesize_t totalSize)
void | emitSpeed (unsigned long speed)
void | emitResult ()
void | setProcessedSize (KIO::filesize_t size)
unsigned long | userTimestamp () const
int & | extraFlags ()
Protected Attributes inherited from KIO::TransferJob
bool | m_suspended
bool | m_errorPage
QByteArray | staticData
KURL | m_redirectionURL
KURL::List | m_redirectionList
QString | m_mimetype
TransferJob * | m_subJob
Protected Attributes inherited from KIO::SimpleJob
Slave * | m_slave
QByteArray | m_packedArgs
KURL | m_url
KURL | m_subUrl
int | m_command
KIO::filesize_t | m_totalSize
Protected Attributes inherited from KIO::Job
QPtrList< Job > | subjobs
int | m_error
QString | m_errorText
unsigned long | m_percent
int | m_progressId
QTimer * | m_speedTimer
QGuardedPtr< QWidget > | m_window
MetaData | m_outgoingMetaData
MetaData | m_incomingMetaData

## Detailed Description

StoredTransferJob is a TransferJob (for downloading or uploading data) that also stores a QByteArray with the data, making it simpler to use than the standard TransferJob.

For KIO::storedGet it puts the data into the member QByteArray, 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 QByteArray can potentially require a lot of memory.

For KIO::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 QByteArray 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 QByteArray & | packedArgs,
|  | const QByteArray & | _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

Definition at line 1390 of file job.cpp.

## Member Function Documentation

QByteArray KIO::StoredTransferJob::data | ( |  | ) | const

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 QByteArray & | arr | ) |

Set data to be uploaded.

This is for put jobs. Automatically called by KIO::storedPut(const QByteArray &, ...), do not call this yourself.

Definition at line 1403 of file job.cpp.

The documentation for this class was generated from the following files:

- jobclasses.h
- job.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys