nsICookieManager.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsICookieManager : public nsISupports {
  28. public:
  29. NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIEMANAGER_IID)
  30. /**
  31. * Called to remove all cookies from the cookie list
  32. */
  33. /* void removeAll (); */
  34. 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_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_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) = 0;
  51. };
  52. /* Use this macro when declaring classes that implement this interface. */
  53. #define NS_DECL_NSICOOKIEMANAGER \
  54. NS_IMETHOD RemoveAll(void); \
  55. NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \
  56. NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked);
  57. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  58. #define NS_FORWARD_NSICOOKIEMANAGER(_to) \
  59. NS_IMETHOD RemoveAll(void) { return _to RemoveAll(); } \
  60. NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \
  61. NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return _to Remove(aDomain, aName, aPath, aBlocked); }
  62. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  63. #define NS_FORWARD_SAFE_NSICOOKIEMANAGER(_to) \
  64. NS_IMETHOD RemoveAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \
  65. NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \
  66. 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); }
  67. #if 0
  68. /* Use the code below as a template for the implementation class for this interface. */
  69. /* Header file */
  70. class nsCookieManager : public nsICookieManager
  71. {
  72. public:
  73. NS_DECL_ISUPPORTS
  74. NS_DECL_NSICOOKIEMANAGER
  75. nsCookieManager();
  76. private:
  77. ~nsCookieManager();
  78. protected:
  79. /* additional members */
  80. };
  81. /* Implementation file */
  82. NS_IMPL_ISUPPORTS1(nsCookieManager, nsICookieManager)
  83. nsCookieManager::nsCookieManager()
  84. {
  85. /* member initializers and constructor code */
  86. }
  87. nsCookieManager::~nsCookieManager()
  88. {
  89. /* destructor code */
  90. }
  91. /* void removeAll (); */
  92. NS_IMETHODIMP nsCookieManager::RemoveAll()
  93. {
  94. return NS_ERROR_NOT_IMPLEMENTED;
  95. }
  96. /* readonly attribute nsISimpleEnumerator enumerator; */
  97. NS_IMETHODIMP nsCookieManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator)
  98. {
  99. return NS_ERROR_NOT_IMPLEMENTED;
  100. }
  101. /* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */
  102. NS_IMETHODIMP nsCookieManager::Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked)
  103. {
  104. return NS_ERROR_NOT_IMPLEMENTED;
  105. }
  106. /* End of implementation class template. */
  107. #endif
  108. #endif /* __gen_nsICookieManager_h__ */