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