netwerk/cookie/nsICookie.idl
author Eitan Isaacson <eitan@monotonous.org>
Tue, 09 Oct 2018 17:20:46 +0000
changeset 440294 c926c64702351c4a8a3ea441dd553c8027dc45f2
parent 438059 09dc63dfd888f39b91ccfb40da8f0f8299303458
child 475212 020c8c871c0d3b3920fe95935cfef06501976c0f
permissions -rw-r--r--
Bug 1479037 - Remove virtual content node, js autofill, and event support 2/4. r=jchen,yzen Disabled most jsunit tests temporarily in this patch. Will modify and bring them back up in later patches, as stuff is reimplemented. Disabled most jsat mochitests. Will have a followup for but re├źnabling or porting, depending on the test. Depends on D6681 Differential Revision: https://phabricator.services.mozilla.com/D6682

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * 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/. */

#include "nsISupports.idl"

/** 
 * An optional interface for accessing the HTTP or
 * javascript cookie object
 */

typedef long nsCookieStatus;
typedef long nsCookiePolicy;

[scriptable, uuid(adf0db5e-211e-45a3-be14-4486ac430a58)]
interface nsICookie : nsISupports {

    /**
     * the name of the cookie
     */
    readonly attribute ACString name;

    /**
     * the cookie value
     */
    readonly attribute AUTF8String value;

    /**
     * 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;

    /**
     * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
     *
     * 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.
     */
    readonly attribute uint64_t expires;

    /**
     * The origin attributes for this cookie
     */
    [implicit_jscontext]
    readonly attribute jsval originAttributes;
};