using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MediaBrowser.Model.Events;
namespace MediaBrowser.Model.Tasks
{
public interface ITaskManager : IDisposable
{
///
/// Gets the list of Scheduled Tasks
///
/// The scheduled tasks.
IScheduledTaskWorker[] ScheduledTasks { get; }
///
/// Cancels if running and queue.
///
///
/// Task options.
void CancelIfRunningAndQueue(TaskOptions options)
where T : IScheduledTask;
///
/// Cancels if running and queue.
///
///
void CancelIfRunningAndQueue()
where T : IScheduledTask;
///
/// Cancels if running.
///
///
void CancelIfRunning()
where T : IScheduledTask;
///
/// Queues the scheduled task.
///
///
/// Task options.
void QueueScheduledTask(TaskOptions options)
where T : IScheduledTask;
///
/// Queues the scheduled task.
///
///
void QueueScheduledTask()
where T : IScheduledTask;
void QueueIfNotRunning()
where T : IScheduledTask;
///
/// Queues the scheduled task.
///
void QueueScheduledTask(IScheduledTask task, TaskOptions options);
///
/// Adds the tasks.
///
/// The tasks.
void AddTasks(IEnumerable tasks);
void Cancel(IScheduledTaskWorker task);
Task Execute(IScheduledTaskWorker task, TaskOptions options);
void Execute()
where T : IScheduledTask;
event EventHandler> TaskExecuting;
event EventHandler TaskCompleted;
void RunTaskOnNextStartup(string key);
}
}