ISessionController.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. using MediaBrowser.Model.Session;
  7. namespace MediaBrowser.Controller.Session
  8. {
  9. public interface ISessionController
  10. {
  11. /// <summary>
  12. /// Gets a value indicating whether this instance is session active.
  13. /// </summary>
  14. /// <value><c>true</c> if this instance is session active; otherwise, <c>false</c>.</value>
  15. bool IsSessionActive { get; }
  16. /// <summary>
  17. /// Gets a value indicating whether [supports media remote control].
  18. /// </summary>
  19. /// <value><c>true</c> if [supports media remote control]; otherwise, <c>false</c>.</value>
  20. bool SupportsMediaControl { get; }
  21. /// <summary>
  22. /// Sends the message.
  23. /// </summary>
  24. /// <typeparam name="T">The type of data.</typeparam>
  25. /// <param name="name">Name of message type.</param>
  26. /// <param name="messageId">Message ID.</param>
  27. /// <param name="data">Data to send.</param>
  28. /// <param name="cancellationToken">CancellationToken for operation.</param>
  29. /// <returns>A task.</returns>
  30. Task SendMessage<T>(SessionMessageType name, Guid messageId, T data, CancellationToken cancellationToken);
  31. }
  32. }