OLD | NEW |
(Empty) | |
| 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 |
| 48 typedef long nsCookieStatus; |
| 49 typedef long nsCookiePolicy; |
| 50 |
| 51 [scriptable, uuid(E9FCB9A4-D376-458f-B720-E65E7DF593BC)] |
| 52 |
| 53 interface 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 * expiration time (local timezone) expressed as number of seconds since Jan
1, 1970 |
| 87 */ |
| 88 readonly attribute PRUint64 expires; |
| 89 |
| 90 /** |
| 91 * P3P status of cookie. Values are |
| 92 * |
| 93 * STATUS_UNKNOWN -- cookie collected in a previous session and this info
no longer available |
| 94 * STATUS_ACCEPTED -- cookie was accepted as it |
| 95 * STATUS_DOWNGRADED -- cookie was accepted but downgraded to a session co
okie |
| 96 * STATUS_FLAGGED -- cookie was accepted with a warning being issued to th
e user |
| 97 * STATUS_REJECTED -- cookie was not accepted |
| 98 */ |
| 99 const nsCookieStatus STATUS_UNKNOWN=0; |
| 100 const nsCookieStatus STATUS_ACCEPTED=1; |
| 101 const nsCookieStatus STATUS_DOWNGRADED=2; |
| 102 const nsCookieStatus STATUS_FLAGGED=3; |
| 103 const nsCookieStatus STATUS_REJECTED=4; |
| 104 |
| 105 readonly attribute nsCookieStatus status; |
| 106 |
| 107 /** |
| 108 * Site's compact policy. Values are |
| 109 * |
| 110 * POLICY_UNKNOWN -- cookie collected in a previous session and this info
no longer available |
| 111 * POLICY_NONE -- site did not send a compact policy along with the cookie |
| 112 * POLICY_NO_CONSENT -- site collects identfiable information without user
involvement |
| 113 * POLICY_IMPLICIT_CONSENT -- site collects identifiable information unles
s user opts out |
| 114 * POLICY_EXPLICIT_CONSENT -- site does not collect identifiable informati
on unless user opts in |
| 115 * POLICY_NO_II -- site does not collect identifiable information |
| 116 */ |
| 117 const nsCookiePolicy POLICY_UNKNOWN=0; |
| 118 const nsCookiePolicy POLICY_NONE=1; |
| 119 const nsCookiePolicy POLICY_NO_CONSENT=2; |
| 120 const nsCookiePolicy POLICY_IMPLICIT_CONSENT=3; |
| 121 const nsCookiePolicy POLICY_EXPLICIT_CONSENT=4; |
| 122 const nsCookiePolicy POLICY_NO_II=5; |
| 123 readonly attribute nsCookiePolicy policy; |
| 124 |
| 125 }; |
OLD | NEW |