|
This is interface to track state and control individual asynchronous jobs withing workshop. More...
Public Member Functions | |
| void | ~WorkshopJob () |
| proto external WorkshopAssetBase | GetAsset () |
| Returns asset to which this job belongs to. | |
| proto external WorkshopRevisionBase | GetRevision () |
| Returns revision to which this job is currently doing the task. | |
| proto external WorkshopRevisionBase | GetPreviousRevision () |
| Returns previous revision for some specific tasks if there was some. | |
| proto external EWorkshopJobTask | GetTask () |
| Returns primary task this job is supposed to do. | |
| proto external EWorkshopJobState | GetState () |
| Returns in what state the job currently is in. | |
| proto external bool | IsCanceled () |
| Return true if job was canceled. | |
| proto external float | GetProcessProgress () |
| Returns primary progress of the jobs process in range 0.0f to 1.0f. | |
| proto external int | GetProcessTotalKB () |
| Return total amount of data in KB which will be processed by the job. | |
| proto external int | GetProcessDoneKB () |
| Returns amount of data in KB which was already processed by the job. | |
| proto external int | GetWriteSpeedKBpS () |
| Returns speed in KB per Second for writing data onto the disk. | |
| proto external float | GetDownloadProgress () |
| Returns progress of downloading missing data in range of 0.0f to 1.0f. | |
| proto external int | GetDownloadTotalKB () |
| Return total amount of missing data in KB which will be downloaded by the job. | |
| proto external int | GetDownloadDoneKB () |
| Return amount of missing data in KB which was already downloaded by the job. | |
| proto external int | GetDownloadSpeedKBpS () |
| Returns speed in KB per Second for downloading missing data. | |
| proto external void | Pause () |
| Will pause the job and will not continue until Resume is invoked. | |
| proto external void | Resume (notnull BackendCallback callback) |
| Will resume the paused job. | |
| proto external void | SetQueuePriority (int priority) |
| Will change the priority/position in processing queue for the jobs. | |
| proto external int | GetQueuePriority () |
| Returns priority of this job in processing queue. | |
| proto external void | Cancel (notnull BackendCallback callback) |
| Will gracefully cancel job and attempt to revert all changes that were done during active state of the asset. | |
| proto external void | ForceCancel () |
| Will forcefully cancel job without attempting to revert any previous changes. | |
| proto external void | Retry (notnull BackendCallback callback) |
| Will retry the job after it failed or was canceled. | |
This is interface to track state and control individual asynchronous jobs withing workshop.
State is saved into meta files of the asset which allows persistence between game restarts and continue unfinished jobs.
Jobs which was finished with any result or canceled by user is discarded by the workshop but Script or Native code can store these jobs with strong reference. This allows to preserve some kind of history with possibility to retry failed or canceled jobs.
| void WorkshopJob.~WorkshopJob | ( | ) |
| proto external void WorkshopJob.Cancel | ( | notnull BackendCallback | callback | ) |
Will gracefully cancel job and attempt to revert all changes that were done during active state of the asset.
job will change to CANCELED state after it finishes reverting.
| proto external void WorkshopJob.ForceCancel | ( | ) |
Will forcefully cancel job without attempting to revert any previous changes.
| proto external WorkshopAssetBase WorkshopJob.GetAsset | ( | ) |
Returns asset to which this job belongs to.
| proto external int WorkshopJob.GetDownloadDoneKB | ( | ) |
Return amount of missing data in KB which was already downloaded by the job.
| proto external float WorkshopJob.GetDownloadProgress | ( | ) |
Returns progress of downloading missing data in range of 0.0f to 1.0f.
| proto external int WorkshopJob.GetDownloadSpeedKBpS | ( | ) |
Returns speed in KB per Second for downloading missing data.
| proto external int WorkshopJob.GetDownloadTotalKB | ( | ) |
Return total amount of missing data in KB which will be downloaded by the job.
| proto external WorkshopRevisionBase WorkshopJob.GetPreviousRevision | ( | ) |
Returns previous revision for some specific tasks if there was some.
| proto external int WorkshopJob.GetProcessDoneKB | ( | ) |
Returns amount of data in KB which was already processed by the job.
| proto external float WorkshopJob.GetProcessProgress | ( | ) |
Returns primary progress of the jobs process in range 0.0f to 1.0f.
| proto external int WorkshopJob.GetProcessTotalKB | ( | ) |
Return total amount of data in KB which will be processed by the job.
| proto external int WorkshopJob.GetQueuePriority | ( | ) |
Returns priority of this job in processing queue.
| proto external WorkshopRevisionBase WorkshopJob.GetRevision | ( | ) |
Returns revision to which this job is currently doing the task.
| proto external EWorkshopJobState WorkshopJob.GetState | ( | ) |
Returns in what state the job currently is in.
| proto external EWorkshopJobTask WorkshopJob.GetTask | ( | ) |
Returns primary task this job is supposed to do.
| proto external int WorkshopJob.GetWriteSpeedKBpS | ( | ) |
Returns speed in KB per Second for writing data onto the disk.
| proto external bool WorkshopJob.IsCanceled | ( | ) |
Return true if job was canceled.
| proto external void WorkshopJob.Pause | ( | ) |
Will pause the job and will not continue until Resume is invoked.
| proto external void WorkshopJob.Resume | ( | notnull BackendCallback | callback | ) |
Will resume the paused job.
| proto external void WorkshopJob.Retry | ( | notnull BackendCallback | callback | ) |
Will retry the job after it failed or was canceled.
| proto external void WorkshopJob.SetQueuePriority | ( | int | priority | ) |
Will change the priority/position in processing queue for the jobs.