PostProcessQueue
class PostProcessQueue : OperationQueue
OperationQueue class, which is responsible for managing all post-processing operations.
-
Whether the post-process will be in concurrency to download queue.
Declaration
Swift
var postProcessInConcurrencyToDownloadQueue: Bool -
The
Operationobject that used to report the completion of all running operations.Declaration
Swift
var finishedOperation: Operation? -
List of tasks that failed.
Declaration
Swift
let failedTasks: SynchronizedArray<DMSwiftTypealias.PostProcess.FailedTask> -
Informs successful start of operations.
Declaration
Swift
public var onStarted: (() -> Void)? -
Informs on changes in progress.
Declaration
Swift
public var onTaskProgressUpdate: ((_ progress: TaskProgress) -> Void)? -
Informs completion of all operations.
Declaration
Swift
public var onComplete: ((_ failledTasks: [DMSwiftTypealias.PostProcess.FailedTask]) -> Void)? -
Initiates with required parameters.
Declaration
Swift
init(configuration: DMSwiftConfiguration, fileStorage: FileStorage, postProcessings: [PostProcessing])Parameters
configurationDownloaderConfigurationused to get preferred configuration.fileStorageThe file storage manager that used to pass to a
PostProcessingobject.postProcessingsAvailable post-processes.
-
Updates
Selfwith theDMSwiftConfigurationDeclaration
Swift
func update(with dmSwiftConfiguration: DMSwiftConfiguration)Parameters
dmSwiftConfigurationCustomizable configuration.
-
Updates postProcesses
Declaration
Swift
func update(postProcesses: [PostProcessing])Parameters
postProcessesList of all available post-preccesses.
-
Updates
FileStorage.Declaration
Swift
func update(with fileStorage: FileStorage)Parameters
fileStoragea new
FileStorage -
Method used to start all operations in Queue.
Please note, the dependent operation used for the purpose that a new operation could be added to the queue dynamically, taking into account that all operations in the queue can be completed before adding a new operation.
Declaration
Swift
func start(withDependentOperation dependentOperation: Operation?)Parameters
dependentOperationThe operation that Queue will be dependent on before it finishes all operations.
-
Add post-process operation to queue.
Declaration
Swift
public func addPostProcessOperation(withFileData fileData: DMSwiftTypealias.Download.SavedFileData?) -> Operation?Parameters
fileDataFileDataobject that represents a file locationURL, filename and file extension.
PostProcessQueue Class Reference