IServerApplicationHost.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. using MediaBrowser.Common;
  6. using MediaBrowser.Model.Net;
  7. using MediaBrowser.Model.System;
  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(CancellationToken cancellationToken);
  21. Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken);
  22. bool CanLaunchWebBrowser { get; }
  23. /// <summary>
  24. /// Gets the HTTP server port.
  25. /// </summary>
  26. /// <value>The HTTP server port.</value>
  27. int HttpPort { get; }
  28. /// <summary>
  29. /// Gets the HTTPS port.
  30. /// </summary>
  31. /// <value>The HTTPS port.</value>
  32. int HttpsPort { get; }
  33. /// <summary>
  34. /// Gets a value indicating whether [supports HTTPS].
  35. /// </summary>
  36. /// <value><c>true</c> if [supports HTTPS]; otherwise, <c>false</c>.</value>
  37. bool EnableHttps { get; }
  38. /// <summary>
  39. /// Gets a value indicating whether this instance has update available.
  40. /// </summary>
  41. /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
  42. bool HasUpdateAvailable { get; }
  43. /// <summary>
  44. /// Gets the name of the friendly.
  45. /// </summary>
  46. /// <value>The name of the friendly.</value>
  47. string FriendlyName { get; }
  48. /// <summary>
  49. /// Gets the local ip address.
  50. /// </summary>
  51. /// <value>The local ip address.</value>
  52. Task<List<IpAddressInfo>> GetLocalIpAddresses(CancellationToken cancellationToken);
  53. /// <summary>
  54. /// Gets the local API URL.
  55. /// </summary>
  56. /// <value>The local API URL.</value>
  57. Task<string> GetLocalApiUrl(CancellationToken cancellationToken);
  58. /// <summary>
  59. /// Gets the local API URL.
  60. /// </summary>
  61. /// <param name="host">The host.</param>
  62. /// <returns>System.String.</returns>
  63. string GetLocalApiUrl(string host);
  64. /// <summary>
  65. /// Gets the local API URL.
  66. /// </summary>
  67. string GetLocalApiUrl(IpAddressInfo address);
  68. void LaunchUrl(string url);
  69. void EnableLoopback(string appName);
  70. WakeOnLanInfo[] GetWakeOnLanInfo();
  71. string ExpandVirtualPath(string path);
  72. string ReverseVirtualPath(string path);
  73. }
  74. }