15 #define kJobTypeMediaFlags "mediaflags" 16 #define kJobTypeCacheImage "cacheimage" 17 #define kJobTypeDDSCompress "ddscompress" 81 unsigned int progress,
117 PRIORITY_LOW_PAUSABLE = 0,
123 CJob() { m_callback = NULL; }
134 virtual ~
CJob() =
default;
144 virtual bool DoWork() = 0;
156 virtual const char*
GetType()
const {
return ""; }
158 virtual bool operator==(
const CJob* job)
const 175 virtual bool ShouldCancel(
unsigned int progress,
unsigned int total)
const;
virtual void OnJobProgress(unsigned int jobID, unsigned int progress, unsigned int total, const CJob *job)
An optional callback function that a job may call while processing.
Definition: Job.h:80
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
Job Manager class for scheduling asynchronous jobs.
Definition: JobManager.h:205
virtual void OnJobComplete(unsigned int jobID, bool success, CJob *job)=0
The callback used when a job completes.
Callback interface for asynchronous jobs.
Definition: Job.h:31
virtual const char * GetType() const
Function that returns the type of job.
Definition: Job.h:156
virtual void OnJobAbort(unsigned int jobID, CJob *job)
An optional callback function used when a job will be aborted.
Definition: Job.h:66
PRIORITY
Priority levels for jobs, specified by clients when adding jobs to the CJobManager.
Definition: Job.h:116
virtual ~IJobCallback()=default
Destructor for job call back objects.