2013-04-13 18:02:30 +00:00
|
|
|
|
using System;
|
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2013-02-21 01:33:05 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Persistence
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides an interface to implement a UserData repository
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IUserDataRepository : IRepository
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2013-04-02 19:25:16 +00:00
|
|
|
|
/// Saves the user data.
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// </summary>
|
2013-04-02 19:25:16 +00:00
|
|
|
|
/// <param name="userId">The user id.</param>
|
2013-04-13 18:02:30 +00:00
|
|
|
|
/// <param name="key">The key.</param>
|
2013-04-02 19:25:16 +00:00
|
|
|
|
/// <param name="userData">The user data.</param>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2013-04-13 18:02:30 +00:00
|
|
|
|
Task SaveUserData(Guid userId, string key, UserItemData userData,
|
2013-04-02 19:25:16 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
2013-02-21 01:33:05 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2013-04-02 19:25:16 +00:00
|
|
|
|
/// Gets the user data.
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// </summary>
|
2013-04-02 19:25:16 +00:00
|
|
|
|
/// <param name="userId">The user id.</param>
|
2013-04-13 18:02:30 +00:00
|
|
|
|
/// <param name="key">The key.</param>
|
2013-04-02 19:25:16 +00:00
|
|
|
|
/// <returns>Task{UserItemData}.</returns>
|
2013-06-17 20:35:43 +00:00
|
|
|
|
UserItemData GetUserData(Guid userId, string key);
|
2013-02-21 01:33:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|