michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * 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 optional interface for accessing the HTTP or michael@0: * javascript cookie object michael@0: */ michael@0: michael@0: typedef long nsCookieStatus; michael@0: typedef long nsCookiePolicy; michael@0: michael@0: [scriptable, uuid(8684966b-1877-4f0f-8155-be4490b96bf7)] michael@0: michael@0: interface nsICookie : nsISupports { michael@0: michael@0: /** michael@0: * the name of the cookie michael@0: */ michael@0: readonly attribute ACString name; michael@0: michael@0: /** michael@0: * the cookie value michael@0: */ michael@0: readonly attribute AUTF8String value; michael@0: michael@0: /** michael@0: * true if the cookie is a domain cookie, false otherwise michael@0: */ michael@0: readonly attribute boolean isDomain; michael@0: michael@0: /** michael@0: * the host (possibly fully qualified) of the cookie michael@0: */ michael@0: readonly attribute AUTF8String host; michael@0: michael@0: /** michael@0: * the path pertaining to the cookie michael@0: */ michael@0: readonly attribute AUTF8String path; michael@0: michael@0: /** michael@0: * true if the cookie was transmitted over ssl, false otherwise michael@0: */ michael@0: readonly attribute boolean isSecure; michael@0: michael@0: /** michael@0: * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead. michael@0: * michael@0: * expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC. michael@0: * expires = 0 represents a session cookie. michael@0: * expires = 1 represents an expiration time earlier than Jan 1, 1970. michael@0: */ michael@0: readonly attribute uint64_t expires; michael@0: michael@0: /** michael@0: * @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases. michael@0: */ michael@0: const nsCookieStatus STATUS_UNKNOWN=0; michael@0: const nsCookieStatus STATUS_ACCEPTED=1; michael@0: const nsCookieStatus STATUS_DOWNGRADED=2; michael@0: const nsCookieStatus STATUS_FLAGGED=3; michael@0: const nsCookieStatus STATUS_REJECTED=4; michael@0: readonly attribute nsCookieStatus status; michael@0: michael@0: /** michael@0: * @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases. michael@0: */ michael@0: const nsCookiePolicy POLICY_UNKNOWN=0; michael@0: const nsCookiePolicy POLICY_NONE=1; michael@0: const nsCookiePolicy POLICY_NO_CONSENT=2; michael@0: const nsCookiePolicy POLICY_IMPLICIT_CONSENT=3; michael@0: const nsCookiePolicy POLICY_EXPLICIT_CONSENT=4; michael@0: const nsCookiePolicy POLICY_NO_II=5; michael@0: readonly attribute nsCookiePolicy policy; michael@0: michael@0: };