INativeApp.cs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using MediaBrowser.Common.Net;
  2. using MediaBrowser.Controller.Diagnostics;
  3. using MediaBrowser.Model.Logging;
  4. using System.Collections.Generic;
  5. using System.Reflection;
  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 this instance can self update.
  50. /// </summary>
  51. /// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value>
  52. bool CanSelfUpdate { get; }
  53. /// <summary>
  54. /// Shutdowns this instance.
  55. /// </summary>
  56. void Shutdown();
  57. /// <summary>
  58. /// Restarts this instance.
  59. /// </summary>
  60. void Restart();
  61. /// <summary>
  62. /// Configures the automatic run.
  63. /// </summary>
  64. /// <param name="autorun">if set to <c>true</c> [autorun].</param>
  65. void ConfigureAutoRun(bool autorun);
  66. /// <summary>
  67. /// Gets the network manager.
  68. /// </summary>
  69. /// <returns>INetworkManager.</returns>
  70. INetworkManager CreateNetworkManager(ILogger logger);
  71. /// <summary>
  72. /// Prevents the system stand by.
  73. /// </summary>
  74. void PreventSystemStandby();
  75. /// <summary>
  76. /// Gets the process manager.
  77. /// </summary>
  78. /// <returns>IProcessManager.</returns>
  79. IProcessManager GetProcessManager();
  80. }
  81. }