jellyfin/MediaBrowser.Controller/Collections/ICollectionManager.cs

75 lines
2.6 KiB
C#
Raw Normal View History

2014-04-22 10:25:54 -07:00
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
2014-03-15 08:17:46 -07:00
using System;
using System.Collections.Generic;
2014-03-05 22:17:13 -07:00
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Collections
{
public interface ICollectionManager
{
2014-07-07 18:41:03 -07:00
/// <summary>
/// Occurs when [collection created].
/// </summary>
event EventHandler<CollectionCreatedEventArgs> CollectionCreated;
/// <summary>
/// Occurs when [items added to collection].
/// </summary>
event EventHandler<CollectionModifiedEventArgs> ItemsAddedToCollection;
/// <summary>
/// Occurs when [items removed from collection].
/// </summary>
event EventHandler<CollectionModifiedEventArgs> ItemsRemovedFromCollection;
2014-03-05 22:17:13 -07:00
/// <summary>
/// Creates the collection.
/// </summary>
/// <param name="options">The options.</param>
/// <returns>Task.</returns>
2014-03-15 08:17:46 -07:00
Task<BoxSet> CreateCollection(CollectionCreationOptions options);
2014-03-05 22:17:13 -07:00
/// <summary>
/// Adds to collection.
/// </summary>
/// <param name="collectionId">The collection identifier.</param>
/// <param name="itemIds">The item ids.</param>
2014-03-05 22:17:13 -07:00
/// <returns>Task.</returns>
2017-08-20 14:07:47 -07:00
Task AddToCollection(Guid collectionId, IEnumerable<string> itemIds);
2014-03-05 22:17:13 -07:00
/// <summary>
/// Removes from collection.
/// </summary>
/// <param name="collectionId">The collection identifier.</param>
/// <param name="itemIds">The item ids.</param>
2014-03-05 22:17:13 -07:00
/// <returns>Task.</returns>
2017-08-20 14:07:47 -07:00
Task RemoveFromCollection(Guid collectionId, IEnumerable<string> itemIds);
Task AddToCollection(Guid collectionId, IEnumerable<Guid> itemIds);
Task RemoveFromCollection(Guid collectionId, IEnumerable<Guid> itemIds);
2014-04-22 10:25:54 -07:00
/// <summary>
/// Collapses the items within box sets.
/// </summary>
/// <param name="items">The items.</param>
/// <param name="user">The user.</param>
/// <returns>IEnumerable{BaseItem}.</returns>
IEnumerable<BaseItem> CollapseItemsWithinBoxSets(IEnumerable<BaseItem> items, User user);
2014-06-30 21:06:28 -07:00
/// <summary>
/// Gets the collections folder.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>Folder.</returns>
Folder GetCollectionsFolder(string userId);
2015-01-24 12:03:55 -07:00
/// <summary>
/// Gets the collections.
/// </summary>
/// <param name="user">The user.</param>
/// <returns>IEnumerable&lt;BoxSet&gt;.</returns>
IEnumerable<BoxSet> GetCollections(User user);
2014-03-05 22:17:13 -07:00
}
}