1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/cookie/nsICookie2.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsICookie.idl" 1.10 + 1.11 +/** 1.12 + * Main cookie object interface for use by consumers: 1.13 + * extends nsICookie, a frozen interface for external 1.14 + * access of cookie objects 1.15 + */ 1.16 + 1.17 +[scriptable, uuid(05c420e5-03d0-4c7b-a605-df7ebe5ca326)] 1.18 + 1.19 +interface nsICookie2 : nsICookie 1.20 +{ 1.21 + 1.22 + /** 1.23 + * the host (possibly fully qualified) of the cookie, 1.24 + * without a leading dot to represent if it is a 1.25 + * domain cookie. 1.26 + */ 1.27 + readonly attribute AUTF8String rawHost; 1.28 + 1.29 + /** 1.30 + * true if the cookie is a session cookie. 1.31 + * note that expiry time will also be honored 1.32 + * for session cookies (see below); thus, whichever is 1.33 + * the more restrictive of the two will take effect. 1.34 + */ 1.35 + readonly attribute boolean isSession; 1.36 + 1.37 + /** 1.38 + * the actual expiry time of the cookie, in seconds 1.39 + * since midnight (00:00:00), January 1, 1970 UTC. 1.40 + * 1.41 + * this is distinct from nsICookie::expires, which 1.42 + * has different and obsolete semantics. 1.43 + */ 1.44 + readonly attribute int64_t expiry; 1.45 + 1.46 + /** 1.47 + * true if the cookie is an http only cookie 1.48 + */ 1.49 + readonly attribute boolean isHttpOnly; 1.50 + 1.51 + /** 1.52 + * the creation time of the cookie, in microseconds 1.53 + * since midnight (00:00:00), January 1, 1970 UTC. 1.54 + */ 1.55 + readonly attribute int64_t creationTime; 1.56 + 1.57 + /** 1.58 + * the last time the cookie was accessed (i.e. created, 1.59 + * modified, or read by the server), in microseconds 1.60 + * since midnight (00:00:00), January 1, 1970 UTC. 1.61 + * 1.62 + * note that this time may be approximate. 1.63 + */ 1.64 + readonly attribute int64_t lastAccessed; 1.65 + 1.66 +};