IHttpServer.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Services;
  4. namespace MediaBrowser.Controller.Net
  5. {
  6. /// <summary>
  7. /// Interface IHttpServer
  8. /// </summary>
  9. public interface IHttpServer : IDisposable
  10. {
  11. /// <summary>
  12. /// Gets the URL prefix.
  13. /// </summary>
  14. /// <value>The URL prefix.</value>
  15. IEnumerable<string> UrlPrefixes { get; }
  16. /// <summary>
  17. /// Gets the certificate path.
  18. /// </summary>
  19. /// <value>The certificate path.</value>
  20. string CertificatePath { get; }
  21. /// <summary>
  22. /// Starts the specified server name.
  23. /// </summary>
  24. /// <param name="urlPrefixes">The URL prefixes.</param>
  25. /// <param name="certificatePath">If an https prefix is specified,
  26. /// the ssl certificate localtion on the file system.</param>
  27. void StartServer(IEnumerable<string> urlPrefixes, string certificatePath);
  28. /// <summary>
  29. /// Stops this instance.
  30. /// </summary>
  31. void Stop();
  32. /// <summary>
  33. /// Occurs when [web socket connected].
  34. /// </summary>
  35. event EventHandler<WebSocketConnectEventArgs> WebSocketConnected;
  36. /// <summary>
  37. /// Occurs when [web socket connecting].
  38. /// </summary>
  39. event EventHandler<WebSocketConnectingEventArgs> WebSocketConnecting;
  40. /// <summary>
  41. /// Inits this instance.
  42. /// </summary>
  43. void Init(IEnumerable<IService> services);
  44. /// <summary>
  45. /// If set, all requests will respond with this message
  46. /// </summary>
  47. string GlobalResponse { get; set; }
  48. }
  49. }