PageRenderTime 34ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsICookieManager.h

http://firefox-mac-pdf.googlecode.com/
C Header | 140 lines | 67 code | 31 blank | 42 comment | 0 complexity | fb63b8498b2aaf269d448e0732db5d5a 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/nsICookieManager.idl
  3. */
  4. #ifndef __gen_nsICookieManager_h__
  5. #define __gen_nsICookieManager_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. #ifndef __gen_nsISimpleEnumerator_h__
  10. #include "nsISimpleEnumerator.h"
  11. #endif
  12. /* For IDL files that don't want to include root IDL files. */
  13. #ifndef NS_NO_VTABLE
  14. #define NS_NO_VTABLE
  15. #endif
  16. /* starting interface: nsICookieManager */
  17. #define NS_ICOOKIEMANAGER_IID_STR "aaab6710-0f2c-11d5-a53b-0010a401eb10"
  18. #define NS_ICOOKIEMANAGER_IID \
  19. {0xaaab6710, 0x0f2c, 0x11d5, \
  20. { 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }}
  21. /**
  22. * An optional interface for accessing or removing the cookies
  23. * that are in the cookie list
  24. *
  25. * @status FROZEN
  26. */
  27. class NS_NO_VTABLE NS_SCRIPTABLE nsICookieManager : public nsISupports {
  28. public:
  29. NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIEMANAGER_IID)
  30. /**
  31. * Called to remove all cookies from the cookie list
  32. */
  33. /* void removeAll (); */
  34. NS_SCRIPTABLE NS_IMETHOD RemoveAll(void) = 0;
  35. /**
  36. * Called to enumerate through each cookie in the cookie list.
  37. * The objects enumerated over are of type nsICookie
  38. */
  39. /* readonly attribute nsISimpleEnumerator enumerator; */
  40. NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0;
  41. /**
  42. * Called to remove an individual cookie from the cookie list
  43. *
  44. * @param aDomain The host or domain for which the cookie was set
  45. * @param aName The name specified in the cookie
  46. * @param aBlocked Indicates if cookies from this host should be permanently blocked
  47. *
  48. */
  49. /* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */
  50. NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) = 0;
  51. };
  52. NS_DEFINE_STATIC_IID_ACCESSOR(nsICookieManager, NS_ICOOKIEMANAGER_IID)
  53. /* Use this macro when declaring classes that implement this interface. */
  54. #define NS_DECL_NSICOOKIEMANAGER \
  55. NS_SCRIPTABLE NS_IMETHOD RemoveAll(void); \
  56. NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \
  57. NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked);
  58. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  59. #define NS_FORWARD_NSICOOKIEMANAGER(_to) \
  60. NS_SCRIPTABLE NS_IMETHOD RemoveAll(void) { return _to RemoveAll(); } \
  61. NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \
  62. NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return _to Remove(aDomain, aName, aPath, aBlocked); }
  63. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  64. #define NS_FORWARD_SAFE_NSICOOKIEMANAGER(_to) \
  65. NS_SCRIPTABLE NS_IMETHOD RemoveAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \
  66. NS_SCRIPTABLE NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \
  67. NS_SCRIPTABLE NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(aDomain, aName, aPath, aBlocked); }
  68. #if 0
  69. /* Use the code below as a template for the implementation class for this interface. */
  70. /* Header file */
  71. class nsCookieManager : public nsICookieManager
  72. {
  73. public:
  74. NS_DECL_ISUPPORTS
  75. NS_DECL_NSICOOKIEMANAGER
  76. nsCookieManager();
  77. private:
  78. ~nsCookieManager();
  79. protected:
  80. /* additional members */
  81. };
  82. /* Implementation file */
  83. NS_IMPL_ISUPPORTS1(nsCookieManager, nsICookieManager)
  84. nsCookieManager::nsCookieManager()
  85. {
  86. /* member initializers and constructor code */
  87. }
  88. nsCookieManager::~nsCookieManager()
  89. {
  90. /* destructor code */
  91. }
  92. /* void removeAll (); */
  93. NS_IMETHODIMP nsCookieManager::RemoveAll()
  94. {
  95. return NS_ERROR_NOT_IMPLEMENTED;
  96. }
  97. /* readonly attribute nsISimpleEnumerator enumerator; */
  98. NS_IMETHODIMP nsCookieManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator)
  99. {
  100. return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102. /* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */
  103. NS_IMETHODIMP nsCookieManager::Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked)
  104. {
  105. return NS_ERROR_NOT_IMPLEMENTED;
  106. }
  107. /* End of implementation class template. */
  108. #endif
  109. #endif /* __gen_nsICookieManager_h__ */