2013-06-10 09:57:30 -07:00
|
|
|
using MediaBrowser.Model.Entities;
|
2014-08-30 19:08:59 -07:00
|
|
|
using System.Threading.Tasks;
|
2013-02-26 15:13:58 -07:00
|
|
|
|
|
|
|
namespace MediaBrowser.Common.Security
|
|
|
|
{
|
|
|
|
public interface ISecurityManager
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets a value indicating whether this instance is MB supporter.
|
|
|
|
/// </summary>
|
|
|
|
/// <value><c>true</c> if this instance is MB supporter; otherwise, <c>false</c>.</value>
|
|
|
|
bool IsMBSupporter { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the supporter key.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The supporter key.</value>
|
|
|
|
string SupporterKey { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
2014-01-26 07:32:38 -07:00
|
|
|
/// Gets the registration status. Overload to support existing plug-ins.
|
2013-02-26 15:13:58 -07:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="feature">The feature.</param>
|
|
|
|
/// <param name="mb2Equivalent">The MB2 equivalent.</param>
|
|
|
|
/// <returns>Task{MBRegistrationRecord}.</returns>
|
2014-01-26 07:32:38 -07:00
|
|
|
Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null);
|
2013-03-14 09:32:16 -07:00
|
|
|
|
2014-01-26 07:32:38 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the registration status.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="feature">The feature.</param>
|
|
|
|
/// <param name="mb2Equivalent">The MB2 equivalent.</param>
|
|
|
|
/// <param name="version">The version of the feature</param>
|
|
|
|
/// <returns>Task{MBRegistrationRecord}.</returns>
|
|
|
|
Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent, string version);
|
2014-08-30 19:08:59 -07:00
|
|
|
|
2013-03-14 09:32:16 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Load all registration info for all entities that require registration
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task LoadAllRegistrationInfo();
|
2014-08-31 12:15:33 -07:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the supporter information.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>Task<SupporterInfo>.</returns>
|
|
|
|
Task<SupporterInfo> GetSupporterInfo();
|
2013-02-26 15:13:58 -07:00
|
|
|
}
|
|
|
|
}
|