diff options
| -rw-r--r-- | MediaBrowser.Common/MediaBrowser.Common.csproj | 1 | ||||
| -rw-r--r-- | MediaBrowser.Common/Security/ISecurityManager.cs | 34 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Plugins/PluginSecurityManager.cs | 5 |
3 files changed, 38 insertions, 2 deletions
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 709d6c016..7f1f980eb 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -136,6 +136,7 @@ <Compile Include="ScheduledTasks\DailyTrigger.cs" /> <Compile Include="ScheduledTasks\IntervalTrigger.cs" /> <Compile Include="ScheduledTasks\WeeklyTrigger.cs" /> + <Compile Include="Security\ISecurityManager.cs" /> <Compile Include="Updates\IInstallationManager.cs" /> </ItemGroup> <ItemGroup> diff --git a/MediaBrowser.Common/Security/ISecurityManager.cs b/MediaBrowser.Common/Security/ISecurityManager.cs new file mode 100644 index 000000000..bcda3c6b4 --- /dev/null +++ b/MediaBrowser.Common/Security/ISecurityManager.cs @@ -0,0 +1,34 @@ +using System.Threading.Tasks; +using Mediabrowser.Model.Entities; + +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> + /// Gets or sets the legacy key. + /// </summary> + /// <value>The legacy key.</value> + string LegacyKey { get; set; } + + /// <summary> + /// Gets the registration status. + /// </summary> + /// <param name="feature">The feature.</param> + /// <param name="mb2Equivalent">The MB2 equivalent.</param> + /// <returns>Task{MBRegistrationRecord}.</returns> + Task<MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null); + } +}
\ No newline at end of file diff --git a/MediaBrowser.Controller/Plugins/PluginSecurityManager.cs b/MediaBrowser.Controller/Plugins/PluginSecurityManager.cs index db3f20ee3..3a097ba1f 100644 --- a/MediaBrowser.Controller/Plugins/PluginSecurityManager.cs +++ b/MediaBrowser.Controller/Plugins/PluginSecurityManager.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.Serialization; +using MediaBrowser.Common.Security; +using MediaBrowser.Model.Serialization; using Mediabrowser.Model.Entities; using Mediabrowser.PluginSecurity; using MediaBrowser.Common.Kernel; @@ -12,7 +13,7 @@ namespace MediaBrowser.Controller.Plugins /// <summary> /// Class PluginSecurityManager /// </summary> - public class PluginSecurityManager + public class PluginSecurityManager : ISecurityManager { /// <summary> /// The _is MB supporter |
