class TransferJob

# 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 | DavJob, MimetypeJob, MultiGetJob
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 ()
- bool isSuspended () const
- 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 permanentRedirection ( KIO::Job *, const KURL &fromUrl, const KURL &toUrl )
- void mimetype ( KIO::Job *, const QString &type )
- void canResume ( KIO::Job *, KIO::filesize_t offset )

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

#### 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 &)
- void slotErrorPage ()
- void slotCanResume ( KIO::filesize_t offset )

#### Protected Members

- 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.

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.

bool isSuspended () | ### isSuspended

[const]

Flow control. Returns true if the job is suspended.

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. 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:

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 permanentRedirection ( KIO::Job *, const KURL &fromUrl, const KURL &toUrl ) | ### permanentRedirection

[signal]

Signals a permanent redirection. The redirection itself is handled internally.

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

[signal]

Mimetype determined

void canResume ( KIO::Job *, KIO::filesize_t 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 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 ( KIO::filesize_t 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]

TransferJob * m_subJob | ### m_subJob

[protected]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from SimpleJob.

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:57 2003, using kdoc 2.0a54.