jellyfin/MediaBrowser.Controller/Persistence/IUserDataRepository.cs

38 lines
1.2 KiB
C#
Raw Normal View History

2013-09-30 15:18:44 -07:00
using MediaBrowser.Controller.Entities;
using System;
2013-02-20 18:33:05 -07: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
{
2013-06-20 09:44:24 -07:00
/// <summary>
/// Opens the connection to the repository
/// </summary>
/// <returns>Task.</returns>
Task Initialize();
2013-02-20 18:33:05 -07:00
/// <summary>
/// Saves the user data.
2013-02-20 18:33:05 -07:00
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="key">The key.</param>
/// <param name="userData">The user data.</param>
2013-02-20 18:33:05 -07:00
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
2013-10-02 09:08:58 -07:00
Task SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken);
2013-02-20 18:33:05 -07:00
/// <summary>
/// Gets the user data.
2013-02-20 18:33:05 -07:00
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="key">The key.</param>
/// <returns>Task{UserItemData}.</returns>
2013-06-17 13:35:43 -07:00
UserItemData GetUserData(Guid userId, string key);
2013-02-20 18:33:05 -07:00
}
}