123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- using MediaBrowser.Common.Plugins;
- using MediaBrowser.Common.Security;
- using MediaBrowser.Model.Configuration;
- using MediaBrowser.Model.System;
- using System;
- using System.Collections.Generic;
- using System.Threading.Tasks;
- namespace MediaBrowser.Common.Kernel
- {
- /// <summary>
- /// Interface IKernel
- /// </summary>
- public interface IKernel : IDisposable
- {
- /// <summary>
- /// Gets the application paths.
- /// </summary>
- /// <value>The application paths.</value>
- IApplicationPaths ApplicationPaths { get; }
- /// <summary>
- /// Gets the configuration.
- /// </summary>
- /// <value>The configuration.</value>
- BaseApplicationConfiguration Configuration { get; }
- /// <summary>
- /// Gets the kernel context.
- /// </summary>
- /// <value>The kernel context.</value>
- KernelContext KernelContext { get; }
- /// <summary>
- /// Inits this instance.
- /// </summary>
- /// <returns>Task.</returns>
- Task Init();
- /// <summary>
- /// Gets or sets a value indicating whether this instance has pending kernel reload.
- /// </summary>
- /// <value><c>true</c> if this instance has pending kernel reload; otherwise, <c>false</c>.</value>
- bool HasPendingRestart { get; }
- /// <summary>
- /// Gets the system status.
- /// </summary>
- /// <returns>SystemInfo.</returns>
- SystemInfo GetSystemInfo();
- /// <summary>
- /// Called when [application updated].
- /// </summary>
- /// <param name="newVersion">The new version.</param>
- void OnApplicationUpdated(Version newVersion);
- /// <summary>
- /// Gets the name of the web application.
- /// </summary>
- /// <value>The name of the web application.</value>
- string WebApplicationName { get; }
- /// <summary>
- /// Performs the pending restart.
- /// </summary>
- void PerformPendingRestart();
- /// <summary>
- /// Gets the plugins.
- /// </summary>
- /// <value>The plugins.</value>
- IEnumerable<IPlugin> Plugins { get; }
- /// <summary>
- /// Gets the UDP server port number.
- /// </summary>
- /// <value>The UDP server port number.</value>
- int UdpServerPortNumber { get; }
- /// <summary>
- /// Gets the HTTP server URL prefix.
- /// </summary>
- /// <value>The HTTP server URL prefix.</value>
- string HttpServerUrlPrefix { get; }
- /// <summary>
- /// Gets the TCP manager.
- /// </summary>
- /// <value>The TCP manager.</value>
- IServerManager ServerManager { get; }
- /// <summary>
- /// Gets the plug-in security manager.
- /// </summary>
- /// <value>The plug-in security manager.</value>
- ISecurityManager SecurityManager { get; set; }
- /// <summary>
- /// Gets the web socket listeners.
- /// </summary>
- /// <value>The web socket listeners.</value>
- IEnumerable<IWebSocketListener> WebSocketListeners { get; }
- /// <summary>
- /// Occurs when [reload completed].
- /// </summary>
- event EventHandler<EventArgs> ReloadCompleted;
- /// <summary>
- /// Occurs when [configuration updated].
- /// </summary>
- event EventHandler<EventArgs> ConfigurationUpdated;
- /// <summary>
- /// Notifies the pending restart.
- /// </summary>
- void NotifyPendingRestart();
- /// <summary>
- /// Gets the XML configuration.
- /// </summary>
- /// <param name="type">The type.</param>
- /// <param name="path">The path.</param>
- /// <returns>System.Object.</returns>
- object GetXmlConfiguration(Type type, string path);
- /// <summary>
- /// Limits simultaneous access to various resources
- /// </summary>
- /// <value>The resource pools.</value>
- ResourcePool ResourcePools { get; set; }
- /// <summary>
- /// Removes the plugin.
- /// </summary>
- /// <param name="plugin">The plugin.</param>
- void RemovePlugin(IPlugin plugin);
- }
- }
|