using System.Collections.Generic;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
using System.Threading;
using System.Threading.Tasks;
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.
Task SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
///
/// Gets the user data.
///
/// The user id.
/// The key.
/// Task{UserItemData}.
UserItemData GetUserData(Guid userId, string key);
///
/// Gets the user data dto.
///
/// The item.
/// The user.
/// UserItemDataDto.
UserItemDataDto GetUserDataDto(IHasUserData item, User user);
///
/// Get all user data for the given user
///
///
///
IEnumerable GetAllUserData(Guid userId);
///
/// Save the all provided user data for the given user
///
///
///
///
///
Task SaveAllUserData(Guid userId, IEnumerable 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);
}
}