2014-09-25 20:20:17 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
2013-04-02 17:37:49 +00:00
|
|
|
|
using System;
|
2013-02-21 01:33:05 +00:00
|
|
|
|
using System.Threading;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Persistence
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface IDisplayPreferencesRepository
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IDisplayPreferencesRepository : IRepository
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Saves display preferences for an item
|
|
|
|
|
/// </summary>
|
2013-04-02 17:37:49 +00:00
|
|
|
|
/// <param name="displayPreferences">The display preferences.</param>
|
2013-07-27 01:15:55 +00:00
|
|
|
|
/// <param name="userId">The user id.</param>
|
|
|
|
|
/// <param name="client">The client.</param>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2017-08-27 00:32:33 +00:00
|
|
|
|
void SaveDisplayPreferences(DisplayPreferences displayPreferences, string userId, string client,
|
2013-04-02 17:37:49 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
2017-08-27 00:32:33 +00:00
|
|
|
|
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// <summary>
|
2014-09-25 20:20:17 +00:00
|
|
|
|
/// Saves all display preferences for a user
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="displayPreferences">The display preferences.</param>
|
|
|
|
|
/// <param name="userId">The user id.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
2017-08-27 00:32:33 +00:00
|
|
|
|
void SaveAllDisplayPreferences(IEnumerable<DisplayPreferences> displayPreferences, Guid userId,
|
2014-09-25 20:20:17 +00:00
|
|
|
|
CancellationToken cancellationToken);
|
|
|
|
|
/// <summary>
|
2013-04-02 17:37:49 +00:00
|
|
|
|
/// Gets the display preferences.
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// </summary>
|
2013-04-02 17:37:49 +00:00
|
|
|
|
/// <param name="displayPreferencesId">The display preferences id.</param>
|
2013-07-27 01:15:55 +00:00
|
|
|
|
/// <param name="userId">The user id.</param>
|
|
|
|
|
/// <param name="client">The client.</param>
|
2013-04-02 17:37:49 +00:00
|
|
|
|
/// <returns>Task{DisplayPreferences}.</returns>
|
2015-05-29 23:51:33 +00:00
|
|
|
|
DisplayPreferences GetDisplayPreferences(string displayPreferencesId, string userId, string client);
|
2014-09-25 20:20:17 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets all display preferences for the given user.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="userId">The user id.</param>
|
|
|
|
|
/// <returns>Task{DisplayPreferences}.</returns>
|
|
|
|
|
IEnumerable<DisplayPreferences> GetAllDisplayPreferences(Guid userId);
|
2013-02-21 01:33:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|