using MediaBrowser.Common.Net; using MediaBrowser.Common.Plugins; using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Common.Serialization; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.System; using System; using System.Collections.Generic; using System.Reflection; using System.Threading.Tasks; namespace MediaBrowser.Common.Kernel { /// /// Interface IKernel /// public interface IKernel { /// /// Gets the application paths. /// /// The application paths. BaseApplicationPaths ApplicationPaths { get; } /// /// Gets the configuration. /// /// The configuration. BaseApplicationConfiguration Configuration { get; } /// /// Gets the kernel context. /// /// The kernel context. KernelContext KernelContext { get; } /// /// Gets the protobuf serializer. /// /// The protobuf serializer. DynamicProtobufSerializer ProtobufSerializer { get; } /// /// Inits this instance. /// /// Task. Task Init(); /// /// Reloads this instance. /// /// Task. Task Reload(); /// /// Gets or sets a value indicating whether this instance has pending kernel reload. /// /// true if this instance has pending kernel reload; otherwise, false. bool HasPendingRestart { get; } /// /// Disposes this instance. /// void Dispose(); /// /// Gets the system status. /// /// SystemInfo. SystemInfo GetSystemInfo(); /// /// Gets the scheduled tasks. /// /// The scheduled tasks. IEnumerable ScheduledTasks { get; } /// /// Reloads the logger. /// void ReloadLogger(); /// /// Called when [application updated]. /// /// The new version. void OnApplicationUpdated(Version newVersion); /// /// Gets the name of the web application. /// /// The name of the web application. string WebApplicationName { get; } /// /// Gets the log file path. /// /// The log file path. string LogFilePath { get; } /// /// Performs the pending restart. /// void PerformPendingRestart(); /// /// Gets the plugins. /// /// The plugins. IEnumerable Plugins { get; } /// /// Gets the UDP server port number. /// /// The UDP server port number. int UdpServerPortNumber { get; } /// /// Gets the HTTP server URL prefix. /// /// The HTTP server URL prefix. string HttpServerUrlPrefix { get; } /// /// Gets a value indicating whether this instance is first run. /// /// true if this instance is first run; otherwise, false. bool IsFirstRun { get; } /// /// Gets the TCP manager. /// /// The TCP manager. TcpManager TcpManager { get; } /// /// Gets the task manager. /// /// The task manager. TaskManager TaskManager { get; } /// /// Gets the web socket listeners. /// /// The web socket listeners. IEnumerable WebSocketListeners { get; } /// /// Occurs when [logger loaded]. /// event EventHandler LoggerLoaded; /// /// Occurs when [reload completed]. /// event EventHandler ReloadCompleted; /// /// Occurs when [configuration updated]. /// event EventHandler ConfigurationUpdated; /// /// Gets the assemblies. /// /// The assemblies. Assembly[] Assemblies { get; } /// /// Gets the rest services. /// /// The rest services. IEnumerable RestServices { get; } } }