2020-04-05 16:10:56 +00:00
|
|
|
#nullable disable
|
2019-01-13 20:02:23 +00:00
|
|
|
using System;
|
2024-09-04 15:38:10 +00:00
|
|
|
using System.Collections.Generic;
|
2020-08-14 00:48:28 +00:00
|
|
|
using Jellyfin.Data.Events;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Tasks
|
|
|
|
{
|
|
|
|
/// <summary>
|
2020-02-04 00:49:27 +00:00
|
|
|
/// Interface IScheduledTaskWorker.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
public interface IScheduledTaskWorker : IDisposable
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Occurs when [task progress].
|
|
|
|
/// </summary>
|
|
|
|
event EventHandler<GenericEventArgs<double>> TaskProgress;
|
|
|
|
|
|
|
|
/// <summary>
|
2021-02-20 22:13:04 +00:00
|
|
|
/// Gets the scheduled task.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The scheduled task.</value>
|
|
|
|
IScheduledTask ScheduledTask { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the last execution result.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The last execution result.</value>
|
|
|
|
TaskResult LastExecutionResult { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the name.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The name.</value>
|
|
|
|
string Name { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the description.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The description.</value>
|
|
|
|
string Description { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the category.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The category.</value>
|
|
|
|
string Category { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the state.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The state.</value>
|
|
|
|
TaskState State { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the current progress.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The current progress.</value>
|
|
|
|
double? CurrentProgress { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
2021-02-20 22:13:04 +00:00
|
|
|
/// Gets or sets the triggers that define when the task will run.
|
2018-12-27 23:27:57 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <value>The triggers.</value>
|
2024-09-04 15:38:10 +00:00
|
|
|
IReadOnlyList<TaskTriggerInfo> Triggers { get; set; }
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the unique id.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The unique id.</value>
|
|
|
|
string Id { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Reloads the trigger events.
|
|
|
|
/// </summary>
|
|
|
|
void ReloadTriggerEvents();
|
|
|
|
}
|
2019-01-13 19:31:15 +00:00
|
|
|
}
|