extensions/cookie/nsICookiePromptService.idl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:70231afca957
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 /**
8 * An interface to open a dialog to ask to permission to accept the cookie.
9 */
10
11 interface nsIDOMWindow;
12 interface nsICookie;
13
14 [scriptable, uuid(72f8bb14-2810-4f38-8d0d-290c5401f54e)]
15 interface nsICookiePromptService : nsISupports
16 {
17 const uint32_t DENY_COOKIE = 0;
18 const uint32_t ACCEPT_COOKIE = 1;
19 const uint32_t ACCEPT_SESSION_COOKIE = 2;
20
21 /* Open a dialog that asks for permission to accept a cookie
22 *
23 * @param parent
24 * @param cookie
25 * @param hostname the host that wants to set the cookie,
26 * not the domain: part of the cookie
27 * @param cookiesFromHost the number of cookies there are already for this host
28 * @param changingCookie are we changing this cookie?
29 * @param rememberDecision should we set the matching permission for this host?
30 * @returns 0 == deny cookie
31 * 1 == accept cookie
32 * 2 == accept cookie for current session
33 */
34
35 long cookieDialog(in nsIDOMWindow parent,
36 in nsICookie cookie,
37 in ACString hostname,
38 in long cookiesFromHost,
39 in boolean changingCookie,
40 out boolean rememberDecision);
41 };
42
43 %{C++
44 #define NS_COOKIEPROMPTSERVICE_CONTRACTID "@mozilla.org/embedcomp/cookieprompt-service;1"
45 %}

mercurial