using MediaBrowser.Model.Events;
using MediaBrowser.Model.Tasks;
using System;
namespace MediaBrowser.Common.ScheduledTasks
{
    /// 
    /// Interface ITaskTrigger
    /// 
    public interface ITaskTrigger
    {
        /// 
        /// Fires when the trigger condition is satisfied and the task should run
        /// 
        event EventHandler> Triggered;
        /// 
        /// Stars waiting for the trigger action
        /// 
        /// The last result.
        /// if set to true [is application startup].
        void Start(TaskResult lastResult, bool isApplicationStartup);
        /// 
        /// Stops waiting for the trigger action
        /// 
        void Stop();
        /// 
        /// Gets or sets the execution properties of this task.
        /// 
        /// 
        /// The execution properties of this task.
        /// 
        TaskExecutionOptions TaskOptions { get; set; }
    }
}