INativeApp.cs 3.1 KB

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