jellyfin-server/MediaBrowser.Common/ScheduledTasks/IScheduledTask.cs

51 lines
1.3 KiB
C#
Raw Normal View History

using System;
2013-02-21 01:33:05 +00:00
using System.Collections.Generic;
using System.Threading;
2013-02-21 01:33:05 +00:00
using System.Threading.Tasks;
namespace MediaBrowser.Common.ScheduledTasks
{
/// <summary>
/// Interface IScheduledTaskWorker
2013-02-21 01:33:05 +00:00
/// </summary>
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>
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="progress">The progress.</param>
2013-02-21 01:33:05 +00:00
/// <returns>Task.</returns>
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
}
public interface IConfigurableScheduledTask
{
bool IsHidden { get; }
}
}