PageRenderTime 32ms CodeModel.GetById 28ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_sdk/idl/nsICookie.idl

http://firefox-mac-pdf.googlecode.com/
IDL | 115 lines | 26 code | 15 blank | 74 comment | 0 complexity | 48062e27fa428c104f04b3969960fb80 MD5 | raw file
  1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2 *
  3 * ***** BEGIN LICENSE BLOCK *****
  4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5 *
  6 * The contents of this file are subject to the Mozilla Public License Version
  7 * 1.1 (the "License"); you may not use this file except in compliance with
  8 * the License. You may obtain a copy of the License at
  9 * http://www.mozilla.org/MPL/
 10 *
 11 * Software distributed under the License is distributed on an "AS IS" basis,
 12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 13 * for the specific language governing rights and limitations under the
 14 * License.
 15 *
 16 * The Original Code is mozilla.org code.
 17 *
 18 * The Initial Developer of the Original Code is
 19 * Netscape Communications, Inc.
 20 * Portions created by the Initial Developer are Copyright (C) 2001
 21 * the Initial Developer. All Rights Reserved.
 22 *
 23 * Contributor(s):
 24 *
 25 * Alternatively, the contents of this file may be used under the terms of
 26 * either the GNU General Public License Version 2 or later (the "GPL"), or
 27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 28 * in which case the provisions of the GPL or the LGPL are applicable instead
 29 * of those above. If you wish to allow use of your version of this file only
 30 * under the terms of either the GPL or the LGPL, and not to allow others to
 31 * use your version of this file under the terms of the MPL, indicate your
 32 * decision by deleting the provisions above and replace them with the notice
 33 * and other provisions required by the GPL or the LGPL. If you do not delete
 34 * the provisions above, a recipient may use your version of this file under
 35 * the terms of any one of the MPL, the GPL or the LGPL.
 36 *
 37 * ***** END LICENSE BLOCK ***** */
 38
 39#include "nsISupports.idl"
 40
 41/** 
 42 * An optional interface for accessing the HTTP or
 43 * javascript cookie object
 44 * 
 45 * @status FROZEN
 46 */
 47
 48typedef long nsCookieStatus;
 49typedef long nsCookiePolicy;
 50
 51[scriptable, uuid(E9FCB9A4-D376-458f-B720-E65E7DF593BC)]
 52
 53interface nsICookie : nsISupports {
 54
 55    /**
 56     * the name of the cookie
 57     */
 58    readonly attribute ACString name;
 59
 60    /**
 61     * the cookie value
 62     */
 63    readonly attribute ACString value;
 64
 65    /**
 66     * true if the cookie is a domain cookie, false otherwise
 67     */
 68    readonly attribute boolean isDomain;
 69
 70    /**
 71     * the host (possibly fully qualified) of the cookie
 72     */
 73    readonly attribute AUTF8String host;
 74
 75    /**
 76     * the path pertaining to the cookie
 77     */
 78    readonly attribute AUTF8String path;
 79
 80    /**
 81     * true if the cookie was transmitted over ssl, false otherwise
 82     */
 83    readonly attribute boolean isSecure;
 84
 85    /**
 86     * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
 87     *
 88     * expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC.
 89     * expires = 0 represents a session cookie.
 90     * expires = 1 represents an expiration time earlier than Jan 1, 1970.
 91     */
 92    readonly attribute PRUint64 expires;
 93
 94    /**
 95     * @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases.
 96     */
 97    const nsCookieStatus STATUS_UNKNOWN=0;
 98    const nsCookieStatus STATUS_ACCEPTED=1;
 99    const nsCookieStatus STATUS_DOWNGRADED=2;
100    const nsCookieStatus STATUS_FLAGGED=3;
101    const nsCookieStatus STATUS_REJECTED=4;
102    readonly attribute nsCookieStatus status;
103
104    /**
105     * @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases.
106     */
107    const nsCookiePolicy POLICY_UNKNOWN=0;
108    const nsCookiePolicy POLICY_NONE=1;
109    const nsCookiePolicy POLICY_NO_CONSENT=2;
110    const nsCookiePolicy POLICY_IMPLICIT_CONSENT=3;
111    const nsCookiePolicy POLICY_EXPLICIT_CONSENT=4;
112    const nsCookiePolicy POLICY_NO_II=5;
113    readonly attribute nsCookiePolicy policy;
114
115};