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/. */
5 #include
"nsISupports.idl"
8 * An interface to open a dialog to ask to permission to accept the cookie.
11 interface nsIDOMWindow
;
14 [scriptable
, uuid(72f8bb14
-2810-4f38
-8d0d
-290c5401f54e
)]
15 interface nsICookiePromptService
: nsISupports
17 const uint32_t DENY_COOKIE
= 0;
18 const uint32_t ACCEPT_COOKIE
= 1;
19 const uint32_t ACCEPT_SESSION_COOKIE
= 2;
21 /* Open a dialog that asks for permission to accept a 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
32 * 2 == accept cookie for current session
35 long cookieDialog
(in nsIDOMWindow parent
,
38 in long cookiesFromHost
,
39 in boolean changingCookie
,
40 out boolean rememberDecision
);
44 #define NS_COOKIEPROMPTSERVICE_CONTRACTID
"@mozilla.org/embedcomp/cookieprompt-service;1"