repo creation with initial code after cloning public repo
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BasePluginConfiguration.
|
||||
/// </summary>
|
||||
public class BasePluginConfiguration
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
public interface IHasWebPages
|
||||
{
|
||||
IEnumerable<PluginPageInfo> GetPages();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a serializable stub class that is used by the api to provide information about installed plugins.
|
||||
/// </summary>
|
||||
public class PluginInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PluginInfo"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The plugin name.</param>
|
||||
/// <param name="version">The plugin <see cref="Version"/>.</param>
|
||||
/// <param name="description">The plugin description.</param>
|
||||
/// <param name="id">The <see cref="Guid"/>.</param>
|
||||
/// <param name="canUninstall">True if this plugin can be uninstalled.</param>
|
||||
public PluginInfo(string name, Version version, string description, Guid id, bool canUninstall)
|
||||
{
|
||||
Name = name;
|
||||
Version = version;
|
||||
Description = description;
|
||||
Id = id;
|
||||
CanUninstall = canUninstall;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
public Version Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the configuration file.
|
||||
/// </summary>
|
||||
public string? ConfigurationFileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the unique id.
|
||||
/// </summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the plugin can be uninstalled.
|
||||
/// </summary>
|
||||
public bool CanUninstall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this plugin has a valid image.
|
||||
/// </summary>
|
||||
public bool HasImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating the status of the plugin.
|
||||
/// </summary>
|
||||
public PluginStatus Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the <see cref="PluginPageInfo" />.
|
||||
/// </summary>
|
||||
public class PluginPageInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the plugin.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display name of the plugin.
|
||||
/// </summary>
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the resource path.
|
||||
/// </summary>
|
||||
public string EmbeddedResourcePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this plugin should appear in the main menu.
|
||||
/// </summary>
|
||||
public bool EnableInMainMenu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the menu section.
|
||||
/// </summary>
|
||||
public string? MenuSection { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the menu icon.
|
||||
/// </summary>
|
||||
public string? MenuIcon { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
namespace MediaBrowser.Model.Plugins
|
||||
{
|
||||
/// <summary>
|
||||
/// Plugin load status.
|
||||
/// </summary>
|
||||
public enum PluginStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// This plugin requires a restart in order for it to load. This is a memory only status.
|
||||
/// The actual status of the plugin after reload is present in the manifest.
|
||||
/// eg. A disabled plugin will still be active until the next restart, and so will have a memory status of Restart,
|
||||
/// but a disk manifest status of Disabled.
|
||||
/// </summary>
|
||||
Restart = 1,
|
||||
|
||||
/// <summary>
|
||||
/// This plugin is currently running.
|
||||
/// </summary>
|
||||
Active = 0,
|
||||
|
||||
/// <summary>
|
||||
/// This plugin has been marked as disabled.
|
||||
/// </summary>
|
||||
Disabled = -1,
|
||||
|
||||
/// <summary>
|
||||
/// This plugin does not meet the TargetAbi requirements.
|
||||
/// </summary>
|
||||
NotSupported = -2,
|
||||
|
||||
/// <summary>
|
||||
/// This plugin caused an error when instantiated (either DI loop, or exception).
|
||||
/// </summary>
|
||||
Malfunctioned = -3,
|
||||
|
||||
/// <summary>
|
||||
/// This plugin has been superseded by another version.
|
||||
/// </summary>
|
||||
Superseded = -4,
|
||||
|
||||
/// <summary>
|
||||
/// [DEPRECATED] See Superseded.
|
||||
/// </summary>
|
||||
Superceded = -4,
|
||||
|
||||
/// <summary>
|
||||
/// An attempt to remove this plugin from disk will happen at every restart.
|
||||
/// It will not be loaded, if unable to do so.
|
||||
/// </summary>
|
||||
Deleted = -5
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user