ISecurityManager.cs 1.9 KB

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