nsISystemProxySettings.idl 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -*- Mode: IDL; 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 "nsISupports.idl"
  6. /**
  7. * This interface allows the proxy code to use platform-specific proxy
  8. * settings when the proxy preference is set to "automatic discovery". This service
  9. * acts like a PAC parser to netwerk, but it will actually read the system settings and
  10. * either return the proper proxy data from the autoconfig URL specified in the system proxy,
  11. * or generate proxy data based on the system's manual proxy settings.
  12. */
  13. [scriptable, uuid(971591cd-277e-409a-bbf6-0a79879cd307)]
  14. interface nsISystemProxySettings : nsISupports
  15. {
  16. /**
  17. * Whether or not it is appropriate to execute getProxyForURI off the main thread.
  18. * If that method can block (e.g. for WPAD as windows does) then it must be
  19. * not mainThreadOnly to avoid creating main thread jank. The main thread only option is
  20. * provided for implementations that do not block but use other main thread only
  21. * functions such as dbus.
  22. */
  23. readonly attribute bool mainThreadOnly;
  24. /**
  25. * If non-empty, use this PAC file. If empty, call getProxyForURI instead.
  26. */
  27. readonly attribute AUTF8String PACURI;
  28. /**
  29. * See ProxyAutoConfig::getProxyForURI; this function behaves similarly except
  30. * a more relaxed return string is allowed that includes full urls instead of just
  31. * host:port syntax. e.g. "PROXY http://www.foo.com:8080" instead of
  32. * "PROXY www.foo.com:8080"
  33. */
  34. AUTF8String getProxyForURI(in AUTF8String testSpec,
  35. in AUTF8String testScheme,
  36. in AUTF8String testHost,
  37. in int32_t testPort);
  38. };