2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An interface to open a dialog to ask to permission to accept the cookie.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface nsIDOMWindow;
|
|
|
|
interface nsICookie;
|
|
|
|
|
|
|
|
[scriptable, uuid(72f8bb14-2810-4f38-8d0d-290c5401f54e)]
|
|
|
|
interface nsICookiePromptService : nsISupports
|
|
|
|
{
|
2012-08-22 08:56:38 -07:00
|
|
|
const uint32_t DENY_COOKIE = 0;
|
|
|
|
const uint32_t ACCEPT_COOKIE = 1;
|
|
|
|
const uint32_t ACCEPT_SESSION_COOKIE = 2;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* Open a dialog that asks for permission to accept a cookie
|
|
|
|
*
|
|
|
|
* @param parent
|
|
|
|
* @param cookie
|
|
|
|
* @param hostname the host that wants to set the cookie,
|
|
|
|
* not the domain: part of the cookie
|
|
|
|
* @param cookiesFromHost the number of cookies there are already for this host
|
|
|
|
* @param changingCookie are we changing this cookie?
|
|
|
|
* @param rememberDecision should we set the matching permission for this host?
|
|
|
|
* @returns 0 == deny cookie
|
|
|
|
* 1 == accept cookie
|
|
|
|
* 2 == accept cookie for current session
|
|
|
|
*/
|
|
|
|
|
|
|
|
long cookieDialog(in nsIDOMWindow parent,
|
|
|
|
in nsICookie cookie,
|
|
|
|
in ACString hostname,
|
|
|
|
in long cookiesFromHost,
|
|
|
|
in boolean changingCookie,
|
|
|
|
out boolean rememberDecision);
|
|
|
|
};
|
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define NS_COOKIEPROMPTSERVICE_CONTRACTID "@mozilla.org/embedcomp/cookieprompt-service;1"
|
|
|
|
%}
|