nsIAuthPromptProvider.idl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. [scriptable, uuid(bd9dc0fa-68ce-47d0-8859-6418c2ae8576)]
  7. interface nsIAuthPromptProvider : nsISupports
  8. {
  9. /**
  10. * Normal (non-proxy) prompt request.
  11. */
  12. const uint32_t PROMPT_NORMAL = 0;
  13. /**
  14. * Proxy auth request.
  15. */
  16. const uint32_t PROMPT_PROXY = 1;
  17. /**
  18. * Request a prompt interface for the given prompt reason;
  19. * @throws NS_ERROR_NOT_AVAILABLE if no prompt is allowed or
  20. * available for the given reason.
  21. *
  22. * @param aPromptReason The reason for the auth prompt;
  23. * one of #PROMPT_NORMAL or #PROMPT_PROXY
  24. * @param iid The desired interface, e.g.
  25. * NS_GET_IID(nsIAuthPrompt2).
  26. * @returns an nsIAuthPrompt2 interface, or throws NS_ERROR_NOT_AVAILABLE
  27. */
  28. void getAuthPrompt(in uint32_t aPromptReason, in nsIIDRef iid,
  29. [iid_is(iid),retval] out nsQIResult result);
  30. };