/gecko_api/include/nsICookie.h
C++ Header | 250 lines | 125 code | 55 blank | 70 comment | 0 complexity | ca48179cdb315f67728b5fbcbbd4b798 MD5 | raw file
1/* 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_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 */ 23typedef PRInt32 nsCookieStatus; 24 25typedef 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 35class NS_NO_VTABLE NS_SCRIPTABLE nsICookie : public nsISupports { 36 public: 37 38 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIE_IID) 39 40 /** 41 * the name of the cookie 42 */ 43 /* readonly attribute ACString name; */ 44 NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName) = 0; 45 46 /** 47 * the cookie value 48 */ 49 /* readonly attribute ACString value; */ 50 NS_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost) = 0; 63 64 /** 65 * the path pertaining to the cookie 66 */ 67 /* readonly attribute AUTF8String path; */ 68 NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure) = 0; 75 76 /** 77 * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead. 78 * 79 * expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC. 80 * expires = 0 represents a session cookie. 81 * expires = 1 represents an expiration time earlier than Jan 1, 1970. 82 */ 83 /* readonly attribute PRUint64 expires; */ 84 NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires) = 0; 85 86 /** 87 * @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases. 88 */ 89 enum { STATUS_UNKNOWN = 0 }; 90 91 enum { STATUS_ACCEPTED = 1 }; 92 93 enum { STATUS_DOWNGRADED = 2 }; 94 95 enum { STATUS_FLAGGED = 3 }; 96 97 enum { STATUS_REJECTED = 4 }; 98 99 /* readonly attribute nsCookieStatus status; */ 100 NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus) = 0; 101 102 /** 103 * @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases. 104 */ 105 enum { POLICY_UNKNOWN = 0 }; 106 107 enum { POLICY_NONE = 1 }; 108 109 enum { POLICY_NO_CONSENT = 2 }; 110 111 enum { POLICY_IMPLICIT_CONSENT = 3 }; 112 113 enum { POLICY_EXPLICIT_CONSENT = 4 }; 114 115 enum { POLICY_NO_II = 5 }; 116 117 /* readonly attribute nsCookiePolicy policy; */ 118 NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) = 0; 119 120}; 121 122 NS_DEFINE_STATIC_IID_ACCESSOR(nsICookie, NS_ICOOKIE_IID) 123 124/* Use this macro when declaring classes that implement this interface. */ 125#define NS_DECL_NSICOOKIE \ 126 NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName); \ 127 NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue); \ 128 NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain); \ 129 NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost); \ 130 NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath); \ 131 NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure); \ 132 NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires); \ 133 NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus); \ 134 NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy); 135 136/* Use this macro to declare functions that forward the behavior of this interface to another object. */ 137#define NS_FORWARD_NSICOOKIE(_to) \ 138 NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \ 139 NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue) { return _to GetValue(aValue); } \ 140 NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return _to GetIsDomain(aIsDomain); } \ 141 NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \ 142 NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath) { return _to GetPath(aPath); } \ 143 NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return _to GetIsSecure(aIsSecure); } \ 144 NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires) { return _to GetExpires(aExpires); } \ 145 NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return _to GetStatus(aStatus); } \ 146 NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return _to GetPolicy(aPolicy); } 147 148/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ 149#define NS_FORWARD_SAFE_NSICOOKIE(_to) \ 150 NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \ 151 NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \ 152 NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDomain(aIsDomain); } \ 153 NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \ 154 NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \ 155 NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSecure(aIsSecure); } \ 156 NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpires(aExpires); } \ 157 NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \ 158 NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPolicy(aPolicy); } 159 160#if 0 161/* Use the code below as a template for the implementation class for this interface. */ 162 163/* Header file */ 164class nsCookie : public nsICookie 165{ 166public: 167 NS_DECL_ISUPPORTS 168 NS_DECL_NSICOOKIE 169 170 nsCookie(); 171 172private: 173 ~nsCookie(); 174 175protected: 176 /* additional members */ 177}; 178 179/* Implementation file */ 180NS_IMPL_ISUPPORTS1(nsCookie, nsICookie) 181 182nsCookie::nsCookie() 183{ 184 /* member initializers and constructor code */ 185} 186 187nsCookie::~nsCookie() 188{ 189 /* destructor code */ 190} 191 192/* readonly attribute ACString name; */ 193NS_IMETHODIMP nsCookie::GetName(nsACString & aName) 194{ 195 return NS_ERROR_NOT_IMPLEMENTED; 196} 197 198/* readonly attribute ACString value; */ 199NS_IMETHODIMP nsCookie::GetValue(nsACString & aValue) 200{ 201 return NS_ERROR_NOT_IMPLEMENTED; 202} 203 204/* readonly attribute boolean isDomain; */ 205NS_IMETHODIMP nsCookie::GetIsDomain(PRBool *aIsDomain) 206{ 207 return NS_ERROR_NOT_IMPLEMENTED; 208} 209 210/* readonly attribute AUTF8String host; */ 211NS_IMETHODIMP nsCookie::GetHost(nsACString & aHost) 212{ 213 return NS_ERROR_NOT_IMPLEMENTED; 214} 215 216/* readonly attribute AUTF8String path; */ 217NS_IMETHODIMP nsCookie::GetPath(nsACString & aPath) 218{ 219 return NS_ERROR_NOT_IMPLEMENTED; 220} 221 222/* readonly attribute boolean isSecure; */ 223NS_IMETHODIMP nsCookie::GetIsSecure(PRBool *aIsSecure) 224{ 225 return NS_ERROR_NOT_IMPLEMENTED; 226} 227 228/* readonly attribute PRUint64 expires; */ 229NS_IMETHODIMP nsCookie::GetExpires(PRUint64 *aExpires) 230{ 231 return NS_ERROR_NOT_IMPLEMENTED; 232} 233 234/* readonly attribute nsCookieStatus status; */ 235NS_IMETHODIMP nsCookie::GetStatus(nsCookieStatus *aStatus) 236{ 237 return NS_ERROR_NOT_IMPLEMENTED; 238} 239 240/* readonly attribute nsCookiePolicy policy; */ 241NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy) 242{ 243 return NS_ERROR_NOT_IMPLEMENTED; 244} 245 246/* End of implementation class template. */ 247#endif 248 249 250#endif /* __gen_nsICookie_h__ */