aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Tasks/IScheduledTask.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-10-23 15:14:57 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-10-23 15:14:57 -0400
commit07791d46a571d3d6eed23e98ec0fe1c46ea0d37f (patch)
treedc34a04c700f8837c557c511edab20ce9816d82d /MediaBrowser.Model/Tasks/IScheduledTask.cs
parent48296834028bdfaf782132258d87fdab42f528eb (diff)
rework scheduled tasks in preparation of common project going portable
Diffstat (limited to 'MediaBrowser.Model/Tasks/IScheduledTask.cs')
-rw-r--r--MediaBrowser.Model/Tasks/IScheduledTask.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Tasks/IScheduledTask.cs b/MediaBrowser.Model/Tasks/IScheduledTask.cs
new file mode 100644
index 000000000..81ba239ad
--- /dev/null
+++ b/MediaBrowser.Model/Tasks/IScheduledTask.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Model.Tasks
+{
+ /// <summary>
+ /// Interface IScheduledTaskWorker
+ /// </summary>
+ public interface IScheduledTask
+ {
+ /// <summary>
+ /// Gets the name of the task
+ /// </summary>
+ /// <value>The name.</value>
+ string Name { get; }
+
+ string Key { 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>
+ /// <returns>Task.</returns>
+ Task Execute(CancellationToken cancellationToken, IProgress<double> progress);
+
+ /// <summary>
+ /// Gets the default triggers.
+ /// </summary>
+ /// <returns>IEnumerable{BaseTaskTrigger}.</returns>
+ IEnumerable<TaskTriggerInfo> GetDefaultTriggers();
+ }
+}