jellyfin/MediaBrowser.Controller/Persistence/IDisplayPreferencesRepository.cs

54 lines
2.0 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2018-12-27 23:27:57 +00:00
using System.Threading;
using MediaBrowser.Model.Entities;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Controller.Persistence
{
/// <summary>
2020-04-11 10:03:10 +00:00
/// Interface IDisplayPreferencesRepository.
2018-12-27 23:27:57 +00:00
/// </summary>
public interface IDisplayPreferencesRepository : IRepository
{
/// <summary>
2020-04-11 10:03:10 +00:00
/// Saves display preferences for an item.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <param name="displayPreferences">The display preferences.</param>
/// <param name="userId">The user id.</param>
/// <param name="client">The client.</param>
/// <param name="cancellationToken">The cancellation token.</param>
2020-04-11 10:03:10 +00:00
void SaveDisplayPreferences(
DisplayPreferences displayPreferences,
string userId,
string client,
CancellationToken cancellationToken);
2018-12-27 23:27:57 +00:00
/// <summary>
2020-04-11 10:03:10 +00:00
/// Saves all display preferences for a user.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <param name="displayPreferences">The display preferences.</param>
/// <param name="userId">The user id.</param>
/// <param name="cancellationToken">The cancellation token.</param>
2020-04-11 10:03:10 +00:00
void SaveAllDisplayPreferences(
IEnumerable<DisplayPreferences> displayPreferences,
Guid userId,
CancellationToken cancellationToken);
2018-12-27 23:27:57 +00:00
/// <summary>
/// Gets the display preferences.
/// </summary>
/// <param name="displayPreferencesId">The display preferences id.</param>
/// <param name="userId">The user id.</param>
/// <param name="client">The client.</param>
/// <returns>Task{DisplayPreferences}.</returns>
DisplayPreferences GetDisplayPreferences(string displayPreferencesId, string userId, string client);
/// <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);
}
}