bug 493457 - followup - fixing a typo in the patch.
[mozilla-central.git] / extensions / cookie / nsICookiePromptService.idl
blob5c5af1351c29a95f47fc308664561f7c461e5f49
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Original Code is cookie manager code.
16 * The Initial Developer of the Original Code is
17 * Michiel van Leeuwen (mvl@exedo.nl).
18 * Portions created by the Initial Developer are Copyright (C) 2003
19 * the Initial Developer. All Rights Reserved.
21 * Contributor(s):
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
35 * ***** END LICENSE BLOCK ***** */
37 #include "nsISupports.idl"
39 /**
40 * An interface to open a dialog to ask to permission to accept the cookie.
43 interface nsIDOMWindow;
44 interface nsICookie;
46 [scriptable, uuid(72f8bb14-2810-4f38-8d0d-290c5401f54e)]
47 interface nsICookiePromptService : nsISupports
49 const PRUint32 DENY_COOKIE = 0;
50 const PRUint32 ACCEPT_COOKIE = 1;
51 const PRUint32 ACCEPT_SESSION_COOKIE = 2;
53 /* Open a dialog that asks for permission to accept a cookie
55 * @param parent
56 * @param cookie
57 * @param hostname the host that wants to set the cookie,
58 * not the domain: part of the cookie
59 * @param cookiesFromHost the number of cookies there are already for this host
60 * @param changingCookie are we changing this cookie?
61 * @param rememberDecision should we set the matching permission for this host?
62 * @returns 0 == deny cookie
63 * 1 == accept cookie
64 * 2 == accept cookie for current session
67 long cookieDialog(in nsIDOMWindow parent,
68 in nsICookie cookie,
69 in ACString hostname,
70 in long cookiesFromHost,
71 in boolean changingCookie,
72 out boolean rememberDecision);
75 %{C++
76 #define NS_COOKIEPROMPTSERVICE_CONTRACTID "@mozilla.org/embedcomp/cookieprompt-service;1"