ISessionController.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using MediaBrowser.Model.Entities;
  2. using MediaBrowser.Model.Session;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace MediaBrowser.Controller.Session
  6. {
  7. public interface ISessionController
  8. {
  9. /// <summary>
  10. /// Gets a value indicating whether [supports media remote control].
  11. /// </summary>
  12. /// <value><c>true</c> if [supports media remote control]; otherwise, <c>false</c>.</value>
  13. bool SupportsMediaRemoteControl { get; }
  14. /// <summary>
  15. /// Gets a value indicating whether this instance is session active.
  16. /// </summary>
  17. /// <value><c>true</c> if this instance is session active; otherwise, <c>false</c>.</value>
  18. bool IsSessionActive { get; }
  19. /// <summary>
  20. /// Sends the system command.
  21. /// </summary>
  22. /// <param name="command">The command.</param>
  23. /// <param name="cancellationToken">The cancellation token.</param>
  24. /// <returns>Task.</returns>
  25. Task SendSystemCommand(SystemCommand command, CancellationToken cancellationToken);
  26. /// <summary>
  27. /// Sends the message command.
  28. /// </summary>
  29. /// <param name="command">The command.</param>
  30. /// <param name="cancellationToken">The cancellation token.</param>
  31. /// <returns>Task.</returns>
  32. Task SendMessageCommand(MessageCommand command, CancellationToken cancellationToken);
  33. /// <summary>
  34. /// Sends the play command.
  35. /// </summary>
  36. /// <param name="command">The command.</param>
  37. /// <param name="cancellationToken">The cancellation token.</param>
  38. /// <returns>Task.</returns>
  39. Task SendPlayCommand(PlayRequest command, CancellationToken cancellationToken);
  40. /// <summary>
  41. /// Sends the browse command.
  42. /// </summary>
  43. /// <param name="command">The command.</param>
  44. /// <param name="cancellationToken">The cancellation token.</param>
  45. /// <returns>Task.</returns>
  46. Task SendBrowseCommand(BrowseRequest command, CancellationToken cancellationToken);
  47. /// <summary>
  48. /// Sends the playstate command.
  49. /// </summary>
  50. /// <param name="command">The command.</param>
  51. /// <param name="cancellationToken">The cancellation token.</param>
  52. /// <returns>Task.</returns>
  53. Task SendPlaystateCommand(PlaystateRequest command, CancellationToken cancellationToken);
  54. /// <summary>
  55. /// Sends the library update info.
  56. /// </summary>
  57. /// <param name="info">The info.</param>
  58. /// <param name="cancellationToken">The cancellation token.</param>
  59. /// <returns>Task.</returns>
  60. Task SendLibraryUpdateInfo(LibraryUpdateInfo info, CancellationToken cancellationToken);
  61. /// <summary>
  62. /// Sends the restart required message.
  63. /// </summary>
  64. /// <param name="cancellationToken">The cancellation token.</param>
  65. /// <returns>Task.</returns>
  66. Task SendRestartRequiredMessage(CancellationToken cancellationToken);
  67. }
  68. }