IChannel.cs 2.5 KB

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