ICollectionManager.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Threading.Tasks;
  6. using Jellyfin.Data.Entities;
  7. using MediaBrowser.Controller.Entities;
  8. using MediaBrowser.Controller.Entities.Movies;
  9. namespace MediaBrowser.Controller.Collections
  10. {
  11. public interface ICollectionManager
  12. {
  13. /// <summary>
  14. /// Occurs when [collection created].
  15. /// </summary>
  16. event EventHandler<CollectionCreatedEventArgs> CollectionCreated;
  17. /// <summary>
  18. /// Occurs when [items added to collection].
  19. /// </summary>
  20. event EventHandler<CollectionModifiedEventArgs> ItemsAddedToCollection;
  21. /// <summary>
  22. /// Occurs when [items removed from collection].
  23. /// </summary>
  24. event EventHandler<CollectionModifiedEventArgs> ItemsRemovedFromCollection;
  25. /// <summary>
  26. /// Creates the collection.
  27. /// </summary>
  28. /// <param name="options">The options.</param>
  29. Task<BoxSet> CreateCollectionAsync(CollectionCreationOptions options);
  30. /// <summary>
  31. /// Adds to collection.
  32. /// </summary>
  33. /// <param name="collectionId">The collection identifier.</param>
  34. /// <param name="itemIds">The item ids.</param>
  35. /// <returns><see cref="Task"/> representing the asynchronous operation.</returns>
  36. Task AddToCollectionAsync(Guid collectionId, IEnumerable<Guid> itemIds);
  37. /// <summary>
  38. /// Removes from collection.
  39. /// </summary>
  40. /// <param name="collectionId">The collection identifier.</param>
  41. /// <param name="itemIds">The item ids.</param>
  42. /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
  43. Task RemoveFromCollectionAsync(Guid collectionId, IEnumerable<Guid> itemIds);
  44. /// <summary>
  45. /// Collapses the items within box sets.
  46. /// </summary>
  47. /// <param name="items">The items.</param>
  48. /// <param name="user">The user.</param>
  49. /// <returns>IEnumerable{BaseItem}.</returns>
  50. IEnumerable<BaseItem> CollapseItemsWithinBoxSets(IEnumerable<BaseItem> items, User user);
  51. }
  52. }