Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIUrlClassifierUtils.idl
3 : */
4 :
5 : #ifndef __gen_nsIUrlClassifierUtils_h__
6 : #define __gen_nsIUrlClassifierUtils_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 :
20 : /* starting interface: nsIUrlClassifierParseFindFullHashCallback */
21 : #define NS_IURLCLASSIFIERPARSEFINDFULLHASHCALLBACK_IID_STR "fbb9684a-a0aa-11e6-88b0-08606e456b8a"
22 :
23 : #define NS_IURLCLASSIFIERPARSEFINDFULLHASHCALLBACK_IID \
24 : {0xfbb9684a, 0xa0aa, 0x11e6, \
25 : { 0x88, 0xb0, 0x08, 0x60, 0x6e, 0x45, 0x6b, 0x8a }}
26 :
27 : class NS_NO_VTABLE nsIUrlClassifierParseFindFullHashCallback : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERPARSEFINDFULLHASHCALLBACK_IID)
31 :
32 : /* void onCompleteHashFound (in ACString aCompleteHash, in ACString aTableNames, in unsigned long aPerHashCacheDuration); */
33 : NS_IMETHOD OnCompleteHashFound(const nsACString & aCompleteHash, const nsACString & aTableNames, uint32_t aPerHashCacheDuration) = 0;
34 :
35 : /* void onResponseParsed (in unsigned long aMinWaitDuration, in unsigned long aNegCacheDuration); */
36 : NS_IMETHOD OnResponseParsed(uint32_t aMinWaitDuration, uint32_t aNegCacheDuration) = 0;
37 :
38 : };
39 :
40 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierParseFindFullHashCallback, NS_IURLCLASSIFIERPARSEFINDFULLHASHCALLBACK_IID)
41 :
42 : /* Use this macro when declaring classes that implement this interface. */
43 : #define NS_DECL_NSIURLCLASSIFIERPARSEFINDFULLHASHCALLBACK \
44 : NS_IMETHOD OnCompleteHashFound(const nsACString & aCompleteHash, const nsACString & aTableNames, uint32_t aPerHashCacheDuration) override; \
45 : NS_IMETHOD OnResponseParsed(uint32_t aMinWaitDuration, uint32_t aNegCacheDuration) 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_NSIURLCLASSIFIERPARSEFINDFULLHASHCALLBACK \
50 : nsresult OnCompleteHashFound(const nsACString & aCompleteHash, const nsACString & aTableNames, uint32_t aPerHashCacheDuration); \
51 : nsresult OnResponseParsed(uint32_t aMinWaitDuration, uint32_t aNegCacheDuration);
52 :
53 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
54 : #define NS_FORWARD_NSIURLCLASSIFIERPARSEFINDFULLHASHCALLBACK(_to) \
55 : NS_IMETHOD OnCompleteHashFound(const nsACString & aCompleteHash, const nsACString & aTableNames, uint32_t aPerHashCacheDuration) override { return _to OnCompleteHashFound(aCompleteHash, aTableNames, aPerHashCacheDuration); } \
56 : NS_IMETHOD OnResponseParsed(uint32_t aMinWaitDuration, uint32_t aNegCacheDuration) override { return _to OnResponseParsed(aMinWaitDuration, aNegCacheDuration); }
57 :
58 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
59 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERPARSEFINDFULLHASHCALLBACK(_to) \
60 : NS_IMETHOD OnCompleteHashFound(const nsACString & aCompleteHash, const nsACString & aTableNames, uint32_t aPerHashCacheDuration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCompleteHashFound(aCompleteHash, aTableNames, aPerHashCacheDuration); } \
61 : NS_IMETHOD OnResponseParsed(uint32_t aMinWaitDuration, uint32_t aNegCacheDuration) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnResponseParsed(aMinWaitDuration, aNegCacheDuration); }
62 :
63 : #if 0
64 : /* Use the code below as a template for the implementation class for this interface. */
65 :
66 : /* Header file */
67 : class nsUrlClassifierParseFindFullHashCallback : public nsIUrlClassifierParseFindFullHashCallback
68 : {
69 : public:
70 : NS_DECL_ISUPPORTS
71 : NS_DECL_NSIURLCLASSIFIERPARSEFINDFULLHASHCALLBACK
72 :
73 : nsUrlClassifierParseFindFullHashCallback();
74 :
75 : private:
76 : ~nsUrlClassifierParseFindFullHashCallback();
77 :
78 : protected:
79 : /* additional members */
80 : };
81 :
82 : /* Implementation file */
83 : NS_IMPL_ISUPPORTS(nsUrlClassifierParseFindFullHashCallback, nsIUrlClassifierParseFindFullHashCallback)
84 :
85 : nsUrlClassifierParseFindFullHashCallback::nsUrlClassifierParseFindFullHashCallback()
86 : {
87 : /* member initializers and constructor code */
88 : }
89 :
90 : nsUrlClassifierParseFindFullHashCallback::~nsUrlClassifierParseFindFullHashCallback()
91 : {
92 : /* destructor code */
93 : }
94 :
95 : /* void onCompleteHashFound (in ACString aCompleteHash, in ACString aTableNames, in unsigned long aPerHashCacheDuration); */
96 : NS_IMETHODIMP nsUrlClassifierParseFindFullHashCallback::OnCompleteHashFound(const nsACString & aCompleteHash, const nsACString & aTableNames, uint32_t aPerHashCacheDuration)
97 : {
98 : return NS_ERROR_NOT_IMPLEMENTED;
99 : }
100 :
101 : /* void onResponseParsed (in unsigned long aMinWaitDuration, in unsigned long aNegCacheDuration); */
102 : NS_IMETHODIMP nsUrlClassifierParseFindFullHashCallback::OnResponseParsed(uint32_t aMinWaitDuration, uint32_t aNegCacheDuration)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* End of implementation class template. */
108 : #endif
109 :
110 :
111 : /* starting interface: nsIUrlClassifierUtils */
112 : #define NS_IURLCLASSIFIERUTILS_IID_STR "e4f0e59c-b922-48b0-a7b6-1735c1f96fed"
113 :
114 : #define NS_IURLCLASSIFIERUTILS_IID \
115 : {0xe4f0e59c, 0xb922, 0x48b0, \
116 : { 0xa7, 0xb6, 0x17, 0x35, 0xc1, 0xf9, 0x6f, 0xed }}
117 :
118 1 : class NS_NO_VTABLE nsIUrlClassifierUtils : public nsISupports {
119 : public:
120 :
121 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IURLCLASSIFIERUTILS_IID)
122 :
123 : /* ACString getKeyForURI (in nsIURI uri); */
124 : NS_IMETHOD GetKeyForURI(nsIURI *uri, nsACString & _retval) = 0;
125 :
126 : /* ACString getProvider (in ACString tableName); */
127 : NS_IMETHOD GetProvider(const nsACString & tableName, nsACString & _retval) = 0;
128 :
129 : /* ACString getTelemetryProvider (in ACString tableName); */
130 : NS_IMETHOD GetTelemetryProvider(const nsACString & tableName, nsACString & _retval) = 0;
131 :
132 : /* ACString getProtocolVersion (in ACString provider); */
133 : NS_IMETHOD GetProtocolVersion(const nsACString & provider, nsACString & _retval) = 0;
134 :
135 : /* ACString convertThreatTypeToListNames (in uint32_t threatType); */
136 : NS_IMETHOD ConvertThreatTypeToListNames(uint32_t threatType, nsACString & _retval) = 0;
137 :
138 : /* uint32_t convertListNameToThreatType (in ACString listName); */
139 : NS_IMETHOD ConvertListNameToThreatType(const nsACString & listName, uint32_t *_retval) = 0;
140 :
141 : /* ACString makeUpdateRequestV4 ([array, size_is (aCount)] in string aListNames, [array, size_is (aCount)] in string aStatesBase64, in uint32_t aCount); */
142 : NS_IMETHOD MakeUpdateRequestV4(const char * *aListNames, const char * *aStatesBase64, uint32_t aCount, nsACString & _retval) = 0;
143 :
144 : /* ACString makeFindFullHashRequestV4 ([array, size_is (aListCount)] in string aListNames, [array, size_is (aListCount)] in string aListStatesBase64, [array, size_is (aPrefixCount)] in string aPrefixes, in uint32_t aListCount, in uint32_t aPrefixCount); */
145 : NS_IMETHOD MakeFindFullHashRequestV4(const char * *aListNames, const char * *aListStatesBase64, const char * *aPrefixes, uint32_t aListCount, uint32_t aPrefixCount, nsACString & _retval) = 0;
146 :
147 : /* void parseFindFullHashResponseV4 (in ACString aResponse, in nsIUrlClassifierParseFindFullHashCallback aCallback); */
148 : NS_IMETHOD ParseFindFullHashResponseV4(const nsACString & aResponse, nsIUrlClassifierParseFindFullHashCallback *aCallback) = 0;
149 :
150 : };
151 :
152 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIUrlClassifierUtils, NS_IURLCLASSIFIERUTILS_IID)
153 :
154 : /* Use this macro when declaring classes that implement this interface. */
155 : #define NS_DECL_NSIURLCLASSIFIERUTILS \
156 : NS_IMETHOD GetKeyForURI(nsIURI *uri, nsACString & _retval) override; \
157 : NS_IMETHOD GetProvider(const nsACString & tableName, nsACString & _retval) override; \
158 : NS_IMETHOD GetTelemetryProvider(const nsACString & tableName, nsACString & _retval) override; \
159 : NS_IMETHOD GetProtocolVersion(const nsACString & provider, nsACString & _retval) override; \
160 : NS_IMETHOD ConvertThreatTypeToListNames(uint32_t threatType, nsACString & _retval) override; \
161 : NS_IMETHOD ConvertListNameToThreatType(const nsACString & listName, uint32_t *_retval) override; \
162 : NS_IMETHOD MakeUpdateRequestV4(const char * *aListNames, const char * *aStatesBase64, uint32_t aCount, nsACString & _retval) override; \
163 : NS_IMETHOD MakeFindFullHashRequestV4(const char * *aListNames, const char * *aListStatesBase64, const char * *aPrefixes, uint32_t aListCount, uint32_t aPrefixCount, nsACString & _retval) override; \
164 : NS_IMETHOD ParseFindFullHashResponseV4(const nsACString & aResponse, nsIUrlClassifierParseFindFullHashCallback *aCallback) override;
165 :
166 : /* Use this macro when declaring the members of this interface when the
167 : class doesn't implement the interface. This is useful for forwarding. */
168 : #define NS_DECL_NON_VIRTUAL_NSIURLCLASSIFIERUTILS \
169 : nsresult GetKeyForURI(nsIURI *uri, nsACString & _retval); \
170 : nsresult GetProvider(const nsACString & tableName, nsACString & _retval); \
171 : nsresult GetTelemetryProvider(const nsACString & tableName, nsACString & _retval); \
172 : nsresult GetProtocolVersion(const nsACString & provider, nsACString & _retval); \
173 : nsresult ConvertThreatTypeToListNames(uint32_t threatType, nsACString & _retval); \
174 : nsresult ConvertListNameToThreatType(const nsACString & listName, uint32_t *_retval); \
175 : nsresult MakeUpdateRequestV4(const char * *aListNames, const char * *aStatesBase64, uint32_t aCount, nsACString & _retval); \
176 : nsresult MakeFindFullHashRequestV4(const char * *aListNames, const char * *aListStatesBase64, const char * *aPrefixes, uint32_t aListCount, uint32_t aPrefixCount, nsACString & _retval); \
177 : nsresult ParseFindFullHashResponseV4(const nsACString & aResponse, nsIUrlClassifierParseFindFullHashCallback *aCallback);
178 :
179 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
180 : #define NS_FORWARD_NSIURLCLASSIFIERUTILS(_to) \
181 : NS_IMETHOD GetKeyForURI(nsIURI *uri, nsACString & _retval) override { return _to GetKeyForURI(uri, _retval); } \
182 : NS_IMETHOD GetProvider(const nsACString & tableName, nsACString & _retval) override { return _to GetProvider(tableName, _retval); } \
183 : NS_IMETHOD GetTelemetryProvider(const nsACString & tableName, nsACString & _retval) override { return _to GetTelemetryProvider(tableName, _retval); } \
184 : NS_IMETHOD GetProtocolVersion(const nsACString & provider, nsACString & _retval) override { return _to GetProtocolVersion(provider, _retval); } \
185 : NS_IMETHOD ConvertThreatTypeToListNames(uint32_t threatType, nsACString & _retval) override { return _to ConvertThreatTypeToListNames(threatType, _retval); } \
186 : NS_IMETHOD ConvertListNameToThreatType(const nsACString & listName, uint32_t *_retval) override { return _to ConvertListNameToThreatType(listName, _retval); } \
187 : NS_IMETHOD MakeUpdateRequestV4(const char * *aListNames, const char * *aStatesBase64, uint32_t aCount, nsACString & _retval) override { return _to MakeUpdateRequestV4(aListNames, aStatesBase64, aCount, _retval); } \
188 : NS_IMETHOD MakeFindFullHashRequestV4(const char * *aListNames, const char * *aListStatesBase64, const char * *aPrefixes, uint32_t aListCount, uint32_t aPrefixCount, nsACString & _retval) override { return _to MakeFindFullHashRequestV4(aListNames, aListStatesBase64, aPrefixes, aListCount, aPrefixCount, _retval); } \
189 : NS_IMETHOD ParseFindFullHashResponseV4(const nsACString & aResponse, nsIUrlClassifierParseFindFullHashCallback *aCallback) override { return _to ParseFindFullHashResponseV4(aResponse, aCallback); }
190 :
191 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
192 : #define NS_FORWARD_SAFE_NSIURLCLASSIFIERUTILS(_to) \
193 : NS_IMETHOD GetKeyForURI(nsIURI *uri, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetKeyForURI(uri, _retval); } \
194 : NS_IMETHOD GetProvider(const nsACString & tableName, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProvider(tableName, _retval); } \
195 : NS_IMETHOD GetTelemetryProvider(const nsACString & tableName, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTelemetryProvider(tableName, _retval); } \
196 : NS_IMETHOD GetProtocolVersion(const nsACString & provider, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolVersion(provider, _retval); } \
197 : NS_IMETHOD ConvertThreatTypeToListNames(uint32_t threatType, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertThreatTypeToListNames(threatType, _retval); } \
198 : NS_IMETHOD ConvertListNameToThreatType(const nsACString & listName, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertListNameToThreatType(listName, _retval); } \
199 : NS_IMETHOD MakeUpdateRequestV4(const char * *aListNames, const char * *aStatesBase64, uint32_t aCount, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeUpdateRequestV4(aListNames, aStatesBase64, aCount, _retval); } \
200 : NS_IMETHOD MakeFindFullHashRequestV4(const char * *aListNames, const char * *aListStatesBase64, const char * *aPrefixes, uint32_t aListCount, uint32_t aPrefixCount, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeFindFullHashRequestV4(aListNames, aListStatesBase64, aPrefixes, aListCount, aPrefixCount, _retval); } \
201 : NS_IMETHOD ParseFindFullHashResponseV4(const nsACString & aResponse, nsIUrlClassifierParseFindFullHashCallback *aCallback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseFindFullHashResponseV4(aResponse, aCallback); }
202 :
203 : #if 0
204 : /* Use the code below as a template for the implementation class for this interface. */
205 :
206 : /* Header file */
207 : class nsUrlClassifierUtils : public nsIUrlClassifierUtils
208 : {
209 : public:
210 : NS_DECL_ISUPPORTS
211 : NS_DECL_NSIURLCLASSIFIERUTILS
212 :
213 : nsUrlClassifierUtils();
214 :
215 : private:
216 : ~nsUrlClassifierUtils();
217 :
218 : protected:
219 : /* additional members */
220 : };
221 :
222 : /* Implementation file */
223 : NS_IMPL_ISUPPORTS(nsUrlClassifierUtils, nsIUrlClassifierUtils)
224 :
225 : nsUrlClassifierUtils::nsUrlClassifierUtils()
226 : {
227 : /* member initializers and constructor code */
228 : }
229 :
230 : nsUrlClassifierUtils::~nsUrlClassifierUtils()
231 : {
232 : /* destructor code */
233 : }
234 :
235 : /* ACString getKeyForURI (in nsIURI uri); */
236 : NS_IMETHODIMP nsUrlClassifierUtils::GetKeyForURI(nsIURI *uri, nsACString & _retval)
237 : {
238 : return NS_ERROR_NOT_IMPLEMENTED;
239 : }
240 :
241 : /* ACString getProvider (in ACString tableName); */
242 : NS_IMETHODIMP nsUrlClassifierUtils::GetProvider(const nsACString & tableName, nsACString & _retval)
243 : {
244 : return NS_ERROR_NOT_IMPLEMENTED;
245 : }
246 :
247 : /* ACString getTelemetryProvider (in ACString tableName); */
248 : NS_IMETHODIMP nsUrlClassifierUtils::GetTelemetryProvider(const nsACString & tableName, nsACString & _retval)
249 : {
250 : return NS_ERROR_NOT_IMPLEMENTED;
251 : }
252 :
253 : /* ACString getProtocolVersion (in ACString provider); */
254 : NS_IMETHODIMP nsUrlClassifierUtils::GetProtocolVersion(const nsACString & provider, nsACString & _retval)
255 : {
256 : return NS_ERROR_NOT_IMPLEMENTED;
257 : }
258 :
259 : /* ACString convertThreatTypeToListNames (in uint32_t threatType); */
260 : NS_IMETHODIMP nsUrlClassifierUtils::ConvertThreatTypeToListNames(uint32_t threatType, nsACString & _retval)
261 : {
262 : return NS_ERROR_NOT_IMPLEMENTED;
263 : }
264 :
265 : /* uint32_t convertListNameToThreatType (in ACString listName); */
266 : NS_IMETHODIMP nsUrlClassifierUtils::ConvertListNameToThreatType(const nsACString & listName, uint32_t *_retval)
267 : {
268 : return NS_ERROR_NOT_IMPLEMENTED;
269 : }
270 :
271 : /* ACString makeUpdateRequestV4 ([array, size_is (aCount)] in string aListNames, [array, size_is (aCount)] in string aStatesBase64, in uint32_t aCount); */
272 : NS_IMETHODIMP nsUrlClassifierUtils::MakeUpdateRequestV4(const char * *aListNames, const char * *aStatesBase64, uint32_t aCount, nsACString & _retval)
273 : {
274 : return NS_ERROR_NOT_IMPLEMENTED;
275 : }
276 :
277 : /* ACString makeFindFullHashRequestV4 ([array, size_is (aListCount)] in string aListNames, [array, size_is (aListCount)] in string aListStatesBase64, [array, size_is (aPrefixCount)] in string aPrefixes, in uint32_t aListCount, in uint32_t aPrefixCount); */
278 : NS_IMETHODIMP nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char * *aListNames, const char * *aListStatesBase64, const char * *aPrefixes, uint32_t aListCount, uint32_t aPrefixCount, nsACString & _retval)
279 : {
280 : return NS_ERROR_NOT_IMPLEMENTED;
281 : }
282 :
283 : /* void parseFindFullHashResponseV4 (in ACString aResponse, in nsIUrlClassifierParseFindFullHashCallback aCallback); */
284 : NS_IMETHODIMP nsUrlClassifierUtils::ParseFindFullHashResponseV4(const nsACString & aResponse, nsIUrlClassifierParseFindFullHashCallback *aCallback)
285 : {
286 : return NS_ERROR_NOT_IMPLEMENTED;
287 : }
288 :
289 : /* End of implementation class template. */
290 : #endif
291 :
292 :
293 : #endif /* __gen_nsIUrlClassifierUtils_h__ */
|