/work/obj-fuzz/ipc/ipdl/PBackgroundFileRequest.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // Automatically generated by ipdlc. |
3 | | // Edit at your own risk |
4 | | // |
5 | | |
6 | | |
7 | | #include "mozilla/dom/PBackgroundFileHandleParent.h" |
8 | | #include "mozilla/dom/PBackgroundFileHandleChild.h" |
9 | | #include "mozilla/ipc/PPendingIPCBlobParent.h" |
10 | | #include "mozilla/ipc/PPendingIPCBlobChild.h" |
11 | | #include "mozilla/dom/PBackgroundFileRequest.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | namespace PBackgroundFileRequest { |
16 | | |
17 | | nsresult |
18 | | CreateEndpoints( |
19 | | base::ProcessId aParentDestPid, |
20 | | base::ProcessId aChildDestPid, |
21 | | mozilla::ipc::Endpoint<mozilla::dom::PBackgroundFileRequestParent>* aParent, |
22 | | mozilla::ipc::Endpoint<mozilla::dom::PBackgroundFileRequestChild>* aChild) |
23 | 0 | { |
24 | 0 | return mozilla::ipc::CreateEndpoints(mozilla::ipc::PrivateIPDLInterface(), aParentDestPid, aChildDestPid, aParent, aChild); |
25 | 0 | } |
26 | | IPC::Message* |
27 | | Msg___delete__(int32_t routingId) |
28 | 0 | { |
29 | 0 | return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
30 | 0 | } |
31 | | IPC::Message* |
32 | | Reply___delete__(int32_t routingId) |
33 | 0 | { |
34 | 0 | return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::REPLY)); |
35 | 0 | } |
36 | | IPC::Message* |
37 | | Msg_Progress(int32_t routingId) |
38 | 0 | { |
39 | 0 | return IPC::Message::IPDLMessage(routingId, Msg_Progress__ID, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_INTERRUPT, IPC::Message::NOT_REPLY)); |
40 | 0 | } |
41 | | |
42 | | } // namespace PBackgroundFileRequest |
43 | | } // namespace dom |
44 | | } // namespace mozilla |
45 | | |
46 | | //----------------------------------------------------------------------------- |
47 | | // Method definitions for the IPDL type |union FileRequestSize| |
48 | | // |
49 | | namespace mozilla { |
50 | | namespace dom { |
51 | | auto FileRequestSize::MaybeDestroy(Type aNewType) -> bool |
52 | 0 | { |
53 | 0 | if ((mType) == (T__None)) { |
54 | 0 | return true; |
55 | 0 | } |
56 | 0 | if ((mType) == (aNewType)) { |
57 | 0 | return false; |
58 | 0 | } |
59 | 0 | switch (mType) { |
60 | 0 | case Tvoid_t: |
61 | 0 | { |
62 | 0 | (ptr_void_t())->~void_t__tdef(); |
63 | 0 | break; |
64 | 0 | } |
65 | 0 | case Tuint64_t: |
66 | 0 | { |
67 | 0 | (ptr_uint64_t())->~uint64_t__tdef(); |
68 | 0 | break; |
69 | 0 | } |
70 | 0 | default: |
71 | 0 | { |
72 | 0 | mozilla::ipc::LogicError("not reached"); |
73 | 0 | break; |
74 | 0 | } |
75 | 0 | } |
76 | 0 | return true; |
77 | 0 | } |
78 | | |
79 | | MOZ_IMPLICIT FileRequestSize::FileRequestSize(const void_t& aOther) |
80 | 0 | { |
81 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther); |
82 | 0 | mType = Tvoid_t; |
83 | 0 | } |
84 | | |
85 | | MOZ_IMPLICIT FileRequestSize::FileRequestSize(void_t&& aOther) |
86 | 0 | { |
87 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther)); |
88 | 0 | mType = Tvoid_t; |
89 | 0 | } |
90 | | |
91 | | MOZ_IMPLICIT FileRequestSize::FileRequestSize(const uint64_t& aOther) |
92 | 0 | { |
93 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t(aOther); |
94 | 0 | mType = Tuint64_t; |
95 | 0 | } |
96 | | |
97 | | MOZ_IMPLICIT FileRequestSize::FileRequestSize(uint64_t&& aOther) |
98 | 0 | { |
99 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t(std::move(aOther)); |
100 | 0 | mType = Tuint64_t; |
101 | 0 | } |
102 | | |
103 | | MOZ_IMPLICIT FileRequestSize::FileRequestSize(const FileRequestSize& aOther) |
104 | 0 | { |
105 | 0 | (aOther).AssertSanity(); |
106 | 0 | switch ((aOther).type()) { |
107 | 0 | case Tvoid_t: |
108 | 0 | { |
109 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t()); |
110 | 0 | break; |
111 | 0 | } |
112 | 0 | case Tuint64_t: |
113 | 0 | { |
114 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t((aOther).get_uint64_t()); |
115 | 0 | break; |
116 | 0 | } |
117 | 0 | case T__None: |
118 | 0 | { |
119 | 0 | break; |
120 | 0 | } |
121 | 0 | default: |
122 | 0 | { |
123 | 0 | mozilla::ipc::LogicError("unreached"); |
124 | 0 | return; |
125 | 0 | } |
126 | 0 | } |
127 | 0 | mType = (aOther).type(); |
128 | 0 | } |
129 | | |
130 | | MOZ_IMPLICIT FileRequestSize::FileRequestSize(FileRequestSize&& aOther) |
131 | 0 | { |
132 | 0 | (aOther).AssertSanity(); |
133 | 0 | Type t = (aOther).type(); |
134 | 0 | switch (t) { |
135 | 0 | case Tvoid_t: |
136 | 0 | { |
137 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t())); |
138 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
139 | 0 | break; |
140 | 0 | } |
141 | 0 | case Tuint64_t: |
142 | 0 | { |
143 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t(std::move((aOther).get_uint64_t())); |
144 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
145 | 0 | break; |
146 | 0 | } |
147 | 0 | case T__None: |
148 | 0 | { |
149 | 0 | break; |
150 | 0 | } |
151 | 0 | default: |
152 | 0 | { |
153 | 0 | mozilla::ipc::LogicError("unreached"); |
154 | 0 | return; |
155 | 0 | } |
156 | 0 | } |
157 | 0 | (aOther).mType = T__None; |
158 | 0 | mType = t; |
159 | 0 | } |
160 | | |
161 | | FileRequestSize::~FileRequestSize() |
162 | 0 | { |
163 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
164 | 0 | } |
165 | | |
166 | | auto FileRequestSize::operator=(const void_t& aRhs) -> FileRequestSize& |
167 | 0 | { |
168 | 0 | if (MaybeDestroy(Tvoid_t)) { |
169 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
170 | 0 | } |
171 | 0 | (*(ptr_void_t())) = aRhs; |
172 | 0 | mType = Tvoid_t; |
173 | 0 | return (*(this)); |
174 | 0 | } |
175 | | |
176 | | auto FileRequestSize::operator=(void_t&& aRhs) -> FileRequestSize& |
177 | 0 | { |
178 | 0 | if (MaybeDestroy(Tvoid_t)) { |
179 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
180 | 0 | } |
181 | 0 | (*(ptr_void_t())) = std::move(aRhs); |
182 | 0 | mType = Tvoid_t; |
183 | 0 | return (*(this)); |
184 | 0 | } |
185 | | |
186 | | auto FileRequestSize::operator=(const uint64_t& aRhs) -> FileRequestSize& |
187 | 0 | { |
188 | 0 | if (MaybeDestroy(Tuint64_t)) { |
189 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t; |
190 | 0 | } |
191 | 0 | (*(ptr_uint64_t())) = aRhs; |
192 | 0 | mType = Tuint64_t; |
193 | 0 | return (*(this)); |
194 | 0 | } |
195 | | |
196 | | auto FileRequestSize::operator=(uint64_t&& aRhs) -> FileRequestSize& |
197 | 0 | { |
198 | 0 | if (MaybeDestroy(Tuint64_t)) { |
199 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t; |
200 | 0 | } |
201 | 0 | (*(ptr_uint64_t())) = std::move(aRhs); |
202 | 0 | mType = Tuint64_t; |
203 | 0 | return (*(this)); |
204 | 0 | } |
205 | | |
206 | | auto FileRequestSize::operator=(const FileRequestSize& aRhs) -> FileRequestSize& |
207 | 0 | { |
208 | 0 | (aRhs).AssertSanity(); |
209 | 0 | Type t = (aRhs).type(); |
210 | 0 | switch (t) { |
211 | 0 | case Tvoid_t: |
212 | 0 | { |
213 | 0 | if (MaybeDestroy(t)) { |
214 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
215 | 0 | } |
216 | 0 | (*(ptr_void_t())) = (aRhs).get_void_t(); |
217 | 0 | break; |
218 | 0 | } |
219 | 0 | case Tuint64_t: |
220 | 0 | { |
221 | 0 | if (MaybeDestroy(t)) { |
222 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t; |
223 | 0 | } |
224 | 0 | (*(ptr_uint64_t())) = (aRhs).get_uint64_t(); |
225 | 0 | break; |
226 | 0 | } |
227 | 0 | case T__None: |
228 | 0 | { |
229 | 0 | static_cast<void>(MaybeDestroy(t)); |
230 | 0 | break; |
231 | 0 | } |
232 | 0 | default: |
233 | 0 | { |
234 | 0 | mozilla::ipc::LogicError("unreached"); |
235 | 0 | break; |
236 | 0 | } |
237 | 0 | } |
238 | 0 | mType = t; |
239 | 0 | return (*(this)); |
240 | 0 | } |
241 | | |
242 | | auto FileRequestSize::operator=(FileRequestSize&& aRhs) -> FileRequestSize& |
243 | 0 | { |
244 | 0 | (aRhs).AssertSanity(); |
245 | 0 | Type t = (aRhs).type(); |
246 | 0 | switch (t) { |
247 | 0 | case Tvoid_t: |
248 | 0 | { |
249 | 0 | if (MaybeDestroy(t)) { |
250 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
251 | 0 | } |
252 | 0 | (*(ptr_void_t())) = std::move((aRhs).get_void_t()); |
253 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
254 | 0 | break; |
255 | 0 | } |
256 | 0 | case Tuint64_t: |
257 | 0 | { |
258 | 0 | if (MaybeDestroy(t)) { |
259 | 0 | new (mozilla::KnownNotNull, ptr_uint64_t()) uint64_t; |
260 | 0 | } |
261 | 0 | (*(ptr_uint64_t())) = std::move((aRhs).get_uint64_t()); |
262 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
263 | 0 | break; |
264 | 0 | } |
265 | 0 | case T__None: |
266 | 0 | { |
267 | 0 | static_cast<void>(MaybeDestroy(t)); |
268 | 0 | break; |
269 | 0 | } |
270 | 0 | default: |
271 | 0 | { |
272 | 0 | mozilla::ipc::LogicError("unreached"); |
273 | 0 | break; |
274 | 0 | } |
275 | 0 | } |
276 | 0 | (aRhs).mType = T__None; |
277 | 0 | mType = t; |
278 | 0 | return (*(this)); |
279 | 0 | } |
280 | | |
281 | | auto FileRequestSize::operator==(const void_t& aRhs) const -> bool |
282 | 0 | { |
283 | 0 | return (get_void_t()) == (aRhs); |
284 | 0 | } |
285 | | |
286 | | auto FileRequestSize::operator==(const uint64_t& aRhs) const -> bool |
287 | 0 | { |
288 | 0 | return (get_uint64_t()) == (aRhs); |
289 | 0 | } |
290 | | |
291 | | auto FileRequestSize::operator==(const FileRequestSize& aRhs) const -> bool |
292 | 0 | { |
293 | 0 | if ((type()) != ((aRhs).type())) { |
294 | 0 | return false; |
295 | 0 | } |
296 | 0 | |
297 | 0 | switch (type()) { |
298 | 0 | case Tvoid_t: |
299 | 0 | { |
300 | 0 | return (get_void_t()) == ((aRhs).get_void_t()); |
301 | 0 | } |
302 | 0 | case Tuint64_t: |
303 | 0 | { |
304 | 0 | return (get_uint64_t()) == ((aRhs).get_uint64_t()); |
305 | 0 | } |
306 | 0 | default: |
307 | 0 | { |
308 | 0 | mozilla::ipc::LogicError("unreached"); |
309 | 0 | return false; |
310 | 0 | } |
311 | 0 | } |
312 | 0 | } |
313 | | |
314 | | auto FileRequestSize::get(void_t* aOutValue) const -> void |
315 | 0 | { |
316 | 0 | (*(aOutValue)) = get_void_t(); |
317 | 0 | } |
318 | | |
319 | | auto FileRequestSize::get(uint64_t* aOutValue) const -> void |
320 | 0 | { |
321 | 0 | (*(aOutValue)) = get_uint64_t(); |
322 | 0 | } |
323 | | |
324 | | } // namespace dom |
325 | | } // namespace mozilla |
326 | | |
327 | | namespace mozilla { |
328 | | namespace ipc { |
329 | | auto IPDLParamTraits<mozilla::dom::FileRequestSize>::Write( |
330 | | IPC::Message* aMsg, |
331 | | mozilla::ipc::IProtocol* aActor, |
332 | | const paramType& aVar) -> void |
333 | | { |
334 | | typedef mozilla::dom::FileRequestSize union__; |
335 | | int type; |
336 | | type = (aVar).type(); |
337 | | WriteIPDLParam(aMsg, aActor, type); |
338 | | // Sentinel = 'FileRequestSize' |
339 | | (aMsg)->WriteSentinel(1806056177); |
340 | | |
341 | | switch (type) { |
342 | | case union__::Tvoid_t: |
343 | | { |
344 | | WriteIPDLParam(aMsg, aActor, (aVar).get_void_t()); |
345 | | // Sentinel = 'Tvoid_t' |
346 | | (aMsg)->WriteSentinel(3041273328); |
347 | | return; |
348 | | } |
349 | | case union__::Tuint64_t: |
350 | | { |
351 | | WriteIPDLParam(aMsg, aActor, (aVar).get_uint64_t()); |
352 | | // Sentinel = 'Tuint64_t' |
353 | | (aMsg)->WriteSentinel(1935076742); |
354 | | return; |
355 | | } |
356 | | default: |
357 | | { |
358 | | (aActor)->FatalError("unknown union type"); |
359 | | return; |
360 | | } |
361 | | } |
362 | | } |
363 | | |
364 | | auto IPDLParamTraits<mozilla::dom::FileRequestSize>::Read( |
365 | | const IPC::Message* aMsg, |
366 | | PickleIterator* aIter, |
367 | | mozilla::ipc::IProtocol* aActor, |
368 | | paramType* aVar) -> bool |
369 | 0 | { |
370 | 0 | typedef mozilla::dom::FileRequestSize union__; |
371 | 0 | int type; |
372 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
373 | 0 | (aActor)->FatalError("Error deserializing type of union FileRequestSize"); |
374 | 0 | return false; |
375 | 0 | } |
376 | 0 | // Sentinel = 'FileRequestSize' |
377 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1806056177)))) { |
378 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union FileRequestSize"); |
379 | 0 | return false; |
380 | 0 | } |
381 | 0 | |
382 | 0 | switch (type) { |
383 | 0 | case union__::Tvoid_t: |
384 | 0 | { |
385 | 0 | mozilla::void_t tmp = mozilla::void_t(); |
386 | 0 | (*(aVar)) = tmp; |
387 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_void_t())))))) { |
388 | 0 | (aActor)->FatalError("Error deserializing variant Tvoid_t of union FileRequestSize"); |
389 | 0 | return false; |
390 | 0 | } |
391 | 0 | // Sentinel = 'Tvoid_t' |
392 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3041273328)))) { |
393 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union FileRequestSize"); |
394 | 0 | return false; |
395 | 0 | } |
396 | 0 | return true; |
397 | 0 | } |
398 | 0 | case union__::Tuint64_t: |
399 | 0 | { |
400 | 0 | uint64_t tmp = uint64_t(); |
401 | 0 | (*(aVar)) = tmp; |
402 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_uint64_t())))))) { |
403 | 0 | (aActor)->FatalError("Error deserializing variant Tuint64_t of union FileRequestSize"); |
404 | 0 | return false; |
405 | 0 | } |
406 | 0 | // Sentinel = 'Tuint64_t' |
407 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1935076742)))) { |
408 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tuint64_t of union FileRequestSize"); |
409 | 0 | return false; |
410 | 0 | } |
411 | 0 | return true; |
412 | 0 | } |
413 | 0 | default: |
414 | 0 | { |
415 | 0 | (aActor)->FatalError("unknown union type"); |
416 | 0 | return false; |
417 | 0 | } |
418 | 0 | } |
419 | 0 | } |
420 | | |
421 | | } // namespace ipc |
422 | | } // namespace mozilla |
423 | | |
424 | | //----------------------------------------------------------------------------- |
425 | | // Method definitions for the IPDL type |union FileRequestLastModified| |
426 | | // |
427 | | namespace mozilla { |
428 | | namespace dom { |
429 | | auto FileRequestLastModified::MaybeDestroy(Type aNewType) -> bool |
430 | 0 | { |
431 | 0 | if ((mType) == (T__None)) { |
432 | 0 | return true; |
433 | 0 | } |
434 | 0 | if ((mType) == (aNewType)) { |
435 | 0 | return false; |
436 | 0 | } |
437 | 0 | switch (mType) { |
438 | 0 | case Tvoid_t: |
439 | 0 | { |
440 | 0 | (ptr_void_t())->~void_t__tdef(); |
441 | 0 | break; |
442 | 0 | } |
443 | 0 | case Tint64_t: |
444 | 0 | { |
445 | 0 | (ptr_int64_t())->~int64_t__tdef(); |
446 | 0 | break; |
447 | 0 | } |
448 | 0 | default: |
449 | 0 | { |
450 | 0 | mozilla::ipc::LogicError("not reached"); |
451 | 0 | break; |
452 | 0 | } |
453 | 0 | } |
454 | 0 | return true; |
455 | 0 | } |
456 | | |
457 | | MOZ_IMPLICIT FileRequestLastModified::FileRequestLastModified(const void_t& aOther) |
458 | 0 | { |
459 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther); |
460 | 0 | mType = Tvoid_t; |
461 | 0 | } |
462 | | |
463 | | MOZ_IMPLICIT FileRequestLastModified::FileRequestLastModified(void_t&& aOther) |
464 | 0 | { |
465 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther)); |
466 | 0 | mType = Tvoid_t; |
467 | 0 | } |
468 | | |
469 | | MOZ_IMPLICIT FileRequestLastModified::FileRequestLastModified(const int64_t& aOther) |
470 | 0 | { |
471 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t(aOther); |
472 | 0 | mType = Tint64_t; |
473 | 0 | } |
474 | | |
475 | | MOZ_IMPLICIT FileRequestLastModified::FileRequestLastModified(int64_t&& aOther) |
476 | 0 | { |
477 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t(std::move(aOther)); |
478 | 0 | mType = Tint64_t; |
479 | 0 | } |
480 | | |
481 | | MOZ_IMPLICIT FileRequestLastModified::FileRequestLastModified(const FileRequestLastModified& aOther) |
482 | 0 | { |
483 | 0 | (aOther).AssertSanity(); |
484 | 0 | switch ((aOther).type()) { |
485 | 0 | case Tvoid_t: |
486 | 0 | { |
487 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t()); |
488 | 0 | break; |
489 | 0 | } |
490 | 0 | case Tint64_t: |
491 | 0 | { |
492 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t((aOther).get_int64_t()); |
493 | 0 | break; |
494 | 0 | } |
495 | 0 | case T__None: |
496 | 0 | { |
497 | 0 | break; |
498 | 0 | } |
499 | 0 | default: |
500 | 0 | { |
501 | 0 | mozilla::ipc::LogicError("unreached"); |
502 | 0 | return; |
503 | 0 | } |
504 | 0 | } |
505 | 0 | mType = (aOther).type(); |
506 | 0 | } |
507 | | |
508 | | MOZ_IMPLICIT FileRequestLastModified::FileRequestLastModified(FileRequestLastModified&& aOther) |
509 | 0 | { |
510 | 0 | (aOther).AssertSanity(); |
511 | 0 | Type t = (aOther).type(); |
512 | 0 | switch (t) { |
513 | 0 | case Tvoid_t: |
514 | 0 | { |
515 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t())); |
516 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
517 | 0 | break; |
518 | 0 | } |
519 | 0 | case Tint64_t: |
520 | 0 | { |
521 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t(std::move((aOther).get_int64_t())); |
522 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
523 | 0 | break; |
524 | 0 | } |
525 | 0 | case T__None: |
526 | 0 | { |
527 | 0 | break; |
528 | 0 | } |
529 | 0 | default: |
530 | 0 | { |
531 | 0 | mozilla::ipc::LogicError("unreached"); |
532 | 0 | return; |
533 | 0 | } |
534 | 0 | } |
535 | 0 | (aOther).mType = T__None; |
536 | 0 | mType = t; |
537 | 0 | } |
538 | | |
539 | | FileRequestLastModified::~FileRequestLastModified() |
540 | 0 | { |
541 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
542 | 0 | } |
543 | | |
544 | | auto FileRequestLastModified::operator=(const void_t& aRhs) -> FileRequestLastModified& |
545 | 0 | { |
546 | 0 | if (MaybeDestroy(Tvoid_t)) { |
547 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
548 | 0 | } |
549 | 0 | (*(ptr_void_t())) = aRhs; |
550 | 0 | mType = Tvoid_t; |
551 | 0 | return (*(this)); |
552 | 0 | } |
553 | | |
554 | | auto FileRequestLastModified::operator=(void_t&& aRhs) -> FileRequestLastModified& |
555 | 0 | { |
556 | 0 | if (MaybeDestroy(Tvoid_t)) { |
557 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
558 | 0 | } |
559 | 0 | (*(ptr_void_t())) = std::move(aRhs); |
560 | 0 | mType = Tvoid_t; |
561 | 0 | return (*(this)); |
562 | 0 | } |
563 | | |
564 | | auto FileRequestLastModified::operator=(const int64_t& aRhs) -> FileRequestLastModified& |
565 | 0 | { |
566 | 0 | if (MaybeDestroy(Tint64_t)) { |
567 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t; |
568 | 0 | } |
569 | 0 | (*(ptr_int64_t())) = aRhs; |
570 | 0 | mType = Tint64_t; |
571 | 0 | return (*(this)); |
572 | 0 | } |
573 | | |
574 | | auto FileRequestLastModified::operator=(int64_t&& aRhs) -> FileRequestLastModified& |
575 | 0 | { |
576 | 0 | if (MaybeDestroy(Tint64_t)) { |
577 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t; |
578 | 0 | } |
579 | 0 | (*(ptr_int64_t())) = std::move(aRhs); |
580 | 0 | mType = Tint64_t; |
581 | 0 | return (*(this)); |
582 | 0 | } |
583 | | |
584 | | auto FileRequestLastModified::operator=(const FileRequestLastModified& aRhs) -> FileRequestLastModified& |
585 | 0 | { |
586 | 0 | (aRhs).AssertSanity(); |
587 | 0 | Type t = (aRhs).type(); |
588 | 0 | switch (t) { |
589 | 0 | case Tvoid_t: |
590 | 0 | { |
591 | 0 | if (MaybeDestroy(t)) { |
592 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
593 | 0 | } |
594 | 0 | (*(ptr_void_t())) = (aRhs).get_void_t(); |
595 | 0 | break; |
596 | 0 | } |
597 | 0 | case Tint64_t: |
598 | 0 | { |
599 | 0 | if (MaybeDestroy(t)) { |
600 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t; |
601 | 0 | } |
602 | 0 | (*(ptr_int64_t())) = (aRhs).get_int64_t(); |
603 | 0 | break; |
604 | 0 | } |
605 | 0 | case T__None: |
606 | 0 | { |
607 | 0 | static_cast<void>(MaybeDestroy(t)); |
608 | 0 | break; |
609 | 0 | } |
610 | 0 | default: |
611 | 0 | { |
612 | 0 | mozilla::ipc::LogicError("unreached"); |
613 | 0 | break; |
614 | 0 | } |
615 | 0 | } |
616 | 0 | mType = t; |
617 | 0 | return (*(this)); |
618 | 0 | } |
619 | | |
620 | | auto FileRequestLastModified::operator=(FileRequestLastModified&& aRhs) -> FileRequestLastModified& |
621 | 0 | { |
622 | 0 | (aRhs).AssertSanity(); |
623 | 0 | Type t = (aRhs).type(); |
624 | 0 | switch (t) { |
625 | 0 | case Tvoid_t: |
626 | 0 | { |
627 | 0 | if (MaybeDestroy(t)) { |
628 | 0 | new (mozilla::KnownNotNull, ptr_void_t()) void_t; |
629 | 0 | } |
630 | 0 | (*(ptr_void_t())) = std::move((aRhs).get_void_t()); |
631 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
632 | 0 | break; |
633 | 0 | } |
634 | 0 | case Tint64_t: |
635 | 0 | { |
636 | 0 | if (MaybeDestroy(t)) { |
637 | 0 | new (mozilla::KnownNotNull, ptr_int64_t()) int64_t; |
638 | 0 | } |
639 | 0 | (*(ptr_int64_t())) = std::move((aRhs).get_int64_t()); |
640 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
641 | 0 | break; |
642 | 0 | } |
643 | 0 | case T__None: |
644 | 0 | { |
645 | 0 | static_cast<void>(MaybeDestroy(t)); |
646 | 0 | break; |
647 | 0 | } |
648 | 0 | default: |
649 | 0 | { |
650 | 0 | mozilla::ipc::LogicError("unreached"); |
651 | 0 | break; |
652 | 0 | } |
653 | 0 | } |
654 | 0 | (aRhs).mType = T__None; |
655 | 0 | mType = t; |
656 | 0 | return (*(this)); |
657 | 0 | } |
658 | | |
659 | | auto FileRequestLastModified::operator==(const void_t& aRhs) const -> bool |
660 | 0 | { |
661 | 0 | return (get_void_t()) == (aRhs); |
662 | 0 | } |
663 | | |
664 | | auto FileRequestLastModified::operator==(const int64_t& aRhs) const -> bool |
665 | 0 | { |
666 | 0 | return (get_int64_t()) == (aRhs); |
667 | 0 | } |
668 | | |
669 | | auto FileRequestLastModified::operator==(const FileRequestLastModified& aRhs) const -> bool |
670 | 0 | { |
671 | 0 | if ((type()) != ((aRhs).type())) { |
672 | 0 | return false; |
673 | 0 | } |
674 | 0 | |
675 | 0 | switch (type()) { |
676 | 0 | case Tvoid_t: |
677 | 0 | { |
678 | 0 | return (get_void_t()) == ((aRhs).get_void_t()); |
679 | 0 | } |
680 | 0 | case Tint64_t: |
681 | 0 | { |
682 | 0 | return (get_int64_t()) == ((aRhs).get_int64_t()); |
683 | 0 | } |
684 | 0 | default: |
685 | 0 | { |
686 | 0 | mozilla::ipc::LogicError("unreached"); |
687 | 0 | return false; |
688 | 0 | } |
689 | 0 | } |
690 | 0 | } |
691 | | |
692 | | auto FileRequestLastModified::get(void_t* aOutValue) const -> void |
693 | 0 | { |
694 | 0 | (*(aOutValue)) = get_void_t(); |
695 | 0 | } |
696 | | |
697 | | auto FileRequestLastModified::get(int64_t* aOutValue) const -> void |
698 | 0 | { |
699 | 0 | (*(aOutValue)) = get_int64_t(); |
700 | 0 | } |
701 | | |
702 | | } // namespace dom |
703 | | } // namespace mozilla |
704 | | |
705 | | namespace mozilla { |
706 | | namespace ipc { |
707 | | auto IPDLParamTraits<mozilla::dom::FileRequestLastModified>::Write( |
708 | | IPC::Message* aMsg, |
709 | | mozilla::ipc::IProtocol* aActor, |
710 | | const paramType& aVar) -> void |
711 | | { |
712 | | typedef mozilla::dom::FileRequestLastModified union__; |
713 | | int type; |
714 | | type = (aVar).type(); |
715 | | WriteIPDLParam(aMsg, aActor, type); |
716 | | // Sentinel = 'FileRequestLastModified' |
717 | | (aMsg)->WriteSentinel(4176568879); |
718 | | |
719 | | switch (type) { |
720 | | case union__::Tvoid_t: |
721 | | { |
722 | | WriteIPDLParam(aMsg, aActor, (aVar).get_void_t()); |
723 | | // Sentinel = 'Tvoid_t' |
724 | | (aMsg)->WriteSentinel(3041273328); |
725 | | return; |
726 | | } |
727 | | case union__::Tint64_t: |
728 | | { |
729 | | WriteIPDLParam(aMsg, aActor, (aVar).get_int64_t()); |
730 | | // Sentinel = 'Tint64_t' |
731 | | (aMsg)->WriteSentinel(650728676); |
732 | | return; |
733 | | } |
734 | | default: |
735 | | { |
736 | | (aActor)->FatalError("unknown union type"); |
737 | | return; |
738 | | } |
739 | | } |
740 | | } |
741 | | |
742 | | auto IPDLParamTraits<mozilla::dom::FileRequestLastModified>::Read( |
743 | | const IPC::Message* aMsg, |
744 | | PickleIterator* aIter, |
745 | | mozilla::ipc::IProtocol* aActor, |
746 | | paramType* aVar) -> bool |
747 | 0 | { |
748 | 0 | typedef mozilla::dom::FileRequestLastModified union__; |
749 | 0 | int type; |
750 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
751 | 0 | (aActor)->FatalError("Error deserializing type of union FileRequestLastModified"); |
752 | 0 | return false; |
753 | 0 | } |
754 | 0 | // Sentinel = 'FileRequestLastModified' |
755 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4176568879)))) { |
756 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union FileRequestLastModified"); |
757 | 0 | return false; |
758 | 0 | } |
759 | 0 | |
760 | 0 | switch (type) { |
761 | 0 | case union__::Tvoid_t: |
762 | 0 | { |
763 | 0 | mozilla::void_t tmp = mozilla::void_t(); |
764 | 0 | (*(aVar)) = tmp; |
765 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_void_t())))))) { |
766 | 0 | (aActor)->FatalError("Error deserializing variant Tvoid_t of union FileRequestLastModified"); |
767 | 0 | return false; |
768 | 0 | } |
769 | 0 | // Sentinel = 'Tvoid_t' |
770 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3041273328)))) { |
771 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union FileRequestLastModified"); |
772 | 0 | return false; |
773 | 0 | } |
774 | 0 | return true; |
775 | 0 | } |
776 | 0 | case union__::Tint64_t: |
777 | 0 | { |
778 | 0 | int64_t tmp = int64_t(); |
779 | 0 | (*(aVar)) = tmp; |
780 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_int64_t())))))) { |
781 | 0 | (aActor)->FatalError("Error deserializing variant Tint64_t of union FileRequestLastModified"); |
782 | 0 | return false; |
783 | 0 | } |
784 | 0 | // Sentinel = 'Tint64_t' |
785 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 650728676)))) { |
786 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tint64_t of union FileRequestLastModified"); |
787 | 0 | return false; |
788 | 0 | } |
789 | 0 | return true; |
790 | 0 | } |
791 | 0 | default: |
792 | 0 | { |
793 | 0 | (aActor)->FatalError("unknown union type"); |
794 | 0 | return false; |
795 | 0 | } |
796 | 0 | } |
797 | 0 | } |
798 | | |
799 | | } // namespace ipc |
800 | | } // namespace mozilla |
801 | | |
802 | | //----------------------------------------------------------------------------- |
803 | | // Method definitions for the IPDL type |struct FileRequestMetadata| |
804 | | // |
805 | | namespace mozilla { |
806 | | namespace dom { |
807 | | auto FileRequestMetadata::operator==(const FileRequestMetadata& _o) const -> bool |
808 | 0 | { |
809 | 0 | if ((!((size()) == ((_o).size())))) { |
810 | 0 | return false; |
811 | 0 | } |
812 | 0 | if ((!((lastModified()) == ((_o).lastModified())))) { |
813 | 0 | return false; |
814 | 0 | } |
815 | 0 | return true; |
816 | 0 | } |
817 | | |
818 | | auto FileRequestMetadata::operator!=(const FileRequestMetadata& _o) const -> bool |
819 | 0 | { |
820 | 0 | return (!(operator==(_o))); |
821 | 0 | } |
822 | | |
823 | | } // namespace dom |
824 | | } // namespace mozilla |
825 | | |
826 | | namespace mozilla { |
827 | | namespace ipc { |
828 | | auto IPDLParamTraits<mozilla::dom::FileRequestMetadata>::Write( |
829 | | IPC::Message* aMsg, |
830 | | mozilla::ipc::IProtocol* aActor, |
831 | | const paramType& aVar) -> void |
832 | 0 | { |
833 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).size()); |
834 | 0 | // Sentinel = 'size' |
835 | 0 | (aMsg)->WriteSentinel(931048223); |
836 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).lastModified()); |
837 | 0 | // Sentinel = 'lastModified' |
838 | 0 | (aMsg)->WriteSentinel(3456113257); |
839 | 0 | } |
840 | | |
841 | | auto IPDLParamTraits<mozilla::dom::FileRequestMetadata>::Read( |
842 | | const IPC::Message* aMsg, |
843 | | PickleIterator* aIter, |
844 | | mozilla::ipc::IProtocol* aActor, |
845 | | paramType* aVar) -> bool |
846 | 0 | { |
847 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->size())))))) { |
848 | 0 | (aActor)->FatalError("Error deserializing 'size' (FileRequestSize) member of 'FileRequestMetadata'"); |
849 | 0 | return false; |
850 | 0 | } |
851 | 0 | // Sentinel = 'size' |
852 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 931048223)))) { |
853 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'size' (FileRequestSize) member of 'FileRequestMetadata'"); |
854 | 0 | return false; |
855 | 0 | } |
856 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->lastModified())))))) { |
857 | 0 | (aActor)->FatalError("Error deserializing 'lastModified' (FileRequestLastModified) member of 'FileRequestMetadata'"); |
858 | 0 | return false; |
859 | 0 | } |
860 | 0 | // Sentinel = 'lastModified' |
861 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 3456113257)))) { |
862 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'lastModified' (FileRequestLastModified) member of 'FileRequestMetadata'"); |
863 | 0 | return false; |
864 | 0 | } |
865 | 0 | return true; |
866 | 0 | } |
867 | | |
868 | | } // namespace ipc |
869 | | } // namespace mozilla |
870 | | |
871 | | //----------------------------------------------------------------------------- |
872 | | // Method definitions for the IPDL type |struct FileRequestGetMetadataResponse| |
873 | | // |
874 | | namespace mozilla { |
875 | | namespace dom { |
876 | | auto FileRequestGetMetadataResponse::operator==(const FileRequestGetMetadataResponse& _o) const -> bool |
877 | 0 | { |
878 | 0 | if ((!((metadata()) == ((_o).metadata())))) { |
879 | 0 | return false; |
880 | 0 | } |
881 | 0 | return true; |
882 | 0 | } |
883 | | |
884 | | auto FileRequestGetMetadataResponse::operator!=(const FileRequestGetMetadataResponse& _o) const -> bool |
885 | 0 | { |
886 | 0 | return (!(operator==(_o))); |
887 | 0 | } |
888 | | |
889 | | } // namespace dom |
890 | | } // namespace mozilla |
891 | | |
892 | | namespace mozilla { |
893 | | namespace ipc { |
894 | | auto IPDLParamTraits<mozilla::dom::FileRequestGetMetadataResponse>::Write( |
895 | | IPC::Message* aMsg, |
896 | | mozilla::ipc::IProtocol* aActor, |
897 | | const paramType& aVar) -> void |
898 | 0 | { |
899 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).metadata()); |
900 | 0 | // Sentinel = 'metadata' |
901 | 0 | (aMsg)->WriteSentinel(541737151); |
902 | 0 | } |
903 | | |
904 | | auto IPDLParamTraits<mozilla::dom::FileRequestGetMetadataResponse>::Read( |
905 | | const IPC::Message* aMsg, |
906 | | PickleIterator* aIter, |
907 | | mozilla::ipc::IProtocol* aActor, |
908 | | paramType* aVar) -> bool |
909 | 0 | { |
910 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->metadata())))))) { |
911 | 0 | (aActor)->FatalError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetMetadataResponse'"); |
912 | 0 | return false; |
913 | 0 | } |
914 | 0 | // Sentinel = 'metadata' |
915 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 541737151)))) { |
916 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetMetadataResponse'"); |
917 | 0 | return false; |
918 | 0 | } |
919 | 0 | return true; |
920 | 0 | } |
921 | | |
922 | | } // namespace ipc |
923 | | } // namespace mozilla |
924 | | |
925 | | //----------------------------------------------------------------------------- |
926 | | // Method definitions for the IPDL type |struct FileRequestReadResponse| |
927 | | // |
928 | | namespace mozilla { |
929 | | namespace dom { |
930 | | auto FileRequestReadResponse::operator==(const FileRequestReadResponse& _o) const -> bool |
931 | 0 | { |
932 | 0 | if ((!((data()) == ((_o).data())))) { |
933 | 0 | return false; |
934 | 0 | } |
935 | 0 | return true; |
936 | 0 | } |
937 | | |
938 | | auto FileRequestReadResponse::operator!=(const FileRequestReadResponse& _o) const -> bool |
939 | 0 | { |
940 | 0 | return (!(operator==(_o))); |
941 | 0 | } |
942 | | |
943 | | } // namespace dom |
944 | | } // namespace mozilla |
945 | | |
946 | | namespace mozilla { |
947 | | namespace ipc { |
948 | | auto IPDLParamTraits<mozilla::dom::FileRequestReadResponse>::Write( |
949 | | IPC::Message* aMsg, |
950 | | mozilla::ipc::IProtocol* aActor, |
951 | | const paramType& aVar) -> void |
952 | 0 | { |
953 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).data()); |
954 | 0 | // Sentinel = 'data' |
955 | 0 | (aMsg)->WriteSentinel(843352540); |
956 | 0 | } |
957 | | |
958 | | auto IPDLParamTraits<mozilla::dom::FileRequestReadResponse>::Read( |
959 | | const IPC::Message* aMsg, |
960 | | PickleIterator* aIter, |
961 | | mozilla::ipc::IProtocol* aActor, |
962 | | paramType* aVar) -> bool |
963 | 0 | { |
964 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->data())))))) { |
965 | 0 | (aActor)->FatalError("Error deserializing 'data' (nsCString) member of 'FileRequestReadResponse'"); |
966 | 0 | return false; |
967 | 0 | } |
968 | 0 | // Sentinel = 'data' |
969 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 843352540)))) { |
970 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'data' (nsCString) member of 'FileRequestReadResponse'"); |
971 | 0 | return false; |
972 | 0 | } |
973 | 0 | return true; |
974 | 0 | } |
975 | | |
976 | | } // namespace ipc |
977 | | } // namespace mozilla |
978 | | |
979 | | //----------------------------------------------------------------------------- |
980 | | // Method definitions for the IPDL type |struct FileRequestWriteResponse| |
981 | | // |
982 | | namespace mozilla { |
983 | | namespace dom { |
984 | | auto FileRequestWriteResponse::operator==(const FileRequestWriteResponse& _o) const -> bool |
985 | 0 | { |
986 | 0 | return true; |
987 | 0 | } |
988 | | |
989 | | auto FileRequestWriteResponse::operator!=(const FileRequestWriteResponse& _o) const -> bool |
990 | 0 | { |
991 | 0 | return (!(operator==(_o))); |
992 | 0 | } |
993 | | |
994 | | } // namespace dom |
995 | | } // namespace mozilla |
996 | | |
997 | | namespace mozilla { |
998 | | namespace ipc { |
999 | | auto IPDLParamTraits<mozilla::dom::FileRequestWriteResponse>::Write( |
1000 | | IPC::Message* aMsg, |
1001 | | mozilla::ipc::IProtocol* aActor, |
1002 | | const paramType& aVar) -> void |
1003 | 0 | { |
1004 | 0 | } |
1005 | | |
1006 | | auto IPDLParamTraits<mozilla::dom::FileRequestWriteResponse>::Read( |
1007 | | const IPC::Message* aMsg, |
1008 | | PickleIterator* aIter, |
1009 | | mozilla::ipc::IProtocol* aActor, |
1010 | | paramType* aVar) -> bool |
1011 | 0 | { |
1012 | 0 | return true; |
1013 | 0 | } |
1014 | | |
1015 | | } // namespace ipc |
1016 | | } // namespace mozilla |
1017 | | |
1018 | | //----------------------------------------------------------------------------- |
1019 | | // Method definitions for the IPDL type |struct FileRequestTruncateResponse| |
1020 | | // |
1021 | | namespace mozilla { |
1022 | | namespace dom { |
1023 | | auto FileRequestTruncateResponse::operator==(const FileRequestTruncateResponse& _o) const -> bool |
1024 | 0 | { |
1025 | 0 | return true; |
1026 | 0 | } |
1027 | | |
1028 | | auto FileRequestTruncateResponse::operator!=(const FileRequestTruncateResponse& _o) const -> bool |
1029 | 0 | { |
1030 | 0 | return (!(operator==(_o))); |
1031 | 0 | } |
1032 | | |
1033 | | } // namespace dom |
1034 | | } // namespace mozilla |
1035 | | |
1036 | | namespace mozilla { |
1037 | | namespace ipc { |
1038 | | auto IPDLParamTraits<mozilla::dom::FileRequestTruncateResponse>::Write( |
1039 | | IPC::Message* aMsg, |
1040 | | mozilla::ipc::IProtocol* aActor, |
1041 | | const paramType& aVar) -> void |
1042 | 0 | { |
1043 | 0 | } |
1044 | | |
1045 | | auto IPDLParamTraits<mozilla::dom::FileRequestTruncateResponse>::Read( |
1046 | | const IPC::Message* aMsg, |
1047 | | PickleIterator* aIter, |
1048 | | mozilla::ipc::IProtocol* aActor, |
1049 | | paramType* aVar) -> bool |
1050 | 0 | { |
1051 | 0 | return true; |
1052 | 0 | } |
1053 | | |
1054 | | } // namespace ipc |
1055 | | } // namespace mozilla |
1056 | | |
1057 | | //----------------------------------------------------------------------------- |
1058 | | // Method definitions for the IPDL type |struct FileRequestFlushResponse| |
1059 | | // |
1060 | | namespace mozilla { |
1061 | | namespace dom { |
1062 | | auto FileRequestFlushResponse::operator==(const FileRequestFlushResponse& _o) const -> bool |
1063 | 0 | { |
1064 | 0 | return true; |
1065 | 0 | } |
1066 | | |
1067 | | auto FileRequestFlushResponse::operator!=(const FileRequestFlushResponse& _o) const -> bool |
1068 | 0 | { |
1069 | 0 | return (!(operator==(_o))); |
1070 | 0 | } |
1071 | | |
1072 | | } // namespace dom |
1073 | | } // namespace mozilla |
1074 | | |
1075 | | namespace mozilla { |
1076 | | namespace ipc { |
1077 | | auto IPDLParamTraits<mozilla::dom::FileRequestFlushResponse>::Write( |
1078 | | IPC::Message* aMsg, |
1079 | | mozilla::ipc::IProtocol* aActor, |
1080 | | const paramType& aVar) -> void |
1081 | 0 | { |
1082 | 0 | } |
1083 | | |
1084 | | auto IPDLParamTraits<mozilla::dom::FileRequestFlushResponse>::Read( |
1085 | | const IPC::Message* aMsg, |
1086 | | PickleIterator* aIter, |
1087 | | mozilla::ipc::IProtocol* aActor, |
1088 | | paramType* aVar) -> bool |
1089 | 0 | { |
1090 | 0 | return true; |
1091 | 0 | } |
1092 | | |
1093 | | } // namespace ipc |
1094 | | } // namespace mozilla |
1095 | | |
1096 | | //----------------------------------------------------------------------------- |
1097 | | // Method definitions for the IPDL type |struct FileRequestGetFileResponse| |
1098 | | // |
1099 | | namespace mozilla { |
1100 | | namespace dom { |
1101 | | auto FileRequestGetFileResponse::operator==(const FileRequestGetFileResponse& _o) const -> bool |
1102 | 0 | { |
1103 | 0 | if ((!((fileParent()) == ((_o).fileParent())))) { |
1104 | 0 | return false; |
1105 | 0 | } |
1106 | 0 | if ((!((fileChild()) == ((_o).fileChild())))) { |
1107 | 0 | return false; |
1108 | 0 | } |
1109 | 0 | if ((!((metadata()) == ((_o).metadata())))) { |
1110 | 0 | return false; |
1111 | 0 | } |
1112 | 0 | return true; |
1113 | 0 | } |
1114 | | |
1115 | | auto FileRequestGetFileResponse::operator!=(const FileRequestGetFileResponse& _o) const -> bool |
1116 | 0 | { |
1117 | 0 | return (!(operator==(_o))); |
1118 | 0 | } |
1119 | | |
1120 | | } // namespace dom |
1121 | | } // namespace mozilla |
1122 | | |
1123 | | namespace mozilla { |
1124 | | namespace ipc { |
1125 | | auto IPDLParamTraits<mozilla::dom::FileRequestGetFileResponse>::Write( |
1126 | | IPC::Message* aMsg, |
1127 | | mozilla::ipc::IProtocol* aActor, |
1128 | | const paramType& aVar) -> void |
1129 | 0 | { |
1130 | 0 | if ((mozilla::ipc::ParentSide) == ((aActor)->GetSide())) { |
1131 | 0 | MOZ_RELEASE_ASSERT((aVar).fileParent(), "NULL actor value passed to non-nullable param"); |
1132 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).fileParent()); |
1133 | 0 | // Sentinel = 'file' |
1134 | 0 | (aMsg)->WriteSentinel(224874390); |
1135 | 0 | } |
1136 | 0 | if ((mozilla::ipc::ChildSide) == ((aActor)->GetSide())) { |
1137 | 0 | MOZ_RELEASE_ASSERT((aVar).fileChild(), "NULL actor value passed to non-nullable param"); |
1138 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).fileChild()); |
1139 | 0 | // Sentinel = 'file' |
1140 | 0 | (aMsg)->WriteSentinel(224874390); |
1141 | 0 | } |
1142 | 0 | WriteIPDLParam(aMsg, aActor, (aVar).metadata()); |
1143 | 0 | // Sentinel = 'metadata' |
1144 | 0 | (aMsg)->WriteSentinel(541737151); |
1145 | 0 | } |
1146 | | |
1147 | | auto IPDLParamTraits<mozilla::dom::FileRequestGetFileResponse>::Read( |
1148 | | const IPC::Message* aMsg, |
1149 | | PickleIterator* aIter, |
1150 | | mozilla::ipc::IProtocol* aActor, |
1151 | | paramType* aVar) -> bool |
1152 | 0 | { |
1153 | 0 | if ((mozilla::ipc::ParentSide) == ((aActor)->GetSide())) { |
1154 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->fileParent())))))) { |
1155 | 0 | (aActor)->FatalError("Error deserializing 'fileParent' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'"); |
1156 | 0 | return false; |
1157 | 0 | } |
1158 | 0 | if ((!((*((&((aVar)->fileParent()))))))) { |
1159 | 0 | (aActor)->FatalError("Error deserializing 'fileParent' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'"); |
1160 | 0 | return false; |
1161 | 0 | } |
1162 | 0 | // Sentinel = 'file' |
1163 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 224874390)))) { |
1164 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'fileParent' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'"); |
1165 | 0 | return false; |
1166 | 0 | } |
1167 | 0 | } |
1168 | 0 | if ((mozilla::ipc::ChildSide) == ((aActor)->GetSide())) { |
1169 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->fileChild())))))) { |
1170 | 0 | (aActor)->FatalError("Error deserializing 'fileChild' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'"); |
1171 | 0 | return false; |
1172 | 0 | } |
1173 | 0 | if ((!((*((&((aVar)->fileChild()))))))) { |
1174 | 0 | (aActor)->FatalError("Error deserializing 'fileChild' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'"); |
1175 | 0 | return false; |
1176 | 0 | } |
1177 | 0 | // Sentinel = 'file' |
1178 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 224874390)))) { |
1179 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'fileChild' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'"); |
1180 | 0 | return false; |
1181 | 0 | } |
1182 | 0 | } |
1183 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->metadata())))))) { |
1184 | 0 | (aActor)->FatalError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetFileResponse'"); |
1185 | 0 | return false; |
1186 | 0 | } |
1187 | 0 | // Sentinel = 'metadata' |
1188 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 541737151)))) { |
1189 | 0 | mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetFileResponse'"); |
1190 | 0 | return false; |
1191 | 0 | } |
1192 | 0 | return true; |
1193 | 0 | } |
1194 | | |
1195 | | } // namespace ipc |
1196 | | } // namespace mozilla |
1197 | | |
1198 | | //----------------------------------------------------------------------------- |
1199 | | // Method definitions for the IPDL type |union FileRequestResponse| |
1200 | | // |
1201 | | namespace mozilla { |
1202 | | namespace dom { |
1203 | | auto FileRequestResponse::MaybeDestroy(Type aNewType) -> bool |
1204 | 0 | { |
1205 | 0 | if ((mType) == (T__None)) { |
1206 | 0 | return true; |
1207 | 0 | } |
1208 | 0 | if ((mType) == (aNewType)) { |
1209 | 0 | return false; |
1210 | 0 | } |
1211 | 0 | switch (mType) { |
1212 | 0 | case Tnsresult: |
1213 | 0 | { |
1214 | 0 | (ptr_nsresult())->~nsresult__tdef(); |
1215 | 0 | break; |
1216 | 0 | } |
1217 | 0 | case TFileRequestGetMetadataResponse: |
1218 | 0 | { |
1219 | 0 | (ptr_FileRequestGetMetadataResponse())->~FileRequestGetMetadataResponse__tdef(); |
1220 | 0 | break; |
1221 | 0 | } |
1222 | 0 | case TFileRequestReadResponse: |
1223 | 0 | { |
1224 | 0 | (ptr_FileRequestReadResponse())->~FileRequestReadResponse__tdef(); |
1225 | 0 | break; |
1226 | 0 | } |
1227 | 0 | case TFileRequestWriteResponse: |
1228 | 0 | { |
1229 | 0 | (ptr_FileRequestWriteResponse())->~FileRequestWriteResponse__tdef(); |
1230 | 0 | break; |
1231 | 0 | } |
1232 | 0 | case TFileRequestTruncateResponse: |
1233 | 0 | { |
1234 | 0 | (ptr_FileRequestTruncateResponse())->~FileRequestTruncateResponse__tdef(); |
1235 | 0 | break; |
1236 | 0 | } |
1237 | 0 | case TFileRequestFlushResponse: |
1238 | 0 | { |
1239 | 0 | (ptr_FileRequestFlushResponse())->~FileRequestFlushResponse__tdef(); |
1240 | 0 | break; |
1241 | 0 | } |
1242 | 0 | case TFileRequestGetFileResponse: |
1243 | 0 | { |
1244 | 0 | (ptr_FileRequestGetFileResponse())->~FileRequestGetFileResponse__tdef(); |
1245 | 0 | break; |
1246 | 0 | } |
1247 | 0 | default: |
1248 | 0 | { |
1249 | 0 | mozilla::ipc::LogicError("not reached"); |
1250 | 0 | break; |
1251 | 0 | } |
1252 | 0 | } |
1253 | 0 | return true; |
1254 | 0 | } |
1255 | | |
1256 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const nsresult& aOther) |
1257 | 0 | { |
1258 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther); |
1259 | 0 | mType = Tnsresult; |
1260 | 0 | } |
1261 | | |
1262 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(nsresult&& aOther) |
1263 | 0 | { |
1264 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther)); |
1265 | 0 | mType = Tnsresult; |
1266 | 0 | } |
1267 | | |
1268 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestGetMetadataResponse& aOther) |
1269 | 0 | { |
1270 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse(aOther); |
1271 | 0 | mType = TFileRequestGetMetadataResponse; |
1272 | 0 | } |
1273 | | |
1274 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestGetMetadataResponse&& aOther) |
1275 | 0 | { |
1276 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse(std::move(aOther)); |
1277 | 0 | mType = TFileRequestGetMetadataResponse; |
1278 | 0 | } |
1279 | | |
1280 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestReadResponse& aOther) |
1281 | 0 | { |
1282 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse(aOther); |
1283 | 0 | mType = TFileRequestReadResponse; |
1284 | 0 | } |
1285 | | |
1286 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestReadResponse&& aOther) |
1287 | 0 | { |
1288 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse(std::move(aOther)); |
1289 | 0 | mType = TFileRequestReadResponse; |
1290 | 0 | } |
1291 | | |
1292 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestWriteResponse& aOther) |
1293 | 0 | { |
1294 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse(aOther); |
1295 | 0 | mType = TFileRequestWriteResponse; |
1296 | 0 | } |
1297 | | |
1298 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestWriteResponse&& aOther) |
1299 | 0 | { |
1300 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse(std::move(aOther)); |
1301 | 0 | mType = TFileRequestWriteResponse; |
1302 | 0 | } |
1303 | | |
1304 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestTruncateResponse& aOther) |
1305 | 0 | { |
1306 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse(aOther); |
1307 | 0 | mType = TFileRequestTruncateResponse; |
1308 | 0 | } |
1309 | | |
1310 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestTruncateResponse&& aOther) |
1311 | 0 | { |
1312 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse(std::move(aOther)); |
1313 | 0 | mType = TFileRequestTruncateResponse; |
1314 | 0 | } |
1315 | | |
1316 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestFlushResponse& aOther) |
1317 | 0 | { |
1318 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse(aOther); |
1319 | 0 | mType = TFileRequestFlushResponse; |
1320 | 0 | } |
1321 | | |
1322 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestFlushResponse&& aOther) |
1323 | 0 | { |
1324 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse(std::move(aOther)); |
1325 | 0 | mType = TFileRequestFlushResponse; |
1326 | 0 | } |
1327 | | |
1328 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestGetFileResponse& aOther) |
1329 | 0 | { |
1330 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse(aOther); |
1331 | 0 | mType = TFileRequestGetFileResponse; |
1332 | 0 | } |
1333 | | |
1334 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestGetFileResponse&& aOther) |
1335 | 0 | { |
1336 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse(std::move(aOther)); |
1337 | 0 | mType = TFileRequestGetFileResponse; |
1338 | 0 | } |
1339 | | |
1340 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(const FileRequestResponse& aOther) |
1341 | 0 | { |
1342 | 0 | (aOther).AssertSanity(); |
1343 | 0 | switch ((aOther).type()) { |
1344 | 0 | case Tnsresult: |
1345 | 0 | { |
1346 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult()); |
1347 | 0 | break; |
1348 | 0 | } |
1349 | 0 | case TFileRequestGetMetadataResponse: |
1350 | 0 | { |
1351 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse((aOther).get_FileRequestGetMetadataResponse()); |
1352 | 0 | break; |
1353 | 0 | } |
1354 | 0 | case TFileRequestReadResponse: |
1355 | 0 | { |
1356 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse((aOther).get_FileRequestReadResponse()); |
1357 | 0 | break; |
1358 | 0 | } |
1359 | 0 | case TFileRequestWriteResponse: |
1360 | 0 | { |
1361 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse((aOther).get_FileRequestWriteResponse()); |
1362 | 0 | break; |
1363 | 0 | } |
1364 | 0 | case TFileRequestTruncateResponse: |
1365 | 0 | { |
1366 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse((aOther).get_FileRequestTruncateResponse()); |
1367 | 0 | break; |
1368 | 0 | } |
1369 | 0 | case TFileRequestFlushResponse: |
1370 | 0 | { |
1371 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse((aOther).get_FileRequestFlushResponse()); |
1372 | 0 | break; |
1373 | 0 | } |
1374 | 0 | case TFileRequestGetFileResponse: |
1375 | 0 | { |
1376 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse((aOther).get_FileRequestGetFileResponse()); |
1377 | 0 | break; |
1378 | 0 | } |
1379 | 0 | case T__None: |
1380 | 0 | { |
1381 | 0 | break; |
1382 | 0 | } |
1383 | 0 | default: |
1384 | 0 | { |
1385 | 0 | mozilla::ipc::LogicError("unreached"); |
1386 | 0 | return; |
1387 | 0 | } |
1388 | 0 | } |
1389 | 0 | mType = (aOther).type(); |
1390 | 0 | } |
1391 | | |
1392 | | MOZ_IMPLICIT FileRequestResponse::FileRequestResponse(FileRequestResponse&& aOther) |
1393 | 0 | { |
1394 | 0 | (aOther).AssertSanity(); |
1395 | 0 | Type t = (aOther).type(); |
1396 | 0 | switch (t) { |
1397 | 0 | case Tnsresult: |
1398 | 0 | { |
1399 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult())); |
1400 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1401 | 0 | break; |
1402 | 0 | } |
1403 | 0 | case TFileRequestGetMetadataResponse: |
1404 | 0 | { |
1405 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse(std::move((aOther).get_FileRequestGetMetadataResponse())); |
1406 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1407 | 0 | break; |
1408 | 0 | } |
1409 | 0 | case TFileRequestReadResponse: |
1410 | 0 | { |
1411 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse(std::move((aOther).get_FileRequestReadResponse())); |
1412 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1413 | 0 | break; |
1414 | 0 | } |
1415 | 0 | case TFileRequestWriteResponse: |
1416 | 0 | { |
1417 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse(std::move((aOther).get_FileRequestWriteResponse())); |
1418 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1419 | 0 | break; |
1420 | 0 | } |
1421 | 0 | case TFileRequestTruncateResponse: |
1422 | 0 | { |
1423 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse(std::move((aOther).get_FileRequestTruncateResponse())); |
1424 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1425 | 0 | break; |
1426 | 0 | } |
1427 | 0 | case TFileRequestFlushResponse: |
1428 | 0 | { |
1429 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse(std::move((aOther).get_FileRequestFlushResponse())); |
1430 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1431 | 0 | break; |
1432 | 0 | } |
1433 | 0 | case TFileRequestGetFileResponse: |
1434 | 0 | { |
1435 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse(std::move((aOther).get_FileRequestGetFileResponse())); |
1436 | 0 | static_cast<void>((aOther).MaybeDestroy(T__None)); |
1437 | 0 | break; |
1438 | 0 | } |
1439 | 0 | case T__None: |
1440 | 0 | { |
1441 | 0 | break; |
1442 | 0 | } |
1443 | 0 | default: |
1444 | 0 | { |
1445 | 0 | mozilla::ipc::LogicError("unreached"); |
1446 | 0 | return; |
1447 | 0 | } |
1448 | 0 | } |
1449 | 0 | (aOther).mType = T__None; |
1450 | 0 | mType = t; |
1451 | 0 | } |
1452 | | |
1453 | | FileRequestResponse::~FileRequestResponse() |
1454 | 0 | { |
1455 | 0 | static_cast<void>(MaybeDestroy(T__None)); |
1456 | 0 | } |
1457 | | |
1458 | | auto FileRequestResponse::operator=(const nsresult& aRhs) -> FileRequestResponse& |
1459 | 0 | { |
1460 | 0 | if (MaybeDestroy(Tnsresult)) { |
1461 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult; |
1462 | 0 | } |
1463 | 0 | (*(ptr_nsresult())) = aRhs; |
1464 | 0 | mType = Tnsresult; |
1465 | 0 | return (*(this)); |
1466 | 0 | } |
1467 | | |
1468 | | auto FileRequestResponse::operator=(nsresult&& aRhs) -> FileRequestResponse& |
1469 | 0 | { |
1470 | 0 | if (MaybeDestroy(Tnsresult)) { |
1471 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult; |
1472 | 0 | } |
1473 | 0 | (*(ptr_nsresult())) = std::move(aRhs); |
1474 | 0 | mType = Tnsresult; |
1475 | 0 | return (*(this)); |
1476 | 0 | } |
1477 | | |
1478 | | auto FileRequestResponse::operator=(const FileRequestGetMetadataResponse& aRhs) -> FileRequestResponse& |
1479 | 0 | { |
1480 | 0 | if (MaybeDestroy(TFileRequestGetMetadataResponse)) { |
1481 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse; |
1482 | 0 | } |
1483 | 0 | (*(ptr_FileRequestGetMetadataResponse())) = aRhs; |
1484 | 0 | mType = TFileRequestGetMetadataResponse; |
1485 | 0 | return (*(this)); |
1486 | 0 | } |
1487 | | |
1488 | | auto FileRequestResponse::operator=(FileRequestGetMetadataResponse&& aRhs) -> FileRequestResponse& |
1489 | 0 | { |
1490 | 0 | if (MaybeDestroy(TFileRequestGetMetadataResponse)) { |
1491 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse; |
1492 | 0 | } |
1493 | 0 | (*(ptr_FileRequestGetMetadataResponse())) = std::move(aRhs); |
1494 | 0 | mType = TFileRequestGetMetadataResponse; |
1495 | 0 | return (*(this)); |
1496 | 0 | } |
1497 | | |
1498 | | auto FileRequestResponse::operator=(const FileRequestReadResponse& aRhs) -> FileRequestResponse& |
1499 | 0 | { |
1500 | 0 | if (MaybeDestroy(TFileRequestReadResponse)) { |
1501 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse; |
1502 | 0 | } |
1503 | 0 | (*(ptr_FileRequestReadResponse())) = aRhs; |
1504 | 0 | mType = TFileRequestReadResponse; |
1505 | 0 | return (*(this)); |
1506 | 0 | } |
1507 | | |
1508 | | auto FileRequestResponse::operator=(FileRequestReadResponse&& aRhs) -> FileRequestResponse& |
1509 | 0 | { |
1510 | 0 | if (MaybeDestroy(TFileRequestReadResponse)) { |
1511 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse; |
1512 | 0 | } |
1513 | 0 | (*(ptr_FileRequestReadResponse())) = std::move(aRhs); |
1514 | 0 | mType = TFileRequestReadResponse; |
1515 | 0 | return (*(this)); |
1516 | 0 | } |
1517 | | |
1518 | | auto FileRequestResponse::operator=(const FileRequestWriteResponse& aRhs) -> FileRequestResponse& |
1519 | 0 | { |
1520 | 0 | if (MaybeDestroy(TFileRequestWriteResponse)) { |
1521 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse; |
1522 | 0 | } |
1523 | 0 | (*(ptr_FileRequestWriteResponse())) = aRhs; |
1524 | 0 | mType = TFileRequestWriteResponse; |
1525 | 0 | return (*(this)); |
1526 | 0 | } |
1527 | | |
1528 | | auto FileRequestResponse::operator=(FileRequestWriteResponse&& aRhs) -> FileRequestResponse& |
1529 | 0 | { |
1530 | 0 | if (MaybeDestroy(TFileRequestWriteResponse)) { |
1531 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse; |
1532 | 0 | } |
1533 | 0 | (*(ptr_FileRequestWriteResponse())) = std::move(aRhs); |
1534 | 0 | mType = TFileRequestWriteResponse; |
1535 | 0 | return (*(this)); |
1536 | 0 | } |
1537 | | |
1538 | | auto FileRequestResponse::operator=(const FileRequestTruncateResponse& aRhs) -> FileRequestResponse& |
1539 | 0 | { |
1540 | 0 | if (MaybeDestroy(TFileRequestTruncateResponse)) { |
1541 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse; |
1542 | 0 | } |
1543 | 0 | (*(ptr_FileRequestTruncateResponse())) = aRhs; |
1544 | 0 | mType = TFileRequestTruncateResponse; |
1545 | 0 | return (*(this)); |
1546 | 0 | } |
1547 | | |
1548 | | auto FileRequestResponse::operator=(FileRequestTruncateResponse&& aRhs) -> FileRequestResponse& |
1549 | 0 | { |
1550 | 0 | if (MaybeDestroy(TFileRequestTruncateResponse)) { |
1551 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse; |
1552 | 0 | } |
1553 | 0 | (*(ptr_FileRequestTruncateResponse())) = std::move(aRhs); |
1554 | 0 | mType = TFileRequestTruncateResponse; |
1555 | 0 | return (*(this)); |
1556 | 0 | } |
1557 | | |
1558 | | auto FileRequestResponse::operator=(const FileRequestFlushResponse& aRhs) -> FileRequestResponse& |
1559 | 0 | { |
1560 | 0 | if (MaybeDestroy(TFileRequestFlushResponse)) { |
1561 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse; |
1562 | 0 | } |
1563 | 0 | (*(ptr_FileRequestFlushResponse())) = aRhs; |
1564 | 0 | mType = TFileRequestFlushResponse; |
1565 | 0 | return (*(this)); |
1566 | 0 | } |
1567 | | |
1568 | | auto FileRequestResponse::operator=(FileRequestFlushResponse&& aRhs) -> FileRequestResponse& |
1569 | 0 | { |
1570 | 0 | if (MaybeDestroy(TFileRequestFlushResponse)) { |
1571 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse; |
1572 | 0 | } |
1573 | 0 | (*(ptr_FileRequestFlushResponse())) = std::move(aRhs); |
1574 | 0 | mType = TFileRequestFlushResponse; |
1575 | 0 | return (*(this)); |
1576 | 0 | } |
1577 | | |
1578 | | auto FileRequestResponse::operator=(const FileRequestGetFileResponse& aRhs) -> FileRequestResponse& |
1579 | 0 | { |
1580 | 0 | if (MaybeDestroy(TFileRequestGetFileResponse)) { |
1581 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse; |
1582 | 0 | } |
1583 | 0 | (*(ptr_FileRequestGetFileResponse())) = aRhs; |
1584 | 0 | mType = TFileRequestGetFileResponse; |
1585 | 0 | return (*(this)); |
1586 | 0 | } |
1587 | | |
1588 | | auto FileRequestResponse::operator=(FileRequestGetFileResponse&& aRhs) -> FileRequestResponse& |
1589 | 0 | { |
1590 | 0 | if (MaybeDestroy(TFileRequestGetFileResponse)) { |
1591 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse; |
1592 | 0 | } |
1593 | 0 | (*(ptr_FileRequestGetFileResponse())) = std::move(aRhs); |
1594 | 0 | mType = TFileRequestGetFileResponse; |
1595 | 0 | return (*(this)); |
1596 | 0 | } |
1597 | | |
1598 | | auto FileRequestResponse::operator=(const FileRequestResponse& aRhs) -> FileRequestResponse& |
1599 | 0 | { |
1600 | 0 | (aRhs).AssertSanity(); |
1601 | 0 | Type t = (aRhs).type(); |
1602 | 0 | switch (t) { |
1603 | 0 | case Tnsresult: |
1604 | 0 | { |
1605 | 0 | if (MaybeDestroy(t)) { |
1606 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult; |
1607 | 0 | } |
1608 | 0 | (*(ptr_nsresult())) = (aRhs).get_nsresult(); |
1609 | 0 | break; |
1610 | 0 | } |
1611 | 0 | case TFileRequestGetMetadataResponse: |
1612 | 0 | { |
1613 | 0 | if (MaybeDestroy(t)) { |
1614 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse; |
1615 | 0 | } |
1616 | 0 | (*(ptr_FileRequestGetMetadataResponse())) = (aRhs).get_FileRequestGetMetadataResponse(); |
1617 | 0 | break; |
1618 | 0 | } |
1619 | 0 | case TFileRequestReadResponse: |
1620 | 0 | { |
1621 | 0 | if (MaybeDestroy(t)) { |
1622 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse; |
1623 | 0 | } |
1624 | 0 | (*(ptr_FileRequestReadResponse())) = (aRhs).get_FileRequestReadResponse(); |
1625 | 0 | break; |
1626 | 0 | } |
1627 | 0 | case TFileRequestWriteResponse: |
1628 | 0 | { |
1629 | 0 | if (MaybeDestroy(t)) { |
1630 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse; |
1631 | 0 | } |
1632 | 0 | (*(ptr_FileRequestWriteResponse())) = (aRhs).get_FileRequestWriteResponse(); |
1633 | 0 | break; |
1634 | 0 | } |
1635 | 0 | case TFileRequestTruncateResponse: |
1636 | 0 | { |
1637 | 0 | if (MaybeDestroy(t)) { |
1638 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse; |
1639 | 0 | } |
1640 | 0 | (*(ptr_FileRequestTruncateResponse())) = (aRhs).get_FileRequestTruncateResponse(); |
1641 | 0 | break; |
1642 | 0 | } |
1643 | 0 | case TFileRequestFlushResponse: |
1644 | 0 | { |
1645 | 0 | if (MaybeDestroy(t)) { |
1646 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse; |
1647 | 0 | } |
1648 | 0 | (*(ptr_FileRequestFlushResponse())) = (aRhs).get_FileRequestFlushResponse(); |
1649 | 0 | break; |
1650 | 0 | } |
1651 | 0 | case TFileRequestGetFileResponse: |
1652 | 0 | { |
1653 | 0 | if (MaybeDestroy(t)) { |
1654 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse; |
1655 | 0 | } |
1656 | 0 | (*(ptr_FileRequestGetFileResponse())) = (aRhs).get_FileRequestGetFileResponse(); |
1657 | 0 | break; |
1658 | 0 | } |
1659 | 0 | case T__None: |
1660 | 0 | { |
1661 | 0 | static_cast<void>(MaybeDestroy(t)); |
1662 | 0 | break; |
1663 | 0 | } |
1664 | 0 | default: |
1665 | 0 | { |
1666 | 0 | mozilla::ipc::LogicError("unreached"); |
1667 | 0 | break; |
1668 | 0 | } |
1669 | 0 | } |
1670 | 0 | mType = t; |
1671 | 0 | return (*(this)); |
1672 | 0 | } |
1673 | | |
1674 | | auto FileRequestResponse::operator=(FileRequestResponse&& aRhs) -> FileRequestResponse& |
1675 | 0 | { |
1676 | 0 | (aRhs).AssertSanity(); |
1677 | 0 | Type t = (aRhs).type(); |
1678 | 0 | switch (t) { |
1679 | 0 | case Tnsresult: |
1680 | 0 | { |
1681 | 0 | if (MaybeDestroy(t)) { |
1682 | 0 | new (mozilla::KnownNotNull, ptr_nsresult()) nsresult; |
1683 | 0 | } |
1684 | 0 | (*(ptr_nsresult())) = std::move((aRhs).get_nsresult()); |
1685 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1686 | 0 | break; |
1687 | 0 | } |
1688 | 0 | case TFileRequestGetMetadataResponse: |
1689 | 0 | { |
1690 | 0 | if (MaybeDestroy(t)) { |
1691 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetMetadataResponse()) FileRequestGetMetadataResponse; |
1692 | 0 | } |
1693 | 0 | (*(ptr_FileRequestGetMetadataResponse())) = std::move((aRhs).get_FileRequestGetMetadataResponse()); |
1694 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1695 | 0 | break; |
1696 | 0 | } |
1697 | 0 | case TFileRequestReadResponse: |
1698 | 0 | { |
1699 | 0 | if (MaybeDestroy(t)) { |
1700 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestReadResponse()) FileRequestReadResponse; |
1701 | 0 | } |
1702 | 0 | (*(ptr_FileRequestReadResponse())) = std::move((aRhs).get_FileRequestReadResponse()); |
1703 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1704 | 0 | break; |
1705 | 0 | } |
1706 | 0 | case TFileRequestWriteResponse: |
1707 | 0 | { |
1708 | 0 | if (MaybeDestroy(t)) { |
1709 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestWriteResponse()) FileRequestWriteResponse; |
1710 | 0 | } |
1711 | 0 | (*(ptr_FileRequestWriteResponse())) = std::move((aRhs).get_FileRequestWriteResponse()); |
1712 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1713 | 0 | break; |
1714 | 0 | } |
1715 | 0 | case TFileRequestTruncateResponse: |
1716 | 0 | { |
1717 | 0 | if (MaybeDestroy(t)) { |
1718 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestTruncateResponse()) FileRequestTruncateResponse; |
1719 | 0 | } |
1720 | 0 | (*(ptr_FileRequestTruncateResponse())) = std::move((aRhs).get_FileRequestTruncateResponse()); |
1721 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1722 | 0 | break; |
1723 | 0 | } |
1724 | 0 | case TFileRequestFlushResponse: |
1725 | 0 | { |
1726 | 0 | if (MaybeDestroy(t)) { |
1727 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestFlushResponse()) FileRequestFlushResponse; |
1728 | 0 | } |
1729 | 0 | (*(ptr_FileRequestFlushResponse())) = std::move((aRhs).get_FileRequestFlushResponse()); |
1730 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1731 | 0 | break; |
1732 | 0 | } |
1733 | 0 | case TFileRequestGetFileResponse: |
1734 | 0 | { |
1735 | 0 | if (MaybeDestroy(t)) { |
1736 | 0 | new (mozilla::KnownNotNull, ptr_FileRequestGetFileResponse()) FileRequestGetFileResponse; |
1737 | 0 | } |
1738 | 0 | (*(ptr_FileRequestGetFileResponse())) = std::move((aRhs).get_FileRequestGetFileResponse()); |
1739 | 0 | static_cast<void>((aRhs).MaybeDestroy(T__None)); |
1740 | 0 | break; |
1741 | 0 | } |
1742 | 0 | case T__None: |
1743 | 0 | { |
1744 | 0 | static_cast<void>(MaybeDestroy(t)); |
1745 | 0 | break; |
1746 | 0 | } |
1747 | 0 | default: |
1748 | 0 | { |
1749 | 0 | mozilla::ipc::LogicError("unreached"); |
1750 | 0 | break; |
1751 | 0 | } |
1752 | 0 | } |
1753 | 0 | (aRhs).mType = T__None; |
1754 | 0 | mType = t; |
1755 | 0 | return (*(this)); |
1756 | 0 | } |
1757 | | |
1758 | | auto FileRequestResponse::operator==(const nsresult& aRhs) const -> bool |
1759 | 0 | { |
1760 | 0 | return (get_nsresult()) == (aRhs); |
1761 | 0 | } |
1762 | | |
1763 | | auto FileRequestResponse::operator==(const FileRequestGetMetadataResponse& aRhs) const -> bool |
1764 | 0 | { |
1765 | 0 | return (get_FileRequestGetMetadataResponse()) == (aRhs); |
1766 | 0 | } |
1767 | | |
1768 | | auto FileRequestResponse::operator==(const FileRequestReadResponse& aRhs) const -> bool |
1769 | 0 | { |
1770 | 0 | return (get_FileRequestReadResponse()) == (aRhs); |
1771 | 0 | } |
1772 | | |
1773 | | auto FileRequestResponse::operator==(const FileRequestWriteResponse& aRhs) const -> bool |
1774 | 0 | { |
1775 | 0 | return (get_FileRequestWriteResponse()) == (aRhs); |
1776 | 0 | } |
1777 | | |
1778 | | auto FileRequestResponse::operator==(const FileRequestTruncateResponse& aRhs) const -> bool |
1779 | 0 | { |
1780 | 0 | return (get_FileRequestTruncateResponse()) == (aRhs); |
1781 | 0 | } |
1782 | | |
1783 | | auto FileRequestResponse::operator==(const FileRequestFlushResponse& aRhs) const -> bool |
1784 | 0 | { |
1785 | 0 | return (get_FileRequestFlushResponse()) == (aRhs); |
1786 | 0 | } |
1787 | | |
1788 | | auto FileRequestResponse::operator==(const FileRequestGetFileResponse& aRhs) const -> bool |
1789 | 0 | { |
1790 | 0 | return (get_FileRequestGetFileResponse()) == (aRhs); |
1791 | 0 | } |
1792 | | |
1793 | | auto FileRequestResponse::operator==(const FileRequestResponse& aRhs) const -> bool |
1794 | 0 | { |
1795 | 0 | if ((type()) != ((aRhs).type())) { |
1796 | 0 | return false; |
1797 | 0 | } |
1798 | 0 | |
1799 | 0 | switch (type()) { |
1800 | 0 | case Tnsresult: |
1801 | 0 | { |
1802 | 0 | return (get_nsresult()) == ((aRhs).get_nsresult()); |
1803 | 0 | } |
1804 | 0 | case TFileRequestGetMetadataResponse: |
1805 | 0 | { |
1806 | 0 | return (get_FileRequestGetMetadataResponse()) == ((aRhs).get_FileRequestGetMetadataResponse()); |
1807 | 0 | } |
1808 | 0 | case TFileRequestReadResponse: |
1809 | 0 | { |
1810 | 0 | return (get_FileRequestReadResponse()) == ((aRhs).get_FileRequestReadResponse()); |
1811 | 0 | } |
1812 | 0 | case TFileRequestWriteResponse: |
1813 | 0 | { |
1814 | 0 | return (get_FileRequestWriteResponse()) == ((aRhs).get_FileRequestWriteResponse()); |
1815 | 0 | } |
1816 | 0 | case TFileRequestTruncateResponse: |
1817 | 0 | { |
1818 | 0 | return (get_FileRequestTruncateResponse()) == ((aRhs).get_FileRequestTruncateResponse()); |
1819 | 0 | } |
1820 | 0 | case TFileRequestFlushResponse: |
1821 | 0 | { |
1822 | 0 | return (get_FileRequestFlushResponse()) == ((aRhs).get_FileRequestFlushResponse()); |
1823 | 0 | } |
1824 | 0 | case TFileRequestGetFileResponse: |
1825 | 0 | { |
1826 | 0 | return (get_FileRequestGetFileResponse()) == ((aRhs).get_FileRequestGetFileResponse()); |
1827 | 0 | } |
1828 | 0 | default: |
1829 | 0 | { |
1830 | 0 | mozilla::ipc::LogicError("unreached"); |
1831 | 0 | return false; |
1832 | 0 | } |
1833 | 0 | } |
1834 | 0 | } |
1835 | | |
1836 | | auto FileRequestResponse::get(nsresult* aOutValue) const -> void |
1837 | 0 | { |
1838 | 0 | (*(aOutValue)) = get_nsresult(); |
1839 | 0 | } |
1840 | | |
1841 | | auto FileRequestResponse::get(FileRequestGetMetadataResponse* aOutValue) const -> void |
1842 | 0 | { |
1843 | 0 | (*(aOutValue)) = get_FileRequestGetMetadataResponse(); |
1844 | 0 | } |
1845 | | |
1846 | | auto FileRequestResponse::get(FileRequestReadResponse* aOutValue) const -> void |
1847 | 0 | { |
1848 | 0 | (*(aOutValue)) = get_FileRequestReadResponse(); |
1849 | 0 | } |
1850 | | |
1851 | | auto FileRequestResponse::get(FileRequestWriteResponse* aOutValue) const -> void |
1852 | 0 | { |
1853 | 0 | (*(aOutValue)) = get_FileRequestWriteResponse(); |
1854 | 0 | } |
1855 | | |
1856 | | auto FileRequestResponse::get(FileRequestTruncateResponse* aOutValue) const -> void |
1857 | 0 | { |
1858 | 0 | (*(aOutValue)) = get_FileRequestTruncateResponse(); |
1859 | 0 | } |
1860 | | |
1861 | | auto FileRequestResponse::get(FileRequestFlushResponse* aOutValue) const -> void |
1862 | 0 | { |
1863 | 0 | (*(aOutValue)) = get_FileRequestFlushResponse(); |
1864 | 0 | } |
1865 | | |
1866 | | auto FileRequestResponse::get(FileRequestGetFileResponse* aOutValue) const -> void |
1867 | 0 | { |
1868 | 0 | (*(aOutValue)) = get_FileRequestGetFileResponse(); |
1869 | 0 | } |
1870 | | |
1871 | | } // namespace dom |
1872 | | } // namespace mozilla |
1873 | | |
1874 | | namespace mozilla { |
1875 | | namespace ipc { |
1876 | | auto IPDLParamTraits<mozilla::dom::FileRequestResponse>::Write( |
1877 | | IPC::Message* aMsg, |
1878 | | mozilla::ipc::IProtocol* aActor, |
1879 | | const paramType& aVar) -> void |
1880 | | { |
1881 | | typedef mozilla::dom::FileRequestResponse union__; |
1882 | | int type; |
1883 | | type = (aVar).type(); |
1884 | | WriteIPDLParam(aMsg, aActor, type); |
1885 | | // Sentinel = 'FileRequestResponse' |
1886 | | (aMsg)->WriteSentinel(1914989643); |
1887 | | |
1888 | | switch (type) { |
1889 | | case union__::Tnsresult: |
1890 | | { |
1891 | | WriteIPDLParam(aMsg, aActor, (aVar).get_nsresult()); |
1892 | | // Sentinel = 'Tnsresult' |
1893 | | (aMsg)->WriteSentinel(2293764539); |
1894 | | return; |
1895 | | } |
1896 | | case union__::TFileRequestGetMetadataResponse: |
1897 | | { |
1898 | | WriteIPDLParam(aMsg, aActor, (aVar).get_FileRequestGetMetadataResponse()); |
1899 | | // Sentinel = 'TFileRequestGetMetadataResponse' |
1900 | | (aMsg)->WriteSentinel(18882654); |
1901 | | return; |
1902 | | } |
1903 | | case union__::TFileRequestReadResponse: |
1904 | | { |
1905 | | WriteIPDLParam(aMsg, aActor, (aVar).get_FileRequestReadResponse()); |
1906 | | // Sentinel = 'TFileRequestReadResponse' |
1907 | | (aMsg)->WriteSentinel(817963328); |
1908 | | return; |
1909 | | } |
1910 | | case union__::TFileRequestWriteResponse: |
1911 | | { |
1912 | | WriteIPDLParam(aMsg, aActor, (aVar).get_FileRequestWriteResponse()); |
1913 | | // Sentinel = 'TFileRequestWriteResponse' |
1914 | | (aMsg)->WriteSentinel(1937414566); |
1915 | | return; |
1916 | | } |
1917 | | case union__::TFileRequestTruncateResponse: |
1918 | | { |
1919 | | WriteIPDLParam(aMsg, aActor, (aVar).get_FileRequestTruncateResponse()); |
1920 | | // Sentinel = 'TFileRequestTruncateResponse' |
1921 | | (aMsg)->WriteSentinel(2329312254); |
1922 | | return; |
1923 | | } |
1924 | | case union__::TFileRequestFlushResponse: |
1925 | | { |
1926 | | WriteIPDLParam(aMsg, aActor, (aVar).get_FileRequestFlushResponse()); |
1927 | | // Sentinel = 'TFileRequestFlushResponse' |
1928 | | (aMsg)->WriteSentinel(4234370673); |
1929 | | return; |
1930 | | } |
1931 | | case union__::TFileRequestGetFileResponse: |
1932 | | { |
1933 | | WriteIPDLParam(aMsg, aActor, (aVar).get_FileRequestGetFileResponse()); |
1934 | | // Sentinel = 'TFileRequestGetFileResponse' |
1935 | | (aMsg)->WriteSentinel(2486481847); |
1936 | | return; |
1937 | | } |
1938 | | default: |
1939 | | { |
1940 | | (aActor)->FatalError("unknown union type"); |
1941 | | return; |
1942 | | } |
1943 | | } |
1944 | | } |
1945 | | |
1946 | | auto IPDLParamTraits<mozilla::dom::FileRequestResponse>::Read( |
1947 | | const IPC::Message* aMsg, |
1948 | | PickleIterator* aIter, |
1949 | | mozilla::ipc::IProtocol* aActor, |
1950 | | paramType* aVar) -> bool |
1951 | 0 | { |
1952 | 0 | typedef mozilla::dom::FileRequestResponse union__; |
1953 | 0 | int type; |
1954 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&(type)))))) { |
1955 | 0 | (aActor)->FatalError("Error deserializing type of union FileRequestResponse"); |
1956 | 0 | return false; |
1957 | 0 | } |
1958 | 0 | // Sentinel = 'FileRequestResponse' |
1959 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1914989643)))) { |
1960 | 0 | mozilla::ipc::SentinelReadError("Error deserializing type of union FileRequestResponse"); |
1961 | 0 | return false; |
1962 | 0 | } |
1963 | 0 | |
1964 | 0 | switch (type) { |
1965 | 0 | case union__::Tnsresult: |
1966 | 0 | { |
1967 | 0 | nsresult tmp = nsresult(); |
1968 | 0 | (*(aVar)) = tmp; |
1969 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_nsresult())))))) { |
1970 | 0 | (aActor)->FatalError("Error deserializing variant Tnsresult of union FileRequestResponse"); |
1971 | 0 | return false; |
1972 | 0 | } |
1973 | 0 | // Sentinel = 'Tnsresult' |
1974 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2293764539)))) { |
1975 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union FileRequestResponse"); |
1976 | 0 | return false; |
1977 | 0 | } |
1978 | 0 | return true; |
1979 | 0 | } |
1980 | 0 | case union__::TFileRequestGetMetadataResponse: |
1981 | 0 | { |
1982 | 0 | mozilla::dom::FileRequestGetMetadataResponse tmp = mozilla::dom::FileRequestGetMetadataResponse(); |
1983 | 0 | (*(aVar)) = tmp; |
1984 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileRequestGetMetadataResponse())))))) { |
1985 | 0 | (aActor)->FatalError("Error deserializing variant TFileRequestGetMetadataResponse of union FileRequestResponse"); |
1986 | 0 | return false; |
1987 | 0 | } |
1988 | 0 | // Sentinel = 'TFileRequestGetMetadataResponse' |
1989 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 18882654)))) { |
1990 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TFileRequestGetMetadataResponse of union FileRequestResponse"); |
1991 | 0 | return false; |
1992 | 0 | } |
1993 | 0 | return true; |
1994 | 0 | } |
1995 | 0 | case union__::TFileRequestReadResponse: |
1996 | 0 | { |
1997 | 0 | mozilla::dom::FileRequestReadResponse tmp = mozilla::dom::FileRequestReadResponse(); |
1998 | 0 | (*(aVar)) = tmp; |
1999 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileRequestReadResponse())))))) { |
2000 | 0 | (aActor)->FatalError("Error deserializing variant TFileRequestReadResponse of union FileRequestResponse"); |
2001 | 0 | return false; |
2002 | 0 | } |
2003 | 0 | // Sentinel = 'TFileRequestReadResponse' |
2004 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 817963328)))) { |
2005 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TFileRequestReadResponse of union FileRequestResponse"); |
2006 | 0 | return false; |
2007 | 0 | } |
2008 | 0 | return true; |
2009 | 0 | } |
2010 | 0 | case union__::TFileRequestWriteResponse: |
2011 | 0 | { |
2012 | 0 | mozilla::dom::FileRequestWriteResponse tmp = mozilla::dom::FileRequestWriteResponse(); |
2013 | 0 | (*(aVar)) = tmp; |
2014 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileRequestWriteResponse())))))) { |
2015 | 0 | (aActor)->FatalError("Error deserializing variant TFileRequestWriteResponse of union FileRequestResponse"); |
2016 | 0 | return false; |
2017 | 0 | } |
2018 | 0 | // Sentinel = 'TFileRequestWriteResponse' |
2019 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 1937414566)))) { |
2020 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TFileRequestWriteResponse of union FileRequestResponse"); |
2021 | 0 | return false; |
2022 | 0 | } |
2023 | 0 | return true; |
2024 | 0 | } |
2025 | 0 | case union__::TFileRequestTruncateResponse: |
2026 | 0 | { |
2027 | 0 | mozilla::dom::FileRequestTruncateResponse tmp = mozilla::dom::FileRequestTruncateResponse(); |
2028 | 0 | (*(aVar)) = tmp; |
2029 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileRequestTruncateResponse())))))) { |
2030 | 0 | (aActor)->FatalError("Error deserializing variant TFileRequestTruncateResponse of union FileRequestResponse"); |
2031 | 0 | return false; |
2032 | 0 | } |
2033 | 0 | // Sentinel = 'TFileRequestTruncateResponse' |
2034 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2329312254)))) { |
2035 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TFileRequestTruncateResponse of union FileRequestResponse"); |
2036 | 0 | return false; |
2037 | 0 | } |
2038 | 0 | return true; |
2039 | 0 | } |
2040 | 0 | case union__::TFileRequestFlushResponse: |
2041 | 0 | { |
2042 | 0 | mozilla::dom::FileRequestFlushResponse tmp = mozilla::dom::FileRequestFlushResponse(); |
2043 | 0 | (*(aVar)) = tmp; |
2044 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileRequestFlushResponse())))))) { |
2045 | 0 | (aActor)->FatalError("Error deserializing variant TFileRequestFlushResponse of union FileRequestResponse"); |
2046 | 0 | return false; |
2047 | 0 | } |
2048 | 0 | // Sentinel = 'TFileRequestFlushResponse' |
2049 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 4234370673)))) { |
2050 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TFileRequestFlushResponse of union FileRequestResponse"); |
2051 | 0 | return false; |
2052 | 0 | } |
2053 | 0 | return true; |
2054 | 0 | } |
2055 | 0 | case union__::TFileRequestGetFileResponse: |
2056 | 0 | { |
2057 | 0 | mozilla::dom::FileRequestGetFileResponse tmp = mozilla::dom::FileRequestGetFileResponse(); |
2058 | 0 | (*(aVar)) = tmp; |
2059 | 0 | if ((!(ReadIPDLParam(aMsg, aIter, aActor, (&((aVar)->get_FileRequestGetFileResponse())))))) { |
2060 | 0 | (aActor)->FatalError("Error deserializing variant TFileRequestGetFileResponse of union FileRequestResponse"); |
2061 | 0 | return false; |
2062 | 0 | } |
2063 | 0 | // Sentinel = 'TFileRequestGetFileResponse' |
2064 | 0 | if ((!((aMsg)->ReadSentinel(aIter, 2486481847)))) { |
2065 | 0 | mozilla::ipc::SentinelReadError("Error deserializing variant TFileRequestGetFileResponse of union FileRequestResponse"); |
2066 | 0 | return false; |
2067 | 0 | } |
2068 | 0 | return true; |
2069 | 0 | } |
2070 | 0 | default: |
2071 | 0 | { |
2072 | 0 | (aActor)->FatalError("unknown union type"); |
2073 | 0 | return false; |
2074 | 0 | } |
2075 | 0 | } |
2076 | 0 | } |
2077 | | |
2078 | | } // namespace ipc |
2079 | | } // namespace mozilla |