jellyfin/MediaBrowser.Controller/IDisplayPreferencesManager.cs

68 lines
3.0 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2020-06-30 18:44:41 -07:00
using Jellyfin.Data.Entities;
namespace MediaBrowser.Controller
{
/// <summary>
/// Manages the storage and retrieval of display preferences.
/// </summary>
public interface IDisplayPreferencesManager
{
/// <summary>
/// Gets the display preferences for the user and client.
/// </summary>
2020-11-02 01:23:29 -07:00
/// <remarks>
/// This will create the display preferences if it does not exist, but it will not save automatically.
/// </remarks>
2020-06-30 18:44:41 -07:00
/// <param name="userId">The user's id.</param>
2020-12-04 16:00:11 -07:00
/// <param name="itemId">The item id.</param>
2020-06-30 18:44:41 -07:00
/// <param name="client">The client string.</param>
/// <returns>The associated display preferences.</returns>
2020-12-04 16:00:11 -07:00
DisplayPreferences GetDisplayPreferences(Guid userId, Guid itemId, string client);
2020-06-30 18:44:41 -07:00
/// <summary>
/// Gets the default item display preferences for the user and client.
/// </summary>
2020-11-02 01:23:29 -07:00
/// <remarks>
/// This will create the item display preferences if it does not exist, but it will not save automatically.
/// </remarks>
/// <param name="userId">The user id.</param>
/// <param name="itemId">The item id.</param>
/// <param name="client">The client string.</param>
/// <returns>The item display preferences.</returns>
ItemDisplayPreferences GetItemDisplayPreferences(Guid userId, Guid itemId, string client);
/// <summary>
/// Gets all of the item display preferences for the user and client.
/// </summary>
/// <param name="userId">The user id.</param>
/// <param name="client">The client string.</param>
/// <returns>A list of item display preferences.</returns>
IList<ItemDisplayPreferences> ListItemDisplayPreferences(Guid userId, string client);
/// <summary>
/// Gets all of the custom item display preferences for the user and client.
/// </summary>
/// <param name="userId">The user id.</param>
2020-12-04 16:00:11 -07:00
/// <param name="itemId">The item id.</param>
/// <param name="client">The client string.</param>
/// <returns>The dictionary of custom item display preferences.</returns>
2020-12-04 16:00:11 -07:00
IDictionary<string, string> ListCustomItemDisplayPreferences(Guid userId, Guid itemId, string client);
/// <summary>
/// Sets the custom item display preference for the user and client.
/// </summary>
/// <param name="userId">The user id.</param>
2020-12-04 16:00:11 -07:00
/// <param name="itemId">The item id.</param>
/// <param name="client">The client id.</param>
/// <param name="customPreferences">A dictionary of custom item display preferences.</param>
2020-12-04 16:00:11 -07:00
void SetCustomItemDisplayPreferences(Guid userId, Guid itemId, string client, Dictionary<string, string> customPreferences);
2020-06-30 18:44:41 -07:00
/// <summary>
2020-08-08 10:39:49 -07:00
/// Saves changes made to the database.
2020-06-30 18:44:41 -07:00
/// </summary>
2020-08-08 10:39:49 -07:00
void SaveChanges();
2020-06-30 18:44:41 -07:00
}
}