2013-02-26 03:43:04 +00:00
|
|
|
|
using System;
|
2013-02-21 01:33:05 +00:00
|
|
|
|
using System.Collections.Generic;
|
2013-02-26 03:43:04 +00:00
|
|
|
|
using System.Threading;
|
2013-02-21 01:33:05 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Common.ScheduledTasks
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2013-02-26 03:43:04 +00:00
|
|
|
|
/// Interface IScheduledTaskWorker
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// </summary>
|
2013-02-26 03:43:04 +00:00
|
|
|
|
public interface IScheduledTask
|
2013-02-21 01:33:05 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the name of the task
|
|
|
|
|
/// </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>
|
|
|
|
|
/// Executes the task
|
|
|
|
|
/// </summary>
|
2013-02-26 03:43:04 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// <returns>Task.</returns>
|
2013-02-26 03:43:04 +00:00
|
|
|
|
Task Execute(CancellationToken cancellationToken, IProgress<double> progress);
|
2013-02-24 21:53:54 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the default triggers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
|
|
|
|
IEnumerable<ITaskTrigger> GetDefaultTriggers();
|
2013-02-21 01:33:05 +00:00
|
|
|
|
}
|
2013-11-29 16:58:24 +00:00
|
|
|
|
|
|
|
|
|
public interface IConfigurableScheduledTask
|
|
|
|
|
{
|
2014-01-19 06:36:21 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value indicating whether this instance is hidden.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
|
2013-11-29 16:58:24 +00:00
|
|
|
|
bool IsHidden { get; }
|
2014-01-19 06:36:21 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value indicating whether this instance is enabled.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
|
|
|
|
|
bool IsEnabled { get; }
|
2013-11-29 16:58:24 +00:00
|
|
|
|
}
|
2014-04-03 22:50:04 +00:00
|
|
|
|
|
|
|
|
|
public interface IHasKey
|
|
|
|
|
{
|
|
|
|
|
string Key { get; }
|
|
|
|
|
}
|
2013-02-26 03:43:04 +00:00
|
|
|
|
}
|