netwerk/base/public/nsIAuthPromptProvider.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIAuthPromptProvider.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +/* -*- Mode: idl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +[scriptable, uuid(bd9dc0fa-68ce-47d0-8859-6418c2ae8576)]
    1.12 +interface nsIAuthPromptProvider : nsISupports
    1.13 +{
    1.14 +    /**
    1.15 +     * Normal (non-proxy) prompt request.
    1.16 +     */
    1.17 +    const uint32_t PROMPT_NORMAL        = 0;
    1.18 +
    1.19 +    /**
    1.20 +     * Proxy auth request.
    1.21 +     */
    1.22 +    const uint32_t PROMPT_PROXY         = 1;
    1.23 +
    1.24 +    /**
    1.25 +     * Request a prompt interface for the given prompt reason;
    1.26 +     * @throws NS_ERROR_NOT_AVAILABLE if no prompt is allowed or
    1.27 +     * available for the given reason.
    1.28 +     *
    1.29 +     * @param aPromptReason   The reason for the auth prompt;
    1.30 +     *                        one of #PROMPT_NORMAL or #PROMPT_PROXY
    1.31 +     * @param iid             The desired interface, e.g.
    1.32 +     *                        NS_GET_IID(nsIAuthPrompt2).
    1.33 +     * @returns an nsIAuthPrompt2 interface, or throws NS_ERROR_NOT_AVAILABLE
    1.34 +     */
    1.35 +    void getAuthPrompt(in uint32_t aPromptReason, in nsIIDRef iid,
    1.36 +                       [iid_is(iid),retval] out nsQIResult result);
    1.37 +};

mercurial