C# Class HandBrake.ApplicationServices.Services.QueueManager

The Queue Manager. Thread Safe.
Inheritance: IQueueManager
Mostra file Open project: golgol7777/HandBrakeWinSource

Public Methods

Method Description
Add ( HandBrake.ApplicationServices.Model.QueueTask job ) : void

Add a job to the Queue. This method is Thread Safe.

BackupQueue ( string exportPath ) : void

Backup any changes to the queue file

CheckForDestinationPathDuplicates ( string destination ) : bool

Checks the current queue for an existing instance of the specified destination.

ClearCompleted ( ) : void

Clear down the Queue´s completed items

GetNextJobForProcessing ( ) : HandBrake.ApplicationServices.Model.QueueTask

Get the first job on the queue for processing. This also removes the job from the Queue and sets the LastProcessedJob

MoveDown ( int index ) : void

Moves an item down one position in the queue.

MoveUp ( int index ) : void

Moves an item up one position in the queue.

QueueManager ( int instanceId ) : System

Initializes a new instance of the QueueManager class.

Remove ( HandBrake.ApplicationServices.Model.QueueTask job ) : void

Remove a job from the Queue. This method is Thread Safe

ResetJobStatusToWaiting ( HandBrake.ApplicationServices.Model.QueueTask job ) : void

Reset a Queued Item from Error or Completed to Waiting

RestoreQueue ( string importPath ) : void

Restore a Queue from file or from the queue backup file.

WriteBatchScriptToFile ( string file ) : bool

Writes the current state of the queue in the form of a batch (.bat) file.

Private Methods

Method Description
InvokeQueueChanged ( EventArgs e ) : void

Invoke the Queue Changed Event

Method Details

Add() public method

Add a job to the Queue. This method is Thread Safe.
public Add ( HandBrake.ApplicationServices.Model.QueueTask job ) : void
job HandBrake.ApplicationServices.Model.QueueTask /// The encode Job object. ///
return void

BackupQueue() public method

Backup any changes to the queue file
public BackupQueue ( string exportPath ) : void
exportPath string /// If this is not null or empty, this will be used instead of the standard backup location. ///
return void

CheckForDestinationPathDuplicates() public method

Checks the current queue for an existing instance of the specified destination.
public CheckForDestinationPathDuplicates ( string destination ) : bool
destination string The destination of the encode.
return bool

ClearCompleted() public method

Clear down the Queue´s completed items
public ClearCompleted ( ) : void
return void

GetNextJobForProcessing() public method

Get the first job on the queue for processing. This also removes the job from the Queue and sets the LastProcessedJob
public GetNextJobForProcessing ( ) : HandBrake.ApplicationServices.Model.QueueTask
return HandBrake.ApplicationServices.Model.QueueTask

MoveDown() public method

Moves an item down one position in the queue.
public MoveDown ( int index ) : void
index int The zero-based location of the job in the queue.
return void

MoveUp() public method

Moves an item up one position in the queue.
public MoveUp ( int index ) : void
index int The zero-based location of the job in the queue.
return void

QueueManager() public method

Initializes a new instance of the QueueManager class.
public QueueManager ( int instanceId ) : System
instanceId int /// The instance Id. ///
return System

Remove() public method

Remove a job from the Queue. This method is Thread Safe
public Remove ( HandBrake.ApplicationServices.Model.QueueTask job ) : void
job HandBrake.ApplicationServices.Model.QueueTask /// The job. ///
return void

ResetJobStatusToWaiting() public method

Reset a Queued Item from Error or Completed to Waiting
public ResetJobStatusToWaiting ( HandBrake.ApplicationServices.Model.QueueTask job ) : void
job HandBrake.ApplicationServices.Model.QueueTask /// The job. ///
return void

RestoreQueue() public method

Restore a Queue from file or from the queue backup file.
public RestoreQueue ( string importPath ) : void
importPath string /// The import path. String.Empty or null will result in the default file being loaded. ///
return void

WriteBatchScriptToFile() public method

Writes the current state of the queue in the form of a batch (.bat) file.
public WriteBatchScriptToFile ( string file ) : bool
file string /// The location of the file to write the batch file to. ///
return bool