netwerk/cookie/nsICookie.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     9 /** 
    10  * An optional interface for accessing the HTTP or
    11  * javascript cookie object
    12  */
    14 typedef long nsCookieStatus;
    15 typedef long nsCookiePolicy;
    17 [scriptable, uuid(8684966b-1877-4f0f-8155-be4490b96bf7)]
    19 interface nsICookie : nsISupports {
    21     /**
    22      * the name of the cookie
    23      */
    24     readonly attribute ACString name;
    26     /**
    27      * the cookie value
    28      */
    29     readonly attribute AUTF8String value;
    31     /**
    32      * true if the cookie is a domain cookie, false otherwise
    33      */
    34     readonly attribute boolean isDomain;
    36     /**
    37      * the host (possibly fully qualified) of the cookie
    38      */
    39     readonly attribute AUTF8String host;
    41     /**
    42      * the path pertaining to the cookie
    43      */
    44     readonly attribute AUTF8String path;
    46     /**
    47      * true if the cookie was transmitted over ssl, false otherwise
    48      */
    49     readonly attribute boolean isSecure;
    51     /**
    52      * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
    53      *
    54      * expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC.
    55      * expires = 0 represents a session cookie.
    56      * expires = 1 represents an expiration time earlier than Jan 1, 1970.
    57      */
    58     readonly attribute uint64_t expires;
    60     /**
    61      * @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases.
    62      */
    63     const nsCookieStatus STATUS_UNKNOWN=0;
    64     const nsCookieStatus STATUS_ACCEPTED=1;
    65     const nsCookieStatus STATUS_DOWNGRADED=2;
    66     const nsCookieStatus STATUS_FLAGGED=3;
    67     const nsCookieStatus STATUS_REJECTED=4;
    68     readonly attribute nsCookieStatus status;
    70     /**
    71      * @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases.
    72      */
    73     const nsCookiePolicy POLICY_UNKNOWN=0;
    74     const nsCookiePolicy POLICY_NONE=1;
    75     const nsCookiePolicy POLICY_NO_CONSENT=2;
    76     const nsCookiePolicy POLICY_IMPLICIT_CONSENT=3;
    77     const nsCookiePolicy POLICY_EXPLICIT_CONSENT=4;
    78     const nsCookiePolicy POLICY_NO_II=5;
    79     readonly attribute nsCookiePolicy policy;
    81 };

mercurial