IServerApplicationHost.cs 2.9 KB

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