kio Library: KIO::SimpleJob Class Reference (kio Library)

| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KIO::SimpleJob Class Reference

A simple job (one url and one command). More...

`#include <jobclasses.h>`

Inheritance diagram for KIO::SimpleJob:

[legend]
Collaboration diagram for KIO::SimpleJob:

[legend]
List of all members.

## Public Slots
void | slotTotalSize (KIO::filesize_t data_size)
virtual void | slotError (int, const QString &)
## Public Member Functions
| SimpleJob (const KURL &url, int command, const QByteArray &packedArgs, bool showProgressInfo)
const KURL & | url () const
virtual void | kill (bool quietly=true)
virtual void | putOnHold ()
virtual void | start (Slave *slave)
void | slaveDone ()
Slave * | slave () const
int | command () const
## Static Public Member Functions
static void | removeOnHold ()
## Protected Slots
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 bytes_per_second)
virtual void | slotMetaData (const KIO::MetaData &_metaData)
void | slotNeedProgressId ()
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)
void | storeSSLSessionFromJob (const KURL &m_redirectionURL)
## Protected Attributes
Slave * | m_slave
QByteArray | m_packedArgs
KURL | m_url
KURL | m_subUrl
int | m_command
KIO::filesize_t | m_totalSize

## Detailed Description

A simple job (one url and one command).

This is the base class for all jobs that are scheduled. Other jobs are high-level jobs (CopyJob, DeleteJob, FileCopyJob...) that manage subjobs but aren't scheduled directly.

Definition at line 487 of file jobclasses.h.

## Constructor & Destructor Documentation

SimpleJob::SimpleJob | ( | const KURL & | url,
|  | int | command,
|  | const QByteArray & | packedArgs,
|  | bool | showProgressInfo
| ) |

  | Creates a new simple job. You don't need to use this constructor, unless you create a new job that inherits from SimpleJob. Parameters:
  | url | the url of the job
  | command | the command of the job
  | packedArgs | the arguments
  | showProgressInfo | true to show progress information to the user
Definition at line 390 of file job.cpp. References KIO::Scheduler::doJob(), QValueList::fromLast(), KURL::hasSubURL(), KURL::isValid(), KURL::join(), QValueList::remove(), QTimer::singleShot(), slotFinished(), KURL::split(), and KURL::url().

## Member Function Documentation

const KURL& KIO::SimpleJob::url | ( |  | ) | const`[inline]`

| Returns the SimpleJob's URL. Returns: the url Definition at line 508 of file jobclasses.h. Referenced by slotFinished().

void SimpleJob::kill | ( | bool | quietly = `true` | ) | `[virtual]`

  | Abort job. This kills all subjobs and deletes the job. Parameters:
  | quietly | if true, Job will emit signal result Should only be set to false when the user kills the job (from kio_uiserver), not when you want to abort a job.
Reimplemented from KIO::Job. Definition at line 417 of file job.cpp. References KIO::Scheduler::cancelJob(), and KIO::Job::kill(). Referenced by putOnHold().

void SimpleJob::putOnHold | ( |  | ) | `[virtual]`

| Abort job. Suspends slave to be reused by another job for the same request. Definition at line 424 of file job.cpp. References kill(), and KIO::Scheduler::putSlaveOnHold(). Referenced by KRun::foundMimeType().

void SimpleJob::removeOnHold | ( |  | ) | `[static]`

| Discard suspended slave. Definition at line 431 of file job.cpp. References KIO::Scheduler::removeSlaveOnHold().

void SimpleJob::slotTotalSize | ( | KIO::filesize_t | data_size | ) | `[slot]`

  | Forward signal from the slave Can also be called by the parent job, when it knows the size. Parameters:
  | data_size | the total size
Definition at line 592 of file job.cpp. References KIO::Job::totalSize(). Referenced by KIO::TransferJob::sendAsyncData(), and slotProcessedSize().

void SimpleJob::slotFinished | ( |  | ) | `[protected, virtual, slot]`

| Called when the slave marks the job as finished. Reimplemented in KIO::DavJob, KIO::StatJob, KIO::MkdirJob, KIO::TransferJob, KIO::MultiGetJob, KIO::MimetypeJob, and KIO::ListJob. Definition at line 522 of file job.cpp. References KURL::directory(), KIO::Job::emitResult(), QPtrList::isEmpty(), KURL::setPath(), and url(). Referenced by SimpleJob(), KIO::ListJob::slotFinished(), KIO::TransferJob::slotFinished(), KIO::StatJob::slotFinished(), and KIO::MkdirJob::slotFinished().

void SimpleJob::slotInfoMessage | ( | const QString & | s | ) | `[protected, slot]`

  | Called on a slave's info message. Parameters:
  | s | the info message
See also: infoMessage() Definition at line 575 of file job.cpp. References KIO::Job::infoMessage().

void SimpleJob::slotConnected | ( |  | ) | `[protected, slot]`

| Called on a slave's connected signal. See also: connected() Definition at line 580 of file job.cpp. References KIO::Job::connected().

void SimpleJob::slotProcessedSize | ( | KIO::filesize_t | data_size | ) | `[protected, slot]`

  | Forward signal from the slave. Parameters:
  | data_size | the processed size in bytes
See also: processedSize() Definition at line 601 of file job.cpp. References KIO::Job::emitPercent(), KIO::Job::processedSize(), KIO::Job::setProcessedSize(), and slotTotalSize().

void SimpleJob::slotSpeed | ( | unsigned long | bytes_per_second | ) | `[protected, slot]`

  | Forward signal from the slave. Parameters:
  | bytes_per_second | the speed in bytes/s
See also: speed() Definition at line 612 of file job.cpp. References KIO::Job::emitSpeed().

void SimpleJob::slotMetaData | ( | const KIO::MetaData & | _metaData | ) | `[protected, virtual, slot]`

  | MetaData from the slave is received. Parameters:
  | _metaData | the meta data
See also: metaData() Reimplemented in KIO::StatJob, KIO::TransferJob, and KIO::ListJob. Definition at line 618 of file job.cpp. Referenced by KIO::ListJob::slotMetaData(), KIO::TransferJob::slotMetaData(), and KIO::StatJob::slotMetaData().

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

- jobclasses.h
- job.cpp

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:26:01 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003