IServerApplicationHost.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 the HTTP server port.
  28. /// </summary>
  29. /// <value>The HTTP server port.</value>
  30. int HttpPort { get; }
  31. /// <summary>
  32. /// Gets the HTTPS port.
  33. /// </summary>
  34. /// <value>The HTTPS port.</value>
  35. int HttpsPort { get; }
  36. /// <summary>
  37. /// Gets a value indicating whether [supports HTTPS].
  38. /// </summary>
  39. /// <value><c>true</c> if [supports HTTPS]; otherwise, <c>false</c>.</value>
  40. bool EnableHttps { get; }
  41. /// <summary>
  42. /// Gets a value indicating whether this instance has update available.
  43. /// </summary>
  44. /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
  45. bool HasUpdateAvailable { get; }
  46. /// <summary>
  47. /// Gets the name of the friendly.
  48. /// </summary>
  49. /// <value>The name of the friendly.</value>
  50. string FriendlyName { get; }
  51. /// <summary>
  52. /// Gets the local ip address.
  53. /// </summary>
  54. /// <value>The local ip address.</value>
  55. Task<List<IpAddressInfo>> GetLocalIpAddresses();
  56. /// <summary>
  57. /// Gets the local API URL.
  58. /// </summary>
  59. /// <value>The local API URL.</value>
  60. Task<string> GetLocalApiUrl();
  61. /// <summary>
  62. /// Gets the local API URL.
  63. /// </summary>
  64. /// <param name="host">The host.</param>
  65. /// <returns>System.String.</returns>
  66. string GetLocalApiUrl(string host);
  67. /// <summary>
  68. /// Gets the local API URL.
  69. /// </summary>
  70. string GetLocalApiUrl(IpAddressInfo address);
  71. void LaunchUrl(string url);
  72. void EnableLoopback(string appName);
  73. string PackageRuntime { get; }
  74. }
  75. }