Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsICookieManager2.idl
3 : */
4 :
5 : #ifndef __gen_nsICookieManager2_h__
6 : #define __gen_nsICookieManager2_h__
7 :
8 :
9 : #ifndef __gen_nsICookieManager_h__
10 : #include "nsICookieManager.h"
11 : #endif
12 :
13 : #include "js/Value.h"
14 :
15 : /* For IDL files that don't want to include root IDL files. */
16 : #ifndef NS_NO_VTABLE
17 : #define NS_NO_VTABLE
18 : #endif
19 : class nsICookie2; /* forward declaration */
20 :
21 : class nsIFile; /* forward declaration */
22 :
23 :
24 : /* starting interface: nsICookieManager2 */
25 : #define NS_ICOOKIEMANAGER2_IID_STR "daf0caa7-b431-4b4d-ba51-08c179bb9dfe"
26 :
27 : #define NS_ICOOKIEMANAGER2_IID \
28 : {0xdaf0caa7, 0xb431, 0x4b4d, \
29 : { 0xba, 0x51, 0x08, 0xc1, 0x79, 0xbb, 0x9d, 0xfe }}
30 :
31 1 : class NS_NO_VTABLE nsICookieManager2 : public nsICookieManager {
32 : public:
33 :
34 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIEMANAGER2_IID)
35 :
36 : /* [implicit_jscontext,optional_argc] void add (in AUTF8String aHost, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aIsSecure, in boolean aIsHttpOnly, in boolean aIsSession, in int64_t aExpiry, [optional] in jsval aOriginAttributes); */
37 : NS_IMETHOD Add(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) = 0;
38 :
39 : /* [notxpcom] nsresult addNative (in AUTF8String aHost, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aIsSecure, in boolean aIsHttpOnly, in boolean aIsSession, in int64_t aExpiry, in OriginAttributesPtr aOriginAttributes); */
40 : NS_IMETHOD_(nsresult) AddNative(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, mozilla::OriginAttributes *aOriginAttributes) = 0;
41 :
42 : /* [implicit_jscontext,optional_argc] boolean cookieExists (in nsICookie2 aCookie, [optional] in jsval aOriginAttributes); */
43 : NS_IMETHOD CookieExists(nsICookie2 *aCookie, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) = 0;
44 :
45 : /* [notxpcom] nsresult cookieExistsNative (in nsICookie2 aCookie, in OriginAttributesPtr aOriginAttributes, out boolean aExists); */
46 : NS_IMETHOD_(nsresult) CookieExistsNative(nsICookie2 *aCookie, mozilla::OriginAttributes *aOriginAttributes, bool *aExists) = 0;
47 :
48 : /* unsigned long countCookiesFromHost (in AUTF8String aHost); */
49 : NS_IMETHOD CountCookiesFromHost(const nsACString & aHost, uint32_t *_retval) = 0;
50 :
51 : /* [implicit_jscontext,optional_argc] nsISimpleEnumerator getCookiesFromHost (in AUTF8String aHost, [optional] in jsval aOriginAttributes); */
52 : NS_IMETHOD GetCookiesFromHost(const nsACString & aHost, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, nsISimpleEnumerator * *_retval) = 0;
53 :
54 : /* void importCookies (in nsIFile aCookieFile); */
55 : NS_IMETHOD ImportCookies(nsIFile *aCookieFile) = 0;
56 :
57 : /* nsISimpleEnumerator getCookiesWithOriginAttributes (in DOMString aPattern, [optional] in AUTF8String aHost); */
58 : NS_IMETHOD GetCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost, nsISimpleEnumerator * *_retval) = 0;
59 :
60 : /* void removeCookiesWithOriginAttributes (in DOMString aPattern, [optional] in AUTF8String aHost); */
61 : NS_IMETHOD RemoveCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost) = 0;
62 :
63 : };
64 :
65 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICookieManager2, NS_ICOOKIEMANAGER2_IID)
66 :
67 : /* Use this macro when declaring classes that implement this interface. */
68 : #define NS_DECL_NSICOOKIEMANAGER2 \
69 : NS_IMETHOD Add(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) override; \
70 : NS_IMETHOD_(nsresult) AddNative(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, mozilla::OriginAttributes *aOriginAttributes) override; \
71 : NS_IMETHOD CookieExists(nsICookie2 *aCookie, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override; \
72 : NS_IMETHOD_(nsresult) CookieExistsNative(nsICookie2 *aCookie, mozilla::OriginAttributes *aOriginAttributes, bool *aExists) override; \
73 : NS_IMETHOD CountCookiesFromHost(const nsACString & aHost, uint32_t *_retval) override; \
74 : NS_IMETHOD GetCookiesFromHost(const nsACString & aHost, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, nsISimpleEnumerator * *_retval) override; \
75 : NS_IMETHOD ImportCookies(nsIFile *aCookieFile) override; \
76 : NS_IMETHOD GetCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost, nsISimpleEnumerator * *_retval) override; \
77 : NS_IMETHOD RemoveCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost) override;
78 :
79 : /* Use this macro when declaring the members of this interface when the
80 : class doesn't implement the interface. This is useful for forwarding. */
81 : #define NS_DECL_NON_VIRTUAL_NSICOOKIEMANAGER2 \
82 : nsresult Add(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc); \
83 : nsresult_(nsresult) AddNative(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, mozilla::OriginAttributes *aOriginAttributes); \
84 : nsresult CookieExists(nsICookie2 *aCookie, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval); \
85 : nsresult_(nsresult) CookieExistsNative(nsICookie2 *aCookie, mozilla::OriginAttributes *aOriginAttributes, bool *aExists); \
86 : nsresult CountCookiesFromHost(const nsACString & aHost, uint32_t *_retval); \
87 : nsresult GetCookiesFromHost(const nsACString & aHost, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, nsISimpleEnumerator * *_retval); \
88 : nsresult ImportCookies(nsIFile *aCookieFile); \
89 : nsresult GetCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost, nsISimpleEnumerator * *_retval); \
90 : nsresult RemoveCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost);
91 :
92 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
93 : #define NS_FORWARD_NSICOOKIEMANAGER2(_to) \
94 : NS_IMETHOD Add(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) override { return _to Add(aHost, aPath, aName, aValue, aIsSecure, aIsHttpOnly, aIsSession, aExpiry, aOriginAttributes, cx, _argc); } \
95 : NS_IMETHOD_(nsresult) AddNative(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, mozilla::OriginAttributes *aOriginAttributes) override { return _to AddNative(aHost, aPath, aName, aValue, aIsSecure, aIsHttpOnly, aIsSession, aExpiry, aOriginAttributes); } \
96 : NS_IMETHOD CookieExists(nsICookie2 *aCookie, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override { return _to CookieExists(aCookie, aOriginAttributes, cx, _argc, _retval); } \
97 : NS_IMETHOD_(nsresult) CookieExistsNative(nsICookie2 *aCookie, mozilla::OriginAttributes *aOriginAttributes, bool *aExists) override { return _to CookieExistsNative(aCookie, aOriginAttributes, aExists); } \
98 : NS_IMETHOD CountCookiesFromHost(const nsACString & aHost, uint32_t *_retval) override { return _to CountCookiesFromHost(aHost, _retval); } \
99 : NS_IMETHOD GetCookiesFromHost(const nsACString & aHost, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, nsISimpleEnumerator * *_retval) override { return _to GetCookiesFromHost(aHost, aOriginAttributes, cx, _argc, _retval); } \
100 : NS_IMETHOD ImportCookies(nsIFile *aCookieFile) override { return _to ImportCookies(aCookieFile); } \
101 : NS_IMETHOD GetCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost, nsISimpleEnumerator * *_retval) override { return _to GetCookiesWithOriginAttributes(aPattern, aHost, _retval); } \
102 : NS_IMETHOD RemoveCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost) override { return _to RemoveCookiesWithOriginAttributes(aPattern, aHost); }
103 :
104 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
105 : #define NS_FORWARD_SAFE_NSICOOKIEMANAGER2(_to) \
106 : NS_IMETHOD Add(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(aHost, aPath, aName, aValue, aIsSecure, aIsHttpOnly, aIsSession, aExpiry, aOriginAttributes, cx, _argc); } \
107 : NS_IMETHOD_(nsresult) AddNative(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, mozilla::OriginAttributes *aOriginAttributes) override; \
108 : NS_IMETHOD CookieExists(nsICookie2 *aCookie, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CookieExists(aCookie, aOriginAttributes, cx, _argc, _retval); } \
109 : NS_IMETHOD_(nsresult) CookieExistsNative(nsICookie2 *aCookie, mozilla::OriginAttributes *aOriginAttributes, bool *aExists) override; \
110 : NS_IMETHOD CountCookiesFromHost(const nsACString & aHost, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CountCookiesFromHost(aHost, _retval); } \
111 : NS_IMETHOD GetCookiesFromHost(const nsACString & aHost, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookiesFromHost(aHost, aOriginAttributes, cx, _argc, _retval); } \
112 : NS_IMETHOD ImportCookies(nsIFile *aCookieFile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCookies(aCookieFile); } \
113 : NS_IMETHOD GetCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost, nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookiesWithOriginAttributes(aPattern, aHost, _retval); } \
114 : NS_IMETHOD RemoveCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveCookiesWithOriginAttributes(aPattern, aHost); }
115 :
116 : #if 0
117 : /* Use the code below as a template for the implementation class for this interface. */
118 :
119 : /* Header file */
120 : class nsCookieManager2 : public nsICookieManager2
121 : {
122 : public:
123 : NS_DECL_ISUPPORTS
124 : NS_DECL_NSICOOKIEMANAGER2
125 :
126 : nsCookieManager2();
127 :
128 : private:
129 : ~nsCookieManager2();
130 :
131 : protected:
132 : /* additional members */
133 : };
134 :
135 : /* Implementation file */
136 : NS_IMPL_ISUPPORTS(nsCookieManager2, nsICookieManager2)
137 :
138 : nsCookieManager2::nsCookieManager2()
139 : {
140 : /* member initializers and constructor code */
141 : }
142 :
143 : nsCookieManager2::~nsCookieManager2()
144 : {
145 : /* destructor code */
146 : }
147 :
148 : /* [implicit_jscontext,optional_argc] void add (in AUTF8String aHost, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aIsSecure, in boolean aIsHttpOnly, in boolean aIsSession, in int64_t aExpiry, [optional] in jsval aOriginAttributes); */
149 : NS_IMETHODIMP nsCookieManager2::Add(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc)
150 : {
151 : return NS_ERROR_NOT_IMPLEMENTED;
152 : }
153 :
154 : /* [notxpcom] nsresult addNative (in AUTF8String aHost, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aIsSecure, in boolean aIsHttpOnly, in boolean aIsSession, in int64_t aExpiry, in OriginAttributesPtr aOriginAttributes); */
155 : NS_IMETHODIMP_(nsresult) nsCookieManager2::AddNative(const nsACString & aHost, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, bool aIsSecure, bool aIsHttpOnly, bool aIsSession, int64_t aExpiry, mozilla::OriginAttributes *aOriginAttributes)
156 : {
157 : return NS_ERROR_NOT_IMPLEMENTED;
158 : }
159 :
160 : /* [implicit_jscontext,optional_argc] boolean cookieExists (in nsICookie2 aCookie, [optional] in jsval aOriginAttributes); */
161 : NS_IMETHODIMP nsCookieManager2::CookieExists(nsICookie2 *aCookie, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, bool *_retval)
162 : {
163 : return NS_ERROR_NOT_IMPLEMENTED;
164 : }
165 :
166 : /* [notxpcom] nsresult cookieExistsNative (in nsICookie2 aCookie, in OriginAttributesPtr aOriginAttributes, out boolean aExists); */
167 : NS_IMETHODIMP_(nsresult) nsCookieManager2::CookieExistsNative(nsICookie2 *aCookie, mozilla::OriginAttributes *aOriginAttributes, bool *aExists)
168 : {
169 : return NS_ERROR_NOT_IMPLEMENTED;
170 : }
171 :
172 : /* unsigned long countCookiesFromHost (in AUTF8String aHost); */
173 : NS_IMETHODIMP nsCookieManager2::CountCookiesFromHost(const nsACString & aHost, uint32_t *_retval)
174 : {
175 : return NS_ERROR_NOT_IMPLEMENTED;
176 : }
177 :
178 : /* [implicit_jscontext,optional_argc] nsISimpleEnumerator getCookiesFromHost (in AUTF8String aHost, [optional] in jsval aOriginAttributes); */
179 : NS_IMETHODIMP nsCookieManager2::GetCookiesFromHost(const nsACString & aHost, JS::HandleValue aOriginAttributes, JSContext* cx, uint8_t _argc, nsISimpleEnumerator * *_retval)
180 : {
181 : return NS_ERROR_NOT_IMPLEMENTED;
182 : }
183 :
184 : /* void importCookies (in nsIFile aCookieFile); */
185 : NS_IMETHODIMP nsCookieManager2::ImportCookies(nsIFile *aCookieFile)
186 : {
187 : return NS_ERROR_NOT_IMPLEMENTED;
188 : }
189 :
190 : /* nsISimpleEnumerator getCookiesWithOriginAttributes (in DOMString aPattern, [optional] in AUTF8String aHost); */
191 : NS_IMETHODIMP nsCookieManager2::GetCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost, nsISimpleEnumerator * *_retval)
192 : {
193 : return NS_ERROR_NOT_IMPLEMENTED;
194 : }
195 :
196 : /* void removeCookiesWithOriginAttributes (in DOMString aPattern, [optional] in AUTF8String aHost); */
197 : NS_IMETHODIMP nsCookieManager2::RemoveCookiesWithOriginAttributes(const nsAString & aPattern, const nsACString & aHost)
198 : {
199 : return NS_ERROR_NOT_IMPLEMENTED;
200 : }
201 :
202 : /* End of implementation class template. */
203 : #endif
204 :
205 :
206 : #endif /* __gen_nsICookieManager2_h__ */
|