ISecurityManager.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 an appstore sale
  40. /// </summary>
  41. /// <returns>true if successful</returns>
  42. Task<Boolean> RegisterAppStoreSale(string store, string application, string product,
  43. string type, string storeId, string storeToken, string email, string amt);
  44. /// <summary>
  45. /// Gets the supporter information.
  46. /// </summary>
  47. /// <returns>Task&lt;SupporterInfo&gt;.</returns>
  48. Task<SupporterInfo> GetSupporterInfo();
  49. }
  50. }