• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Job Class Referenceabstract

#include <job.h>

Inheritance diagram for Job:
Inheritance graph
[legend]

Classes

struct  Error
 

Public Types

enum  ErrorType { AutomaticRetry, ManualSolve, NotSolveable }
 
enum  Policy { Start, Stop, None }
 
enum  Status {
  Running = 0, Stopped = 2, Aborted = 3, Finished = 4,
  FinishedKeepAlive = 5, Moving = 6
}
 

Public Member Functions

 Job (Scheduler *scheduler, JobQueue *parent)
 
virtual ~Job ()
 
virtual int elapsedTime () const =0
 
Error error () const
 
virtual bool isStalled () const =0
 
virtual bool isWorking () const =0
 
JobQueue * jobQueue ()
 
Policy policy () const
 
virtual int remainingTime () const =0
 
virtual void resolveError (int errorId)
 
void setError (const QString &text, const QPixmap &pixmap, ErrorType type=AutomaticRetry, int errorId=-1)
 
void setPolicy (Policy jobPolicy)
 
void setStatus (Status jobStatus)
 
virtual void start ()=0
 
Status startStatus () const
 
Status status () const
 
virtual void stop ()=0
 

Protected Member Functions

void postJobEvent (Status)
 
void read (QDomNode *n)
 
Scheduler * scheduler () const
 
void setStartStatus (Status jobStatus)
 
void write (QDomNode *n)
 

Protected Attributes

JobQueue * m_jobQueue
 
Scheduler * m_scheduler
 

Detailed Description

Definition at line 35 of file job.h.

Member Enumeration Documentation

enum Job::ErrorType

Describes different types of errors and how the scheduler should manage them.

Enumerator
AutomaticRetry 
ManualSolve 
NotSolveable 

Definition at line 68 of file job.h.

enum Job::Policy

The policy property describes how the scheduler should manage this job.

Enumerator
Start 
Stop 

The scheduler should start this job even if its queue isn't in a Running status.

None 

The scheduler shouldn't never start this job, even if if its queue is in a Running status.

The scheduler should start this job depending on its queue status

Definition at line 57 of file job.h.

enum Job::Status

The status property describes the current job status.

Enumerator
Running 
Stopped 

The job is being executed.

Aborted 

The job is stopped.

Finished 

The job is stopped, but this also indicates that it stopped because an error occurred.

FinishedKeepAlive 

The job exited from its Running state successfully.

Moving 

The job exited from its Running state successfully but wants to be restarted by the scheduler.

Definition at line 42 of file job.h.

Constructor & Destructor Documentation

Job::Job ( Scheduler *  scheduler,
JobQueue *  parent 
)

Definition at line 19 of file job.cpp.

Job::~Job ( )
virtual

Definition at line 30 of file job.cpp.

Member Function Documentation

virtual int Job::elapsedTime ( ) const
pure virtual

Implemented in Transfer, and BTTransfer.

Error Job::error ( ) const
inline

Definition at line 96 of file job.h.

virtual bool Job::isStalled ( ) const
pure virtual

Implemented in Transfer, and BTTransfer.

virtual bool Job::isWorking ( ) const
pure virtual

Implemented in Transfer, and BTTransfer.

JobQueue* Job::jobQueue ( )
inline

Definition at line 86 of file job.h.

Policy Job::policy ( ) const
inline

Definition at line 95 of file job.h.

void Job::postJobEvent ( Status  )
protected

This one posts a job event to the scheduler.

void Job::read ( QDomNode *  n)
protected
virtual int Job::remainingTime ( ) const
pure virtual

Implemented in Transfer, BTTransfer, Metalink, and AbstractMetalink.

void Job::resolveError ( int  errorId)
virtual

Definition at line 74 of file job.cpp.

Scheduler* Job::scheduler ( ) const
inlineprotected

Definition at line 106 of file job.h.

void Job::setError ( const QString &  text,
const QPixmap &  pixmap,
ErrorType  type = AutomaticRetry,
int  errorId = -1 
)

Definition at line 65 of file job.cpp.

void Job::setPolicy ( Policy  jobPolicy)

Definition at line 54 of file job.cpp.

void Job::setStartStatus ( Status  jobStatus)
protected

Definition at line 48 of file job.cpp.

void Job::setStatus ( Status  jobStatus)

Definition at line 34 of file job.cpp.

virtual void Job::start ( )
pure virtual

Implemented in BTTransfer.

Status Job::startStatus ( ) const
inline

Definition at line 94 of file job.h.

Status Job::status ( ) const
inline

Definition at line 93 of file job.h.

virtual void Job::stop ( )
pure virtual

Implemented in BTTransfer.

void Job::write ( QDomNode *  n)
protected

Member Data Documentation

JobQueue* Job::m_jobQueue
protected

Definition at line 118 of file job.h.

Scheduler* Job::m_scheduler
protected

Definition at line 119 of file job.h.


The documentation for this class was generated from the following files:
  • job.h
  • job.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal