aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Collections
diff options
context:
space:
mode:
authorTim Hobbs <jesus.tesh@gmail.com>2014-03-13 06:36:39 -0700
committerTim Hobbs <jesus.tesh@gmail.com>2014-03-13 06:36:39 -0700
commit9976857e785d7e76807e02798480a063f9f3defa (patch)
tree0335c9e5ffabc49fd88150b297860af4fe04a0d6 /MediaBrowser.Controller/Collections
parenta402d3ea9232799b136b0dc8e9936ebfb286b7f5 (diff)
parentb7bcc2450694105de9f9fc8cc07d2cfc4d9d7c96 (diff)
Merge remote-tracking branch 'upstream/master' into ribbons
Diffstat (limited to 'MediaBrowser.Controller/Collections')
-rw-r--r--MediaBrowser.Controller/Collections/CollectionCreationOptions.cs22
-rw-r--r--MediaBrowser.Controller/Collections/ICollectionManager.cs32
2 files changed, 54 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs b/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs
new file mode 100644
index 0000000000..e147e09056
--- /dev/null
+++ b/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs
@@ -0,0 +1,22 @@
+using MediaBrowser.Model.Entities;
+using System;
+using System.Collections.Generic;
+
+namespace MediaBrowser.Controller.Collections
+{
+ public class CollectionCreationOptions : IHasProviderIds
+ {
+ public string Name { get; set; }
+
+ public Guid? ParentId { get; set; }
+
+ public bool IsLocked { get; set; }
+
+ public Dictionary<string, string> ProviderIds { get; set; }
+
+ public CollectionCreationOptions()
+ {
+ ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+ }
+ }
+}
diff --git a/MediaBrowser.Controller/Collections/ICollectionManager.cs b/MediaBrowser.Controller/Collections/ICollectionManager.cs
new file mode 100644
index 0000000000..d7bc178ad3
--- /dev/null
+++ b/MediaBrowser.Controller/Collections/ICollectionManager.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Controller.Collections
+{
+ public interface ICollectionManager
+ {
+ /// <summary>
+ /// Creates the collection.
+ /// </summary>
+ /// <param name="options">The options.</param>
+ /// <returns>Task.</returns>
+ Task CreateCollection(CollectionCreationOptions options);
+
+ /// <summary>
+ /// Adds to collection.
+ /// </summary>
+ /// <param name="collectionId">The collection identifier.</param>
+ /// <param name="itemIds">The item ids.</param>
+ /// <returns>Task.</returns>
+ Task AddToCollection(Guid collectionId, IEnumerable<Guid> itemIds);
+
+ /// <summary>
+ /// Removes from collection.
+ /// </summary>
+ /// <param name="collectionId">The collection identifier.</param>
+ /// <param name="itemIds">The item ids.</param>
+ /// <returns>Task.</returns>
+ Task RemoveFromCollection(Guid collectionId, IEnumerable<Guid> itemIds);
+ }
+}