INativeApp.cs 3.5 KB

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