IChannel.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using MediaBrowser.Controller.Entities;
  2. using MediaBrowser.Controller.Providers;
  3. using MediaBrowser.Model.Entities;
  4. using System.Collections.Generic;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  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 channel information.
  18. /// </summary>
  19. /// <returns>ChannelInfo.</returns>
  20. ChannelInfo GetChannelInfo();
  21. /// <summary>
  22. /// Determines whether [is enabled for] [the specified user].
  23. /// </summary>
  24. /// <param name="user">The user.</param>
  25. /// <returns><c>true</c> if [is enabled for] [the specified user]; otherwise, <c>false</c>.</returns>
  26. bool IsEnabledFor(User user);
  27. /// <summary>
  28. /// Searches the specified search term.
  29. /// </summary>
  30. /// <param name="searchInfo">The search information.</param>
  31. /// <param name="user">The user.</param>
  32. /// <param name="cancellationToken">The cancellation token.</param>
  33. /// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
  34. Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
  35. /// <summary>
  36. /// Gets the channel items.
  37. /// </summary>
  38. /// <param name="query">The query.</param>
  39. /// <param name="cancellationToken">The cancellation token.</param>
  40. /// <returns>Task{IEnumerable{ChannelItem}}.</returns>
  41. Task<ChannelItemResult> GetChannelItems(InternalChannelItemQuery query, CancellationToken cancellationToken);
  42. /// <summary>
  43. /// Gets the channel image.
  44. /// </summary>
  45. /// <param name="type">The type.</param>
  46. /// <param name="cancellationToken">The cancellation token.</param>
  47. /// <returns>Task{DynamicImageInfo}.</returns>
  48. Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken);
  49. /// <summary>
  50. /// Gets the supported channel images.
  51. /// </summary>
  52. /// <returns>IEnumerable{ImageType}.</returns>
  53. IEnumerable<ImageType> GetSupportedChannelImages();
  54. }
  55. }