2019-01-13 13:01:16 -07:00
|
|
|
using System;
|
2019-01-13 12:25:11 -07:00
|
|
|
using MediaBrowser.Model.Plugins;
|
2018-12-27 16:27:57 -07:00
|
|
|
|
|
|
|
namespace MediaBrowser.Common.Plugins
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Interface IPlugin
|
|
|
|
/// </summary>
|
|
|
|
public interface IPlugin
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the name of the plugin
|
|
|
|
/// </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>
|
|
|
|
/// Gets the plugin version
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The version.</value>
|
|
|
|
Version Version { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the path to the assembly file
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The assembly file path.</value>
|
|
|
|
string AssemblyFilePath { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the full path to the data folder, where the plugin can store any miscellaneous files needed
|
|
|
|
/// </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>
|
|
|
|
/// Gets the type of configuration this plugin uses
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The type of the configuration.</value>
|
|
|
|
Type ConfigurationType { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Completely overwrites the current configuration with a new copy
|
|
|
|
/// Returns true or false indicating success or failure
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="configuration">The configuration.</param>
|
2019-01-13 13:37:13 -07:00
|
|
|
/// <exception cref="ArgumentNullException">configuration</exception>
|
2018-12-27 16:27:57 -07:00
|
|
|
void UpdateConfiguration(BasePluginConfiguration configuration);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the plugin's configuration
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The configuration.</value>
|
|
|
|
BasePluginConfiguration Configuration { get; }
|
|
|
|
|
|
|
|
void SetStartupInfo(Action<string> directoryCreateFn);
|
|
|
|
}
|
2019-01-13 12:30:41 -07:00
|
|
|
}
|