ISessionController.cs 1.3 KB

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