IServerApplicationHost.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. using MediaBrowser.Common;
  2. using MediaBrowser.Model.System;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Net;
  6. using System.Threading.Tasks;
  7. using MediaBrowser.Model.Net;
  8. namespace MediaBrowser.Controller
  9. {
  10. /// <summary>
  11. /// Interface IServerApplicationHost
  12. /// </summary>
  13. public interface IServerApplicationHost : IApplicationHost
  14. {
  15. event EventHandler HasUpdateAvailableChanged;
  16. /// <summary>
  17. /// Gets the system info.
  18. /// </summary>
  19. /// <returns>SystemInfo.</returns>
  20. Task<SystemInfo> GetSystemInfo();
  21. /// <summary>
  22. /// Gets a value indicating whether [supports automatic run at startup].
  23. /// </summary>
  24. /// <value><c>true</c> if [supports automatic run at startup]; otherwise, <c>false</c>.</value>
  25. bool SupportsAutoRunAtStartup { get; }
  26. /// <summary>
  27. /// Gets a value indicating whether [supports library monitor].
  28. /// </summary>
  29. /// <value><c>true</c> if [supports library monitor]; otherwise, <c>false</c>.</value>
  30. bool SupportsLibraryMonitor { get; }
  31. /// <summary>
  32. /// Gets the HTTP server port.
  33. /// </summary>
  34. /// <value>The HTTP server port.</value>
  35. int HttpPort { get; }
  36. /// <summary>
  37. /// Gets the HTTPS port.
  38. /// </summary>
  39. /// <value>The HTTPS port.</value>
  40. int HttpsPort { get; }
  41. /// <summary>
  42. /// Gets a value indicating whether [supports HTTPS].
  43. /// </summary>
  44. /// <value><c>true</c> if [supports HTTPS]; otherwise, <c>false</c>.</value>
  45. bool EnableHttps { get; }
  46. /// <summary>
  47. /// Gets a value indicating whether this instance has update available.
  48. /// </summary>
  49. /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
  50. bool HasUpdateAvailable { get; }
  51. /// <summary>
  52. /// Gets the name of the friendly.
  53. /// </summary>
  54. /// <value>The name of the friendly.</value>
  55. string FriendlyName { get; }
  56. /// <summary>
  57. /// Gets the local ip address.
  58. /// </summary>
  59. /// <value>The local ip address.</value>
  60. Task<List<IpAddressInfo>> GetLocalIpAddresses();
  61. /// <summary>
  62. /// Gets the local API URL.
  63. /// </summary>
  64. /// <value>The local API URL.</value>
  65. Task<string> GetLocalApiUrl();
  66. /// <summary>
  67. /// Gets the local API URL.
  68. /// </summary>
  69. /// <param name="host">The host.</param>
  70. /// <returns>System.String.</returns>
  71. string GetLocalApiUrl(string host);
  72. /// <summary>
  73. /// Gets the local API URL.
  74. /// </summary>
  75. string GetLocalApiUrl(string ipAddress, bool isIpv6);
  76. void LaunchUrl(string url);
  77. void EnableLoopback(string appName);
  78. }
  79. }