IServerApplicationHost.cs 2.9 KB

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