netwerk/base/public/nsIAuthPromptCallback.idl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:a5f442a31951
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #include "nsISupports.idl"
6
7 interface nsIAuthInformation;
8
9 /**
10 * Interface for callback methods for the asynchronous nsIAuthPrompt2 method.
11 * Callers MUST call exactly one method if nsIAuthPrompt2::promptPasswordAsync
12 * returns successfully. They MUST NOT call any method on this interface before
13 * promptPasswordAsync returns.
14 */
15 [scriptable, uuid(bdc387d7-2d29-4cac-92f1-dd75d786631d)]
16 interface nsIAuthPromptCallback : nsISupports
17 {
18 /**
19 * Authentication information is available.
20 *
21 * @param aContext
22 * The context as passed to promptPasswordAsync
23 * @param aAuthInfo
24 * Authentication information. Must be the same object that was passed
25 * to promptPasswordAsync.
26 *
27 * @note Any exceptions thrown from this method should be ignored.
28 */
29 void onAuthAvailable(in nsISupports aContext,
30 in nsIAuthInformation aAuthInfo);
31
32 /**
33 * Notification that the prompt was cancelled.
34 *
35 * @param aContext
36 * The context that was passed to promptPasswordAsync.
37 * @param userCancel
38 * If false, this prompt was cancelled by calling the
39 * the cancel method on the nsICancelable; otherwise,
40 * it was cancelled by the user.
41 */
42 void onAuthCancelled(in nsISupports aContext, in boolean userCancel);
43 };
44

mercurial