ICollectionManager.cs 2.1 KB

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