IDisplayPreferencesManager.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using Jellyfin.Data.Entities;
  4. namespace MediaBrowser.Controller
  5. {
  6. /// <summary>
  7. /// Manages the storage and retrieval of display preferences.
  8. /// </summary>
  9. public interface IDisplayPreferencesManager
  10. {
  11. /// <summary>
  12. /// Gets the display preferences for the user and client.
  13. /// </summary>
  14. /// <remarks>
  15. /// This will create the display preferences if it does not exist, but it will not save automatically.
  16. /// </remarks>
  17. /// <param name="userId">The user's id.</param>
  18. /// <param name="client">The client string.</param>
  19. /// <returns>The associated display preferences.</returns>
  20. DisplayPreferences GetDisplayPreferences(Guid userId, string client);
  21. /// <summary>
  22. /// Gets the default item display preferences for the user and client.
  23. /// </summary>
  24. /// <remarks>
  25. /// This will create the item display preferences if it does not exist, but it will not save automatically.
  26. /// </remarks>
  27. /// <param name="userId">The user id.</param>
  28. /// <param name="itemId">The item id.</param>
  29. /// <param name="client">The client string.</param>
  30. /// <returns>The item display preferences.</returns>
  31. ItemDisplayPreferences GetItemDisplayPreferences(Guid userId, Guid itemId, string client);
  32. /// <summary>
  33. /// Gets all of the item display preferences for the user and client.
  34. /// </summary>
  35. /// <param name="userId">The user id.</param>
  36. /// <param name="client">The client string.</param>
  37. /// <returns>A list of item display preferences.</returns>
  38. IList<ItemDisplayPreferences> ListItemDisplayPreferences(Guid userId, string client);
  39. /// <summary>
  40. /// Saves changes made to the database.
  41. /// </summary>
  42. void SaveChanges();
  43. }
  44. }