INativeApp.cs 3.9 KB

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