using MediaBrowser.Common.Plugins;
using System.IO;
namespace MediaBrowser.Controller.Plugins
{
///
/// Class BaseConfigurationPage
///
public abstract class BaseConfigurationPage
{
///
/// Gets the name.
///
/// The name.
public abstract string Name { get; }
///
/// Gets the description.
///
/// The description.
public virtual string Description
{
get { return string.Empty; }
}
///
/// Gets the type of the configuration page.
///
/// The type of the configuration page.
public virtual ConfigurationPageType ConfigurationPageType
{
get { return ConfigurationPageType.PluginConfiguration; }
}
///
/// Gets the HTML stream from manifest resource.
///
/// The resource.
/// Stream.
protected Stream GetHtmlStreamFromManifestResource(string resource)
{
return GetType().Assembly.GetManifestResourceStream(resource);
}
///
/// Gets the HTML stream.
///
/// Stream.
public abstract Stream GetHtmlStream();
///
/// Gets the name of the plugin.
///
/// The name of the plugin.
public virtual string OwnerPluginName
{
get { return GetOwnerPlugin().Name; }
}
///
/// Gets the owner plugin.
///
/// BasePlugin.
public abstract IPlugin GetOwnerPlugin();
}
///
/// Enum ConfigurationPageType
///
public enum ConfigurationPageType
{
///
/// The plugin configuration
///
PluginConfiguration,
///
/// The none
///
None
}
}