/work/obj-fuzz/dist/include/nsINetworkInterceptController.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/base/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_nsIContentPolicy_h__ |
14 | | #include "nsIContentPolicy.h" |
15 | | #endif |
16 | | |
17 | | #include "js/GCAnnotations.h" |
18 | | |
19 | | /* For IDL files that don't want to include root IDL files. */ |
20 | | #ifndef NS_NO_VTABLE |
21 | | #define NS_NO_VTABLE |
22 | | #endif |
23 | | class nsICacheInfoChannel; /* forward declaration */ |
24 | | |
25 | | class nsIChannel; /* forward declaration */ |
26 | | |
27 | | class nsIConsoleReportCollector; /* forward declaration */ |
28 | | |
29 | | class nsIInputStream; /* forward declaration */ |
30 | | |
31 | | class nsIOutputStream; /* forward declaration */ |
32 | | |
33 | | class nsIURI; /* forward declaration */ |
34 | | |
35 | | #include "nsContentUtils.h" |
36 | | #include "nsIChannel.h" |
37 | | #include "nsIConsoleReportCollector.h" |
38 | | #include "nsILoadInfo.h" |
39 | | namespace mozilla { |
40 | | class TimeStamp; |
41 | | namespace dom { |
42 | | class ChannelInfo; |
43 | | } |
44 | | } |
45 | | |
46 | | /* starting interface: nsIInterceptedBodyCallback */ |
47 | | #define NS_IINTERCEPTEDBODYCALLBACK_IID_STR "51039eb6-bea0-40c7-b523-ccab56cc4fde" |
48 | | |
49 | | #define NS_IINTERCEPTEDBODYCALLBACK_IID \ |
50 | | {0x51039eb6, 0xbea0, 0x40c7, \ |
51 | | { 0xb5, 0x23, 0xcc, 0xab, 0x56, 0xcc, 0x4f, 0xde }} |
52 | | |
53 | | class NS_NO_VTABLE nsIInterceptedBodyCallback : public nsISupports { |
54 | | public: |
55 | | |
56 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINTERCEPTEDBODYCALLBACK_IID) |
57 | | |
58 | | /* void bodyComplete (in nsresult aRv); */ |
59 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD BodyComplete(nsresult aRv) = 0; |
60 | | |
61 | | }; |
62 | | |
63 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIInterceptedBodyCallback, NS_IINTERCEPTEDBODYCALLBACK_IID) |
64 | | |
65 | | /* Use this macro when declaring classes that implement this interface. */ |
66 | | #define NS_DECL_NSIINTERCEPTEDBODYCALLBACK \ |
67 | | NS_IMETHOD BodyComplete(nsresult aRv) override; |
68 | | |
69 | | /* Use this macro when declaring the members of this interface when the |
70 | | class doesn't implement the interface. This is useful for forwarding. */ |
71 | | #define NS_DECL_NON_VIRTUAL_NSIINTERCEPTEDBODYCALLBACK \ |
72 | | nsresult BodyComplete(nsresult aRv); |
73 | | |
74 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
75 | | #define NS_FORWARD_NSIINTERCEPTEDBODYCALLBACK(_to) \ |
76 | | NS_IMETHOD BodyComplete(nsresult aRv) override { return _to BodyComplete(aRv); } |
77 | | |
78 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
79 | | #define NS_FORWARD_SAFE_NSIINTERCEPTEDBODYCALLBACK(_to) \ |
80 | | NS_IMETHOD BodyComplete(nsresult aRv) override { return !_to ? NS_ERROR_NULL_POINTER : _to->BodyComplete(aRv); } |
81 | | |
82 | | |
83 | | /* starting interface: nsIInterceptedChannel */ |
84 | | #define NS_IINTERCEPTEDCHANNEL_IID_STR "f4b82975-6a86-4cc4-87fe-9a1fd430c86d" |
85 | | |
86 | | #define NS_IINTERCEPTEDCHANNEL_IID \ |
87 | | {0xf4b82975, 0x6a86, 0x4cc4, \ |
88 | | { 0x87, 0xfe, 0x9a, 0x1f, 0xd4, 0x30, 0xc8, 0x6d }} |
89 | | |
90 | | class nsIInterceptedChannel : public nsISupports { |
91 | | public: |
92 | | |
93 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IINTERCEPTEDCHANNEL_IID) |
94 | | |
95 | | /* void resetInterception (); */ |
96 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ResetInterception(void) = 0; |
97 | | |
98 | | /* void synthesizeStatus (in uint16_t status, in ACString reason); */ |
99 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString& reason) = 0; |
100 | | |
101 | | /* void synthesizeHeader (in ACString name, in ACString value); */ |
102 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SynthesizeHeader(const nsACString& name, const nsACString& value) = 0; |
103 | | |
104 | | /* void startSynthesizedResponse (in nsIInputStream body, in nsIInterceptedBodyCallback callback, in nsICacheInfoChannel channel, in ACString finalURLSpec, in bool responseRedirected); */ |
105 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD StartSynthesizedResponse(nsIInputStream *body, nsIInterceptedBodyCallback *callback, nsICacheInfoChannel *channel, const nsACString& finalURLSpec, bool responseRedirected) = 0; |
106 | | |
107 | | /* void finishSynthesizedResponse (); */ |
108 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FinishSynthesizedResponse(void) = 0; |
109 | | |
110 | | /* void cancelInterception (in nsresult status); */ |
111 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CancelInterception(nsresult status) = 0; |
112 | | |
113 | | /* readonly attribute nsIChannel channel; */ |
114 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetChannel(nsIChannel **aChannel) = 0; |
115 | | |
116 | | /* readonly attribute nsIURI secureUpgradedChannelURI; */ |
117 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI **aSecureUpgradedChannelURI) = 0; |
118 | | |
119 | | /* [noscript] void setChannelInfo (in ChannelInfo channelInfo); */ |
120 | | NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo * channelInfo) = 0; |
121 | | |
122 | | /* [noscript] readonly attribute nsContentPolicyType internalContentPolicyType; */ |
123 | | NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) = 0; |
124 | | |
125 | | /* [noscript] readonly attribute nsIConsoleReportCollector consoleReportCollector; */ |
126 | | NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector **aConsoleReportCollector) = 0; |
127 | | |
128 | | /* [noscript] void SetLaunchServiceWorkerStart (in TimeStamp aTimeStamp); */ |
129 | | NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) = 0; |
130 | | |
131 | | /* [noscript] void GetLaunchServiceWorkerStart (out TimeStamp aTimeStamp); */ |
132 | | NS_IMETHOD GetLaunchServiceWorkerStart(mozilla::TimeStamp * aTimeStamp) = 0; |
133 | | |
134 | | /* [noscript] void SetLaunchServiceWorkerEnd (in TimeStamp aTimeStamp); */ |
135 | | NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) = 0; |
136 | | |
137 | | /* [noscript] void GetLaunchServiceWorkerEnd (out TimeStamp aTimeStamp); */ |
138 | | NS_IMETHOD GetLaunchServiceWorkerEnd(mozilla::TimeStamp * aTimeStamp) = 0; |
139 | | |
140 | | /* [noscript] void SetDispatchFetchEventStart (in TimeStamp aTimeStamp); */ |
141 | | NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) = 0; |
142 | | |
143 | | /* [noscript] void SetDispatchFetchEventEnd (in TimeStamp aTimeStamp); */ |
144 | | NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) = 0; |
145 | | |
146 | | /* [noscript] void SetHandleFetchEventStart (in TimeStamp aTimeStamp); */ |
147 | | NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) = 0; |
148 | | |
149 | | /* [noscript] void SetHandleFetchEventEnd (in TimeStamp aTimeStamp); */ |
150 | | NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) = 0; |
151 | | |
152 | | /* [noscript] void SetFinishResponseStart (in TimeStamp aTimeStamp); */ |
153 | | NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) = 0; |
154 | | |
155 | | /* [noscript] void SetFinishSynthesizedResponseEnd (in TimeStamp aTimeStamp); */ |
156 | | NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) = 0; |
157 | | |
158 | | /* [noscript] void SetChannelResetEnd (in TimeStamp aTimeStamp); */ |
159 | | NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) = 0; |
160 | | |
161 | | /* [noscript] void SaveTimeStamps (); */ |
162 | | NS_IMETHOD SaveTimeStamps(void) = 0; |
163 | | |
164 | | already_AddRefed<nsIConsoleReportCollector> |
165 | | GetConsoleReportCollector() |
166 | 0 | { |
167 | 0 | nsCOMPtr<nsIConsoleReportCollector> reporter; |
168 | 0 | GetConsoleReportCollector(getter_AddRefs(reporter)); |
169 | 0 | return reporter.forget(); |
170 | 0 | } |
171 | | void |
172 | | GetSubresourceTimeStampKey(nsIChannel* aChannel, nsACString& aKey) |
173 | 0 | { |
174 | 0 | if (!nsContentUtils::IsNonSubresourceRequest(aChannel)) { |
175 | 0 | nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo(); |
176 | 0 | if (loadInfo) { |
177 | 0 | switch(loadInfo->InternalContentPolicyType()) { |
178 | 0 | case nsIContentPolicy::TYPE_SCRIPT: |
179 | 0 | case nsIContentPolicy::TYPE_INTERNAL_SCRIPT: |
180 | 0 | case nsIContentPolicy::TYPE_INTERNAL_SCRIPT_PRELOAD: |
181 | 0 | case nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS: { |
182 | 0 | aKey = NS_LITERAL_CSTRING("subresource-script"); |
183 | 0 | break; |
184 | 0 | } |
185 | 0 | case nsIContentPolicy::TYPE_IMAGE: |
186 | 0 | case nsIContentPolicy::TYPE_INTERNAL_IMAGE: |
187 | 0 | case nsIContentPolicy::TYPE_INTERNAL_IMAGE_PRELOAD: |
188 | 0 | case nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON: { |
189 | 0 | aKey = NS_LITERAL_CSTRING("subresource-image"); |
190 | 0 | break; |
191 | 0 | } |
192 | 0 | case nsIContentPolicy::TYPE_STYLESHEET: |
193 | 0 | case nsIContentPolicy::TYPE_INTERNAL_STYLESHEET: |
194 | 0 | case nsIContentPolicy::TYPE_INTERNAL_STYLESHEET_PRELOAD: { |
195 | 0 | aKey = NS_LITERAL_CSTRING("subresource-stylesheet"); |
196 | 0 | break; |
197 | 0 | } |
198 | 0 | default: { |
199 | 0 | aKey = NS_LITERAL_CSTRING("subresource-other"); |
200 | 0 | break; |
201 | 0 | } |
202 | 0 | } |
203 | 0 | } |
204 | 0 | } |
205 | 0 | } |
206 | | /* [noscript] void setReleaseHandle (in nsISupports aHandle); */ |
207 | | NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) = 0; |
208 | | |
209 | | }; |
210 | | |
211 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIInterceptedChannel, NS_IINTERCEPTEDCHANNEL_IID) |
212 | | |
213 | | /* Use this macro when declaring classes that implement this interface. */ |
214 | | #define NS_DECL_NSIINTERCEPTEDCHANNEL \ |
215 | | NS_IMETHOD ResetInterception(void) override; \ |
216 | | NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString& reason) override; \ |
217 | | NS_IMETHOD SynthesizeHeader(const nsACString& name, const nsACString& value) override; \ |
218 | | NS_IMETHOD StartSynthesizedResponse(nsIInputStream *body, nsIInterceptedBodyCallback *callback, nsICacheInfoChannel *channel, const nsACString& finalURLSpec, bool responseRedirected) override; \ |
219 | | NS_IMETHOD FinishSynthesizedResponse(void) override; \ |
220 | | NS_IMETHOD CancelInterception(nsresult status) override; \ |
221 | | NS_IMETHOD GetChannel(nsIChannel **aChannel) override; \ |
222 | | NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI **aSecureUpgradedChannelURI) override; \ |
223 | | NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo * channelInfo) override; \ |
224 | | NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) override; \ |
225 | | NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector **aConsoleReportCollector) override; \ |
226 | | NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) override; \ |
227 | | NS_IMETHOD GetLaunchServiceWorkerStart(mozilla::TimeStamp * aTimeStamp) override; \ |
228 | | NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) override; \ |
229 | | NS_IMETHOD GetLaunchServiceWorkerEnd(mozilla::TimeStamp * aTimeStamp) override; \ |
230 | | NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) override; \ |
231 | | NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) override; \ |
232 | | NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) override; \ |
233 | | NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) override; \ |
234 | | NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) override; \ |
235 | | NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) override; \ |
236 | | NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) override; \ |
237 | | NS_IMETHOD SaveTimeStamps(void) override; \ |
238 | | NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) override; |
239 | | |
240 | | /* Use this macro when declaring the members of this interface when the |
241 | | class doesn't implement the interface. This is useful for forwarding. */ |
242 | | #define NS_DECL_NON_VIRTUAL_NSIINTERCEPTEDCHANNEL \ |
243 | | nsresult ResetInterception(void); \ |
244 | | nsresult SynthesizeStatus(uint16_t status, const nsACString& reason); \ |
245 | | nsresult SynthesizeHeader(const nsACString& name, const nsACString& value); \ |
246 | | nsresult StartSynthesizedResponse(nsIInputStream *body, nsIInterceptedBodyCallback *callback, nsICacheInfoChannel *channel, const nsACString& finalURLSpec, bool responseRedirected); \ |
247 | | nsresult FinishSynthesizedResponse(void); \ |
248 | | nsresult CancelInterception(nsresult status); \ |
249 | | nsresult GetChannel(nsIChannel **aChannel); \ |
250 | | nsresult GetSecureUpgradedChannelURI(nsIURI **aSecureUpgradedChannelURI); \ |
251 | | nsresult SetChannelInfo(mozilla::dom::ChannelInfo * channelInfo); \ |
252 | | nsresult GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType); \ |
253 | | nsresult GetConsoleReportCollector(nsIConsoleReportCollector **aConsoleReportCollector); \ |
254 | | nsresult SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp); \ |
255 | | nsresult GetLaunchServiceWorkerStart(mozilla::TimeStamp * aTimeStamp); \ |
256 | | nsresult SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp); \ |
257 | | nsresult GetLaunchServiceWorkerEnd(mozilla::TimeStamp * aTimeStamp); \ |
258 | | nsresult SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp); \ |
259 | | nsresult SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp); \ |
260 | | nsresult SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp); \ |
261 | | nsresult SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp); \ |
262 | | nsresult SetFinishResponseStart(mozilla::TimeStamp aTimeStamp); \ |
263 | | nsresult SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp); \ |
264 | | nsresult SetChannelResetEnd(mozilla::TimeStamp aTimeStamp); \ |
265 | | nsresult SaveTimeStamps(void); \ |
266 | | nsresult SetReleaseHandle(nsISupports *aHandle); |
267 | | |
268 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
269 | | #define NS_FORWARD_NSIINTERCEPTEDCHANNEL(_to) \ |
270 | | NS_IMETHOD ResetInterception(void) override { return _to ResetInterception(); } \ |
271 | | NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString& reason) override { return _to SynthesizeStatus(status, reason); } \ |
272 | | NS_IMETHOD SynthesizeHeader(const nsACString& name, const nsACString& value) override { return _to SynthesizeHeader(name, value); } \ |
273 | | NS_IMETHOD StartSynthesizedResponse(nsIInputStream *body, nsIInterceptedBodyCallback *callback, nsICacheInfoChannel *channel, const nsACString& finalURLSpec, bool responseRedirected) override { return _to StartSynthesizedResponse(body, callback, channel, finalURLSpec, responseRedirected); } \ |
274 | | NS_IMETHOD FinishSynthesizedResponse(void) override { return _to FinishSynthesizedResponse(); } \ |
275 | | NS_IMETHOD CancelInterception(nsresult status) override { return _to CancelInterception(status); } \ |
276 | | NS_IMETHOD GetChannel(nsIChannel **aChannel) override { return _to GetChannel(aChannel); } \ |
277 | | NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI **aSecureUpgradedChannelURI) override { return _to GetSecureUpgradedChannelURI(aSecureUpgradedChannelURI); } \ |
278 | | NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo * channelInfo) override { return _to SetChannelInfo(channelInfo); } \ |
279 | | NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) override { return _to GetInternalContentPolicyType(aInternalContentPolicyType); } \ |
280 | | NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector **aConsoleReportCollector) override { return _to GetConsoleReportCollector(aConsoleReportCollector); } \ |
281 | | NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) override { return _to SetLaunchServiceWorkerStart(aTimeStamp); } \ |
282 | | NS_IMETHOD GetLaunchServiceWorkerStart(mozilla::TimeStamp * aTimeStamp) override { return _to GetLaunchServiceWorkerStart(aTimeStamp); } \ |
283 | | NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetLaunchServiceWorkerEnd(aTimeStamp); } \ |
284 | | NS_IMETHOD GetLaunchServiceWorkerEnd(mozilla::TimeStamp * aTimeStamp) override { return _to GetLaunchServiceWorkerEnd(aTimeStamp); } \ |
285 | | NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return _to SetDispatchFetchEventStart(aTimeStamp); } \ |
286 | | NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetDispatchFetchEventEnd(aTimeStamp); } \ |
287 | | NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return _to SetHandleFetchEventStart(aTimeStamp); } \ |
288 | | NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetHandleFetchEventEnd(aTimeStamp); } \ |
289 | | NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) override { return _to SetFinishResponseStart(aTimeStamp); } \ |
290 | | NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetFinishSynthesizedResponseEnd(aTimeStamp); } \ |
291 | | NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) override { return _to SetChannelResetEnd(aTimeStamp); } \ |
292 | | NS_IMETHOD SaveTimeStamps(void) override { return _to SaveTimeStamps(); } \ |
293 | | NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) override { return _to SetReleaseHandle(aHandle); } |
294 | | |
295 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
296 | | #define NS_FORWARD_SAFE_NSIINTERCEPTEDCHANNEL(_to) \ |
297 | | NS_IMETHOD ResetInterception(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetInterception(); } \ |
298 | | NS_IMETHOD SynthesizeStatus(uint16_t status, const nsACString& reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizeStatus(status, reason); } \ |
299 | | NS_IMETHOD SynthesizeHeader(const nsACString& name, const nsACString& value) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SynthesizeHeader(name, value); } \ |
300 | | NS_IMETHOD StartSynthesizedResponse(nsIInputStream *body, nsIInterceptedBodyCallback *callback, nsICacheInfoChannel *channel, const nsACString& finalURLSpec, bool responseRedirected) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartSynthesizedResponse(body, callback, channel, finalURLSpec, responseRedirected); } \ |
301 | | NS_IMETHOD FinishSynthesizedResponse(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishSynthesizedResponse(); } \ |
302 | | NS_IMETHOD CancelInterception(nsresult status) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CancelInterception(status); } \ |
303 | | NS_IMETHOD GetChannel(nsIChannel **aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChannel(aChannel); } \ |
304 | | NS_IMETHOD GetSecureUpgradedChannelURI(nsIURI **aSecureUpgradedChannelURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecureUpgradedChannelURI(aSecureUpgradedChannelURI); } \ |
305 | | NS_IMETHOD SetChannelInfo(mozilla::dom::ChannelInfo * channelInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChannelInfo(channelInfo); } \ |
306 | | NS_IMETHOD GetInternalContentPolicyType(nsContentPolicyType *aInternalContentPolicyType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInternalContentPolicyType(aInternalContentPolicyType); } \ |
307 | | NS_IMETHOD GetConsoleReportCollector(nsIConsoleReportCollector **aConsoleReportCollector) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetConsoleReportCollector(aConsoleReportCollector); } \ |
308 | | NS_IMETHOD SetLaunchServiceWorkerStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLaunchServiceWorkerStart(aTimeStamp); } \ |
309 | | NS_IMETHOD GetLaunchServiceWorkerStart(mozilla::TimeStamp * aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLaunchServiceWorkerStart(aTimeStamp); } \ |
310 | | NS_IMETHOD SetLaunchServiceWorkerEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLaunchServiceWorkerEnd(aTimeStamp); } \ |
311 | | NS_IMETHOD GetLaunchServiceWorkerEnd(mozilla::TimeStamp * aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLaunchServiceWorkerEnd(aTimeStamp); } \ |
312 | | NS_IMETHOD SetDispatchFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDispatchFetchEventStart(aTimeStamp); } \ |
313 | | NS_IMETHOD SetDispatchFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDispatchFetchEventEnd(aTimeStamp); } \ |
314 | | NS_IMETHOD SetHandleFetchEventStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHandleFetchEventStart(aTimeStamp); } \ |
315 | | NS_IMETHOD SetHandleFetchEventEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHandleFetchEventEnd(aTimeStamp); } \ |
316 | | NS_IMETHOD SetFinishResponseStart(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFinishResponseStart(aTimeStamp); } \ |
317 | | NS_IMETHOD SetFinishSynthesizedResponseEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFinishSynthesizedResponseEnd(aTimeStamp); } \ |
318 | | NS_IMETHOD SetChannelResetEnd(mozilla::TimeStamp aTimeStamp) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChannelResetEnd(aTimeStamp); } \ |
319 | | NS_IMETHOD SaveTimeStamps(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveTimeStamps(); } \ |
320 | | NS_IMETHOD SetReleaseHandle(nsISupports *aHandle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReleaseHandle(aHandle); } |
321 | | |
322 | | |
323 | | /* starting interface: nsINetworkInterceptController */ |
324 | | #define NS_INETWORKINTERCEPTCONTROLLER_IID_STR "70d2b4fe-a552-48cd-8d93-1d8437a56b53" |
325 | | |
326 | | #define NS_INETWORKINTERCEPTCONTROLLER_IID \ |
327 | | {0x70d2b4fe, 0xa552, 0x48cd, \ |
328 | | { 0x8d, 0x93, 0x1d, 0x84, 0x37, 0xa5, 0x6b, 0x53 }} |
329 | | |
330 | | class NS_NO_VTABLE nsINetworkInterceptController : public nsISupports { |
331 | | public: |
332 | | |
333 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_INETWORKINTERCEPTCONTROLLER_IID) |
334 | | |
335 | | /* bool shouldPrepareForIntercept (in nsIURI aURI, in nsIChannel aChannel); */ |
336 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, nsIChannel *aChannel, bool *_retval) = 0; |
337 | | |
338 | | /* void channelIntercepted (in nsIInterceptedChannel aChannel); */ |
339 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) = 0; |
340 | | |
341 | | }; |
342 | | |
343 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsINetworkInterceptController, NS_INETWORKINTERCEPTCONTROLLER_IID) |
344 | | |
345 | | /* Use this macro when declaring classes that implement this interface. */ |
346 | | #define NS_DECL_NSINETWORKINTERCEPTCONTROLLER \ |
347 | | NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, nsIChannel *aChannel, bool *_retval) override; \ |
348 | | NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override; |
349 | | |
350 | | /* Use this macro when declaring the members of this interface when the |
351 | | class doesn't implement the interface. This is useful for forwarding. */ |
352 | | #define NS_DECL_NON_VIRTUAL_NSINETWORKINTERCEPTCONTROLLER \ |
353 | | nsresult ShouldPrepareForIntercept(nsIURI *aURI, nsIChannel *aChannel, bool *_retval); \ |
354 | | nsresult ChannelIntercepted(nsIInterceptedChannel *aChannel); |
355 | | |
356 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
357 | | #define NS_FORWARD_NSINETWORKINTERCEPTCONTROLLER(_to) \ |
358 | | NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, nsIChannel *aChannel, bool *_retval) override { return _to ShouldPrepareForIntercept(aURI, aChannel, _retval); } \ |
359 | | NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override { return _to ChannelIntercepted(aChannel); } |
360 | | |
361 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
362 | | #define NS_FORWARD_SAFE_NSINETWORKINTERCEPTCONTROLLER(_to) \ |
363 | | NS_IMETHOD ShouldPrepareForIntercept(nsIURI *aURI, nsIChannel *aChannel, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShouldPrepareForIntercept(aURI, aChannel, _retval); } \ |
364 | | NS_IMETHOD ChannelIntercepted(nsIInterceptedChannel *aChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ChannelIntercepted(aChannel); } |
365 | | |
366 | | |
367 | | #endif /* __gen_nsINetworkInterceptController_h__ */ |