IServerApplicationHost.cs 2.8 KB

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