1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/cookie/nsICookie.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,81 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +/** 1.13 + * An optional interface for accessing the HTTP or 1.14 + * javascript cookie object 1.15 + */ 1.16 + 1.17 +typedef long nsCookieStatus; 1.18 +typedef long nsCookiePolicy; 1.19 + 1.20 +[scriptable, uuid(8684966b-1877-4f0f-8155-be4490b96bf7)] 1.21 + 1.22 +interface nsICookie : nsISupports { 1.23 + 1.24 + /** 1.25 + * the name of the cookie 1.26 + */ 1.27 + readonly attribute ACString name; 1.28 + 1.29 + /** 1.30 + * the cookie value 1.31 + */ 1.32 + readonly attribute AUTF8String value; 1.33 + 1.34 + /** 1.35 + * true if the cookie is a domain cookie, false otherwise 1.36 + */ 1.37 + readonly attribute boolean isDomain; 1.38 + 1.39 + /** 1.40 + * the host (possibly fully qualified) of the cookie 1.41 + */ 1.42 + readonly attribute AUTF8String host; 1.43 + 1.44 + /** 1.45 + * the path pertaining to the cookie 1.46 + */ 1.47 + readonly attribute AUTF8String path; 1.48 + 1.49 + /** 1.50 + * true if the cookie was transmitted over ssl, false otherwise 1.51 + */ 1.52 + readonly attribute boolean isSecure; 1.53 + 1.54 + /** 1.55 + * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead. 1.56 + * 1.57 + * expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC. 1.58 + * expires = 0 represents a session cookie. 1.59 + * expires = 1 represents an expiration time earlier than Jan 1, 1970. 1.60 + */ 1.61 + readonly attribute uint64_t expires; 1.62 + 1.63 + /** 1.64 + * @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases. 1.65 + */ 1.66 + const nsCookieStatus STATUS_UNKNOWN=0; 1.67 + const nsCookieStatus STATUS_ACCEPTED=1; 1.68 + const nsCookieStatus STATUS_DOWNGRADED=2; 1.69 + const nsCookieStatus STATUS_FLAGGED=3; 1.70 + const nsCookieStatus STATUS_REJECTED=4; 1.71 + readonly attribute nsCookieStatus status; 1.72 + 1.73 + /** 1.74 + * @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases. 1.75 + */ 1.76 + const nsCookiePolicy POLICY_UNKNOWN=0; 1.77 + const nsCookiePolicy POLICY_NONE=1; 1.78 + const nsCookiePolicy POLICY_NO_CONSENT=2; 1.79 + const nsCookiePolicy POLICY_IMPLICIT_CONSENT=3; 1.80 + const nsCookiePolicy POLICY_EXPLICIT_CONSENT=4; 1.81 + const nsCookiePolicy POLICY_NO_II=5; 1.82 + readonly attribute nsCookiePolicy policy; 1.83 + 1.84 +};