2013-02-25 20:43:04 -07:00
|
|
|
|
using System;
|
2013-02-20 18:33:05 -07:00
|
|
|
|
using System.Collections.Generic;
|
2013-02-25 20:43:04 -07:00
|
|
|
|
using System.Threading;
|
2013-02-20 18:33:05 -07:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2016-10-23 12:14:57 -07:00
|
|
|
|
namespace MediaBrowser.Model.Tasks
|
2013-02-20 18:33:05 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2013-02-25 20:43:04 -07:00
|
|
|
|
/// Interface IScheduledTaskWorker
|
2013-02-20 18:33:05 -07:00
|
|
|
|
/// </summary>
|
2013-02-25 20:43:04 -07:00
|
|
|
|
public interface IScheduledTask
|
2013-02-20 18:33:05 -07:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the name of the task
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The name.</value>
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
2016-10-23 12:14:57 -07:00
|
|
|
|
string Key { get; }
|
|
|
|
|
|
2013-02-20 18:33:05 -07:00
|
|
|
|
/// <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>
|
|
|
|
|
/// Executes the task
|
|
|
|
|
/// </summary>
|
2013-02-25 20:43:04 -07:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
2013-02-20 18:33:05 -07:00
|
|
|
|
/// <returns>Task.</returns>
|
2013-02-25 20:43:04 -07:00
|
|
|
|
Task Execute(CancellationToken cancellationToken, IProgress<double> progress);
|
2013-02-24 14:53:54 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the default triggers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
2016-10-23 12:14:57 -07:00
|
|
|
|
IEnumerable<TaskTriggerInfo> GetDefaultTriggers();
|
2013-02-20 18:33:05 -07:00
|
|
|
|
}
|
2013-02-25 20:43:04 -07:00
|
|
|
|
}
|