2
0

IChannel.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System.Collections.Generic;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. using MediaBrowser.Controller.Providers;
  7. using MediaBrowser.Model.Entities;
  8. namespace MediaBrowser.Controller.Channels
  9. {
  10. public interface IChannel
  11. {
  12. /// <summary>
  13. /// Gets the name.
  14. /// </summary>
  15. /// <value>The name.</value>
  16. string Name { get; }
  17. /// <summary>
  18. /// Gets the description.
  19. /// </summary>
  20. /// <value>The description.</value>
  21. string Description { get; }
  22. /// <summary>
  23. /// Gets the data version.
  24. /// </summary>
  25. /// <value>The data version.</value>
  26. string DataVersion { get; }
  27. /// <summary>
  28. /// Gets the home page URL.
  29. /// </summary>
  30. /// <value>The home page URL.</value>
  31. string HomePageUrl { get; }
  32. /// <summary>
  33. /// Gets the parental rating.
  34. /// </summary>
  35. /// <value>The parental rating.</value>
  36. ChannelParentalRating ParentalRating { get; }
  37. /// <summary>
  38. /// Gets the channel information.
  39. /// </summary>
  40. /// <returns>ChannelFeatures.</returns>
  41. InternalChannelFeatures GetChannelFeatures();
  42. /// <summary>
  43. /// Determines whether [is enabled for] [the specified user].
  44. /// </summary>
  45. /// <param name="userId">The user identifier.</param>
  46. /// <returns><c>true</c> if [is enabled for] [the specified user]; otherwise, <c>false</c>.</returns>
  47. bool IsEnabledFor(string userId);
  48. /// <summary>
  49. /// Gets the channel items.
  50. /// </summary>
  51. /// <param name="query">The query.</param>
  52. /// <param name="cancellationToken">The cancellation token.</param>
  53. /// <returns>Task{IEnumerable{ChannelItem}}.</returns>
  54. Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken);
  55. /// <summary>
  56. /// Gets the channel image.
  57. /// </summary>
  58. /// <param name="type">The type.</param>
  59. /// <param name="cancellationToken">The cancellation token.</param>
  60. /// <returns>Task{DynamicImageResponse}.</returns>
  61. Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken);
  62. /// <summary>
  63. /// Gets the supported channel images.
  64. /// </summary>
  65. /// <returns>IEnumerable{ImageType}.</returns>
  66. IEnumerable<ImageType> GetSupportedChannelImages();
  67. }
  68. }