PageRenderTime 30ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsICookie.h

http://firefox-mac-pdf.googlecode.com/
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. #ifndef __gen_nsICookie_h__
  5. #define __gen_nsICookie_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /**
  14. * An optional interface for accessing the HTTP or
  15. * javascript cookie object
  16. *
  17. * @status FROZEN
  18. */
  19. typedef PRInt32 nsCookieStatus;
  20. typedef PRInt32 nsCookiePolicy;
  21. /* starting interface: nsICookie */
  22. #define NS_ICOOKIE_IID_STR "e9fcb9a4-d376-458f-b720-e65e7df593bc"
  23. #define NS_ICOOKIE_IID \
  24. {0xe9fcb9a4, 0xd376, 0x458f, \
  25. { 0xb7, 0x20, 0xe6, 0x5e, 0x7d, 0xf5, 0x93, 0xbc }}
  26. class NS_NO_VTABLE NS_SCRIPTABLE nsICookie : public nsISupports {
  27. public:
  28. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIE_IID)
  29. /**
  30. * the name of the cookie
  31. */
  32. /* readonly attribute ACString name; */
  33. NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName) = 0;
  34. /**
  35. * the cookie value
  36. */
  37. /* readonly attribute ACString value; */
  38. NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue) = 0;
  39. /**
  40. * true if the cookie is a domain cookie, false otherwise
  41. */
  42. /* readonly attribute boolean isDomain; */
  43. NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain) = 0;
  44. /**
  45. * the host (possibly fully qualified) of the cookie
  46. */
  47. /* readonly attribute AUTF8String host; */
  48. NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost) = 0;
  49. /**
  50. * the path pertaining to the cookie
  51. */
  52. /* readonly attribute AUTF8String path; */
  53. NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath) = 0;
  54. /**
  55. * true if the cookie was transmitted over ssl, false otherwise
  56. */
  57. /* readonly attribute boolean isSecure; */
  58. NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure) = 0;
  59. /**
  60. * @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
  61. *
  62. * expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC.
  63. * expires = 0 represents a session cookie.
  64. * expires = 1 represents an expiration time earlier than Jan 1, 1970.
  65. */
  66. /* readonly attribute PRUint64 expires; */
  67. NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires) = 0;
  68. /**
  69. * @DEPRECATED status implementation will return STATUS_UNKNOWN in all cases.
  70. */
  71. enum { STATUS_UNKNOWN = 0 };
  72. enum { STATUS_ACCEPTED = 1 };
  73. enum { STATUS_DOWNGRADED = 2 };
  74. enum { STATUS_FLAGGED = 3 };
  75. enum { STATUS_REJECTED = 4 };
  76. /* readonly attribute nsCookieStatus status; */
  77. NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus) = 0;
  78. /**
  79. * @DEPRECATED policy implementation will return POLICY_UNKNOWN in all cases.
  80. */
  81. enum { POLICY_UNKNOWN = 0 };
  82. enum { POLICY_NONE = 1 };
  83. enum { POLICY_NO_CONSENT = 2 };
  84. enum { POLICY_IMPLICIT_CONSENT = 3 };
  85. enum { POLICY_EXPLICIT_CONSENT = 4 };
  86. enum { POLICY_NO_II = 5 };
  87. /* readonly attribute nsCookiePolicy policy; */
  88. NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) = 0;
  89. };
  90. NS_DEFINE_STATIC_IID_ACCESSOR(nsICookie, NS_ICOOKIE_IID)
  91. /* Use this macro when declaring classes that implement this interface. */
  92. #define NS_DECL_NSICOOKIE \
  93. NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName); \
  94. NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue); \
  95. NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain); \
  96. NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost); \
  97. NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath); \
  98. NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure); \
  99. NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires); \
  100. NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus); \
  101. NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy);
  102. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  103. #define NS_FORWARD_NSICOOKIE(_to) \
  104. NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \
  105. NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue) { return _to GetValue(aValue); } \
  106. NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return _to GetIsDomain(aIsDomain); } \
  107. NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \
  108. NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath) { return _to GetPath(aPath); } \
  109. NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return _to GetIsSecure(aIsSecure); } \
  110. NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires) { return _to GetExpires(aExpires); } \
  111. NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return _to GetStatus(aStatus); } \
  112. NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return _to GetPolicy(aPolicy); }
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  114. #define NS_FORWARD_SAFE_NSICOOKIE(_to) \
  115. NS_SCRIPTABLE NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  116. NS_SCRIPTABLE NS_IMETHOD GetValue(nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  117. NS_SCRIPTABLE NS_IMETHOD GetIsDomain(PRBool *aIsDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDomain(aIsDomain); } \
  118. NS_SCRIPTABLE NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
  119. NS_SCRIPTABLE NS_IMETHOD GetPath(nsACString & aPath) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPath(aPath); } \
  120. NS_SCRIPTABLE NS_IMETHOD GetIsSecure(PRBool *aIsSecure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsSecure(aIsSecure); } \
  121. NS_SCRIPTABLE NS_IMETHOD GetExpires(PRUint64 *aExpires) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpires(aExpires); } \
  122. NS_SCRIPTABLE NS_IMETHOD GetStatus(nsCookieStatus *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \
  123. NS_SCRIPTABLE NS_IMETHOD GetPolicy(nsCookiePolicy *aPolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPolicy(aPolicy); }
  124. #if 0
  125. /* Use the code below as a template for the implementation class for this interface. */
  126. /* Header file */
  127. class nsCookie : public nsICookie
  128. {
  129. public:
  130. NS_DECL_ISUPPORTS
  131. NS_DECL_NSICOOKIE
  132. nsCookie();
  133. private:
  134. ~nsCookie();
  135. protected:
  136. /* additional members */
  137. };
  138. /* Implementation file */
  139. NS_IMPL_ISUPPORTS1(nsCookie, nsICookie)
  140. nsCookie::nsCookie()
  141. {
  142. /* member initializers and constructor code */
  143. }
  144. nsCookie::~nsCookie()
  145. {
  146. /* destructor code */
  147. }
  148. /* readonly attribute ACString name; */
  149. NS_IMETHODIMP nsCookie::GetName(nsACString & aName)
  150. {
  151. return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153. /* readonly attribute ACString value; */
  154. NS_IMETHODIMP nsCookie::GetValue(nsACString & aValue)
  155. {
  156. return NS_ERROR_NOT_IMPLEMENTED;
  157. }
  158. /* readonly attribute boolean isDomain; */
  159. NS_IMETHODIMP nsCookie::GetIsDomain(PRBool *aIsDomain)
  160. {
  161. return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163. /* readonly attribute AUTF8String host; */
  164. NS_IMETHODIMP nsCookie::GetHost(nsACString & aHost)
  165. {
  166. return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168. /* readonly attribute AUTF8String path; */
  169. NS_IMETHODIMP nsCookie::GetPath(nsACString & aPath)
  170. {
  171. return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173. /* readonly attribute boolean isSecure; */
  174. NS_IMETHODIMP nsCookie::GetIsSecure(PRBool *aIsSecure)
  175. {
  176. return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178. /* readonly attribute PRUint64 expires; */
  179. NS_IMETHODIMP nsCookie::GetExpires(PRUint64 *aExpires)
  180. {
  181. return NS_ERROR_NOT_IMPLEMENTED;
  182. }
  183. /* readonly attribute nsCookieStatus status; */
  184. NS_IMETHODIMP nsCookie::GetStatus(nsCookieStatus *aStatus)
  185. {
  186. return NS_ERROR_NOT_IMPLEMENTED;
  187. }
  188. /* readonly attribute nsCookiePolicy policy; */
  189. NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy)
  190. {
  191. return NS_ERROR_NOT_IMPLEMENTED;
  192. }
  193. /* End of implementation class template. */
  194. #endif
  195. #endif /* __gen_nsICookie_h__ */