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