2
0

IDtoService.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System.Collections.Generic;
  2. using MediaBrowser.Controller.Entities;
  3. using MediaBrowser.Model.Dto;
  4. using MediaBrowser.Model.Querying;
  5. namespace MediaBrowser.Controller.Dto
  6. {
  7. /// <summary>
  8. /// Interface IDtoService
  9. /// </summary>
  10. public interface IDtoService
  11. {
  12. /// <summary>
  13. /// Gets the dto id.
  14. /// </summary>
  15. /// <param name="item">The item.</param>
  16. /// <returns>System.String.</returns>
  17. string GetDtoId(BaseItem item);
  18. /// <summary>
  19. /// Attaches the primary image aspect ratio.
  20. /// </summary>
  21. /// <param name="dto">The dto.</param>
  22. /// <param name="item">The item.</param>
  23. void AttachPrimaryImageAspectRatio(IItemDto dto, BaseItem item);
  24. /// <summary>
  25. /// Gets the primary image aspect ratio.
  26. /// </summary>
  27. /// <param name="item">The item.</param>
  28. /// <returns>System.Nullable&lt;System.Double&gt;.</returns>
  29. double? GetPrimaryImageAspectRatio(BaseItem item);
  30. /// <summary>
  31. /// Gets the base item dto.
  32. /// </summary>
  33. /// <param name="item">The item.</param>
  34. /// <param name="fields">The fields.</param>
  35. /// <param name="user">The user.</param>
  36. /// <param name="owner">The owner.</param>
  37. BaseItemDto GetBaseItemDto(BaseItem item, ItemFields[] fields, User user = null, BaseItem owner = null);
  38. /// <summary>
  39. /// Gets the base item dto.
  40. /// </summary>
  41. /// <param name="item">The item.</param>
  42. /// <param name="options">The options.</param>
  43. /// <param name="user">The user.</param>
  44. /// <param name="owner">The owner.</param>
  45. /// <returns>BaseItemDto.</returns>
  46. BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null);
  47. /// <summary>
  48. /// Gets the base item dtos.
  49. /// </summary>
  50. /// <param name="items">The items.</param>
  51. /// <param name="options">The options.</param>
  52. /// <param name="user">The user.</param>
  53. /// <param name="owner">The owner.</param>
  54. BaseItemDto[] GetBaseItemDtos(BaseItem[] items, DtoOptions options, User user = null, BaseItem owner = null);
  55. BaseItemDto[] GetBaseItemDtos(List<BaseItem> items, DtoOptions options, User user = null, BaseItem owner = null);
  56. /// <summary>
  57. /// Gets the item by name dto.
  58. /// </summary>
  59. BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null);
  60. }
  61. }