IKernel.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using MediaBrowser.Model.System;
  2. using System;
  3. namespace MediaBrowser.Common.Kernel
  4. {
  5. /// <summary>
  6. /// Interface IKernel
  7. /// </summary>
  8. public interface IKernel
  9. {
  10. /// <summary>
  11. /// Occurs when [has pending restart changed].
  12. /// </summary>
  13. event EventHandler HasPendingRestartChanged;
  14. /// <summary>
  15. /// Gets the kernel context.
  16. /// </summary>
  17. /// <value>The kernel context.</value>
  18. KernelContext KernelContext { get; }
  19. /// <summary>
  20. /// Inits this instance.
  21. /// </summary>
  22. /// <returns>Task.</returns>
  23. void Init();
  24. /// <summary>
  25. /// Gets or sets a value indicating whether this instance has pending kernel reload.
  26. /// </summary>
  27. /// <value><c>true</c> if this instance has pending kernel reload; otherwise, <c>false</c>.</value>
  28. bool HasPendingRestart { get; }
  29. /// <summary>
  30. /// Gets the system status.
  31. /// </summary>
  32. /// <returns>SystemInfo.</returns>
  33. SystemInfo GetSystemInfo();
  34. /// <summary>
  35. /// Called when [application updated].
  36. /// </summary>
  37. /// <param name="newVersion">The new version.</param>
  38. void OnApplicationUpdated(Version newVersion);
  39. /// <summary>
  40. /// Gets the name of the web application.
  41. /// </summary>
  42. /// <value>The name of the web application.</value>
  43. string WebApplicationName { get; }
  44. /// <summary>
  45. /// Performs the pending restart.
  46. /// </summary>
  47. void PerformPendingRestart();
  48. /// <summary>
  49. /// Gets the UDP server port number.
  50. /// </summary>
  51. /// <value>The UDP server port number.</value>
  52. int UdpServerPortNumber { get; }
  53. /// <summary>
  54. /// Gets the HTTP server URL prefix.
  55. /// </summary>
  56. /// <value>The HTTP server URL prefix.</value>
  57. string HttpServerUrlPrefix { get; }
  58. /// <summary>
  59. /// Notifies the pending restart.
  60. /// </summary>
  61. void NotifyPendingRestart();
  62. }
  63. }