#pragma warning disable CS1591 using System; using System.Collections.Generic; using System.Threading.Tasks; using Jellyfin.Data.Events; namespace MediaBrowser.Model.Tasks { public interface ITaskManager : IDisposable { event EventHandler>? TaskExecuting; event EventHandler? TaskCompleted; /// /// Gets the list of Scheduled Tasks. /// /// The scheduled tasks. IScheduledTaskWorker[] ScheduledTasks { get; } /// /// Cancels if running and queue. /// /// An implementation of . /// Task options. void CancelIfRunningAndQueue(TaskOptions options) where T : IScheduledTask; /// /// Cancels if running and queue. /// /// An implementation of . void CancelIfRunningAndQueue() where T : IScheduledTask; /// /// Cancels if running. /// /// An implementation of . void CancelIfRunning() where T : IScheduledTask; /// /// Queues the scheduled task. /// /// An implementation of . /// Task options. void QueueScheduledTask(TaskOptions options) where T : IScheduledTask; /// /// Queues the scheduled task. /// /// An implementation of . void QueueScheduledTask() where T : IScheduledTask; void QueueIfNotRunning() where T : IScheduledTask; /// /// Queues the scheduled task. /// /// The to queue. /// The to use. 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; } }