using System.Collections.Generic;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
using System.Threading;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.Library
{
///
/// Interface IUserDataManager
///
public interface IUserDataManager
{
///
/// Occurs when [user data saved].
///
event EventHandler UserDataSaved;
///
/// Saves the user data.
///
/// The user id.
/// The item.
/// The user data.
/// The reason.
/// The cancellation token.
/// Task.
void SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
UserItemData GetUserData(IHasUserData user, IHasUserData item);
UserItemData GetUserData(string userId, IHasUserData item);
UserItemData GetUserData(Guid userId, IHasUserData item);
///
/// Gets the user data dto.
///
UserItemDataDto GetUserDataDto(IHasUserData item, User user);
UserItemDataDto GetUserDataDto(IHasUserData item, BaseItemDto itemDto, User user, ItemFields[] fields);
///
/// Get all user data for the given user
///
///
///
List GetAllUserData(Guid userId);
///
/// Save the all provided user data for the given user
///
///
///
///
///
void SaveAllUserData(Guid userId, UserItemData[] userData, CancellationToken cancellationToken);
///
/// Updates playstate for an item and returns true or false indicating if it was played to completion
///
bool UpdatePlayState(BaseItem item, UserItemData data, long? positionTicks);
}
}