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