ISecurityManager.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using MediaBrowser.Model.Entities;
  2. using System.Threading.Tasks;
  3. namespace MediaBrowser.Common.Security
  4. {
  5. public interface ISecurityManager
  6. {
  7. /// <summary>
  8. /// Gets a value indicating whether this instance is MB supporter.
  9. /// </summary>
  10. /// <value><c>true</c> if this instance is MB supporter; otherwise, <c>false</c>.</value>
  11. bool IsMBSupporter { get; }
  12. /// <summary>
  13. /// Gets or sets the supporter key.
  14. /// </summary>
  15. /// <value>The supporter key.</value>
  16. string SupporterKey { get; set; }
  17. /// <summary>
  18. /// Gets the registration status. Overload to support existing plug-ins.
  19. /// </summary>
  20. /// <param name="feature">The feature.</param>
  21. /// <param name="mb2Equivalent">The MB2 equivalent.</param>
  22. /// <returns>Task{MBRegistrationRecord}.</returns>
  23. Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null);
  24. /// <summary>
  25. /// Gets the registration status.
  26. /// </summary>
  27. /// <param name="feature">The feature.</param>
  28. /// <param name="mb2Equivalent">The MB2 equivalent.</param>
  29. /// <param name="version">The version of the feature</param>
  30. /// <returns>Task{MBRegistrationRecord}.</returns>
  31. Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent, string version);
  32. /// <summary>
  33. /// Load all registration info for all entities that require registration
  34. /// </summary>
  35. /// <returns></returns>
  36. Task LoadAllRegistrationInfo();
  37. /// <summary>
  38. /// Gets the supporter information.
  39. /// </summary>
  40. /// <returns>Task&lt;SupporterInfo&gt;.</returns>
  41. Task<SupporterInfo> GetSupporterInfo();
  42. }
  43. }