jellyfin/MediaBrowser.Common/Plugins/IPlugin.cs

86 lines
2.5 KiB
C#
Raw Normal View History

#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Plugins;
2018-12-27 23:27:57 +00:00
namespace MediaBrowser.Common.Plugins
{
/// <summary>
2019-12-10 23:13:57 +00:00
/// Interface IPlugin.
2018-12-27 23:27:57 +00:00
/// </summary>
public interface IPlugin
{
/// <summary>
2019-12-10 23:13:57 +00:00
/// Gets the name of the plugin.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
string Description { get; }
/// <summary>
/// Gets the unique id.
/// </summary>
/// <value>The unique id.</value>
Guid Id { get; }
/// <summary>
2019-12-10 23:13:57 +00:00
/// Gets the plugin version.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <value>The version.</value>
Version Version { get; }
/// <summary>
2019-12-10 23:13:57 +00:00
/// Gets the path to the assembly file.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <value>The assembly file path.</value>
string AssemblyFilePath { get; }
/// <summary>
2019-12-10 23:13:57 +00:00
/// Gets the full path to the data folder, where the plugin can store any miscellaneous files needed.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <value>The data folder path.</value>
string DataFolderPath { get; }
/// <summary>
/// Gets the plugin info.
/// </summary>
/// <returns>PluginInfo.</returns>
PluginInfo GetPluginInfo();
/// <summary>
/// Called when just before the plugin is uninstalled from the server.
/// </summary>
void OnUninstalling();
}
public interface IHasPluginConfiguration
{
/// <summary>
2019-12-10 23:13:57 +00:00
/// Gets the type of configuration this plugin uses.
2018-12-27 23:27:57 +00:00
/// </summary>
/// <value>The type of the configuration.</value>
Type ConfigurationType { get; }
/// <summary>
2019-12-10 23:13:57 +00:00
/// Gets the plugin's configuration.
2018-12-27 23:27:57 +00:00
/// </summary>
2019-12-10 23:13:57 +00:00
/// <value>The configuration.</value>
BasePluginConfiguration Configuration { get; }
2018-12-27 23:27:57 +00:00
/// <summary>
2019-12-10 23:13:57 +00:00
/// Completely overwrites the current configuration with a new copy
/// Returns true or false indicating success or failure.
2018-12-27 23:27:57 +00:00
/// </summary>
2019-12-10 23:13:57 +00:00
/// <param name="configuration">The configuration.</param>
/// <exception cref="ArgumentNullException"><c>configuration</c> is <c>null</c>.</exception>
void UpdateConfiguration(BasePluginConfiguration configuration);
2018-12-27 23:27:57 +00:00
void SetStartupInfo(Action<string> directoryCreateFn);
}
}