nsIProtocolProxyCallback.idl 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* vim:set ts=2 sw=2 sts=2 et cindent: */
  3. /* This Source Code Form is subject to the terms of the Mozilla Public
  4. * License, v. 2.0. If a copy of the MPL was not distributed with this
  5. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  6. #include "nsISupports.idl"
  7. interface nsIChannel;
  8. interface nsIProxyInfo;
  9. interface nsICancelable;
  10. /**
  11. * This interface serves as a closure for nsIProtocolProxyService's
  12. * asyncResolve method.
  13. */
  14. [scriptable, uuid(fbb6eff6-0cc2-4d99-8d6f-0a12b462bdeb)]
  15. interface nsIProtocolProxyCallback : nsISupports
  16. {
  17. /**
  18. * This method is called when proxy info is available or when an error
  19. * in the proxy resolution occurs.
  20. *
  21. * @param aRequest
  22. * The value returned from asyncResolve.
  23. * @param aChannel
  24. * The channel passed to asyncResolve.
  25. * @param aProxyInfo
  26. * The resulting proxy info or null if there is no associated proxy
  27. * info for aURI. As with the result of nsIProtocolProxyService's
  28. * resolve method, a null result implies that a direct connection
  29. * should be used.
  30. * @param aStatus
  31. * The status of the callback. This is a failure code if the request
  32. * could not be satisfied, in which case the value of aStatus
  33. * indicates the reason for the failure and aProxyInfo will be null.
  34. */
  35. void onProxyAvailable(in nsICancelable aRequest,
  36. in nsIChannel aChannel,
  37. in nsIProxyInfo aProxyInfo,
  38. in nsresult aStatus);
  39. };