nsIProxiedProtocolHandler.idl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsIProtocolHandler.idl"
  6. interface nsIChannel;
  7. interface nsIURI;
  8. interface nsIProxyInfo;
  9. interface nsILoadInfo;
  10. [scriptable, uuid(3756047a-fa2b-4b45-9948-3b5f8fc375e7)]
  11. interface nsIProxiedProtocolHandler : nsIProtocolHandler
  12. {
  13. /** Create a new channel with the given proxyInfo
  14. *
  15. * @param uri the channel uri
  16. * @param proxyInfo any proxy information that has already been determined,
  17. * or null if channel should later determine the proxy on its own using
  18. * proxyResolveFlags/proxyURI
  19. * @param proxyResolveFlags used if the proxy is later determined
  20. * from nsIProtocolProxyService::asyncResolve
  21. * @param proxyURI used if the proxy is later determined from
  22. * nsIProtocolProxyService::asyncResolve with this as the proxyURI name.
  23. * Generally this is the same as uri (or null which has the same
  24. * effect), except in the case of websockets which wants to bootstrap
  25. * to an http:// channel but make its proxy determination based on
  26. * a ws:// uri.
  27. * @param aLoadInfo used to evaluate who initated the resource request.
  28. */
  29. nsIChannel newProxiedChannel2(in nsIURI uri, in nsIProxyInfo proxyInfo,
  30. in unsigned long proxyResolveFlags,
  31. in nsIURI proxyURI,
  32. in nsILoadInfo aLoadInfo);
  33. /** Create a new channel with the given proxyInfo
  34. *
  35. * @param uri the channel uri
  36. * @param proxyInfo any proxy information that has already been determined,
  37. * or null if channel should later determine the proxy on its own using
  38. * proxyResolveFlags/proxyURI
  39. * @param proxyResolveFlags used if the proxy is later determined
  40. * from nsIProtocolProxyService::asyncResolve
  41. * @param proxyURI used if the proxy is later determined from
  42. * nsIProtocolProxyService::asyncResolve with this as the proxyURI name.
  43. * Generally this is the same as uri (or null which has the same
  44. * effect), except in the case of websockets which wants to bootstrap
  45. * to an http:// channel but make its proxy determination based on
  46. * a ws:// uri.
  47. */
  48. nsIChannel newProxiedChannel(in nsIURI uri, in nsIProxyInfo proxyInfo,
  49. in unsigned long proxyResolveFlags,
  50. in nsIURI proxyURI);
  51. };