using MediaBrowser.Model.Plugins; using System; namespace MediaBrowser.Common.Plugins { /// /// Interface IPlugin /// 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; } /// /// 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(); /// /// Gets a value indicating whether this instance is first run. /// /// true if this instance is first run; otherwise, false. bool IsFirstRun { get; } } }