2016-10-23 19:47:34 +00:00
|
|
|
|
using System;
|
|
|
|
|
using MediaBrowser.Model.Events;
|
2013-02-26 03:43:04 +00:00
|
|
|
|
|
2016-10-23 19:47:34 +00:00
|
|
|
|
namespace MediaBrowser.Model.Tasks
|
2013-02-26 03:43:04 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface IScheduledTaskWorker
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IScheduledTaskWorker : IDisposable
|
|
|
|
|
{
|
2014-05-10 17:28:03 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Occurs when [task progress].
|
|
|
|
|
/// </summary>
|
|
|
|
|
event EventHandler<GenericEventArgs<double>> TaskProgress;
|
|
|
|
|
|
2013-02-26 03:43:04 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the scheduled task.
|
|
|
|
|
/// </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>
|
|
|
|
|
/// Gets the triggers that define when the task will run
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The triggers.</value>
|
2016-10-23 19:47:34 +00:00
|
|
|
|
/// <exception cref="ArgumentNullException">value</exception>
|
2016-10-23 19:14:57 +00:00
|
|
|
|
TaskTriggerInfo[] Triggers { get; set; }
|
2013-02-26 03:43:04 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the unique id.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The unique id.</value>
|
2014-05-09 19:43:06 +00:00
|
|
|
|
string Id { get; }
|
2015-10-25 15:48:44 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Reloads the trigger events.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void ReloadTriggerEvents();
|
2013-02-26 03:43:04 +00:00
|
|
|
|
}
|
|
|
|
|
}
|