INativeApp.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using MediaBrowser.Common.Net;
  2. using MediaBrowser.Model.Logging;
  3. using System.Collections.Generic;
  4. using System.Reflection;
  5. using MediaBrowser.Controller.Power;
  6. namespace MediaBrowser.Server.Startup.Common
  7. {
  8. public interface INativeApp
  9. {
  10. /// <summary>
  11. /// Gets the assemblies with parts.
  12. /// </summary>
  13. /// <returns>List&lt;Assembly&gt;.</returns>
  14. List<Assembly> GetAssembliesWithParts();
  15. /// <summary>
  16. /// Authorizes the server.
  17. /// </summary>
  18. /// <param name="udpPort">The UDP port.</param>
  19. /// <param name="httpServerPort">The HTTP server port.</param>
  20. /// <param name="httpsServerPort">The HTTPS server port.</param>
  21. /// <param name="tempDirectory">The temporary directory.</param>
  22. void AuthorizeServer(int udpPort, int httpServerPort, int httpsServerPort, string tempDirectory);
  23. /// <summary>
  24. /// Gets the environment.
  25. /// </summary>
  26. /// <value>The environment.</value>
  27. NativeEnvironment Environment { get; }
  28. /// <summary>
  29. /// Gets a value indicating whether [supports running as service].
  30. /// </summary>
  31. /// <value><c>true</c> if [supports running as service]; otherwise, <c>false</c>.</value>
  32. bool SupportsRunningAsService { get; }
  33. /// <summary>
  34. /// Gets a value indicating whether this instance is running as service.
  35. /// </summary>
  36. /// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
  37. bool IsRunningAsService { get; }
  38. /// <summary>
  39. /// Gets a value indicating whether this instance can self restart.
  40. /// </summary>
  41. /// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
  42. bool CanSelfRestart { get; }
  43. /// <summary>
  44. /// Gets a value indicating whether [supports autorun at startup].
  45. /// </summary>
  46. /// <value><c>true</c> if [supports autorun at startup]; otherwise, <c>false</c>.</value>
  47. bool SupportsAutoRunAtStartup { get; }
  48. /// <summary>
  49. /// Gets a value indicating whether [supports library monitor].
  50. /// </summary>
  51. /// <value><c>true</c> if [supports library monitor]; otherwise, <c>false</c>.</value>
  52. bool SupportsLibraryMonitor { get; }
  53. /// <summary>
  54. /// Gets a value indicating whether this instance can self update.
  55. /// </summary>
  56. /// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value>
  57. bool CanSelfUpdate { get; }
  58. /// <summary>
  59. /// Shutdowns this instance.
  60. /// </summary>
  61. void Shutdown();
  62. /// <summary>
  63. /// Restarts this instance.
  64. /// </summary>
  65. void Restart(StartupOptions startupOptions);
  66. /// <summary>
  67. /// Configures the automatic run.
  68. /// </summary>
  69. /// <param name="autorun">if set to <c>true</c> [autorun].</param>
  70. void ConfigureAutoRun(bool autorun);
  71. /// <summary>
  72. /// Gets the network manager.
  73. /// </summary>
  74. /// <returns>INetworkManager.</returns>
  75. INetworkManager CreateNetworkManager(ILogger logger);
  76. /// <summary>
  77. /// Prevents the system stand by.
  78. /// </summary>
  79. void PreventSystemStandby();
  80. /// <summary>
  81. /// Gets the power management.
  82. /// </summary>
  83. /// <returns>IPowerManagement.</returns>
  84. IPowerManagement GetPowerManagement();
  85. }
  86. }