Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIUrlClassifierDBService.idl
3 : */
4 :
5 : #ifndef __gen_nsIUrlClassifierDBService_h__
6 : #define __gen_nsIUrlClassifierDBService_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 : #include "Entries.h"
18 : #include "LookupCache.h"
19 : class nsUrlClassifierLookupResult;
20 : class nsIUrlClassifierHashCompleter; /* forward declaration */
21 :
22 : class nsIPrincipal; /* forward declaration */
23 :
24 :
25 : /* starting interface: nsIUrlClassifierCallback */
26 : #define NS_IURLCLASSIFIERCALLBACK_IID_STR "4ca27b6b-a674-4b3d-ab30-d21e2da2dffb"
27 :
28 : #define NS_IURLCLASSIFIERCALLBACK_IID \
29 : {0x4ca27b6b, 0xa674, 0x4b3d, \
30 : { 0xab, 0x30, 0xd2, 0x1e, 0x2d, 0xa2, 0xdf, 0xfb }}
31 :
32 2 : class NS_NO_VTABLE nsIUrlClassifierCallback : public nsISupports {
33 : public:
34 :
35 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERCALLBACK_IID)
36 :
37 : /* void handleEvent (in ACString value); */
38 : NS_IMETHOD HandleEvent(const nsACString & value) = 0;
39 :
40 : };
41 :
42 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierCallback, NS_IURLCLASSIFIERCALLBACK_IID)
43 :
44 : /* Use this macro when declaring classes that implement this interface. */
45 : #define NS_DECL_NSIURLCLASSIFIERCALLBACK \
46 : NS_IMETHOD HandleEvent(const nsACString & value) override;
47 :
48 : /* Use this macro when declaring the members of this interface when the
49 : class doesn't implement the interface. This is useful for forwarding. */
50 : #define NS_DECL_NON_VIRTUAL_NSIURLCLASSIFIERCALLBACK \
51 : nsresult HandleEvent(const nsACString & value);
52 :
53 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
54 : #define NS_FORWARD_NSIURLCLASSIFIERCALLBACK(_to) \
55 : NS_IMETHOD HandleEvent(const nsACString & value) override { return _to HandleEvent(value); }
56 :
57 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
58 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERCALLBACK(_to) \
59 : NS_IMETHOD HandleEvent(const nsACString & value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(value); }
60 :
61 : #if 0
62 : /* Use the code below as a template for the implementation class for this interface. */
63 :
64 : /* Header file */
65 : class nsUrlClassifierCallback : public nsIUrlClassifierCallback
66 : {
67 : public:
68 : NS_DECL_ISUPPORTS
69 : NS_DECL_NSIURLCLASSIFIERCALLBACK
70 :
71 : nsUrlClassifierCallback();
72 :
73 : private:
74 : ~nsUrlClassifierCallback();
75 :
76 : protected:
77 : /* additional members */
78 : };
79 :
80 : /* Implementation file */
81 : NS_IMPL_ISUPPORTS(nsUrlClassifierCallback, nsIUrlClassifierCallback)
82 :
83 : nsUrlClassifierCallback::nsUrlClassifierCallback()
84 : {
85 : /* member initializers and constructor code */
86 : }
87 :
88 : nsUrlClassifierCallback::~nsUrlClassifierCallback()
89 : {
90 : /* destructor code */
91 : }
92 :
93 : /* void handleEvent (in ACString value); */
94 : NS_IMETHODIMP nsUrlClassifierCallback::HandleEvent(const nsACString & value)
95 : {
96 : return NS_ERROR_NOT_IMPLEMENTED;
97 : }
98 :
99 : /* End of implementation class template. */
100 : #endif
101 :
102 :
103 : /* starting interface: nsIUrlClassifierUpdateObserver */
104 : #define NS_IURLCLASSIFIERUPDATEOBSERVER_IID_STR "9fa11561-5816-4e1b-bcc9-b629ca05cce6"
105 :
106 : #define NS_IURLCLASSIFIERUPDATEOBSERVER_IID \
107 : {0x9fa11561, 0x5816, 0x4e1b, \
108 : { 0xbc, 0xc9, 0xb6, 0x29, 0xca, 0x05, 0xcc, 0xe6 }}
109 :
110 3 : class NS_NO_VTABLE nsIUrlClassifierUpdateObserver : public nsISupports {
111 : public:
112 :
113 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERUPDATEOBSERVER_IID)
114 :
115 : /* void updateUrlRequested (in ACString url, in ACString table); */
116 : NS_IMETHOD UpdateUrlRequested(const nsACString & url, const nsACString & table) = 0;
117 :
118 : /* void streamFinished (in nsresult status, in unsigned long delay); */
119 : NS_IMETHOD StreamFinished(nsresult status, uint32_t delay) = 0;
120 :
121 : /* void updateError (in nsresult error); */
122 : NS_IMETHOD UpdateError(nsresult error) = 0;
123 :
124 : /* void updateSuccess (in unsigned long requestedTimeout); */
125 : NS_IMETHOD UpdateSuccess(uint32_t requestedTimeout) = 0;
126 :
127 : };
128 :
129 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierUpdateObserver, NS_IURLCLASSIFIERUPDATEOBSERVER_IID)
130 :
131 : /* Use this macro when declaring classes that implement this interface. */
132 : #define NS_DECL_NSIURLCLASSIFIERUPDATEOBSERVER \
133 : NS_IMETHOD UpdateUrlRequested(const nsACString & url, const nsACString & table) override; \
134 : NS_IMETHOD StreamFinished(nsresult status, uint32_t delay) override; \
135 : NS_IMETHOD UpdateError(nsresult error) override; \
136 : NS_IMETHOD UpdateSuccess(uint32_t requestedTimeout) override;
137 :
138 : /* Use this macro when declaring the members of this interface when the
139 : class doesn't implement the interface. This is useful for forwarding. */
140 : #define NS_DECL_NON_VIRTUAL_NSIURLCLASSIFIERUPDATEOBSERVER \
141 : nsresult UpdateUrlRequested(const nsACString & url, const nsACString & table); \
142 : nsresult StreamFinished(nsresult status, uint32_t delay); \
143 : nsresult UpdateError(nsresult error); \
144 : nsresult UpdateSuccess(uint32_t requestedTimeout);
145 :
146 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
147 : #define NS_FORWARD_NSIURLCLASSIFIERUPDATEOBSERVER(_to) \
148 : NS_IMETHOD UpdateUrlRequested(const nsACString & url, const nsACString & table) override { return _to UpdateUrlRequested(url, table); } \
149 : NS_IMETHOD StreamFinished(nsresult status, uint32_t delay) override { return _to StreamFinished(status, delay); } \
150 : NS_IMETHOD UpdateError(nsresult error) override { return _to UpdateError(error); } \
151 : NS_IMETHOD UpdateSuccess(uint32_t requestedTimeout) override { return _to UpdateSuccess(requestedTimeout); }
152 :
153 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
154 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERUPDATEOBSERVER(_to) \
155 : NS_IMETHOD UpdateUrlRequested(const nsACString & url, const nsACString & table) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateUrlRequested(url, table); } \
156 : NS_IMETHOD StreamFinished(nsresult status, uint32_t delay) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StreamFinished(status, delay); } \
157 : NS_IMETHOD UpdateError(nsresult error) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateError(error); } \
158 : NS_IMETHOD UpdateSuccess(uint32_t requestedTimeout) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateSuccess(requestedTimeout); }
159 :
160 : #if 0
161 : /* Use the code below as a template for the implementation class for this interface. */
162 :
163 : /* Header file */
164 : class nsUrlClassifierUpdateObserver : public nsIUrlClassifierUpdateObserver
165 : {
166 : public:
167 : NS_DECL_ISUPPORTS
168 : NS_DECL_NSIURLCLASSIFIERUPDATEOBSERVER
169 :
170 : nsUrlClassifierUpdateObserver();
171 :
172 : private:
173 : ~nsUrlClassifierUpdateObserver();
174 :
175 : protected:
176 : /* additional members */
177 : };
178 :
179 : /* Implementation file */
180 : NS_IMPL_ISUPPORTS(nsUrlClassifierUpdateObserver, nsIUrlClassifierUpdateObserver)
181 :
182 : nsUrlClassifierUpdateObserver::nsUrlClassifierUpdateObserver()
183 : {
184 : /* member initializers and constructor code */
185 : }
186 :
187 : nsUrlClassifierUpdateObserver::~nsUrlClassifierUpdateObserver()
188 : {
189 : /* destructor code */
190 : }
191 :
192 : /* void updateUrlRequested (in ACString url, in ACString table); */
193 : NS_IMETHODIMP nsUrlClassifierUpdateObserver::UpdateUrlRequested(const nsACString & url, const nsACString & table)
194 : {
195 : return NS_ERROR_NOT_IMPLEMENTED;
196 : }
197 :
198 : /* void streamFinished (in nsresult status, in unsigned long delay); */
199 : NS_IMETHODIMP nsUrlClassifierUpdateObserver::StreamFinished(nsresult status, uint32_t delay)
200 : {
201 : return NS_ERROR_NOT_IMPLEMENTED;
202 : }
203 :
204 : /* void updateError (in nsresult error); */
205 : NS_IMETHODIMP nsUrlClassifierUpdateObserver::UpdateError(nsresult error)
206 : {
207 : return NS_ERROR_NOT_IMPLEMENTED;
208 : }
209 :
210 : /* void updateSuccess (in unsigned long requestedTimeout); */
211 : NS_IMETHODIMP nsUrlClassifierUpdateObserver::UpdateSuccess(uint32_t requestedTimeout)
212 : {
213 : return NS_ERROR_NOT_IMPLEMENTED;
214 : }
215 :
216 : /* End of implementation class template. */
217 : #endif
218 :
219 :
220 : /* starting interface: nsIUrlClassifierDBService */
221 : #define NS_IURLCLASSIFIERDBSERVICE_IID_STR "7a258022-6765-11e5-b379-b37b1f2354be"
222 :
223 : #define NS_IURLCLASSIFIERDBSERVICE_IID \
224 : {0x7a258022, 0x6765, 0x11e5, \
225 : { 0xb3, 0x79, 0xb3, 0x7b, 0x1f, 0x23, 0x54, 0xbe }}
226 :
227 3 : class NS_NO_VTABLE nsIUrlClassifierDBService : public nsISupports {
228 : public:
229 :
230 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERDBSERVICE_IID)
231 :
232 : /* void lookup (in nsIPrincipal principal, in ACString tables, in nsIUrlClassifierCallback c); */
233 : NS_IMETHOD Lookup(nsIPrincipal *principal, const nsACString & tables, nsIUrlClassifierCallback *c) = 0;
234 :
235 : /* void getTables (in nsIUrlClassifierCallback c); */
236 : NS_IMETHOD GetTables(nsIUrlClassifierCallback *c) = 0;
237 :
238 : /* void setHashCompleter (in ACString tableName, in nsIUrlClassifierHashCompleter completer); */
239 : NS_IMETHOD SetHashCompleter(const nsACString & tableName, nsIUrlClassifierHashCompleter *completer) = 0;
240 :
241 : /* void clearLastResults (); */
242 : NS_IMETHOD ClearLastResults(void) = 0;
243 :
244 : /* void beginUpdate (in nsIUrlClassifierUpdateObserver updater, in ACString tables); */
245 : NS_IMETHOD BeginUpdate(nsIUrlClassifierUpdateObserver *updater, const nsACString & tables) = 0;
246 :
247 : /* void beginStream (in ACString table); */
248 : NS_IMETHOD BeginStream(const nsACString & table) = 0;
249 :
250 : /* void updateStream (in ACString updateChunk); */
251 : NS_IMETHOD UpdateStream(const nsACString & updateChunk) = 0;
252 :
253 : /* void finishStream (); */
254 : NS_IMETHOD FinishStream(void) = 0;
255 :
256 : /* void finishUpdate (); */
257 : NS_IMETHOD FinishUpdate(void) = 0;
258 :
259 : /* void cancelUpdate (); */
260 : NS_IMETHOD CancelUpdate(void) = 0;
261 :
262 : /* void resetDatabase (); */
263 : NS_IMETHOD ResetDatabase(void) = 0;
264 :
265 : /* void reloadDatabase (); */
266 : NS_IMETHOD ReloadDatabase(void) = 0;
267 :
268 : /* void clearCache (); */
269 : NS_IMETHOD ClearCache(void) = 0;
270 :
271 : };
272 :
273 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierDBService, NS_IURLCLASSIFIERDBSERVICE_IID)
274 :
275 : /* Use this macro when declaring classes that implement this interface. */
276 : #define NS_DECL_NSIURLCLASSIFIERDBSERVICE \
277 : NS_IMETHOD Lookup(nsIPrincipal *principal, const nsACString & tables, nsIUrlClassifierCallback *c) override; \
278 : NS_IMETHOD GetTables(nsIUrlClassifierCallback *c) override; \
279 : NS_IMETHOD SetHashCompleter(const nsACString & tableName, nsIUrlClassifierHashCompleter *completer) override; \
280 : NS_IMETHOD ClearLastResults(void) override; \
281 : NS_IMETHOD BeginUpdate(nsIUrlClassifierUpdateObserver *updater, const nsACString & tables) override; \
282 : NS_IMETHOD BeginStream(const nsACString & table) override; \
283 : NS_IMETHOD UpdateStream(const nsACString & updateChunk) override; \
284 : NS_IMETHOD FinishStream(void) override; \
285 : NS_IMETHOD FinishUpdate(void) override; \
286 : NS_IMETHOD CancelUpdate(void) override; \
287 : NS_IMETHOD ResetDatabase(void) override; \
288 : NS_IMETHOD ReloadDatabase(void) override; \
289 : NS_IMETHOD ClearCache(void) override;
290 :
291 : /* Use this macro when declaring the members of this interface when the
292 : class doesn't implement the interface. This is useful for forwarding. */
293 : #define NS_DECL_NON_VIRTUAL_NSIURLCLASSIFIERDBSERVICE \
294 : nsresult Lookup(nsIPrincipal *principal, const nsACString & tables, nsIUrlClassifierCallback *c); \
295 : nsresult GetTables(nsIUrlClassifierCallback *c); \
296 : nsresult SetHashCompleter(const nsACString & tableName, nsIUrlClassifierHashCompleter *completer); \
297 : nsresult ClearLastResults(void); \
298 : nsresult BeginUpdate(nsIUrlClassifierUpdateObserver *updater, const nsACString & tables); \
299 : nsresult BeginStream(const nsACString & table); \
300 : nsresult UpdateStream(const nsACString & updateChunk); \
301 : nsresult FinishStream(void); \
302 : nsresult FinishUpdate(void); \
303 : nsresult CancelUpdate(void); \
304 : nsresult ResetDatabase(void); \
305 : nsresult ReloadDatabase(void); \
306 : nsresult ClearCache(void);
307 :
308 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
309 : #define NS_FORWARD_NSIURLCLASSIFIERDBSERVICE(_to) \
310 : NS_IMETHOD Lookup(nsIPrincipal *principal, const nsACString & tables, nsIUrlClassifierCallback *c) override { return _to Lookup(principal, tables, c); } \
311 : NS_IMETHOD GetTables(nsIUrlClassifierCallback *c) override { return _to GetTables(c); } \
312 : NS_IMETHOD SetHashCompleter(const nsACString & tableName, nsIUrlClassifierHashCompleter *completer) override { return _to SetHashCompleter(tableName, completer); } \
313 : NS_IMETHOD ClearLastResults(void) override { return _to ClearLastResults(); } \
314 : NS_IMETHOD BeginUpdate(nsIUrlClassifierUpdateObserver *updater, const nsACString & tables) override { return _to BeginUpdate(updater, tables); } \
315 : NS_IMETHOD BeginStream(const nsACString & table) override { return _to BeginStream(table); } \
316 : NS_IMETHOD UpdateStream(const nsACString & updateChunk) override { return _to UpdateStream(updateChunk); } \
317 : NS_IMETHOD FinishStream(void) override { return _to FinishStream(); } \
318 : NS_IMETHOD FinishUpdate(void) override { return _to FinishUpdate(); } \
319 : NS_IMETHOD CancelUpdate(void) override { return _to CancelUpdate(); } \
320 : NS_IMETHOD ResetDatabase(void) override { return _to ResetDatabase(); } \
321 : NS_IMETHOD ReloadDatabase(void) override { return _to ReloadDatabase(); } \
322 : NS_IMETHOD ClearCache(void) override { return _to ClearCache(); }
323 :
324 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
325 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERDBSERVICE(_to) \
326 : NS_IMETHOD Lookup(nsIPrincipal *principal, const nsACString & tables, nsIUrlClassifierCallback *c) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Lookup(principal, tables, c); } \
327 : NS_IMETHOD GetTables(nsIUrlClassifierCallback *c) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTables(c); } \
328 : NS_IMETHOD SetHashCompleter(const nsACString & tableName, nsIUrlClassifierHashCompleter *completer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHashCompleter(tableName, completer); } \
329 : NS_IMETHOD ClearLastResults(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearLastResults(); } \
330 : NS_IMETHOD BeginUpdate(nsIUrlClassifierUpdateObserver *updater, const nsACString & tables) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginUpdate(updater, tables); } \
331 : NS_IMETHOD BeginStream(const nsACString & table) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginStream(table); } \
332 : NS_IMETHOD UpdateStream(const nsACString & updateChunk) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateStream(updateChunk); } \
333 : NS_IMETHOD FinishStream(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishStream(); } \
334 : NS_IMETHOD FinishUpdate(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishUpdate(); } \
335 : NS_IMETHOD CancelUpdate(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CancelUpdate(); } \
336 : NS_IMETHOD ResetDatabase(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetDatabase(); } \
337 : NS_IMETHOD ReloadDatabase(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReloadDatabase(); } \
338 : NS_IMETHOD ClearCache(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearCache(); }
339 :
340 : #if 0
341 : /* Use the code below as a template for the implementation class for this interface. */
342 :
343 : /* Header file */
344 : class nsUrlClassifierDBService : public nsIUrlClassifierDBService
345 : {
346 : public:
347 : NS_DECL_ISUPPORTS
348 : NS_DECL_NSIURLCLASSIFIERDBSERVICE
349 :
350 : nsUrlClassifierDBService();
351 :
352 : private:
353 : ~nsUrlClassifierDBService();
354 :
355 : protected:
356 : /* additional members */
357 : };
358 :
359 : /* Implementation file */
360 : NS_IMPL_ISUPPORTS(nsUrlClassifierDBService, nsIUrlClassifierDBService)
361 :
362 : nsUrlClassifierDBService::nsUrlClassifierDBService()
363 : {
364 : /* member initializers and constructor code */
365 : }
366 :
367 : nsUrlClassifierDBService::~nsUrlClassifierDBService()
368 : {
369 : /* destructor code */
370 : }
371 :
372 : /* void lookup (in nsIPrincipal principal, in ACString tables, in nsIUrlClassifierCallback c); */
373 : NS_IMETHODIMP nsUrlClassifierDBService::Lookup(nsIPrincipal *principal, const nsACString & tables, nsIUrlClassifierCallback *c)
374 : {
375 : return NS_ERROR_NOT_IMPLEMENTED;
376 : }
377 :
378 : /* void getTables (in nsIUrlClassifierCallback c); */
379 : NS_IMETHODIMP nsUrlClassifierDBService::GetTables(nsIUrlClassifierCallback *c)
380 : {
381 : return NS_ERROR_NOT_IMPLEMENTED;
382 : }
383 :
384 : /* void setHashCompleter (in ACString tableName, in nsIUrlClassifierHashCompleter completer); */
385 : NS_IMETHODIMP nsUrlClassifierDBService::SetHashCompleter(const nsACString & tableName, nsIUrlClassifierHashCompleter *completer)
386 : {
387 : return NS_ERROR_NOT_IMPLEMENTED;
388 : }
389 :
390 : /* void clearLastResults (); */
391 : NS_IMETHODIMP nsUrlClassifierDBService::ClearLastResults()
392 : {
393 : return NS_ERROR_NOT_IMPLEMENTED;
394 : }
395 :
396 : /* void beginUpdate (in nsIUrlClassifierUpdateObserver updater, in ACString tables); */
397 : NS_IMETHODIMP nsUrlClassifierDBService::BeginUpdate(nsIUrlClassifierUpdateObserver *updater, const nsACString & tables)
398 : {
399 : return NS_ERROR_NOT_IMPLEMENTED;
400 : }
401 :
402 : /* void beginStream (in ACString table); */
403 : NS_IMETHODIMP nsUrlClassifierDBService::BeginStream(const nsACString & table)
404 : {
405 : return NS_ERROR_NOT_IMPLEMENTED;
406 : }
407 :
408 : /* void updateStream (in ACString updateChunk); */
409 : NS_IMETHODIMP nsUrlClassifierDBService::UpdateStream(const nsACString & updateChunk)
410 : {
411 : return NS_ERROR_NOT_IMPLEMENTED;
412 : }
413 :
414 : /* void finishStream (); */
415 : NS_IMETHODIMP nsUrlClassifierDBService::FinishStream()
416 : {
417 : return NS_ERROR_NOT_IMPLEMENTED;
418 : }
419 :
420 : /* void finishUpdate (); */
421 : NS_IMETHODIMP nsUrlClassifierDBService::FinishUpdate()
422 : {
423 : return NS_ERROR_NOT_IMPLEMENTED;
424 : }
425 :
426 : /* void cancelUpdate (); */
427 : NS_IMETHODIMP nsUrlClassifierDBService::CancelUpdate()
428 : {
429 : return NS_ERROR_NOT_IMPLEMENTED;
430 : }
431 :
432 : /* void resetDatabase (); */
433 : NS_IMETHODIMP nsUrlClassifierDBService::ResetDatabase()
434 : {
435 : return NS_ERROR_NOT_IMPLEMENTED;
436 : }
437 :
438 : /* void reloadDatabase (); */
439 : NS_IMETHODIMP nsUrlClassifierDBService::ReloadDatabase()
440 : {
441 : return NS_ERROR_NOT_IMPLEMENTED;
442 : }
443 :
444 : /* void clearCache (); */
445 : NS_IMETHODIMP nsUrlClassifierDBService::ClearCache()
446 : {
447 : return NS_ERROR_NOT_IMPLEMENTED;
448 : }
449 :
450 : /* End of implementation class template. */
451 : #endif
452 :
453 :
454 : /* starting interface: nsIUrlClassifierLookupCallback */
455 : #define NS_IURLCLASSIFIERLOOKUPCALLBACK_IID_STR "b903dc8f-dff1-42fe-894b-36e7a59bb801"
456 :
457 : #define NS_IURLCLASSIFIERLOOKUPCALLBACK_IID \
458 : {0xb903dc8f, 0xdff1, 0x42fe, \
459 : { 0x89, 0x4b, 0x36, 0xe7, 0xa5, 0x9b, 0xb8, 0x01 }}
460 :
461 0 : class NS_NO_VTABLE nsIUrlClassifierLookupCallback : public nsISupports {
462 : public:
463 :
464 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERLOOKUPCALLBACK_IID)
465 :
466 : /* void lookupComplete (in ResultArray results); */
467 : NS_IMETHOD LookupComplete(nsTArray<mozilla::safebrowsing::LookupResult> *results) = 0;
468 :
469 : };
470 :
471 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierLookupCallback, NS_IURLCLASSIFIERLOOKUPCALLBACK_IID)
472 :
473 : /* Use this macro when declaring classes that implement this interface. */
474 : #define NS_DECL_NSIURLCLASSIFIERLOOKUPCALLBACK \
475 : NS_IMETHOD LookupComplete(nsTArray<mozilla::safebrowsing::LookupResult> *results) override;
476 :
477 : /* Use this macro when declaring the members of this interface when the
478 : class doesn't implement the interface. This is useful for forwarding. */
479 : #define NS_DECL_NON_VIRTUAL_NSIURLCLASSIFIERLOOKUPCALLBACK \
480 : nsresult LookupComplete(nsTArray<mozilla::safebrowsing::LookupResult> *results);
481 :
482 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
483 : #define NS_FORWARD_NSIURLCLASSIFIERLOOKUPCALLBACK(_to) \
484 : NS_IMETHOD LookupComplete(nsTArray<mozilla::safebrowsing::LookupResult> *results) override { return _to LookupComplete(results); }
485 :
486 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
487 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERLOOKUPCALLBACK(_to) \
488 : NS_IMETHOD LookupComplete(nsTArray<mozilla::safebrowsing::LookupResult> *results) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LookupComplete(results); }
489 :
490 : #if 0
491 : /* Use the code below as a template for the implementation class for this interface. */
492 :
493 : /* Header file */
494 : class nsUrlClassifierLookupCallback : public nsIUrlClassifierLookupCallback
495 : {
496 : public:
497 : NS_DECL_ISUPPORTS
498 : NS_DECL_NSIURLCLASSIFIERLOOKUPCALLBACK
499 :
500 : nsUrlClassifierLookupCallback();
501 :
502 : private:
503 : ~nsUrlClassifierLookupCallback();
504 :
505 : protected:
506 : /* additional members */
507 : };
508 :
509 : /* Implementation file */
510 : NS_IMPL_ISUPPORTS(nsUrlClassifierLookupCallback, nsIUrlClassifierLookupCallback)
511 :
512 : nsUrlClassifierLookupCallback::nsUrlClassifierLookupCallback()
513 : {
514 : /* member initializers and constructor code */
515 : }
516 :
517 : nsUrlClassifierLookupCallback::~nsUrlClassifierLookupCallback()
518 : {
519 : /* destructor code */
520 : }
521 :
522 : /* void lookupComplete (in ResultArray results); */
523 : NS_IMETHODIMP nsUrlClassifierLookupCallback::LookupComplete(nsTArray<mozilla::safebrowsing::LookupResult> *results)
524 : {
525 : return NS_ERROR_NOT_IMPLEMENTED;
526 : }
527 :
528 : /* End of implementation class template. */
529 : #endif
530 :
531 :
532 : /* starting interface: nsIUrlClassifierClassifyCallback */
533 : #define NS_IURLCLASSIFIERCLASSIFYCALLBACK_IID_STR "091adf98-28a5-473d-8dec-5b34b4e62496"
534 :
535 : #define NS_IURLCLASSIFIERCLASSIFYCALLBACK_IID \
536 : {0x091adf98, 0x28a5, 0x473d, \
537 : { 0x8d, 0xec, 0x5b, 0x34, 0xb4, 0xe6, 0x24, 0x96 }}
538 :
539 0 : class NS_NO_VTABLE nsIUrlClassifierClassifyCallback : public nsISupports {
540 : public:
541 :
542 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERCLASSIFYCALLBACK_IID)
543 :
544 : /* void handleResult (in ACString aList, in ACString aPrefix); */
545 : NS_IMETHOD HandleResult(const nsACString & aList, const nsACString & aPrefix) = 0;
546 :
547 : };
548 :
549 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierClassifyCallback, NS_IURLCLASSIFIERCLASSIFYCALLBACK_IID)
550 :
551 : /* Use this macro when declaring classes that implement this interface. */
552 : #define NS_DECL_NSIURLCLASSIFIERCLASSIFYCALLBACK \
553 : NS_IMETHOD HandleResult(const nsACString & aList, const nsACString & aPrefix) override;
554 :
555 : /* Use this macro when declaring the members of this interface when the
556 : class doesn't implement the interface. This is useful for forwarding. */
557 : #define NS_DECL_NON_VIRTUAL_NSIURLCLASSIFIERCLASSIFYCALLBACK \
558 : nsresult HandleResult(const nsACString & aList, const nsACString & aPrefix);
559 :
560 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
561 : #define NS_FORWARD_NSIURLCLASSIFIERCLASSIFYCALLBACK(_to) \
562 : NS_IMETHOD HandleResult(const nsACString & aList, const nsACString & aPrefix) override { return _to HandleResult(aList, aPrefix); }
563 :
564 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
565 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERCLASSIFYCALLBACK(_to) \
566 : NS_IMETHOD HandleResult(const nsACString & aList, const nsACString & aPrefix) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleResult(aList, aPrefix); }
567 :
568 : #if 0
569 : /* Use the code below as a template for the implementation class for this interface. */
570 :
571 : /* Header file */
572 : class nsUrlClassifierClassifyCallback : public nsIUrlClassifierClassifyCallback
573 : {
574 : public:
575 : NS_DECL_ISUPPORTS
576 : NS_DECL_NSIURLCLASSIFIERCLASSIFYCALLBACK
577 :
578 : nsUrlClassifierClassifyCallback();
579 :
580 : private:
581 : ~nsUrlClassifierClassifyCallback();
582 :
583 : protected:
584 : /* additional members */
585 : };
586 :
587 : /* Implementation file */
588 : NS_IMPL_ISUPPORTS(nsUrlClassifierClassifyCallback, nsIUrlClassifierClassifyCallback)
589 :
590 : nsUrlClassifierClassifyCallback::nsUrlClassifierClassifyCallback()
591 : {
592 : /* member initializers and constructor code */
593 : }
594 :
595 : nsUrlClassifierClassifyCallback::~nsUrlClassifierClassifyCallback()
596 : {
597 : /* destructor code */
598 : }
599 :
600 : /* void handleResult (in ACString aList, in ACString aPrefix); */
601 : NS_IMETHODIMP nsUrlClassifierClassifyCallback::HandleResult(const nsACString & aList, const nsACString & aPrefix)
602 : {
603 : return NS_ERROR_NOT_IMPLEMENTED;
604 : }
605 :
606 : /* End of implementation class template. */
607 : #endif
608 :
609 :
610 : #endif /* __gen_nsIUrlClassifierDBService_h__ */
|