jellyfin/MediaBrowser.Controller/Library/IUserDataManager.cs

39 lines
1.3 KiB
C#
Raw Normal View History

2013-10-02 09:08:58 -07:00
using MediaBrowser.Controller.Entities;
2013-10-02 10:23:10 -07:00
using MediaBrowser.Model.Entities;
2013-10-02 09:08:58 -07:00
using System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Library
{
2013-10-02 10:23:10 -07:00
/// <summary>
/// Interface IUserDataManager
/// </summary>
2013-10-02 09:08:58 -07:00
public interface IUserDataManager
{
2013-10-02 12:08:58 -07:00
/// <summary>
/// Occurs when [user data saved].
/// </summary>
event EventHandler<UserDataSaveEventArgs> UserDataSaved;
2013-10-02 09:08:58 -07:00
/// <summary>
/// Saves the user data.
/// </summary>
/// <param name="userId">The user id.</param>
2013-10-23 09:03:12 -07:00
/// <param name="item">The item.</param>
2013-10-02 09:08:58 -07:00
/// <param name="userData">The user data.</param>
2013-10-02 10:23:10 -07:00
/// <param name="reason">The reason.</param>
2013-10-02 09:08:58 -07:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2013-12-19 14:51:32 -07:00
Task SaveUserData(Guid userId, IHasUserData item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
2013-10-02 09:08:58 -07:00
/// <summary>
/// Gets the user data.
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="key">The key.</param>
/// <returns>Task{UserItemData}.</returns>
UserItemData GetUserData(Guid userId, string key);
}
}