123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- using MediaBrowser.Model.Entities;
- using MediaBrowser.Model.Session;
- using System.Threading;
- using System.Threading.Tasks;
- namespace MediaBrowser.Controller.Session
- {
- public interface ISessionController
- {
- /// <summary>
- /// Gets a value indicating whether [supports media remote control].
- /// </summary>
- /// <value><c>true</c> if [supports media remote control]; otherwise, <c>false</c>.</value>
- bool SupportsMediaRemoteControl { get; }
- /// <summary>
- /// Gets a value indicating whether this instance is session active.
- /// </summary>
- /// <value><c>true</c> if this instance is session active; otherwise, <c>false</c>.</value>
- bool IsSessionActive { get; }
- /// <summary>
- /// Sends the message command.
- /// </summary>
- /// <param name="command">The command.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendMessageCommand(MessageCommand command, CancellationToken cancellationToken);
- /// <summary>
- /// Sends the play command.
- /// </summary>
- /// <param name="command">The command.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendPlayCommand(PlayRequest command, CancellationToken cancellationToken);
- /// <summary>
- /// Sends the browse command.
- /// </summary>
- /// <param name="command">The command.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendBrowseCommand(BrowseRequest command, CancellationToken cancellationToken);
- /// <summary>
- /// Sends the playstate command.
- /// </summary>
- /// <param name="command">The command.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendPlaystateCommand(PlaystateRequest command, CancellationToken cancellationToken);
- /// <summary>
- /// Sends the generic command.
- /// </summary>
- /// <param name="command">The command.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendGeneralCommand(GeneralCommand command, CancellationToken cancellationToken);
-
- /// <summary>
- /// Sends the library update info.
- /// </summary>
- /// <param name="info">The info.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendLibraryUpdateInfo(LibraryUpdateInfo info, CancellationToken cancellationToken);
- /// <summary>
- /// Sends the restart required message.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendRestartRequiredNotification(CancellationToken cancellationToken);
- /// <summary>
- /// Sends the user data change info.
- /// </summary>
- /// <param name="info">The info.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendUserDataChangeInfo(UserDataChangeInfo info, CancellationToken cancellationToken);
- /// <summary>
- /// Sends the server shutdown notification.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendServerShutdownNotification(CancellationToken cancellationToken);
- /// <summary>
- /// Sends the session ended notification.
- /// </summary>
- /// <param name="sessionInfo">The session information.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendSessionEndedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken);
-
- /// <summary>
- /// Sends the server restart notification.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task.</returns>
- Task SendServerRestartNotification(CancellationToken cancellationToken);
- }
- }
|