IServerApplicationHost.cs 3.0 KB

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