Logo Search packages:      
Sourcecode: partitionmanager version File versions  Download package

Job Class Reference

#include <job.h>

Inheritance diagram for Job:

BackupFileSystemJob CheckFileSystemJob CopyFileSystemJob CreateFileSystemJob CreatePartitionJob CreatePartitionTableJob DeleteFileSystemJob DeletePartitionJob MoveFileSystemJob ResizeFileSystemJob RestoreFileSystemJob SetFileSystemLabelJob SetPartFlagsJob SetPartGeometryJob

List of all members.

Detailed Description

Base class for all Jobs.

Each Operation is made up of one or more Jobs. Usually, an Operation will run each Job it is made up of and only complete successfully if each Job could be run without error. Jobs are all-or-nothing and try to be as atomic as possible: A Job is either successfully run or not, there is no case where a Job finishes with a warning.


Definition at line 47 of file job.h.

Public Types

enum  JobStatus { Pending = 0, Success, Error }


void finished ()
void progress (int)
void started ()

Public Member Functions

virtual QString description () const =0
virtual qint32 numSteps () const
virtual bool run (Report &parent)=0
JobStatus status () const
virtual QIcon statusIcon () const
virtual QString statusText () const

Static Public Member Functions

static FileSystem::Type detectFileSystem (PedDevice *pedDevice, PedPartition *pedPartition)

Protected Member Functions

void closePed ()
bool commit (quint32 timeout=10)
bool copyBlocks (Report &report, CopyTarget &target, CopySource &source)
FileSystem::Type detectFileSystemBySector (Report &report, Device &device, qint64 sector)
void emitProgress (int i)
void jobFinished (Report &report, bool b)
ReportjobStarted (Report &parent)
bool openPed (const QString &path, bool diskFailOk=false)
PedDevice * pedDevice ()
PedDisk * pedDisk ()
bool rollbackCopyBlocks (Report &report, CopyTarget &origTarget, CopySource &origSource)
void setStatus (JobStatus s)

Static Protected Member Functions

static bool commit (PedDisk *disk, quint32 timeout=10)
static PedFileSystemType * getPedFileSystemType (FileSystem::Type t)
static void pedTimerHandler (PedTimer *pedTimer, void *ctx)

Private Attributes

PedDevice * m_PedDevice
PedDisk * m_PedDisk
JobStatus m_Status

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

Generated by  Doxygen 1.6.0   Back to index