/work/obj-fuzz/dist/include/nsIHttpChannel.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/protocol/http/nsIHttpChannel.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIHttpChannel_h__ |
6 | | #define __gen_nsIHttpChannel_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsIChannel_h__ |
10 | | #include "nsIChannel.h" |
11 | | #endif |
12 | | |
13 | | #include "mozilla/AlreadyAddRefed.h" |
14 | | #include "mozilla/Assertions.h" |
15 | | #include "mozilla/DebugOnly.h" |
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 nsIHttpHeaderVisitor; /* forward declaration */ |
22 | | |
23 | | |
24 | | /* starting interface: nsIHttpChannel */ |
25 | | #define NS_IHTTPCHANNEL_IID_STR "c5a4a073-4539-49c7-a3f2-cec3f0619c6c" |
26 | | |
27 | | #define NS_IHTTPCHANNEL_IID \ |
28 | | {0xc5a4a073, 0x4539, 0x49c7, \ |
29 | | { 0xa3, 0xf2, 0xce, 0xc3, 0xf0, 0x61, 0x9c, 0x6c }} |
30 | | |
31 | | class NS_NO_VTABLE nsIHttpChannel : public nsIChannel { |
32 | | public: |
33 | | |
34 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHTTPCHANNEL_IID) |
35 | | |
36 | | /* [must_use] attribute ACString requestMethod; */ |
37 | | MOZ_MUST_USE NS_IMETHOD GetRequestMethod(nsACString& aRequestMethod) = 0; |
38 | | MOZ_MUST_USE NS_IMETHOD SetRequestMethod(const nsACString& aRequestMethod) = 0; |
39 | | |
40 | | /* [must_use] attribute nsIURI referrer; */ |
41 | | MOZ_MUST_USE NS_IMETHOD GetReferrer(nsIURI **aReferrer) = 0; |
42 | | MOZ_MUST_USE NS_IMETHOD SetReferrer(nsIURI *aReferrer) = 0; |
43 | | |
44 | | enum { |
45 | | REFERRER_POLICY_UNSET = 0U, |
46 | | REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE = 1U, |
47 | | REFERRER_POLICY_NO_REFERRER = 2U, |
48 | | REFERRER_POLICY_ORIGIN = 3U, |
49 | | REFERRER_POLICY_ORIGIN_WHEN_XORIGIN = 4U, |
50 | | REFERRER_POLICY_UNSAFE_URL = 5U, |
51 | | REFERRER_POLICY_SAME_ORIGIN = 6U, |
52 | | REFERRER_POLICY_STRICT_ORIGIN = 7U, |
53 | | REFERRER_POLICY_STRICT_ORIGIN_WHEN_XORIGIN = 8U |
54 | | }; |
55 | | |
56 | | /* [must_use] readonly attribute unsigned long referrerPolicy; */ |
57 | | MOZ_MUST_USE NS_IMETHOD GetReferrerPolicy(uint32_t *aReferrerPolicy) = 0; |
58 | | |
59 | | /* [must_use] void setReferrerWithPolicy (in nsIURI referrer, in unsigned long referrerPolicy); */ |
60 | | MOZ_MUST_USE NS_IMETHOD SetReferrerWithPolicy(nsIURI *referrer, uint32_t referrerPolicy) = 0; |
61 | | |
62 | | /* [must_use] readonly attribute ACString protocolVersion; */ |
63 | | MOZ_MUST_USE NS_IMETHOD GetProtocolVersion(nsACString& aProtocolVersion) = 0; |
64 | | |
65 | | /* [must_use] readonly attribute uint64_t transferSize; */ |
66 | | MOZ_MUST_USE NS_IMETHOD GetTransferSize(uint64_t *aTransferSize) = 0; |
67 | | |
68 | | /* [must_use] readonly attribute uint64_t decodedBodySize; */ |
69 | | MOZ_MUST_USE NS_IMETHOD GetDecodedBodySize(uint64_t *aDecodedBodySize) = 0; |
70 | | |
71 | | /* [must_use] readonly attribute uint64_t encodedBodySize; */ |
72 | | MOZ_MUST_USE NS_IMETHOD GetEncodedBodySize(uint64_t *aEncodedBodySize) = 0; |
73 | | |
74 | | /* [must_use] ACString getRequestHeader (in ACString aHeader); */ |
75 | | MOZ_MUST_USE NS_IMETHOD GetRequestHeader(const nsACString& aHeader, nsACString& _retval) = 0; |
76 | | |
77 | | /* [must_use] void setRequestHeader (in ACString aHeader, in ACString aValue, in boolean aMerge); */ |
78 | | MOZ_MUST_USE NS_IMETHOD SetRequestHeader(const nsACString& aHeader, const nsACString& aValue, bool aMerge) = 0; |
79 | | |
80 | | /* [must_use] void setEmptyRequestHeader (in ACString aHeader); */ |
81 | | MOZ_MUST_USE NS_IMETHOD SetEmptyRequestHeader(const nsACString& aHeader) = 0; |
82 | | |
83 | | /* [must_use] void visitRequestHeaders (in nsIHttpHeaderVisitor aVisitor); */ |
84 | | MOZ_MUST_USE NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; |
85 | | |
86 | | /* [must_use] void visitNonDefaultRequestHeaders (in nsIHttpHeaderVisitor aVisitor); */ |
87 | | MOZ_MUST_USE NS_IMETHOD VisitNonDefaultRequestHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; |
88 | | |
89 | | /* [must_use] attribute boolean allowPipelining; */ |
90 | | MOZ_MUST_USE NS_IMETHOD GetAllowPipelining(bool *aAllowPipelining) = 0; |
91 | | MOZ_MUST_USE NS_IMETHOD SetAllowPipelining(bool aAllowPipelining) = 0; |
92 | | |
93 | | /* [must_use] attribute boolean allowSTS; */ |
94 | | MOZ_MUST_USE NS_IMETHOD GetAllowSTS(bool *aAllowSTS) = 0; |
95 | | MOZ_MUST_USE NS_IMETHOD SetAllowSTS(bool aAllowSTS) = 0; |
96 | | |
97 | | /* [must_use] attribute unsigned long redirectionLimit; */ |
98 | | MOZ_MUST_USE NS_IMETHOD GetRedirectionLimit(uint32_t *aRedirectionLimit) = 0; |
99 | | MOZ_MUST_USE NS_IMETHOD SetRedirectionLimit(uint32_t aRedirectionLimit) = 0; |
100 | | |
101 | | /* [must_use] readonly attribute unsigned long responseStatus; */ |
102 | | MOZ_MUST_USE NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) = 0; |
103 | | |
104 | | /* [must_use] readonly attribute ACString responseStatusText; */ |
105 | | MOZ_MUST_USE NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) = 0; |
106 | | |
107 | | /* [must_use] readonly attribute boolean requestSucceeded; */ |
108 | | MOZ_MUST_USE NS_IMETHOD GetRequestSucceeded(bool *aRequestSucceeded) = 0; |
109 | | |
110 | | /* [must_use] attribute boolean isMainDocumentChannel; */ |
111 | | MOZ_MUST_USE NS_IMETHOD GetIsMainDocumentChannel(bool *aIsMainDocumentChannel) = 0; |
112 | | MOZ_MUST_USE NS_IMETHOD SetIsMainDocumentChannel(bool aIsMainDocumentChannel) = 0; |
113 | | |
114 | | /* [must_use] ACString getResponseHeader (in ACString header); */ |
115 | | MOZ_MUST_USE NS_IMETHOD GetResponseHeader(const nsACString& header, nsACString& _retval) = 0; |
116 | | |
117 | | /* [must_use] void setResponseHeader (in ACString header, in ACString value, in boolean merge); */ |
118 | | MOZ_MUST_USE NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) = 0; |
119 | | |
120 | | /* [must_use] void visitResponseHeaders (in nsIHttpHeaderVisitor aVisitor); */ |
121 | | MOZ_MUST_USE NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; |
122 | | |
123 | | /* [must_use] void getOriginalResponseHeader (in ACString aHeader, in nsIHttpHeaderVisitor aVisitor); */ |
124 | | MOZ_MUST_USE NS_IMETHOD GetOriginalResponseHeader(const nsACString& aHeader, nsIHttpHeaderVisitor *aVisitor) = 0; |
125 | | |
126 | | /* [must_use] void visitOriginalResponseHeaders (in nsIHttpHeaderVisitor aVisitor); */ |
127 | | MOZ_MUST_USE NS_IMETHOD VisitOriginalResponseHeaders(nsIHttpHeaderVisitor *aVisitor) = 0; |
128 | | |
129 | | /* [must_use] boolean isNoStoreResponse (); */ |
130 | | MOZ_MUST_USE NS_IMETHOD IsNoStoreResponse(bool *_retval) = 0; |
131 | | |
132 | | /* [must_use] boolean isNoCacheResponse (); */ |
133 | | MOZ_MUST_USE NS_IMETHOD IsNoCacheResponse(bool *_retval) = 0; |
134 | | |
135 | | /* [must_use] boolean isPrivateResponse (); */ |
136 | | MOZ_MUST_USE NS_IMETHOD IsPrivateResponse(bool *_retval) = 0; |
137 | | |
138 | | /* [must_use] void redirectTo (in nsIURI aTargetURI); */ |
139 | | MOZ_MUST_USE NS_IMETHOD RedirectTo(nsIURI *aTargetURI) = 0; |
140 | | |
141 | | /* [must_use] void upgradeToSecure (); */ |
142 | | MOZ_MUST_USE NS_IMETHOD UpgradeToSecure(void) = 0; |
143 | | |
144 | | /* [must_use,noscript] attribute uint64_t requestContextID; */ |
145 | | MOZ_MUST_USE NS_IMETHOD GetRequestContextID(uint64_t *aRequestContextID) = 0; |
146 | | MOZ_MUST_USE NS_IMETHOD SetRequestContextID(uint64_t aRequestContextID) = 0; |
147 | | |
148 | | /* [must_use] attribute uint64_t channelId; */ |
149 | | MOZ_MUST_USE NS_IMETHOD GetChannelId(uint64_t *aChannelId) = 0; |
150 | | MOZ_MUST_USE NS_IMETHOD SetChannelId(uint64_t aChannelId) = 0; |
151 | | |
152 | | /* [must_use] attribute uint64_t topLevelContentWindowId; */ |
153 | | MOZ_MUST_USE NS_IMETHOD GetTopLevelContentWindowId(uint64_t *aTopLevelContentWindowId) = 0; |
154 | | MOZ_MUST_USE NS_IMETHOD SetTopLevelContentWindowId(uint64_t aTopLevelContentWindowId) = 0; |
155 | | |
156 | | /* [infallible] readonly attribute boolean isTrackingResource; */ |
157 | | NS_IMETHOD GetIsTrackingResource(bool *aIsTrackingResource) = 0; |
158 | | inline bool GetIsTrackingResource() |
159 | 0 | { |
160 | 0 | bool result; |
161 | 0 | mozilla::DebugOnly<nsresult> rv = GetIsTrackingResource(&result); |
162 | 0 | MOZ_ASSERT(NS_SUCCEEDED(rv)); |
163 | 0 | return result; |
164 | 0 | } |
165 | | |
166 | | /* [infallible] readonly attribute boolean isThirdPartyTrackingResource; */ |
167 | | NS_IMETHOD GetIsThirdPartyTrackingResource(bool *aIsThirdPartyTrackingResource) = 0; |
168 | | inline bool GetIsThirdPartyTrackingResource() |
169 | 0 | { |
170 | 0 | bool result; |
171 | 0 | mozilla::DebugOnly<nsresult> rv = GetIsThirdPartyTrackingResource(&result); |
172 | 0 | MOZ_ASSERT(NS_SUCCEEDED(rv)); |
173 | 0 | return result; |
174 | 0 | } |
175 | | |
176 | | /* [noscript] void overrideTrackingFlagsForDocumentCookieAccessor (in nsIHttpChannel aDocumentChannel); */ |
177 | | NS_IMETHOD OverrideTrackingFlagsForDocumentCookieAccessor(nsIHttpChannel *aDocumentChannel) = 0; |
178 | | |
179 | | /* [must_use] attribute uint64_t topLevelOuterContentWindowId; */ |
180 | | MOZ_MUST_USE NS_IMETHOD GetTopLevelOuterContentWindowId(uint64_t *aTopLevelOuterContentWindowId) = 0; |
181 | | MOZ_MUST_USE NS_IMETHOD SetTopLevelOuterContentWindowId(uint64_t aTopLevelOuterContentWindowId) = 0; |
182 | | |
183 | | /* void logBlockedCORSRequest (in AString aMessage, in ACString aCategory); */ |
184 | | NS_IMETHOD LogBlockedCORSRequest(const nsAString& aMessage, const nsACString& aCategory) = 0; |
185 | | |
186 | | }; |
187 | | |
188 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIHttpChannel, NS_IHTTPCHANNEL_IID) |
189 | | |
190 | | /* Use this macro when declaring classes that implement this interface. */ |
191 | | #define NS_DECL_NSIHTTPCHANNEL \ |
192 | | MOZ_MUST_USE NS_IMETHOD GetRequestMethod(nsACString& aRequestMethod) override; \ |
193 | | MOZ_MUST_USE NS_IMETHOD SetRequestMethod(const nsACString& aRequestMethod) override; \ |
194 | | MOZ_MUST_USE NS_IMETHOD GetReferrer(nsIURI **aReferrer) override; \ |
195 | | MOZ_MUST_USE NS_IMETHOD SetReferrer(nsIURI *aReferrer) override; \ |
196 | | MOZ_MUST_USE NS_IMETHOD GetReferrerPolicy(uint32_t *aReferrerPolicy) override; \ |
197 | | MOZ_MUST_USE NS_IMETHOD SetReferrerWithPolicy(nsIURI *referrer, uint32_t referrerPolicy) override; \ |
198 | | MOZ_MUST_USE NS_IMETHOD GetProtocolVersion(nsACString& aProtocolVersion) override; \ |
199 | | MOZ_MUST_USE NS_IMETHOD GetTransferSize(uint64_t *aTransferSize) override; \ |
200 | | MOZ_MUST_USE NS_IMETHOD GetDecodedBodySize(uint64_t *aDecodedBodySize) override; \ |
201 | | MOZ_MUST_USE NS_IMETHOD GetEncodedBodySize(uint64_t *aEncodedBodySize) override; \ |
202 | | MOZ_MUST_USE NS_IMETHOD GetRequestHeader(const nsACString& aHeader, nsACString& _retval) override; \ |
203 | | MOZ_MUST_USE NS_IMETHOD SetRequestHeader(const nsACString& aHeader, const nsACString& aValue, bool aMerge) override; \ |
204 | | MOZ_MUST_USE NS_IMETHOD SetEmptyRequestHeader(const nsACString& aHeader) override; \ |
205 | | MOZ_MUST_USE NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) override; \ |
206 | | MOZ_MUST_USE NS_IMETHOD VisitNonDefaultRequestHeaders(nsIHttpHeaderVisitor *aVisitor) override; \ |
207 | | MOZ_MUST_USE NS_IMETHOD GetAllowPipelining(bool *aAllowPipelining) override; \ |
208 | | MOZ_MUST_USE NS_IMETHOD SetAllowPipelining(bool aAllowPipelining) override; \ |
209 | | MOZ_MUST_USE NS_IMETHOD GetAllowSTS(bool *aAllowSTS) override; \ |
210 | | MOZ_MUST_USE NS_IMETHOD SetAllowSTS(bool aAllowSTS) override; \ |
211 | | MOZ_MUST_USE NS_IMETHOD GetRedirectionLimit(uint32_t *aRedirectionLimit) override; \ |
212 | | MOZ_MUST_USE NS_IMETHOD SetRedirectionLimit(uint32_t aRedirectionLimit) override; \ |
213 | | MOZ_MUST_USE NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) override; \ |
214 | | MOZ_MUST_USE NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) override; \ |
215 | | MOZ_MUST_USE NS_IMETHOD GetRequestSucceeded(bool *aRequestSucceeded) override; \ |
216 | | MOZ_MUST_USE NS_IMETHOD GetIsMainDocumentChannel(bool *aIsMainDocumentChannel) override; \ |
217 | | MOZ_MUST_USE NS_IMETHOD SetIsMainDocumentChannel(bool aIsMainDocumentChannel) override; \ |
218 | | MOZ_MUST_USE NS_IMETHOD GetResponseHeader(const nsACString& header, nsACString& _retval) override; \ |
219 | | MOZ_MUST_USE NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) override; \ |
220 | | MOZ_MUST_USE NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) override; \ |
221 | | MOZ_MUST_USE NS_IMETHOD GetOriginalResponseHeader(const nsACString& aHeader, nsIHttpHeaderVisitor *aVisitor) override; \ |
222 | | MOZ_MUST_USE NS_IMETHOD VisitOriginalResponseHeaders(nsIHttpHeaderVisitor *aVisitor) override; \ |
223 | | MOZ_MUST_USE NS_IMETHOD IsNoStoreResponse(bool *_retval) override; \ |
224 | | MOZ_MUST_USE NS_IMETHOD IsNoCacheResponse(bool *_retval) override; \ |
225 | | MOZ_MUST_USE NS_IMETHOD IsPrivateResponse(bool *_retval) override; \ |
226 | | MOZ_MUST_USE NS_IMETHOD RedirectTo(nsIURI *aTargetURI) override; \ |
227 | | MOZ_MUST_USE NS_IMETHOD UpgradeToSecure(void) override; \ |
228 | | MOZ_MUST_USE NS_IMETHOD GetRequestContextID(uint64_t *aRequestContextID) override; \ |
229 | | MOZ_MUST_USE NS_IMETHOD SetRequestContextID(uint64_t aRequestContextID) override; \ |
230 | | MOZ_MUST_USE NS_IMETHOD GetChannelId(uint64_t *aChannelId) override; \ |
231 | | MOZ_MUST_USE NS_IMETHOD SetChannelId(uint64_t aChannelId) override; \ |
232 | | MOZ_MUST_USE NS_IMETHOD GetTopLevelContentWindowId(uint64_t *aTopLevelContentWindowId) override; \ |
233 | | MOZ_MUST_USE NS_IMETHOD SetTopLevelContentWindowId(uint64_t aTopLevelContentWindowId) override; \ |
234 | | using nsIHttpChannel::GetIsTrackingResource; \ |
235 | | NS_IMETHOD GetIsTrackingResource(bool *aIsTrackingResource) override; \ |
236 | | using nsIHttpChannel::GetIsThirdPartyTrackingResource; \ |
237 | | NS_IMETHOD GetIsThirdPartyTrackingResource(bool *aIsThirdPartyTrackingResource) override; \ |
238 | | NS_IMETHOD OverrideTrackingFlagsForDocumentCookieAccessor(nsIHttpChannel *aDocumentChannel) override; \ |
239 | | MOZ_MUST_USE NS_IMETHOD GetTopLevelOuterContentWindowId(uint64_t *aTopLevelOuterContentWindowId) override; \ |
240 | | MOZ_MUST_USE NS_IMETHOD SetTopLevelOuterContentWindowId(uint64_t aTopLevelOuterContentWindowId) override; \ |
241 | | NS_IMETHOD LogBlockedCORSRequest(const nsAString& aMessage, const nsACString& aCategory) override; |
242 | | |
243 | | /* Use this macro when declaring the members of this interface when the |
244 | | class doesn't implement the interface. This is useful for forwarding. */ |
245 | | #define NS_DECL_NON_VIRTUAL_NSIHTTPCHANNEL \ |
246 | | MOZ_MUST_USE nsresult GetRequestMethod(nsACString& aRequestMethod); \ |
247 | | MOZ_MUST_USE nsresult SetRequestMethod(const nsACString& aRequestMethod); \ |
248 | | MOZ_MUST_USE nsresult GetReferrer(nsIURI **aReferrer); \ |
249 | | MOZ_MUST_USE nsresult SetReferrer(nsIURI *aReferrer); \ |
250 | | MOZ_MUST_USE nsresult GetReferrerPolicy(uint32_t *aReferrerPolicy); \ |
251 | | MOZ_MUST_USE nsresult SetReferrerWithPolicy(nsIURI *referrer, uint32_t referrerPolicy); \ |
252 | | MOZ_MUST_USE nsresult GetProtocolVersion(nsACString& aProtocolVersion); \ |
253 | | MOZ_MUST_USE nsresult GetTransferSize(uint64_t *aTransferSize); \ |
254 | | MOZ_MUST_USE nsresult GetDecodedBodySize(uint64_t *aDecodedBodySize); \ |
255 | | MOZ_MUST_USE nsresult GetEncodedBodySize(uint64_t *aEncodedBodySize); \ |
256 | | MOZ_MUST_USE nsresult GetRequestHeader(const nsACString& aHeader, nsACString& _retval); \ |
257 | | MOZ_MUST_USE nsresult SetRequestHeader(const nsACString& aHeader, const nsACString& aValue, bool aMerge); \ |
258 | | MOZ_MUST_USE nsresult SetEmptyRequestHeader(const nsACString& aHeader); \ |
259 | | MOZ_MUST_USE nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor); \ |
260 | | MOZ_MUST_USE nsresult VisitNonDefaultRequestHeaders(nsIHttpHeaderVisitor *aVisitor); \ |
261 | | MOZ_MUST_USE nsresult GetAllowPipelining(bool *aAllowPipelining); \ |
262 | | MOZ_MUST_USE nsresult SetAllowPipelining(bool aAllowPipelining); \ |
263 | | MOZ_MUST_USE nsresult GetAllowSTS(bool *aAllowSTS); \ |
264 | | MOZ_MUST_USE nsresult SetAllowSTS(bool aAllowSTS); \ |
265 | | MOZ_MUST_USE nsresult GetRedirectionLimit(uint32_t *aRedirectionLimit); \ |
266 | | MOZ_MUST_USE nsresult SetRedirectionLimit(uint32_t aRedirectionLimit); \ |
267 | | MOZ_MUST_USE nsresult GetResponseStatus(uint32_t *aResponseStatus); \ |
268 | | MOZ_MUST_USE nsresult GetResponseStatusText(nsACString& aResponseStatusText); \ |
269 | | MOZ_MUST_USE nsresult GetRequestSucceeded(bool *aRequestSucceeded); \ |
270 | | MOZ_MUST_USE nsresult GetIsMainDocumentChannel(bool *aIsMainDocumentChannel); \ |
271 | | MOZ_MUST_USE nsresult SetIsMainDocumentChannel(bool aIsMainDocumentChannel); \ |
272 | | MOZ_MUST_USE nsresult GetResponseHeader(const nsACString& header, nsACString& _retval); \ |
273 | | MOZ_MUST_USE nsresult SetResponseHeader(const nsACString& header, const nsACString& value, bool merge); \ |
274 | | MOZ_MUST_USE nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor); \ |
275 | | MOZ_MUST_USE nsresult GetOriginalResponseHeader(const nsACString& aHeader, nsIHttpHeaderVisitor *aVisitor); \ |
276 | | MOZ_MUST_USE nsresult VisitOriginalResponseHeaders(nsIHttpHeaderVisitor *aVisitor); \ |
277 | | MOZ_MUST_USE nsresult IsNoStoreResponse(bool *_retval); \ |
278 | | MOZ_MUST_USE nsresult IsNoCacheResponse(bool *_retval); \ |
279 | | MOZ_MUST_USE nsresult IsPrivateResponse(bool *_retval); \ |
280 | | MOZ_MUST_USE nsresult RedirectTo(nsIURI *aTargetURI); \ |
281 | | MOZ_MUST_USE nsresult UpgradeToSecure(void); \ |
282 | | MOZ_MUST_USE nsresult GetRequestContextID(uint64_t *aRequestContextID); \ |
283 | | MOZ_MUST_USE nsresult SetRequestContextID(uint64_t aRequestContextID); \ |
284 | | MOZ_MUST_USE nsresult GetChannelId(uint64_t *aChannelId); \ |
285 | | MOZ_MUST_USE nsresult SetChannelId(uint64_t aChannelId); \ |
286 | | MOZ_MUST_USE nsresult GetTopLevelContentWindowId(uint64_t *aTopLevelContentWindowId); \ |
287 | | MOZ_MUST_USE nsresult SetTopLevelContentWindowId(uint64_t aTopLevelContentWindowId); \ |
288 | | using nsIHttpChannel::GetIsTrackingResource; \ |
289 | | nsresult GetIsTrackingResource(bool *aIsTrackingResource); \ |
290 | | using nsIHttpChannel::GetIsThirdPartyTrackingResource; \ |
291 | | nsresult GetIsThirdPartyTrackingResource(bool *aIsThirdPartyTrackingResource); \ |
292 | | nsresult OverrideTrackingFlagsForDocumentCookieAccessor(nsIHttpChannel *aDocumentChannel); \ |
293 | | MOZ_MUST_USE nsresult GetTopLevelOuterContentWindowId(uint64_t *aTopLevelOuterContentWindowId); \ |
294 | | MOZ_MUST_USE nsresult SetTopLevelOuterContentWindowId(uint64_t aTopLevelOuterContentWindowId); \ |
295 | | nsresult LogBlockedCORSRequest(const nsAString& aMessage, const nsACString& aCategory); |
296 | | |
297 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
298 | | #define NS_FORWARD_NSIHTTPCHANNEL(_to) \ |
299 | 0 | MOZ_MUST_USE NS_IMETHOD GetRequestMethod(nsACString& aRequestMethod) override { return _to GetRequestMethod(aRequestMethod); } \ |
300 | 0 | MOZ_MUST_USE NS_IMETHOD SetRequestMethod(const nsACString& aRequestMethod) override { return _to SetRequestMethod(aRequestMethod); } \ |
301 | 0 | MOZ_MUST_USE NS_IMETHOD GetReferrer(nsIURI **aReferrer) override { return _to GetReferrer(aReferrer); } \ |
302 | 0 | MOZ_MUST_USE NS_IMETHOD SetReferrer(nsIURI *aReferrer) override { return _to SetReferrer(aReferrer); } \ |
303 | 0 | MOZ_MUST_USE NS_IMETHOD GetReferrerPolicy(uint32_t *aReferrerPolicy) override { return _to GetReferrerPolicy(aReferrerPolicy); } \ |
304 | 0 | MOZ_MUST_USE NS_IMETHOD SetReferrerWithPolicy(nsIURI *referrer, uint32_t referrerPolicy) override { return _to SetReferrerWithPolicy(referrer, referrerPolicy); } \ |
305 | 0 | MOZ_MUST_USE NS_IMETHOD GetProtocolVersion(nsACString& aProtocolVersion) override { return _to GetProtocolVersion(aProtocolVersion); } \ |
306 | 0 | MOZ_MUST_USE NS_IMETHOD GetTransferSize(uint64_t *aTransferSize) override { return _to GetTransferSize(aTransferSize); } \ |
307 | 0 | MOZ_MUST_USE NS_IMETHOD GetDecodedBodySize(uint64_t *aDecodedBodySize) override { return _to GetDecodedBodySize(aDecodedBodySize); } \ |
308 | 0 | MOZ_MUST_USE NS_IMETHOD GetEncodedBodySize(uint64_t *aEncodedBodySize) override { return _to GetEncodedBodySize(aEncodedBodySize); } \ |
309 | 0 | MOZ_MUST_USE NS_IMETHOD GetRequestHeader(const nsACString& aHeader, nsACString& _retval) override { return _to GetRequestHeader(aHeader, _retval); } \ |
310 | 0 | MOZ_MUST_USE NS_IMETHOD SetRequestHeader(const nsACString& aHeader, const nsACString& aValue, bool aMerge) override { return _to SetRequestHeader(aHeader, aValue, aMerge); } \ |
311 | 0 | MOZ_MUST_USE NS_IMETHOD SetEmptyRequestHeader(const nsACString& aHeader) override { return _to SetEmptyRequestHeader(aHeader); } \ |
312 | 0 | MOZ_MUST_USE NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) override { return _to VisitRequestHeaders(aVisitor); } \ |
313 | 0 | MOZ_MUST_USE NS_IMETHOD VisitNonDefaultRequestHeaders(nsIHttpHeaderVisitor *aVisitor) override { return _to VisitNonDefaultRequestHeaders(aVisitor); } \ |
314 | 0 | MOZ_MUST_USE NS_IMETHOD GetAllowPipelining(bool *aAllowPipelining) override { return _to GetAllowPipelining(aAllowPipelining); } \ |
315 | 0 | MOZ_MUST_USE NS_IMETHOD SetAllowPipelining(bool aAllowPipelining) override { return _to SetAllowPipelining(aAllowPipelining); } \ |
316 | 0 | MOZ_MUST_USE NS_IMETHOD GetAllowSTS(bool *aAllowSTS) override { return _to GetAllowSTS(aAllowSTS); } \ |
317 | 0 | MOZ_MUST_USE NS_IMETHOD SetAllowSTS(bool aAllowSTS) override { return _to SetAllowSTS(aAllowSTS); } \ |
318 | 0 | MOZ_MUST_USE NS_IMETHOD GetRedirectionLimit(uint32_t *aRedirectionLimit) override { return _to GetRedirectionLimit(aRedirectionLimit); } \ |
319 | 0 | MOZ_MUST_USE NS_IMETHOD SetRedirectionLimit(uint32_t aRedirectionLimit) override { return _to SetRedirectionLimit(aRedirectionLimit); } \ |
320 | 0 | MOZ_MUST_USE NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) override { return _to GetResponseStatus(aResponseStatus); } \ |
321 | 0 | MOZ_MUST_USE NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) override { return _to GetResponseStatusText(aResponseStatusText); } \ |
322 | 0 | MOZ_MUST_USE NS_IMETHOD GetRequestSucceeded(bool *aRequestSucceeded) override { return _to GetRequestSucceeded(aRequestSucceeded); } \ |
323 | 0 | MOZ_MUST_USE NS_IMETHOD GetIsMainDocumentChannel(bool *aIsMainDocumentChannel) override { return _to GetIsMainDocumentChannel(aIsMainDocumentChannel); } \ |
324 | 0 | MOZ_MUST_USE NS_IMETHOD SetIsMainDocumentChannel(bool aIsMainDocumentChannel) override { return _to SetIsMainDocumentChannel(aIsMainDocumentChannel); } \ |
325 | 0 | MOZ_MUST_USE NS_IMETHOD GetResponseHeader(const nsACString& header, nsACString& _retval) override { return _to GetResponseHeader(header, _retval); } \ |
326 | 0 | MOZ_MUST_USE NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) override { return _to SetResponseHeader(header, value, merge); } \ |
327 | 0 | MOZ_MUST_USE NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) override { return _to VisitResponseHeaders(aVisitor); } \ |
328 | 0 | MOZ_MUST_USE NS_IMETHOD GetOriginalResponseHeader(const nsACString& aHeader, nsIHttpHeaderVisitor *aVisitor) override { return _to GetOriginalResponseHeader(aHeader, aVisitor); } \ |
329 | 0 | MOZ_MUST_USE NS_IMETHOD VisitOriginalResponseHeaders(nsIHttpHeaderVisitor *aVisitor) override { return _to VisitOriginalResponseHeaders(aVisitor); } \ |
330 | 0 | MOZ_MUST_USE NS_IMETHOD IsNoStoreResponse(bool *_retval) override { return _to IsNoStoreResponse(_retval); } \ |
331 | 0 | MOZ_MUST_USE NS_IMETHOD IsNoCacheResponse(bool *_retval) override { return _to IsNoCacheResponse(_retval); } \ |
332 | 0 | MOZ_MUST_USE NS_IMETHOD IsPrivateResponse(bool *_retval) override { return _to IsPrivateResponse(_retval); } \ |
333 | 0 | MOZ_MUST_USE NS_IMETHOD RedirectTo(nsIURI *aTargetURI) override { return _to RedirectTo(aTargetURI); } \ |
334 | 0 | MOZ_MUST_USE NS_IMETHOD UpgradeToSecure(void) override { return _to UpgradeToSecure(); } \ |
335 | 0 | MOZ_MUST_USE NS_IMETHOD GetRequestContextID(uint64_t *aRequestContextID) override { return _to GetRequestContextID(aRequestContextID); } \ |
336 | 0 | MOZ_MUST_USE NS_IMETHOD SetRequestContextID(uint64_t aRequestContextID) override { return _to SetRequestContextID(aRequestContextID); } \ |
337 | 0 | MOZ_MUST_USE NS_IMETHOD GetChannelId(uint64_t *aChannelId) override { return _to GetChannelId(aChannelId); } \ |
338 | 0 | MOZ_MUST_USE NS_IMETHOD SetChannelId(uint64_t aChannelId) override { return _to SetChannelId(aChannelId); } \ |
339 | 0 | MOZ_MUST_USE NS_IMETHOD GetTopLevelContentWindowId(uint64_t *aTopLevelContentWindowId) override { return _to GetTopLevelContentWindowId(aTopLevelContentWindowId); } \ |
340 | 0 | MOZ_MUST_USE NS_IMETHOD SetTopLevelContentWindowId(uint64_t aTopLevelContentWindowId) override { return _to SetTopLevelContentWindowId(aTopLevelContentWindowId); } \ |
341 | | using nsIHttpChannel::GetIsTrackingResource; \ |
342 | 0 | NS_IMETHOD GetIsTrackingResource(bool *aIsTrackingResource) override { return _to GetIsTrackingResource(aIsTrackingResource); } \ |
343 | | using nsIHttpChannel::GetIsThirdPartyTrackingResource; \ |
344 | 0 | NS_IMETHOD GetIsThirdPartyTrackingResource(bool *aIsThirdPartyTrackingResource) override { return _to GetIsThirdPartyTrackingResource(aIsThirdPartyTrackingResource); } \ |
345 | 0 | NS_IMETHOD OverrideTrackingFlagsForDocumentCookieAccessor(nsIHttpChannel *aDocumentChannel) override { return _to OverrideTrackingFlagsForDocumentCookieAccessor(aDocumentChannel); } \ |
346 | 0 | MOZ_MUST_USE NS_IMETHOD GetTopLevelOuterContentWindowId(uint64_t *aTopLevelOuterContentWindowId) override { return _to GetTopLevelOuterContentWindowId(aTopLevelOuterContentWindowId); } \ |
347 | 0 | MOZ_MUST_USE NS_IMETHOD SetTopLevelOuterContentWindowId(uint64_t aTopLevelOuterContentWindowId) override { return _to SetTopLevelOuterContentWindowId(aTopLevelOuterContentWindowId); } \ |
348 | 0 | NS_IMETHOD LogBlockedCORSRequest(const nsAString& aMessage, const nsACString& aCategory) override { return _to LogBlockedCORSRequest(aMessage, aCategory); } |
349 | | |
350 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
351 | | #define NS_FORWARD_SAFE_NSIHTTPCHANNEL(_to) \ |
352 | | MOZ_MUST_USE NS_IMETHOD GetRequestMethod(nsACString& aRequestMethod) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestMethod(aRequestMethod); } \ |
353 | | MOZ_MUST_USE NS_IMETHOD SetRequestMethod(const nsACString& aRequestMethod) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestMethod(aRequestMethod); } \ |
354 | | MOZ_MUST_USE NS_IMETHOD GetReferrer(nsIURI **aReferrer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferrer(aReferrer); } \ |
355 | | MOZ_MUST_USE NS_IMETHOD SetReferrer(nsIURI *aReferrer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReferrer(aReferrer); } \ |
356 | | MOZ_MUST_USE NS_IMETHOD GetReferrerPolicy(uint32_t *aReferrerPolicy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferrerPolicy(aReferrerPolicy); } \ |
357 | | MOZ_MUST_USE NS_IMETHOD SetReferrerWithPolicy(nsIURI *referrer, uint32_t referrerPolicy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReferrerWithPolicy(referrer, referrerPolicy); } \ |
358 | | MOZ_MUST_USE NS_IMETHOD GetProtocolVersion(nsACString& aProtocolVersion) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocolVersion(aProtocolVersion); } \ |
359 | | MOZ_MUST_USE NS_IMETHOD GetTransferSize(uint64_t *aTransferSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransferSize(aTransferSize); } \ |
360 | | MOZ_MUST_USE NS_IMETHOD GetDecodedBodySize(uint64_t *aDecodedBodySize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDecodedBodySize(aDecodedBodySize); } \ |
361 | | MOZ_MUST_USE NS_IMETHOD GetEncodedBodySize(uint64_t *aEncodedBodySize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEncodedBodySize(aEncodedBodySize); } \ |
362 | | MOZ_MUST_USE NS_IMETHOD GetRequestHeader(const nsACString& aHeader, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestHeader(aHeader, _retval); } \ |
363 | | MOZ_MUST_USE NS_IMETHOD SetRequestHeader(const nsACString& aHeader, const nsACString& aValue, bool aMerge) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestHeader(aHeader, aValue, aMerge); } \ |
364 | | MOZ_MUST_USE NS_IMETHOD SetEmptyRequestHeader(const nsACString& aHeader) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEmptyRequestHeader(aHeader); } \ |
365 | | MOZ_MUST_USE NS_IMETHOD VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitRequestHeaders(aVisitor); } \ |
366 | | MOZ_MUST_USE NS_IMETHOD VisitNonDefaultRequestHeaders(nsIHttpHeaderVisitor *aVisitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitNonDefaultRequestHeaders(aVisitor); } \ |
367 | | MOZ_MUST_USE NS_IMETHOD GetAllowPipelining(bool *aAllowPipelining) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowPipelining(aAllowPipelining); } \ |
368 | | MOZ_MUST_USE NS_IMETHOD SetAllowPipelining(bool aAllowPipelining) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowPipelining(aAllowPipelining); } \ |
369 | | MOZ_MUST_USE NS_IMETHOD GetAllowSTS(bool *aAllowSTS) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllowSTS(aAllowSTS); } \ |
370 | | MOZ_MUST_USE NS_IMETHOD SetAllowSTS(bool aAllowSTS) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAllowSTS(aAllowSTS); } \ |
371 | | MOZ_MUST_USE NS_IMETHOD GetRedirectionLimit(uint32_t *aRedirectionLimit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRedirectionLimit(aRedirectionLimit); } \ |
372 | | MOZ_MUST_USE NS_IMETHOD SetRedirectionLimit(uint32_t aRedirectionLimit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRedirectionLimit(aRedirectionLimit); } \ |
373 | | MOZ_MUST_USE NS_IMETHOD GetResponseStatus(uint32_t *aResponseStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatus(aResponseStatus); } \ |
374 | | MOZ_MUST_USE NS_IMETHOD GetResponseStatusText(nsACString& aResponseStatusText) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseStatusText(aResponseStatusText); } \ |
375 | | MOZ_MUST_USE NS_IMETHOD GetRequestSucceeded(bool *aRequestSucceeded) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestSucceeded(aRequestSucceeded); } \ |
376 | | MOZ_MUST_USE NS_IMETHOD GetIsMainDocumentChannel(bool *aIsMainDocumentChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMainDocumentChannel(aIsMainDocumentChannel); } \ |
377 | | MOZ_MUST_USE NS_IMETHOD SetIsMainDocumentChannel(bool aIsMainDocumentChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsMainDocumentChannel(aIsMainDocumentChannel); } \ |
378 | | MOZ_MUST_USE NS_IMETHOD GetResponseHeader(const nsACString& header, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseHeader(header, _retval); } \ |
379 | | MOZ_MUST_USE NS_IMETHOD SetResponseHeader(const nsACString& header, const nsACString& value, bool merge) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetResponseHeader(header, value, merge); } \ |
380 | | MOZ_MUST_USE NS_IMETHOD VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitResponseHeaders(aVisitor); } \ |
381 | | MOZ_MUST_USE NS_IMETHOD GetOriginalResponseHeader(const nsACString& aHeader, nsIHttpHeaderVisitor *aVisitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOriginalResponseHeader(aHeader, aVisitor); } \ |
382 | | MOZ_MUST_USE NS_IMETHOD VisitOriginalResponseHeaders(nsIHttpHeaderVisitor *aVisitor) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VisitOriginalResponseHeaders(aVisitor); } \ |
383 | | MOZ_MUST_USE NS_IMETHOD IsNoStoreResponse(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNoStoreResponse(_retval); } \ |
384 | | MOZ_MUST_USE NS_IMETHOD IsNoCacheResponse(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNoCacheResponse(_retval); } \ |
385 | | MOZ_MUST_USE NS_IMETHOD IsPrivateResponse(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsPrivateResponse(_retval); } \ |
386 | | MOZ_MUST_USE NS_IMETHOD RedirectTo(nsIURI *aTargetURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RedirectTo(aTargetURI); } \ |
387 | | MOZ_MUST_USE NS_IMETHOD UpgradeToSecure(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpgradeToSecure(); } \ |
388 | | MOZ_MUST_USE NS_IMETHOD GetRequestContextID(uint64_t *aRequestContextID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestContextID(aRequestContextID); } \ |
389 | | MOZ_MUST_USE NS_IMETHOD SetRequestContextID(uint64_t aRequestContextID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRequestContextID(aRequestContextID); } \ |
390 | | MOZ_MUST_USE NS_IMETHOD GetChannelId(uint64_t *aChannelId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChannelId(aChannelId); } \ |
391 | | MOZ_MUST_USE NS_IMETHOD SetChannelId(uint64_t aChannelId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChannelId(aChannelId); } \ |
392 | | MOZ_MUST_USE NS_IMETHOD GetTopLevelContentWindowId(uint64_t *aTopLevelContentWindowId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTopLevelContentWindowId(aTopLevelContentWindowId); } \ |
393 | | MOZ_MUST_USE NS_IMETHOD SetTopLevelContentWindowId(uint64_t aTopLevelContentWindowId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTopLevelContentWindowId(aTopLevelContentWindowId); } \ |
394 | | NS_IMETHOD GetIsTrackingResource(bool *aIsTrackingResource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsTrackingResource(aIsTrackingResource); } \ |
395 | | NS_IMETHOD GetIsThirdPartyTrackingResource(bool *aIsThirdPartyTrackingResource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsThirdPartyTrackingResource(aIsThirdPartyTrackingResource); } \ |
396 | | NS_IMETHOD OverrideTrackingFlagsForDocumentCookieAccessor(nsIHttpChannel *aDocumentChannel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OverrideTrackingFlagsForDocumentCookieAccessor(aDocumentChannel); } \ |
397 | | MOZ_MUST_USE NS_IMETHOD GetTopLevelOuterContentWindowId(uint64_t *aTopLevelOuterContentWindowId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTopLevelOuterContentWindowId(aTopLevelOuterContentWindowId); } \ |
398 | | MOZ_MUST_USE NS_IMETHOD SetTopLevelOuterContentWindowId(uint64_t aTopLevelOuterContentWindowId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTopLevelOuterContentWindowId(aTopLevelOuterContentWindowId); } \ |
399 | | NS_IMETHOD LogBlockedCORSRequest(const nsAString& aMessage, const nsACString& aCategory) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LogBlockedCORSRequest(aMessage, aCategory); } |
400 | | |
401 | | |
402 | | #endif /* __gen_nsIHttpChannel_h__ */ |