ICollectionManager.cs 2.0 KB

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