using MediaBrowser.Common.Kernel; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Serialization; using System; namespace MediaBrowser.Common.Plugins { public interface IPlugin { /// /// Gets the name of the plugin /// /// The name. string Name { get; } /// /// Gets the description. /// /// The description. string Description { get; } /// /// Gets a value indicating whether this instance is a core plugin. /// /// true if this instance is a core plugin; otherwise, false. bool IsCorePlugin { get; } /// /// Gets the type of configuration this plugin uses /// /// The type of the configuration. Type ConfigurationType { get; } /// /// Gets the unique id. /// /// The unique id. Guid Id { get; } /// /// Gets the plugin version /// /// The version. Version Version { get; } /// /// Gets the name the assembly file /// /// The name of the assembly file. string AssemblyFileName { get; } /// /// Gets the last date modified of the configuration /// /// The configuration date last modified. DateTime ConfigurationDateLastModified { get; } /// /// Gets the last date modified of the plugin /// /// The assembly date last modified. DateTime AssemblyDateLastModified { get; } /// /// Gets the path to the assembly file /// /// The assembly file path. string AssemblyFilePath { get; } /// /// Gets the plugin's configuration /// /// The configuration. BasePluginConfiguration Configuration { get; } /// /// Gets the name of the configuration file. Subclasses should override /// /// The name of the configuration file. string ConfigurationFileName { get; } /// /// Gets the full path to the configuration file /// /// The configuration file path. string ConfigurationFilePath { get; } /// /// Gets the full path to the data folder, where the plugin can store any miscellaneous files needed /// /// The data folder path. string DataFolderPath { get; } /// /// Returns true or false indicating if the plugin should be downloaded and run within the Ui. /// /// true if [download to UI]; otherwise, false. bool DownloadToUi { get; } /// /// Gets the logger. /// /// The logger. ILogger Logger { get; } /// /// Starts the plugin. /// /// The kernel. /// The XML serializer. /// The logger. /// kernel void Initialize(IKernel kernel, IXmlSerializer xmlSerializer, ILogger logger); /// /// Disposes the plugins. Undos all actions performed during Init. /// void Dispose(); /// /// Saves the current configuration to the file system /// /// Cannot call Plugin.SaveConfiguration from the UI. void SaveConfiguration(); /// /// Completely overwrites the current configuration with a new copy /// Returns true or false indicating success or failure /// /// The configuration. /// configuration void UpdateConfiguration(BasePluginConfiguration configuration); /// /// Gets the plugin info. /// /// PluginInfo. PluginInfo GetPluginInfo(); /// /// Called when just before the plugin is uninstalled from the server. /// void OnUninstalling(); } }