2013-10-03 01:22:50 +00:00
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
using MediaBrowser.Model.Session;
|
2013-09-24 15:42:30 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Session
|
|
|
|
|
{
|
2013-10-02 19:08:58 +00:00
|
|
|
|
public interface ISessionController
|
2013-09-24 15:42:30 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2013-10-03 01:22:50 +00:00
|
|
|
|
/// Gets a value indicating whether [supports media remote control].
|
2013-09-24 15:42:30 +00:00
|
|
|
|
/// </summary>
|
2013-10-03 01:22:50 +00:00
|
|
|
|
/// <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; }
|
2013-09-24 15:42:30 +00:00
|
|
|
|
|
2013-09-24 19:54:42 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends the message command.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="command">The command.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-10-03 01:22:50 +00:00
|
|
|
|
Task SendMessageCommand(MessageCommand command, CancellationToken cancellationToken);
|
2013-09-24 19:54:42 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends the play command.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="command">The command.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-10-03 01:22:50 +00:00
|
|
|
|
Task SendPlayCommand(PlayRequest command, CancellationToken cancellationToken);
|
2013-09-24 19:54:42 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends the browse command.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="command">The command.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-10-03 01:22:50 +00:00
|
|
|
|
Task SendBrowseCommand(BrowseRequest command, CancellationToken cancellationToken);
|
2013-09-24 19:54:42 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends the playstate command.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="command">The command.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-10-03 01:22:50 +00:00
|
|
|
|
Task SendPlaystateCommand(PlaystateRequest command, CancellationToken cancellationToken);
|
|
|
|
|
|
2014-03-28 19:58:18 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends the generic command.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="command">The command.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2014-03-31 21:04:22 +00:00
|
|
|
|
Task SendGeneralCommand(GeneralCommand command, CancellationToken cancellationToken);
|
2014-03-28 19:58:18 +00:00
|
|
|
|
|
2013-10-03 01:22:50 +00:00
|
|
|
|
/// <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>
|
2013-10-03 18:02:23 +00:00
|
|
|
|
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 server restart notification.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task SendServerRestartNotification(CancellationToken cancellationToken);
|
2013-09-24 15:42:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|