Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsICookieService.idl
3 : */
4 :
5 : #ifndef __gen_nsICookieService_h__
6 : #define __gen_nsICookieService_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIURI; /* forward declaration */
18 :
19 : class nsIPrompt; /* forward declaration */
20 :
21 : class nsIChannel; /* forward declaration */
22 :
23 :
24 : /* starting interface: nsICookieTransactionCallback */
25 : #define NS_ICOOKIETRANSACTIONCALLBACK_IID_STR "0fc41ffb-f1b7-42d9-9a42-8dc420c158c1"
26 :
27 : #define NS_ICOOKIETRANSACTIONCALLBACK_IID \
28 : {0x0fc41ffb, 0xf1b7, 0x42d9, \
29 : { 0x9a, 0x42, 0x8d, 0xc4, 0x20, 0xc1, 0x58, 0xc1 }}
30 :
31 : class NS_NO_VTABLE nsICookieTransactionCallback : public nsISupports {
32 : public:
33 :
34 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIETRANSACTIONCALLBACK_IID)
35 :
36 : /* void callback (); */
37 : NS_IMETHOD Callback(void) = 0;
38 :
39 : };
40 :
41 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICookieTransactionCallback, NS_ICOOKIETRANSACTIONCALLBACK_IID)
42 :
43 : /* Use this macro when declaring classes that implement this interface. */
44 : #define NS_DECL_NSICOOKIETRANSACTIONCALLBACK \
45 : NS_IMETHOD Callback(void) override;
46 :
47 : /* Use this macro when declaring the members of this interface when the
48 : class doesn't implement the interface. This is useful for forwarding. */
49 : #define NS_DECL_NON_VIRTUAL_NSICOOKIETRANSACTIONCALLBACK \
50 : nsresult Callback(void);
51 :
52 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
53 : #define NS_FORWARD_NSICOOKIETRANSACTIONCALLBACK(_to) \
54 : NS_IMETHOD Callback(void) override { return _to Callback(); }
55 :
56 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
57 : #define NS_FORWARD_SAFE_NSICOOKIETRANSACTIONCALLBACK(_to) \
58 : NS_IMETHOD Callback(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Callback(); }
59 :
60 : #if 0
61 : /* Use the code below as a template for the implementation class for this interface. */
62 :
63 : /* Header file */
64 : class nsCookieTransactionCallback : public nsICookieTransactionCallback
65 : {
66 : public:
67 : NS_DECL_ISUPPORTS
68 : NS_DECL_NSICOOKIETRANSACTIONCALLBACK
69 :
70 : nsCookieTransactionCallback();
71 :
72 : private:
73 : ~nsCookieTransactionCallback();
74 :
75 : protected:
76 : /* additional members */
77 : };
78 :
79 : /* Implementation file */
80 : NS_IMPL_ISUPPORTS(nsCookieTransactionCallback, nsICookieTransactionCallback)
81 :
82 : nsCookieTransactionCallback::nsCookieTransactionCallback()
83 : {
84 : /* member initializers and constructor code */
85 : }
86 :
87 : nsCookieTransactionCallback::~nsCookieTransactionCallback()
88 : {
89 : /* destructor code */
90 : }
91 :
92 : /* void callback (); */
93 : NS_IMETHODIMP nsCookieTransactionCallback::Callback()
94 : {
95 : return NS_ERROR_NOT_IMPLEMENTED;
96 : }
97 :
98 : /* End of implementation class template. */
99 : #endif
100 :
101 :
102 : /* starting interface: nsICookieService */
103 : #define NS_ICOOKIESERVICE_IID_STR "1e94e283-2811-4f43-b947-d22b1549d824"
104 :
105 : #define NS_ICOOKIESERVICE_IID \
106 : {0x1e94e283, 0x2811, 0x4f43, \
107 : { 0xb9, 0x47, 0xd2, 0x2b, 0x15, 0x49, 0xd8, 0x24 }}
108 :
109 1 : class NS_NO_VTABLE nsICookieService : public nsISupports {
110 : public:
111 :
112 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICOOKIESERVICE_IID)
113 :
114 : enum {
115 : BEHAVIOR_ACCEPT = 0U,
116 : BEHAVIOR_REJECT_FOREIGN = 1U,
117 : BEHAVIOR_REJECT = 2U,
118 : BEHAVIOR_LIMIT_FOREIGN = 3U,
119 : ACCEPT_NORMALLY = 0U,
120 : ACCEPT_SESSION = 2U,
121 : ACCEPT_FOR_N_DAYS = 3U
122 : };
123 :
124 : /* string getCookieString (in nsIURI aURI, in nsIChannel aChannel); */
125 : NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char * *_retval) = 0;
126 :
127 : /* string getCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIChannel aChannel); */
128 : NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char * *_retval) = 0;
129 :
130 : /* void setCookieString (in nsIURI aURI, in nsIPrompt aPrompt, in string aCookie, in nsIChannel aChannel); */
131 : NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char * aCookie, nsIChannel *aChannel) = 0;
132 :
133 : /* void setCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIPrompt aPrompt, in string aCookie, in string aServerTime, in nsIChannel aChannel); */
134 : NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char * aCookie, const char * aServerTime, nsIChannel *aChannel) = 0;
135 :
136 : /* void runInTransaction (in nsICookieTransactionCallback aCallback); */
137 : NS_IMETHOD RunInTransaction(nsICookieTransactionCallback *aCallback) = 0;
138 :
139 : };
140 :
141 : NS_DEFINE_STATIC_IID_ACCESSOR(nsICookieService, NS_ICOOKIESERVICE_IID)
142 :
143 : /* Use this macro when declaring classes that implement this interface. */
144 : #define NS_DECL_NSICOOKIESERVICE \
145 : NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char * *_retval) override; \
146 : NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char * *_retval) override; \
147 : NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char * aCookie, nsIChannel *aChannel) override; \
148 : NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char * aCookie, const char * aServerTime, nsIChannel *aChannel) override; \
149 : NS_IMETHOD RunInTransaction(nsICookieTransactionCallback *aCallback) override;
150 :
151 : /* Use this macro when declaring the members of this interface when the
152 : class doesn't implement the interface. This is useful for forwarding. */
153 : #define NS_DECL_NON_VIRTUAL_NSICOOKIESERVICE \
154 : nsresult GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char * *_retval); \
155 : nsresult GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char * *_retval); \
156 : nsresult SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char * aCookie, nsIChannel *aChannel); \
157 : nsresult SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char * aCookie, const char * aServerTime, nsIChannel *aChannel); \
158 : nsresult RunInTransaction(nsICookieTransactionCallback *aCallback);
159 :
160 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
161 : #define NS_FORWARD_NSICOOKIESERVICE(_to) \
162 : NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char * *_retval) override { return _to GetCookieString(aURI, aChannel, _retval); } \
163 : NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char * *_retval) override { return _to GetCookieStringFromHttp(aURI, aFirstURI, aChannel, _retval); } \
164 : NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char * aCookie, nsIChannel *aChannel) override { return _to SetCookieString(aURI, aPrompt, aCookie, aChannel); } \
165 : NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char * aCookie, const char * aServerTime, nsIChannel *aChannel) override { return _to SetCookieStringFromHttp(aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel); } \
166 : NS_IMETHOD RunInTransaction(nsICookieTransactionCallback *aCallback) override { return _to RunInTransaction(aCallback); }
167 :
168 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
169 : #define NS_FORWARD_SAFE_NSICOOKIESERVICE(_to) \
170 : NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookieString(aURI, aChannel, _retval); } \
171 : NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookieStringFromHttp(aURI, aFirstURI, aChannel, _retval); } \
172 : NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char * aCookie, nsIChannel *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookieString(aURI, aPrompt, aCookie, aChannel); } \
173 : NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char * aCookie, const char * aServerTime, nsIChannel *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookieStringFromHttp(aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel); } \
174 : NS_IMETHOD RunInTransaction(nsICookieTransactionCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RunInTransaction(aCallback); }
175 :
176 : #if 0
177 : /* Use the code below as a template for the implementation class for this interface. */
178 :
179 : /* Header file */
180 : class nsCookieService : public nsICookieService
181 : {
182 : public:
183 : NS_DECL_ISUPPORTS
184 : NS_DECL_NSICOOKIESERVICE
185 :
186 : nsCookieService();
187 :
188 : private:
189 : ~nsCookieService();
190 :
191 : protected:
192 : /* additional members */
193 : };
194 :
195 : /* Implementation file */
196 : NS_IMPL_ISUPPORTS(nsCookieService, nsICookieService)
197 :
198 : nsCookieService::nsCookieService()
199 : {
200 : /* member initializers and constructor code */
201 : }
202 :
203 : nsCookieService::~nsCookieService()
204 : {
205 : /* destructor code */
206 : }
207 :
208 : /* string getCookieString (in nsIURI aURI, in nsIChannel aChannel); */
209 : NS_IMETHODIMP nsCookieService::GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char * *_retval)
210 : {
211 : return NS_ERROR_NOT_IMPLEMENTED;
212 : }
213 :
214 : /* string getCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIChannel aChannel); */
215 : NS_IMETHODIMP nsCookieService::GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char * *_retval)
216 : {
217 : return NS_ERROR_NOT_IMPLEMENTED;
218 : }
219 :
220 : /* void setCookieString (in nsIURI aURI, in nsIPrompt aPrompt, in string aCookie, in nsIChannel aChannel); */
221 : NS_IMETHODIMP nsCookieService::SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char * aCookie, nsIChannel *aChannel)
222 : {
223 : return NS_ERROR_NOT_IMPLEMENTED;
224 : }
225 :
226 : /* void setCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIPrompt aPrompt, in string aCookie, in string aServerTime, in nsIChannel aChannel); */
227 : NS_IMETHODIMP nsCookieService::SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char * aCookie, const char * aServerTime, nsIChannel *aChannel)
228 : {
229 : return NS_ERROR_NOT_IMPLEMENTED;
230 : }
231 :
232 : /* void runInTransaction (in nsICookieTransactionCallback aCallback); */
233 : NS_IMETHODIMP nsCookieService::RunInTransaction(nsICookieTransactionCallback *aCallback)
234 : {
235 : return NS_ERROR_NOT_IMPLEMENTED;
236 : }
237 :
238 : /* End of implementation class template. */
239 : #endif
240 :
241 :
242 : #endif /* __gen_nsICookieService_h__ */
|