using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Session;
using MediaBrowser.Model.System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Session
{
    public interface ISessionController
    {
        /// 
        /// Gets a value indicating whether this instance is session active.
        /// 
        /// true if this instance is session active; otherwise, false.
        bool IsSessionActive { get; }
        /// 
        /// Gets a value indicating whether [supports media remote control].
        /// 
        /// true if [supports media remote control]; otherwise, false.
        bool SupportsMediaControl { get; }
        
        /// 
        /// Sends the play command.
        /// 
        /// The command.
        /// The cancellation token.
        /// Task.
        Task SendPlayCommand(PlayRequest command, CancellationToken cancellationToken);
        /// 
        /// Sends the playstate command.
        /// 
        /// The command.
        /// The cancellation token.
        /// Task.
        Task SendPlaystateCommand(PlaystateRequest command, CancellationToken cancellationToken);
        /// 
        /// Sends the generic command.
        /// 
        /// The command.
        /// The cancellation token.
        /// Task.
        Task SendGeneralCommand(GeneralCommand command, CancellationToken cancellationToken);
        
        /// 
        /// Sends the library update info.
        /// 
        /// The info.
        /// The cancellation token.
        /// Task.
        Task SendLibraryUpdateInfo(LibraryUpdateInfo info, CancellationToken cancellationToken);
        /// 
        /// Sends the restart required message.
        /// 
        /// The information.
        /// The cancellation token.
        /// Task.
        Task SendRestartRequiredNotification(SystemInfo info, CancellationToken cancellationToken);
        /// 
        /// Sends the user data change info.
        /// 
        /// The info.
        /// The cancellation token.
        /// Task.
        Task SendUserDataChangeInfo(UserDataChangeInfo info, CancellationToken cancellationToken);
        /// 
        /// Sends the server shutdown notification.
        /// 
        /// The cancellation token.
        /// Task.
        Task SendServerShutdownNotification(CancellationToken cancellationToken);
        /// 
        /// Sends the session ended notification.
        /// 
        /// The session information.
        /// The cancellation token.
        /// Task.
        Task SendSessionEndedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken);
        /// 
        /// Sends the playback start notification.
        /// 
        /// The session information.
        /// The cancellation token.
        /// Task.
        Task SendPlaybackStartNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken);
        /// 
        /// Sends the playback start notification.
        /// 
        /// The session information.
        /// The cancellation token.
        /// Task.
        Task SendPlaybackStoppedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken);
        
        /// 
        /// Sends the server restart notification.
        /// 
        /// The cancellation token.
        /// Task.
        Task SendServerRestartNotification(CancellationToken cancellationToken);
        /// 
        /// Sends the message.
        /// 
        /// 
        /// The name.
        /// The data.
        /// The cancellation token.
        /// Task.
        Task SendMessage(string name, T data, CancellationToken cancellationToken);
        /// 
        /// Called when [activity].
        /// 
        void OnActivity();
    }
}