|
| ~CVideoLibraryQueue () override |
|
void | ScanLibrary (const std::string &directory, bool scanAll=false, bool showProgress=true) |
| Enqueue a library scan job. More...
|
|
bool | IsScanningLibrary () const |
| Check if a library scan is in progress. More...
|
|
void | StopLibraryScanning () |
| Stop and dequeue all scanning jobs. More...
|
|
void | CleanLibrary (const std::set< int > &paths=std::set< int >(), bool asynchronous=true, CGUIDialogProgressBarHandle *progressBar=NULL) |
| Enqueue a library cleaning job. More...
|
|
void | CleanLibraryModal (const std::set< int > &paths=std::set< int >()) |
| Executes a library cleaning with a modal dialog. More...
|
|
void | RefreshItem (CFileItemPtr item, bool ignoreNfo=false, bool forceRefresh=true, bool refreshAll=false, const std::string &searchTitle="") |
| Enqueues a job to refresh the details of the given item. More...
|
|
bool | RefreshItemModal (CFileItemPtr item, bool forceRefresh=true, bool refreshAll=false) |
| Refreshes the details of the given item with a modal dialog. More...
|
|
void | MarkAsWatched (const CFileItemPtr &item, bool watched) |
| Queue a watched status update job. More...
|
|
void | ResetResumePoint (const CFileItemPtr item) |
| Queue a reset resume point job. More...
|
|
void | AddJob (CVideoLibraryJob *job) |
| Adds the given job to the queue. More...
|
|
void | CancelJob (CVideoLibraryJob *job) |
| Cancels the given job and removes it from the queue. More...
|
|
void | CancelAllJobs () |
| Cancels all running and queued jobs. More...
|
|
bool | IsRunning () const |
| Whether any jobs are running or not. More...
|
|
|
void | OnJobComplete (unsigned int jobID, bool success, CJob *job) override |
| The callback used when a job completes. More...
|
|
void | Refresh () |
| Notifies all to refresh the current listings. More...
|
|
bool | QueueEmpty () const |
| Returns if we still have jobs waiting to be processed NOTE: This function does not take into account the jobs that are currently processing. More...
|
|
| CJobQueue (bool lifo=false, unsigned int jobsAtOnce=1, CJob::PRIORITY priority=CJob::PRIORITY_LOW) |
| CJobQueue constructor. More...
|
|
| ~CJobQueue () override |
| CJobQueue destructor Cancels any in-process jobs, and destroys the job queue. More...
|
|
bool | AddJob (CJob *job) |
| Add a job to the queue On completion of the job (or destruction of the job queue) the CJob object will be destroyed. More...
|
|
template<typename F > |
void | Submit (F &&f) |
| Add a function f to this job queue. More...
|
|
void | CancelJob (const CJob *job) |
| Cancel a job in the queue Cancels a job in the queue. Any job currently being processed may complete after this call has completed, but OnJobComplete will not be performed. If the job is only queued then it will be removed from the queue and deleted. More...
|
|
void | CancelJobs () |
| Cancel all jobs in the queue Removes all jobs from the queue. Any job currently being processed may complete after this call has completed, but OnJobComplete will not be performed. More...
|
|
bool | IsProcessing () const |
| Check whether the queue is processing a job. More...
|
|
virtual | ~IJobCallback ()=default |
| Destructor for job call back objects. More...
|
|
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. More...
|
|
Queue for video library jobs.
The queue can only process a single job at any time and every job will be executed at the lowest priority.
void CVideoLibraryQueue::OnJobComplete |
( |
unsigned int |
jobID, |
|
|
bool |
success, |
|
|
CJob * |
job |
|
) |
| |
|
overrideprotectedvirtual |
The callback used when a job completes.
OnJobComplete is called at the completion of the CJob::DoWork function, and is used to return information to the caller on the result of the job. On returning from this function the CJobManager will destroy this job.
Subclasses should override this function if they wish to transfer information from the job prior to it's deletion. They must then call this base class function, which will move on to the next job.
- See also
- CJobManager, IJobCallback and CJob
Reimplemented from CJobQueue.