# class TransferJob | The transfer job pumps data into and/or out of a Slave. More...
Full name | `KIO::TransferJob`
Definition | `#include <jobclasses.h>`
Inherits | KIO::SimpleJob [public ]
Inherited by | MimetypeJob
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- 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 ()
- void setMetaData ( const KIO::MetaData &)
- void addMetaData (const QString &key, const QString &value)
- void addMetaData (const QMap<QString,QString> &values)
- MetaData outgoingMetaData ()
- MetaData metaData ()
- QString queryMetaData (const QString &key)
- bool isErrorPage () const

#### Signals

- void data ( KIO::Job *, const QByteArray &data)
- void dataReq ( KIO::Job *, QByteArray &data)
- void redirection ( KIO::Job *, const KURL &url )
- void mimetype ( KIO::Job *, const QString &type )
- void canResume ( KIO::Job *, unsigned long offset )

#### 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 slotMetaData ( const KIO::MetaData &_metaData)
- virtual void slotNeedSubURLData ()
- virtual void slotSubURLData (KIO::Job*, const QByteArray &)
- void slotErrorPage ()
- void slotCanResume ( unsigned long offset )

#### Protected Members

- bool m_suspended
- bool m_errorPage
- QByteArray staticData
- KURL m_redirectionURL
- KURL::List m_redirectionList
- QString m_mimetype
- MetaData m_outgoingMetaData
- MetaData m_incomingMetaData
- 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.

TransferJob (const KURL& url, int command, const QByteArray &packedArgs, const QByteArray &_staticData, bool showProgressInfo) | ### TransferJob

void start (Slave *slave) | ### start

[virtual]

Reimplemented from SimpleJob.

void slotResult ( KIO::Job *job ) | ### slotResult

[virtual]

Called when m_subJob finishes.

Reimplemented from Job.

void suspend () | ### suspend

Flow control. Suspend data processing from the slave.

void resume () | ### resume

Flow control. Resume data processing from the slave.

void setMetaData ( const KIO::MetaData &) | ### setMetaData

Set meta data to be sent to the slave.

void addMetaData (const QString &key, const QString &value) | ### addMetaData

Add key/value pair to the meta data that is sent to the slave

void addMetaData (const QMap<QString,QString> &values) | ### addMetaData

Add key/value pairs to the meta data that is sent to the slave

MetaData outgoingMetaData () | ### outgoingMetaData

MetaData metaData () | ### metaData

Get meta data received from the slave. (Valid when first data is received and/or slave is finished)

QString queryMetaData (const QString &key) | ### queryMetaData

Query meta data received from the slave. (Valid when first data is received and/or slave is finished)

bool isErrorPage () | ### isErrorPage

[const]

Returns: 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 result().

void data ( KIO::Job *, const QByteArray &data) | ### data

[signal]

Data from the slave has arrived.

Parameters:

data | data received from the slave End of data (EOD) has been reached if data.size() == 0

void dataReq ( KIO::Job *, QByteArray &data) | ### dataReq

[signal]

Request for data.

Parameters:

data | buffer to fill with data to send to the slave. An empty buffer indicates end of data. (EOD)

void redirection ( KIO::Job *, const KURL &url ) | ### redirection

[signal]

Signals a redirection Use to update the URL shown to the user The redirection itself is handled internally

void mimetype ( KIO::Job *, const QString &type ) | ### mimetype

[signal]

Mimetype determined

void canResume ( KIO::Job *, unsigned long offset ) | ### canResume

[signal]

Emitted if the "put" job found an existing partial file (in which case offset is the size of that file) and emitted by the "get" job if it supports resuming to the given offset - in this case `offset` is unused)

void slotRedirection ( const KURL &url) | ### slotRedirection

[protected slots virtual slot]

void slotFinished () | ### slotFinished

[protected slots virtual slot]

Reimplemented from SimpleJob.

void slotData ( const QByteArray &data) | ### slotData

[protected slots virtual slot]

void slotDataReq () | ### slotDataReq

[protected slots virtual slot]

void slotMimetype ( const QString &mimetype ) | ### slotMimetype

[protected slots virtual slot]

void slotMetaData ( const KIO::MetaData &_metaData) | ### slotMetaData

[protected slots virtual slot]

void slotNeedSubURLData () | ### slotNeedSubURLData

[protected slots virtual slot]

void slotSubURLData (KIO::Job*, const QByteArray &) | ### slotSubURLData

[protected slots virtual slot]

void slotErrorPage () | ### slotErrorPage

[protected slots slot]

void slotCanResume ( unsigned long offset ) | ### slotCanResume

[protected slots slot]

bool m_suspended | ### m_suspended

[protected]

bool m_errorPage | ### m_errorPage

[protected]

QByteArray staticData | ### staticData

[protected]

KURL m_redirectionURL | ### m_redirectionURL

[protected]

KURL::List m_redirectionList | ### m_redirectionList

[protected]

QString m_mimetype | ### m_mimetype

[protected]

MetaData m_outgoingMetaData | ### m_outgoingMetaData

[protected]

MetaData m_incomingMetaData | ### m_incomingMetaData

[protected]

TransferJob * m_subJob | ### m_subJob

[protected]

Generated by: root@i386.ports.openbsd.org on Wed Apr 25 13:58:36 2001, using kdoc 2.0a53.