OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0
-Release/WINNT_5.2_Depend/mozilla/netwerk/cookie/public/nsICookie.idl |
| 3 */ |
| 4 |
| 5 #ifndef __gen_nsICookie_h__ |
| 6 #define __gen_nsICookie_h__ |
| 7 |
| 8 |
| 9 #ifndef __gen_nsISupports_h__ |
| 10 #include "nsISupports.h" |
| 11 #endif |
| 12 |
| 13 /* For IDL files that don't want to include root IDL files. */ |
| 14 #ifndef NS_NO_VTABLE |
| 15 #define NS_NO_VTABLE |
| 16 #endif |
| 17 /** |
| 18 * An optional interface for accessing the HTTP or |
| 19 * javascript cookie object |
| 20 * |
| 21 * @status FROZEN |
| 22 */ |
| 23 typedef PRInt32 nsCookieStatus; |
| 24 |
| 25 typedef PRInt32 nsCookiePolicy; |
| 26 |
| 27 |
| 28 /* starting interface: nsICookie */ |
| 29 #define NS_ICOOKIE_IID_STR "e9fcb9a4-d376-458f-b720-e65e7df593bc" |
| 30 |
| 31 #define NS_ICOOKIE_IID \ |
| 32 {0xe9fcb9a4, 0xd376, 0x458f, \ |
| 33 { 0xb7, 0x20, 0xe6, 0x5e, 0x7d, 0xf5, 0x93, 0xbc }} |
| 34 |
| 35 class NS_NO_VTABLE nsICookie : public nsISupports { |
| 36 public: |
| 37 |
| 38 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIE_IID) |
| 39 |
| 40 /** |
| 41 * the name of the cookie |
| 42 */ |
| 43 /* readonly attribute ACString name; */ |
| 44 NS_IMETHOD GetName(nsACString & aName) = 0; |
| 45 |
| 46 /** |
| 47 * the cookie value |
| 48 */ |
| 49 /* readonly attribute ACString value; */ |
| 50 NS_IMETHOD GetValue(nsACString & aValue) = 0; |
| 51 |
| 52 /** |
| 53 * true if the cookie is a domain cookie, false otherwise |
| 54 */ |
| 55 /* readonly attribute boolean isDomain; */ |
| 56 NS_IMETHOD GetIsDomain(PRBool *aIsDomain) = 0; |
| 57 |
| 58 /** |
| 59 * the host (possibly fully qualified) of the cookie |
| 60 */ |
| 61 /* readonly attribute AUTF8String host; */ |
| 62 NS_IMETHOD GetHost(nsACString & aHost) = 0; |
| 63 |
| 64 /** |
| 65 * the path pertaining to the cookie |
| 66 */ |
| 67 /* readonly attribute AUTF8String path; */ |
| 68 NS_IMETHOD GetPath(nsACString & aPath) = 0; |
| 69 |
| 70 /** |
| 71 * true if the cookie was transmitted over ssl, false otherwise |
| 72 */ |
| 73 /* readonly attribute boolean isSecure; */ |
| 74 NS_IMETHOD GetIsSecure(PRBool *aIsSecure) = 0; |
| 75 |
| 76 /** |
| 77 * expiration time (local timezone) expressed as number of seconds since Jan
1, 1970 |
| 78 */ |
| 79 /* readonly attribute PRUint64 expires; */ |
| 80 NS_IMETHOD GetExpires(PRUint64 *aExpires) = 0; |
| 81 |
| 82 /** |
| 83 * P3P status of cookie. Values are |
| 84 * |
| 85 * STATUS_UNKNOWN -- cookie collected in a previous session and this info
no longer available |
| 86 * STATUS_ACCEPTED -- cookie was accepted as it |
| 87 * STATUS_DOWNGRADED -- cookie was accepted but downgraded to a session co
okie |
| 88 * STATUS_FLAGGED -- cookie was accepted with a warning being issued to th
e user |
| 89 * STATUS_REJECTED -- cookie was not accepted |
| 90 */ |
| 91 enum { STATUS_UNKNOWN = 0 }; |
| 92 |
| 93 enum { STATUS_ACCEPTED = 1 }; |
| 94 |
| 95 enum { STATUS_DOWNGRADED = 2 }; |
| 96 |
| 97 enum { STATUS_FLAGGED = 3 }; |
| 98 |
| 99 enum { STATUS_REJECTED = 4 }; |
| 100 |
| 101 /* readonly attribute nsCookieStatus status; */ |
| 102 NS_IMETHOD GetStatus(nsCookieStatus *aStatus) = 0; |
| 103 |
| 104 /** |
| 105 * Site's compact policy. Values are |
| 106 * |
| 107 * POLICY_UNKNOWN -- cookie collected in a previous session and this info
no longer available |
| 108 * POLICY_NONE -- site did not send a compact policy along with the cookie |
| 109 * POLICY_NO_CONSENT -- site collects identfiable information without user
involvement |
| 110 * POLICY_IMPLICIT_CONSENT -- site collects identifiable information unles
s user opts out |
| 111 * POLICY_EXPLICIT_CONSENT -- site does not collect identifiable informati
on unless user opts in |
| 112 * POLICY_NO_II -- site does not collect identifiable information |
| 113 */ |
| 114 enum { POLICY_UNKNOWN = 0 }; |
| 115 |
| 116 enum { POLICY_NONE = 1 }; |
| 117 |
| 118 enum { POLICY_NO_CONSENT = 2 }; |
| 119 |
| 120 enum { POLICY_IMPLICIT_CONSENT = 3 }; |
| 121 |
| 122 enum { POLICY_EXPLICIT_CONSENT = 4 }; |
| 123 |
| 124 enum { POLICY_NO_II = 5 }; |
| 125 |
| 126 /* readonly attribute nsCookiePolicy policy; */ |
| 127 NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) = 0; |
| 128 |
| 129 }; |
| 130 |
| 131 /* Use this macro when declaring classes that implement this interface. */ |
| 132 #define NS_DECL_NSICOOKIE \ |
| 133 NS_IMETHOD GetName(nsACString & aName); \ |
| 134 NS_IMETHOD GetValue(nsACString & aValue); \ |
| 135 NS_IMETHOD GetIsDomain(PRBool *aIsDomain); \ |
| 136 NS_IMETHOD GetHost(nsACString & aHost); \ |
| 137 NS_IMETHOD GetPath(nsACString & aPath); \ |
| 138 NS_IMETHOD GetIsSecure(PRBool *aIsSecure); \ |
| 139 NS_IMETHOD GetExpires(PRUint64 *aExpires); \ |
| 140 NS_IMETHOD GetStatus(nsCookieStatus *aStatus); \ |
| 141 NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy); |
| 142 |
| 143 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 144 #define NS_FORWARD_NSICOOKIE(_to) \ |
| 145 NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \ |
| 146 NS_IMETHOD GetValue(nsACString & aValue) { return _to GetValue(aValue); } \ |
| 147 NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return _to GetIsDomain(aIsDomain);
} \ |
| 148 NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \ |
| 149 NS_IMETHOD GetPath(nsACString & aPath) { return _to GetPath(aPath); } \ |
| 150 NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return _to GetIsSecure(aIsSecure);
} \ |
| 151 NS_IMETHOD GetExpires(PRUint64 *aExpires) { return _to GetExpires(aExpires); }
\ |
| 152 NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return _to GetStatus(aStatus);
} \ |
| 153 NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return _to GetPolicy(aPolicy);
} |
| 154 |
| 155 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 156 #define NS_FORWARD_SAFE_NSICOOKIE(_to) \ |
| 157 NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER :
_to->GetName(aName); } \ |
| 158 NS_IMETHOD GetValue(nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER
: _to->GetValue(aValue); } \ |
| 159 NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return !_to ? NS_ERROR_NULL_POINTE
R : _to->GetIsDomain(aIsDomain); } \ |
| 160 NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER :
_to->GetHost(aHost); } \ |
| 161 NS_IMETHOD GetPath(nsACString & aPath) { return !_to ? NS_ERROR_NULL_POINTER :
_to->GetPath(aPath); } \ |
| 162 NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return !_to ? NS_ERROR_NULL_POINTE
R : _to->GetIsSecure(aIsSecure); } \ |
| 163 NS_IMETHOD GetExpires(PRUint64 *aExpires) { return !_to ? NS_ERROR_NULL_POINTE
R : _to->GetExpires(aExpires); } \ |
| 164 NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return !_to ? NS_ERROR_NULL_PO
INTER : _to->GetStatus(aStatus); } \ |
| 165 NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return !_to ? NS_ERROR_NULL_PO
INTER : _to->GetPolicy(aPolicy); } |
| 166 |
| 167 #if 0 |
| 168 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 169 |
| 170 /* Header file */ |
| 171 class nsCookie : public nsICookie |
| 172 { |
| 173 public: |
| 174 NS_DECL_ISUPPORTS |
| 175 NS_DECL_NSICOOKIE |
| 176 |
| 177 nsCookie(); |
| 178 |
| 179 private: |
| 180 ~nsCookie(); |
| 181 |
| 182 protected: |
| 183 /* additional members */ |
| 184 }; |
| 185 |
| 186 /* Implementation file */ |
| 187 NS_IMPL_ISUPPORTS1(nsCookie, nsICookie) |
| 188 |
| 189 nsCookie::nsCookie() |
| 190 { |
| 191 /* member initializers and constructor code */ |
| 192 } |
| 193 |
| 194 nsCookie::~nsCookie() |
| 195 { |
| 196 /* destructor code */ |
| 197 } |
| 198 |
| 199 /* readonly attribute ACString name; */ |
| 200 NS_IMETHODIMP nsCookie::GetName(nsACString & aName) |
| 201 { |
| 202 return NS_ERROR_NOT_IMPLEMENTED; |
| 203 } |
| 204 |
| 205 /* readonly attribute ACString value; */ |
| 206 NS_IMETHODIMP nsCookie::GetValue(nsACString & aValue) |
| 207 { |
| 208 return NS_ERROR_NOT_IMPLEMENTED; |
| 209 } |
| 210 |
| 211 /* readonly attribute boolean isDomain; */ |
| 212 NS_IMETHODIMP nsCookie::GetIsDomain(PRBool *aIsDomain) |
| 213 { |
| 214 return NS_ERROR_NOT_IMPLEMENTED; |
| 215 } |
| 216 |
| 217 /* readonly attribute AUTF8String host; */ |
| 218 NS_IMETHODIMP nsCookie::GetHost(nsACString & aHost) |
| 219 { |
| 220 return NS_ERROR_NOT_IMPLEMENTED; |
| 221 } |
| 222 |
| 223 /* readonly attribute AUTF8String path; */ |
| 224 NS_IMETHODIMP nsCookie::GetPath(nsACString & aPath) |
| 225 { |
| 226 return NS_ERROR_NOT_IMPLEMENTED; |
| 227 } |
| 228 |
| 229 /* readonly attribute boolean isSecure; */ |
| 230 NS_IMETHODIMP nsCookie::GetIsSecure(PRBool *aIsSecure) |
| 231 { |
| 232 return NS_ERROR_NOT_IMPLEMENTED; |
| 233 } |
| 234 |
| 235 /* readonly attribute PRUint64 expires; */ |
| 236 NS_IMETHODIMP nsCookie::GetExpires(PRUint64 *aExpires) |
| 237 { |
| 238 return NS_ERROR_NOT_IMPLEMENTED; |
| 239 } |
| 240 |
| 241 /* readonly attribute nsCookieStatus status; */ |
| 242 NS_IMETHODIMP nsCookie::GetStatus(nsCookieStatus *aStatus) |
| 243 { |
| 244 return NS_ERROR_NOT_IMPLEMENTED; |
| 245 } |
| 246 |
| 247 /* readonly attribute nsCookiePolicy policy; */ |
| 248 NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy) |
| 249 { |
| 250 return NS_ERROR_NOT_IMPLEMENTED; |
| 251 } |
| 252 |
| 253 /* End of implementation class template. */ |
| 254 #endif |
| 255 |
| 256 |
| 257 #endif /* __gen_nsICookie_h__ */ |
OLD | NEW |