Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsINetworkInterceptController.idl
3 : */
4 :
5 : #ifndef __gen_nsINetworkInterceptController_h__
6 : #define __gen_nsINetworkInterceptController_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #ifndef __gen_nsIContentPolicyBase_h__
14 : #include "nsIContentPolicyBase.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 : class nsIChannel; /* forward declaration */
22 :
23 : class nsIConsoleReportCollector; /* forward declaration */
24 :
25 : class nsIOutputStream; /* forward declaration */
26 :
27 : class nsIURI; /* forward declaration */
28 :
29 : #include "nsIConsoleReportCollector.h"
30 : namespace mozilla {
31 : class TimeStamp;
32 : namespace dom {
33 : class ChannelInfo;
34 : }
35 : }
36 :
37 : /* starting interface: nsIInterceptedChannel */
38 : #define NS_IINTERCEPTEDCHANNEL_IID_STR "f4b82975-6a86-4cc4-87fe-9a1fd430c86d"
39 :
40 : #define NS_IINTERCEPTEDCHANNEL_IID \
41 : {0xf4b82975, 0x6a86, 0x4cc4, \
42 : { 0x87, 0xfe, 0x9a, 0x1f, 0xd4, 0x30, 0xc8, 0x6d }}
43 :
44 0 : class nsIInterceptedChannel : public nsISupports {
45 : public:
46 :
47 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINTERCEPTEDCHANNEL_IID)
48 :
49 : /* void resetInterception (); */
50 : NS_IMETHOD ResetInterception(void) = 0;
51 :
52 : /* void synthesizeStatus (in uint16_t status, in ACString reason); */
53 : NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) = 0;
54 :
55 : /* void synthesizeHeader (in ACString name, in ACString value); */
56 : NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) = 0;
57 :
58 : /* void finishSynthesizedResponse (in ACString finalURLSpec); */
59 : NS_IMETHOD FinishSynthesizedResponse(const nsACString & finalURLSpec) = 0;
60 :
61 : /* void cancel (in nsresult status); */
62 : NS_IMETHOD Cancel(nsresult status) = 0;
63 :
64 : /* readonly attribute nsIOutputStream responseBody; */
65 : NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) = 0;
66 :
67 : /* readonly attribute nsIChannel channel; */
68 : NS_IMETHOD GetChannel(nsIChannel * *aChannel) = 0;
69 :
70 : /* readonly attribute nsIURI secureUpgradedChannelURI; */
71 : NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI * *aSecureUpgradedChannelURI) = 0;
72 :
73 : /* [noscript] void setChannelInfo (in ChannelInfo channelInfo); */
74 : NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) = 0;
75 :
76 : /* [noscript] readonly attribute nsContentPolicyType internalContentPolicyType; */
77 : NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) = 0;
78 :
79 : /* [noscript] readonly attribute nsIConsoleReportCollector consoleReportCollector; */
80 : NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector * *aConsoleReportCollector) = 0;
81 :
82 : /* [noscript] void SetLaunchServiceWorkerStart (in TimeStamp aTimeStamp); */
83 : NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) = 0;
84 :
85 : /* [noscript] void SetLaunchServiceWorkerEnd (in TimeStamp aTimeStamp); */
86 : NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) = 0;
87 :
88 : /* [noscript] void SetDispatchFetchEventStart (in TimeStamp aTimeStamp); */
89 : NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) = 0;
90 :
91 : /* [noscript] void SetDispatchFetchEventEnd (in TimeStamp aTimeStamp); */
92 : NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) = 0;
93 :
94 : /* [noscript] void SetHandleFetchEventStart (in TimeStamp aTimeStamp); */
95 : NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) = 0;
96 :
97 : /* [noscript] void SetHandleFetchEventEnd (in TimeStamp aTimeStamp); */
98 : NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) = 0;
99 :
100 : /* [noscript] void SetFinishResponseStart (in TimeStamp aTimeStamp); */
101 : NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) = 0;
102 :
103 : /* [noscript] void SetFinishSynthesizedResponseEnd (in TimeStamp aTimeStamp); */
104 : NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) = 0;
105 :
106 : /* [noscript] void SetChannelResetEnd (in TimeStamp aTimeStamp); */
107 : NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) = 0;
108 :
109 : /* [noscript] void SaveTimeStamps (); */
110 : NS_IMETHOD SaveTimeStamps(void) = 0;
111 :
112 : already_AddRefed<nsIConsoleReportCollector>
113 0 : GetConsoleReportCollector()
114 : {
115 0 : nsCOMPtr<nsIConsoleReportCollector> reporter;
116 0 : GetConsoleReportCollector(getter_AddRefs(reporter));
117 0 : return reporter.forget();
118 : }
119 : /* [noscript] void setReleaseHandle (in nsISupports aHandle); */
120 : NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) = 0;
121 :
122 : };
123 :
124 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIInterceptedChannel, NS_IINTERCEPTEDCHANNEL_IID)
125 :
126 : /* Use this macro when declaring classes that implement this interface. */
127 : #define NS_DECL_NSIINTERCEPTEDCHANNEL \
128 : NS_IMETHOD ResetInterception(void) override; \
129 : NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) override; \
130 : NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) override; \
131 : NS_IMETHOD FinishSynthesizedResponse(const nsACString & finalURLSpec) override; \
132 : NS_IMETHOD Cancel(nsresult status) override; \
133 : NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) override; \
134 : NS_IMETHOD GetChannel(nsIChannel * *aChannel) override; \
135 : NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI * *aSecureUpgradedChannelURI) override; \
136 : NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) override; \
137 : NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) override; \
138 : NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector * *aConsoleReportCollector) override; \
139 : NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) override; \
140 : NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) override; \
141 : NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) override; \
142 : NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) override; \
143 : NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) override; \
144 : NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) override; \
145 : NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) override; \
146 : NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) override; \
147 : NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) override; \
148 : NS_IMETHOD SaveTimeStamps(void) override; \
149 : NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) 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_NSIINTERCEPTEDCHANNEL \
154 : nsresult ResetInterception(void); \
155 : nsresult SynthesizeStatus(uint16_t status, const nsACString & reason); \
156 : nsresult SynthesizeHeader(const nsACString & name, const nsACString & value); \
157 : nsresult FinishSynthesizedResponse(const nsACString & finalURLSpec); \
158 : nsresult Cancel(nsresult status); \
159 : nsresult GetResponseBody(nsIOutputStream * *aResponseBody); \
160 : nsresult GetChannel(nsIChannel * *aChannel); \
161 : nsresult GetSecureUpgradedChannelURI(nsIURI * *aSecureUpgradedChannelURI); \
162 : nsresult SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo); \
163 : nsresult GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType); \
164 : nsresult GetConsoleReportCollector(nsIConsoleReportCollector * *aConsoleReportCollector); \
165 : nsresult SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp); \
166 : nsresult SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp); \
167 : nsresult SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp); \
168 : nsresult SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp); \
169 : nsresult SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp); \
170 : nsresult SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp); \
171 : nsresult SetFinishResponseStart(mozilla::TimeStamp aTimeStamp); \
172 : nsresult SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp); \
173 : nsresult SetChannelResetEnd(mozilla::TimeStamp aTimeStamp); \
174 : nsresult SaveTimeStamps(void); \
175 : nsresult SetReleaseHandle(nsISupports *aHandle);
176 :
177 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
178 : #define NS_FORWARD_NSIINTERCEPTEDCHANNEL(_to) \
179 : NS_IMETHOD ResetInterception(void) override { return _to ResetInterception(); } \
180 : NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) override { return _to SynthesizeStatus(status, reason); } \
181 : NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) override { return _to SynthesizeHeader(name, value); } \
182 : NS_IMETHOD FinishSynthesizedResponse(const nsACString & finalURLSpec) override { return _to FinishSynthesizedResponse(finalURLSpec); } \
183 : NS_IMETHOD Cancel(nsresult status) override { return _to Cancel(status); } \
184 : NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) override { return _to GetResponseBody(aResponseBody); } \
185 : NS_IMETHOD GetChannel(nsIChannel * *aChannel) override { return _to GetChannel(aChannel); } \
186 : NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI * *aSecureUpgradedChannelURI) override { return _to GetSecureUpgradedChannelURI(aSecureUpgradedChannelURI); } \
187 : NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) override { return _to SetChannelInfo(channelInfo); } \
188 : NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) override { return _to GetInternalContentPolicyType(aInternalContentPolicyType); } \
189 : NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector * *aConsoleReportCollector) override { return _to GetConsoleReportCollector(aConsoleReportCollector); } \
190 : NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) override { return _to SetLaunchServiceWorkerStart(aTimeStamp); } \
191 : NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetLaunchServiceWorkerEnd(aTimeStamp); } \
192 : NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return _to SetDispatchFetchEventStart(aTimeStamp); } \
193 : NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetDispatchFetchEventEnd(aTimeStamp); } \
194 : NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return _to SetHandleFetchEventStart(aTimeStamp); } \
195 : NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetHandleFetchEventEnd(aTimeStamp); } \
196 : NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) override { return _to SetFinishResponseStart(aTimeStamp); } \
197 : NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetFinishSynthesizedResponseEnd(aTimeStamp); } \
198 : NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetChannelResetEnd(aTimeStamp); } \
199 : NS_IMETHOD SaveTimeStamps(void) override { return _to SaveTimeStamps(); } \
200 : NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) override { return _to SetReleaseHandle(aHandle); }
201 :
202 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
203 : #define NS_FORWARD_SAFE_NSIINTERCEPTEDCHANNEL(_to) \
204 : NS_IMETHOD ResetInterception(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetInterception(); } \
205 : NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString & reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizeStatus(status, reason); } \
206 : NS_IMETHOD SynthesizeHeader(const nsACString & name, const nsACString & value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizeHeader(name, value); } \
207 : NS_IMETHOD FinishSynthesizedResponse(const nsACString & finalURLSpec) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishSynthesizedResponse(finalURLSpec); } \
208 : NS_IMETHOD Cancel(nsresult status) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(status); } \
209 : NS_IMETHOD GetResponseBody(nsIOutputStream * *aResponseBody) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseBody(aResponseBody); } \
210 : NS_IMETHOD GetChannel(nsIChannel * *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChannel(aChannel); } \
211 : NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI * *aSecureUpgradedChannelURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecureUpgradedChannelURI(aSecureUpgradedChannelURI); } \
212 : NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChannelInfo(channelInfo); } \
213 : NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInternalContentPolicyType(aInternalContentPolicyType); } \
214 : NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector * *aConsoleReportCollector) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetConsoleReportCollector(aConsoleReportCollector); } \
215 : NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLaunchServiceWorkerStart(aTimeStamp); } \
216 : NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLaunchServiceWorkerEnd(aTimeStamp); } \
217 : NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDispatchFetchEventStart(aTimeStamp); } \
218 : NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDispatchFetchEventEnd(aTimeStamp); } \
219 : NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHandleFetchEventStart(aTimeStamp); } \
220 : NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHandleFetchEventEnd(aTimeStamp); } \
221 : NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFinishResponseStart(aTimeStamp); } \
222 : NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFinishSynthesizedResponseEnd(aTimeStamp); } \
223 : NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChannelResetEnd(aTimeStamp); } \
224 : NS_IMETHOD SaveTimeStamps(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveTimeStamps(); } \
225 : NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReleaseHandle(aHandle); }
226 :
227 : #if 0
228 : /* Use the code below as a template for the implementation class for this interface. */
229 :
230 : /* Header file */
231 : class nsInterceptedChannel : public nsIInterceptedChannel
232 : {
233 : public:
234 : NS_DECL_ISUPPORTS
235 : NS_DECL_NSIINTERCEPTEDCHANNEL
236 :
237 : nsInterceptedChannel();
238 :
239 : private:
240 : ~nsInterceptedChannel();
241 :
242 : protected:
243 : /* additional members */
244 : };
245 :
246 : /* Implementation file */
247 : NS_IMPL_ISUPPORTS(nsInterceptedChannel, nsIInterceptedChannel)
248 :
249 : nsInterceptedChannel::nsInterceptedChannel()
250 : {
251 : /* member initializers and constructor code */
252 : }
253 :
254 : nsInterceptedChannel::~nsInterceptedChannel()
255 : {
256 : /* destructor code */
257 : }
258 :
259 : /* void resetInterception (); */
260 : NS_IMETHODIMP nsInterceptedChannel::ResetInterception()
261 : {
262 : return NS_ERROR_NOT_IMPLEMENTED;
263 : }
264 :
265 : /* void synthesizeStatus (in uint16_t status, in ACString reason); */
266 : NS_IMETHODIMP nsInterceptedChannel::SynthesizeStatus(uint16_t status, const nsACString & reason)
267 : {
268 : return NS_ERROR_NOT_IMPLEMENTED;
269 : }
270 :
271 : /* void synthesizeHeader (in ACString name, in ACString value); */
272 : NS_IMETHODIMP nsInterceptedChannel::SynthesizeHeader(const nsACString & name, const nsACString & value)
273 : {
274 : return NS_ERROR_NOT_IMPLEMENTED;
275 : }
276 :
277 : /* void finishSynthesizedResponse (in ACString finalURLSpec); */
278 : NS_IMETHODIMP nsInterceptedChannel::FinishSynthesizedResponse(const nsACString & finalURLSpec)
279 : {
280 : return NS_ERROR_NOT_IMPLEMENTED;
281 : }
282 :
283 : /* void cancel (in nsresult status); */
284 : NS_IMETHODIMP nsInterceptedChannel::Cancel(nsresult status)
285 : {
286 : return NS_ERROR_NOT_IMPLEMENTED;
287 : }
288 :
289 : /* readonly attribute nsIOutputStream responseBody; */
290 : NS_IMETHODIMP nsInterceptedChannel::GetResponseBody(nsIOutputStream * *aResponseBody)
291 : {
292 : return NS_ERROR_NOT_IMPLEMENTED;
293 : }
294 :
295 : /* readonly attribute nsIChannel channel; */
296 : NS_IMETHODIMP nsInterceptedChannel::GetChannel(nsIChannel * *aChannel)
297 : {
298 : return NS_ERROR_NOT_IMPLEMENTED;
299 : }
300 :
301 : /* readonly attribute nsIURI secureUpgradedChannelURI; */
302 : NS_IMETHODIMP nsInterceptedChannel::GetSecureUpgradedChannelURI(nsIURI * *aSecureUpgradedChannelURI)
303 : {
304 : return NS_ERROR_NOT_IMPLEMENTED;
305 : }
306 :
307 : /* [noscript] void setChannelInfo (in ChannelInfo channelInfo); */
308 : NS_IMETHODIMP nsInterceptedChannel::SetChannelInfo(mozilla::dom::ChannelInfo *channelInfo)
309 : {
310 : return NS_ERROR_NOT_IMPLEMENTED;
311 : }
312 :
313 : /* [noscript] readonly attribute nsContentPolicyType internalContentPolicyType; */
314 : NS_IMETHODIMP nsInterceptedChannel::GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType)
315 : {
316 : return NS_ERROR_NOT_IMPLEMENTED;
317 : }
318 :
319 : /* [noscript] readonly attribute nsIConsoleReportCollector consoleReportCollector; */
320 : NS_IMETHODIMP nsInterceptedChannel::GetConsoleReportCollector(nsIConsoleReportCollector * *aConsoleReportCollector)
321 : {
322 : return NS_ERROR_NOT_IMPLEMENTED;
323 : }
324 :
325 : /* [noscript] void SetLaunchServiceWorkerStart (in TimeStamp aTimeStamp); */
326 : NS_IMETHODIMP nsInterceptedChannel::SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp)
327 : {
328 : return NS_ERROR_NOT_IMPLEMENTED;
329 : }
330 :
331 : /* [noscript] void SetLaunchServiceWorkerEnd (in TimeStamp aTimeStamp); */
332 : NS_IMETHODIMP nsInterceptedChannel::SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp)
333 : {
334 : return NS_ERROR_NOT_IMPLEMENTED;
335 : }
336 :
337 : /* [noscript] void SetDispatchFetchEventStart (in TimeStamp aTimeStamp); */
338 : NS_IMETHODIMP nsInterceptedChannel::SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp)
339 : {
340 : return NS_ERROR_NOT_IMPLEMENTED;
341 : }
342 :
343 : /* [noscript] void SetDispatchFetchEventEnd (in TimeStamp aTimeStamp); */
344 : NS_IMETHODIMP nsInterceptedChannel::SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp)
345 : {
346 : return NS_ERROR_NOT_IMPLEMENTED;
347 : }
348 :
349 : /* [noscript] void SetHandleFetchEventStart (in TimeStamp aTimeStamp); */
350 : NS_IMETHODIMP nsInterceptedChannel::SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp)
351 : {
352 : return NS_ERROR_NOT_IMPLEMENTED;
353 : }
354 :
355 : /* [noscript] void SetHandleFetchEventEnd (in TimeStamp aTimeStamp); */
356 : NS_IMETHODIMP nsInterceptedChannel::SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp)
357 : {
358 : return NS_ERROR_NOT_IMPLEMENTED;
359 : }
360 :
361 : /* [noscript] void SetFinishResponseStart (in TimeStamp aTimeStamp); */
362 : NS_IMETHODIMP nsInterceptedChannel::SetFinishResponseStart(mozilla::TimeStamp aTimeStamp)
363 : {
364 : return NS_ERROR_NOT_IMPLEMENTED;
365 : }
366 :
367 : /* [noscript] void SetFinishSynthesizedResponseEnd (in TimeStamp aTimeStamp); */
368 : NS_IMETHODIMP nsInterceptedChannel::SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp)
369 : {
370 : return NS_ERROR_NOT_IMPLEMENTED;
371 : }
372 :
373 : /* [noscript] void SetChannelResetEnd (in TimeStamp aTimeStamp); */
374 : NS_IMETHODIMP nsInterceptedChannel::SetChannelResetEnd(mozilla::TimeStamp aTimeStamp)
375 : {
376 : return NS_ERROR_NOT_IMPLEMENTED;
377 : }
378 :
379 : /* [noscript] void SaveTimeStamps (); */
380 : NS_IMETHODIMP nsInterceptedChannel::SaveTimeStamps()
381 : {
382 : return NS_ERROR_NOT_IMPLEMENTED;
383 : }
384 :
385 : /* [noscript] void setReleaseHandle (in nsISupports aHandle); */
386 : NS_IMETHODIMP nsInterceptedChannel::SetReleaseHandle(nsISupports *aHandle)
387 : {
388 : return NS_ERROR_NOT_IMPLEMENTED;
389 : }
390 :
391 : /* End of implementation class template. */
392 : #endif
393 :
394 :
395 : /* starting interface: nsINetworkInterceptController */
396 : #define NS_INETWORKINTERCEPTCONTROLLER_IID_STR "70d2b4fe-a552-48cd-8d93-1d8437a56b53"
397 :
398 : #define NS_INETWORKINTERCEPTCONTROLLER_IID \
399 : {0x70d2b4fe, 0xa552, 0x48cd, \
400 : { 0x8d, 0x93, 0x1d, 0x84, 0x37, 0xa5, 0x6b, 0x53 }}
401 :
402 8 : class NS_NO_VTABLE nsINetworkInterceptController : public nsISupports {
403 : public:
404 :
405 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_INETWORKINTERCEPTCONTROLLER_IID)
406 :
407 : /* bool shouldPrepareForIntercept (in nsIURI aURI, in bool aIsNonSubresourceRequest); */
408 : NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNonSubresourceRequest, bool *_retval) = 0;
409 :
410 : /* void channelIntercepted (in nsIInterceptedChannel aChannel); */
411 : NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) = 0;
412 :
413 : };
414 :
415 : NS_DEFINE_STATIC_IID_ACCESSOR(nsINetworkInterceptController, NS_INETWORKINTERCEPTCONTROLLER_IID)
416 :
417 : /* Use this macro when declaring classes that implement this interface. */
418 : #define NS_DECL_NSINETWORKINTERCEPTCONTROLLER \
419 : NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNonSubresourceRequest, bool *_retval) override; \
420 : NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override;
421 :
422 : /* Use this macro when declaring the members of this interface when the
423 : class doesn't implement the interface. This is useful for forwarding. */
424 : #define NS_DECL_NON_VIRTUAL_NSINETWORKINTERCEPTCONTROLLER \
425 : nsresult ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNonSubresourceRequest, bool *_retval); \
426 : nsresult ChannelIntercepted(nsIInterceptedChannel *aChannel);
427 :
428 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
429 : #define NS_FORWARD_NSINETWORKINTERCEPTCONTROLLER(_to) \
430 : NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNonSubresourceRequest, bool *_retval) override { return _to ShouldPrepareForIntercept(aURI, aIsNonSubresourceRequest, _retval); } \
431 : NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override { return _to ChannelIntercepted(aChannel); }
432 :
433 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
434 : #define NS_FORWARD_SAFE_NSINETWORKINTERCEPTCONTROLLER(_to) \
435 : NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNonSubresourceRequest, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShouldPrepareForIntercept(aURI, aIsNonSubresourceRequest, _retval); } \
436 : NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChannelIntercepted(aChannel); }
437 :
438 : #if 0
439 : /* Use the code below as a template for the implementation class for this interface. */
440 :
441 : /* Header file */
442 : class nsNetworkInterceptController : public nsINetworkInterceptController
443 : {
444 : public:
445 : NS_DECL_ISUPPORTS
446 : NS_DECL_NSINETWORKINTERCEPTCONTROLLER
447 :
448 : nsNetworkInterceptController();
449 :
450 : private:
451 : ~nsNetworkInterceptController();
452 :
453 : protected:
454 : /* additional members */
455 : };
456 :
457 : /* Implementation file */
458 : NS_IMPL_ISUPPORTS(nsNetworkInterceptController, nsINetworkInterceptController)
459 :
460 : nsNetworkInterceptController::nsNetworkInterceptController()
461 : {
462 : /* member initializers and constructor code */
463 : }
464 :
465 : nsNetworkInterceptController::~nsNetworkInterceptController()
466 : {
467 : /* destructor code */
468 : }
469 :
470 : /* bool shouldPrepareForIntercept (in nsIURI aURI, in bool aIsNonSubresourceRequest); */
471 : NS_IMETHODIMP nsNetworkInterceptController::ShouldPrepareForIntercept(nsIURI *aURI, bool aIsNonSubresourceRequest, bool *_retval)
472 : {
473 : return NS_ERROR_NOT_IMPLEMENTED;
474 : }
475 :
476 : /* void channelIntercepted (in nsIInterceptedChannel aChannel); */
477 : NS_IMETHODIMP nsNetworkInterceptController::ChannelIntercepted(nsIInterceptedChannel *aChannel)
478 : {
479 : return NS_ERROR_NOT_IMPLEMENTED;
480 : }
481 :
482 : /* End of implementation class template. */
483 : #endif
484 :
485 :
486 : #endif /* __gen_nsINetworkInterceptController_h__ */
|