using MediaBrowser.Controller.Entities;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Persistence
{
///
/// Provides an interface to implement an Item repository
///
public interface IItemRepository : IRepository
{
///
/// Saves an item
///
/// The item.
/// The cancellation token.
/// Task.
Task SaveItem(BaseItem item, CancellationToken cancellationToken);
///
/// Gets an item
///
/// The id.
/// BaseItem.
BaseItem GetItem(Guid id);
///
/// Gets children of a given Folder
///
/// The parent.
/// IEnumerable{BaseItem}.
IEnumerable RetrieveChildren(Folder parent);
///
/// Retrieves the items.
///
/// The ids.
/// IEnumerable{BaseItem}.
IEnumerable GetItems(IEnumerable ids);
///
/// Saves children of a given Folder
///
/// The parent id.
/// The children.
/// The cancellation token.
/// Task.
Task SaveChildren(Guid parentId, IEnumerable children, CancellationToken cancellationToken);
///
/// Gets the critic reviews.
///
/// The item id.
/// Task{IEnumerable{ItemReview}}.
Task> GetCriticReviews(Guid itemId);
///
/// Saves the critic reviews.
///
/// The item id.
/// The critic reviews.
/// Task.
Task SaveCriticReviews(Guid itemId, IEnumerable criticReviews);
///
/// Saves the items.
///
/// The items.
/// The cancellation token.
/// Task.
Task SaveItems(IEnumerable items, CancellationToken cancellationToken);
}
}