• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • TDEIO
  • TransferJob
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
TDEIO::TransferJob Class Reference

#include <jobclasses.h>

Inheritance diagram for TDEIO::TransferJob:
TDEIO::SimpleJob TDEIO::Job TDEIO::DavJob TDEIO::MimetypeJob TDEIO::MultiGetJob TDEIO::StoredTransferJob

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 ()
- Public Member Functions inherited from TDEIO::SimpleJob
 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
- Public Member Functions inherited from TDEIO::Job
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 ()

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 Slots inherited from TDEIO::SimpleJob
virtual void slotFinished ()
void slotWarning (const TQString &)
void slotInfoMessage (const TQString &s)
void slotConnected ()
void slotProcessedSize (TDEIO::filesize_t data_size)
void slotSpeed (unsigned long speed)
virtual void slotMetaData (const TDEIO::MetaData &_metaData)
void slotNeedProgressId ()
- Protected Slots inherited from TDEIO::Job
void slotSpeed (TDEIO::Job *job, unsigned long speed)
void slotInfoMessage (TDEIO::Job *job, const TQString &msg)
void slotSpeedTimeout ()

Protected Member Functions

virtual void virtual_hook (int id, void *data)
- Protected Member Functions inherited from TDEIO::SimpleJob
void storeSSLSessionFromJob (const KURL &m_redirectionURL)
- Protected Member Functions inherited from TDEIO::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 (TDEIO::filesize_t processedSize, TDEIO::filesize_t totalSize)
void emitSpeed (unsigned long speed)
void emitResult ()
void setProcessedSize (TDEIO::filesize_t size)
unsigned long userTimestamp () const
int & extraFlags ()

Protected Attributes

bool m_suspended
bool m_errorPage
TQByteArray staticData
KURL m_redirectionURL
KURL::List m_redirectionList
TQString m_mimetype
TransferJob * m_subJob
- Protected Attributes inherited from TDEIO::SimpleJob
Slave * m_slave
TQByteArray m_packedArgs
KURL m_url
KURL m_subUrl
int m_command
TDEIO::filesize_t m_totalSize
- Protected Attributes inherited from TDEIO::Job
TQPtrList< Job > subjobs
int m_error
TQString m_errorText
unsigned long m_percent
int m_progressId
TQTimer * m_speedTimer
TQGuardedPtr< TQWidget > m_window
MetaData m_outgoingMetaData
MetaData m_incomingMetaData

Additional Inherited Members

- Public Slots inherited from TDEIO::SimpleJob
void slotTotalSize (TDEIO::filesize_t data_size)
virtual void slotError (int, const TQString &)
- Static Public Member Functions inherited from TDEIO::SimpleJob
static void removeOnHold ()
- Protected Types inherited from TDEIO::Job
enum  { EF_TransferJobAsync = (1 << 0), EF_TransferJobNeedData = (1 << 1), EF_TransferJobDataSent = (1 << 2), EF_ListJobUnrestricted = (1 << 3) }

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 874 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
urlthe url to get or put
commandthe command to issue
packedArgsthe arguments
_staticDataadditional data to transmit (e.g. in a HTTP Post)
showProgressInfotrue to show progress information to the user

Definition at line 951 of file job.cpp.

Member Function Documentation

void TDEIO::TransferJob::data ( TDEIO::Job *  job,
const TQByteArray &  data 
)
signal

Data from the slave has arrived.

Parameters
jobthe job that emitted this signal
datadata 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
jobthe job that emitted this signal
databuffer 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().

@return true if we got an (HTML) error page from the server
instead of what we asked for.

Definition at line 930 of file jobclasses.h.

bool TDEIO::TransferJob::isSuspended ( ) const
inline

Flow control.

Returns
true if the job is suspended

Definition at line 920 of file jobclasses.h.

void TDEIO::TransferJob::mimetype ( TDEIO::Job *  job,
const TQString &  type 
)
signal

Mimetype determined.

Parameters
jobthe job that emitted this signal
typethe 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
jobthe job that emitted this signal
fromUrlthe original URL
toUrlthe 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
jobthe job that emitted this signal
urlthe new URL
bool TransferJob::reportDataSent ( )

Returns whether the job reports the amount of data that has been sent (true), or whether the job reports the amount of data that has been received (false)

Since
3.2

Definition at line 1099 of file job.cpp.

void TransferJob::resume ( )

Flow control.

Resume data processing from the slave.

Definition at line 1157 of file job.cpp.

void TransferJob::sendAsyncData ( const TQByteArray &  data)

Provide data to the job when async data is enabled.

Should be called exactly once after receiving a dataReq signal Sending an empty block indicates end of data.

Since
3.2

Definition at line 1071 of file job.cpp.

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

Definition at line 1063 of file job.cpp.

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

Definition at line 1091 of file job.cpp.

void TransferJob::slotResult ( TDEIO::Job *  job)
virtual

Called when m_subJob finishes.

Parameters
jobthe job that finished

Reimplemented from TDEIO::Job.

Definition at line 1233 of file job.cpp.

void TransferJob::suspend ( )

Flow control.

Suspend data processing from the slave.

Definition at line 1150 of file job.cpp.


The documentation for this class was generated from the following files:
  • jobclasses.h
  • job.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.