IChannel.cs 2.5 KB

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