|
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 "nsIPromptService.idl" |
|
6 |
|
7 interface nsIAuthInformation; |
|
8 interface nsIAuthPromptCallback; |
|
9 interface nsICancelable; |
|
10 interface nsIChannel; |
|
11 interface nsIDOMWindow; |
|
12 |
|
13 /** |
|
14 * This is an improved version of nsIPromptService that is less prescriptive |
|
15 * about the resulting user interface. |
|
16 * |
|
17 * @status INCOMPLETE do not freeze before fixing bug 228207 |
|
18 */ |
|
19 [scriptable, uuid(cf86d196-dbee-4482-9dfa-3477aa128319)] |
|
20 interface nsIPromptService2 : nsIPromptService { |
|
21 // NOTE: These functions differ from their nsIAuthPrompt counterparts by |
|
22 // having additional checkbox parameters |
|
23 // checkValue can be null meaning to show no checkbox |
|
24 // checkboxLabel is a wstring so that it can be null from both JS and C++ in |
|
25 // a convenient way |
|
26 // |
|
27 // See nsIAuthPrompt2 for documentation on the semantics of the other |
|
28 // parameters. |
|
29 boolean promptAuth(in nsIDOMWindow aParent, |
|
30 in nsIChannel aChannel, |
|
31 in uint32_t level, |
|
32 in nsIAuthInformation authInfo, |
|
33 in wstring checkboxLabel, |
|
34 inout boolean checkValue); |
|
35 |
|
36 nsICancelable asyncPromptAuth(in nsIDOMWindow aParent, |
|
37 in nsIChannel aChannel, |
|
38 in nsIAuthPromptCallback aCallback, |
|
39 in nsISupports aContext, |
|
40 in uint32_t level, |
|
41 in nsIAuthInformation authInfo, |
|
42 in wstring checkboxLabel, |
|
43 inout boolean checkValue); |
|
44 }; |
|
45 |