IImageProvider.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using MediaBrowser.Controller.Entities;
  2. using MediaBrowser.Model.Entities;
  3. using MediaBrowser.Model.Providers;
  4. using System.Collections.Generic;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7. namespace MediaBrowser.Controller.Providers
  8. {
  9. /// <summary>
  10. /// Interface IImageProvider
  11. /// </summary>
  12. public interface IImageProvider
  13. {
  14. /// <summary>
  15. /// Gets the name.
  16. /// </summary>
  17. /// <value>The name.</value>
  18. string Name { get; }
  19. /// <summary>
  20. /// Supportses the specified item.
  21. /// </summary>
  22. /// <param name="item">The item.</param>
  23. /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
  24. bool Supports(BaseItem item);
  25. /// <summary>
  26. /// Gets the images.
  27. /// </summary>
  28. /// <param name="item">The item.</param>
  29. /// <param name="imageType">Type of the image.</param>
  30. /// <param name="cancellationToken">The cancellation token.</param>
  31. /// <returns>Task{IEnumerable{RemoteImageInfo}}.</returns>
  32. Task<IEnumerable<RemoteImageInfo>> GetImages(BaseItem item, ImageType imageType, CancellationToken cancellationToken);
  33. /// <summary>
  34. /// Gets the images.
  35. /// </summary>
  36. /// <param name="item">The item.</param>
  37. /// <param name="cancellationToken">The cancellation token.</param>
  38. /// <returns>Task{IEnumerable{RemoteImageInfo}}.</returns>
  39. Task<IEnumerable<RemoteImageInfo>> GetAllImages(BaseItem item, CancellationToken cancellationToken);
  40. /// <summary>
  41. /// Gets the priority.
  42. /// </summary>
  43. /// <value>The priority.</value>
  44. int Priority { get; }
  45. }
  46. }