Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PBackgroundFileRequestParent.h"
8 : #include "ipc/IPCMessageUtils.h"
9 :
10 : #include "mozilla/dom/PBackgroundFileHandleParent.h"
11 : #include "mozilla/ipc/PPendingIPCBlobParent.h"
12 :
13 : #include "nsIFile.h"
14 : #include "GeckoProfiler.h"
15 :
16 : namespace mozilla {
17 : namespace dom {
18 :
19 :
20 :
21 0 : MOZ_IMPLICIT PBackgroundFileRequestParent::PBackgroundFileRequestParent() :
22 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
23 0 : mState(PBackgroundFileRequest::__Dead)
24 : {
25 0 : MOZ_COUNT_CTOR(PBackgroundFileRequestParent);
26 0 : }
27 :
28 0 : PBackgroundFileRequestParent::~PBackgroundFileRequestParent()
29 : {
30 0 : MOZ_COUNT_DTOR(PBackgroundFileRequestParent);
31 0 : }
32 :
33 0 : auto PBackgroundFileRequestParent::Manager() const -> PBackgroundFileHandleParent*
34 : {
35 0 : return static_cast<PBackgroundFileHandleParent*>(IProtocol::Manager());
36 : }
37 :
38 0 : auto PBackgroundFileRequestParent::Send__delete__(
39 : PBackgroundFileRequestParent* actor,
40 : const FileRequestResponse& response) -> bool
41 : {
42 0 : if ((!(actor))) {
43 0 : return false;
44 : }
45 :
46 0 : IPC::Message* msg__ = PBackgroundFileRequest::Msg___delete__((actor)->Id());
47 :
48 0 : (actor)->Write(actor, msg__, false);
49 : // Sentinel = 'actor'
50 0 : (msg__)->WriteSentinel(875202478);
51 0 : (actor)->Write(response, msg__);
52 : // Sentinel = 'response'
53 0 : (msg__)->WriteSentinel(2396115421);
54 :
55 :
56 :
57 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundFileRequestParent")) {
58 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundFileRequestParent", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
59 : }
60 0 : AUTO_PROFILER_LABEL("PBackgroundFileRequest::Msg___delete__", OTHER);
61 0 : PBackgroundFileRequest::Transition(PBackgroundFileRequest::Msg___delete____ID, (&((actor)->mState)));
62 :
63 0 : bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
64 :
65 0 : IProtocol* mgr = (actor)->Manager();
66 0 : (actor)->DestroySubtree(Deletion);
67 0 : (actor)->DeallocSubtree();
68 0 : (mgr)->RemoveManagee(PBackgroundFileRequestMsgStart, actor);
69 0 : return sendok__;
70 : }
71 :
72 0 : auto PBackgroundFileRequestParent::SendProgress(
73 : const uint64_t& progress,
74 : const uint64_t& progressMax) -> bool
75 : {
76 0 : IPC::Message* msg__ = PBackgroundFileRequest::Msg_Progress(Id());
77 :
78 0 : Write(progress, msg__);
79 : // Sentinel = 'progress'
80 0 : (msg__)->WriteSentinel(858119353);
81 0 : Write(progressMax, msg__);
82 : // Sentinel = 'progressMax'
83 0 : (msg__)->WriteSentinel(2530734978);
84 :
85 :
86 :
87 :
88 0 : if (mozilla::ipc::LoggingEnabledFor("PBackgroundFileRequestParent")) {
89 0 : mozilla::ipc::LogMessageForProtocol("PBackgroundFileRequestParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
90 : }
91 0 : AUTO_PROFILER_LABEL("PBackgroundFileRequest::Msg_Progress", OTHER);
92 0 : PBackgroundFileRequest::Transition(PBackgroundFileRequest::Msg_Progress__ID, (&(mState)));
93 :
94 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
95 0 : return sendok__;
96 : }
97 :
98 0 : auto PBackgroundFileRequestParent::RemoveManagee(
99 : int32_t aProtocolId,
100 : ProtocolBase* aListener) -> void
101 : {
102 0 : FatalError("unreached");
103 0 : return;
104 : }
105 :
106 0 : auto PBackgroundFileRequestParent::OnMessageReceived(const Message& msg__) -> PBackgroundFileRequestParent::Result
107 : {
108 0 : switch ((msg__).type()) {
109 : case PBackgroundFileRequest::Reply___delete____ID:
110 : {
111 0 : return MsgProcessed;
112 : }
113 : default:
114 : {
115 0 : return MsgNotKnown;
116 : }
117 : }
118 : }
119 :
120 0 : auto PBackgroundFileRequestParent::OnMessageReceived(
121 : const Message& msg__,
122 : Message*& reply__) -> PBackgroundFileRequestParent::Result
123 : {
124 0 : return MsgNotKnown;
125 : }
126 :
127 0 : auto PBackgroundFileRequestParent::OnCallReceived(
128 : const Message& msg__,
129 : Message*& reply__) -> PBackgroundFileRequestParent::Result
130 : {
131 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
132 : return MsgNotKnown;
133 : }
134 :
135 0 : auto PBackgroundFileRequestParent::GetProtocolTypeId() -> int32_t
136 : {
137 0 : return PBackgroundFileRequestMsgStart;
138 : }
139 :
140 0 : auto PBackgroundFileRequestParent::ProtocolName() const -> const char*
141 : {
142 0 : return "PBackgroundFileRequestParent";
143 : }
144 :
145 0 : auto PBackgroundFileRequestParent::DestroySubtree(ActorDestroyReason why) -> void
146 : {
147 : // Unregister from our manager.
148 0 : Unregister(Id());
149 :
150 : // Reject owning pending promises.
151 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
152 :
153 : // Finally, destroy "us".
154 0 : ActorDestroy(why);
155 0 : }
156 :
157 0 : auto PBackgroundFileRequestParent::DeallocSubtree() -> void
158 : {
159 0 : }
160 :
161 0 : auto PBackgroundFileRequestParent::Write(
162 : const FileRequestGetMetadataResponse& v__,
163 : Message* msg__) -> void
164 : {
165 0 : Write((v__).metadata(), msg__);
166 : // Sentinel = 'metadata'
167 0 : (msg__)->WriteSentinel(541737151);
168 0 : }
169 :
170 0 : auto PBackgroundFileRequestParent::Read(
171 : FileRequestGetMetadataResponse* v__,
172 : const Message* msg__,
173 : PickleIterator* iter__) -> bool
174 : {
175 0 : if ((!(Read((&((v__)->metadata())), msg__, iter__)))) {
176 0 : FatalError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetMetadataResponse'");
177 0 : return false;
178 : }
179 : // Sentinel = 'metadata'
180 0 : if ((!((msg__)->ReadSentinel(iter__, 541737151)))) {
181 0 : mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetMetadataResponse'");
182 0 : return false;
183 : }
184 0 : return true;
185 : }
186 :
187 0 : auto PBackgroundFileRequestParent::Write(
188 : const FileRequestSize& v__,
189 : Message* msg__) -> void
190 : {
191 : typedef FileRequestSize type__;
192 0 : Write(int((v__).type()), msg__);
193 : // Sentinel = 'FileRequestSize'
194 0 : (msg__)->WriteSentinel(1806056177);
195 :
196 0 : switch ((v__).type()) {
197 : case type__::Tvoid_t:
198 : {
199 0 : Write((v__).get_void_t(), msg__);
200 : // Sentinel = 'Tvoid_t'
201 0 : (msg__)->WriteSentinel(3041273328);
202 0 : return;
203 : }
204 : case type__::Tuint64_t:
205 : {
206 0 : Write((v__).get_uint64_t(), msg__);
207 : // Sentinel = 'Tuint64_t'
208 0 : (msg__)->WriteSentinel(1935076742);
209 0 : return;
210 : }
211 : default:
212 : {
213 0 : FatalError("unknown union type");
214 0 : return;
215 : }
216 : }
217 : }
218 :
219 0 : auto PBackgroundFileRequestParent::Read(
220 : FileRequestSize* v__,
221 : const Message* msg__,
222 : PickleIterator* iter__) -> bool
223 : {
224 : typedef FileRequestSize type__;
225 : int type;
226 0 : if ((!(Read((&(type)), msg__, iter__)))) {
227 0 : mozilla::ipc::UnionTypeReadError("FileRequestSize");
228 0 : return false;
229 : }
230 : // Sentinel = 'FileRequestSize'
231 0 : if ((!((msg__)->ReadSentinel(iter__, 1806056177)))) {
232 0 : mozilla::ipc::SentinelReadError("FileRequestSize");
233 0 : return false;
234 : }
235 :
236 0 : switch (type) {
237 : case type__::Tvoid_t:
238 : {
239 : void_t tmp = void_t();
240 0 : (*(v__)) = tmp;
241 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
242 0 : FatalError("Error deserializing Union type");
243 0 : return false;
244 : }
245 : // Sentinel = 'Tvoid_t'
246 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
247 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
248 0 : return false;
249 : }
250 0 : return true;
251 : }
252 : case type__::Tuint64_t:
253 : {
254 0 : uint64_t tmp = uint64_t();
255 0 : (*(v__)) = tmp;
256 0 : if ((!(Read((&((v__)->get_uint64_t())), msg__, iter__)))) {
257 0 : FatalError("Error deserializing Union type");
258 0 : return false;
259 : }
260 : // Sentinel = 'Tuint64_t'
261 0 : if ((!((msg__)->ReadSentinel(iter__, 1935076742)))) {
262 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
263 0 : return false;
264 : }
265 0 : return true;
266 : }
267 : default:
268 : {
269 0 : FatalError("unknown union type");
270 0 : return false;
271 : }
272 : }
273 : }
274 :
275 0 : auto PBackgroundFileRequestParent::Write(
276 : const FileRequestWriteResponse& v__,
277 : Message* msg__) -> void
278 : {
279 0 : }
280 :
281 0 : auto PBackgroundFileRequestParent::Read(
282 : FileRequestWriteResponse* v__,
283 : const Message* msg__,
284 : PickleIterator* iter__) -> bool
285 : {
286 0 : return true;
287 : }
288 :
289 0 : auto PBackgroundFileRequestParent::Write(
290 : const FileRequestResponse& v__,
291 : Message* msg__) -> void
292 : {
293 : typedef FileRequestResponse type__;
294 0 : Write(int((v__).type()), msg__);
295 : // Sentinel = 'FileRequestResponse'
296 0 : (msg__)->WriteSentinel(1914989643);
297 :
298 0 : switch ((v__).type()) {
299 : case type__::Tnsresult:
300 : {
301 0 : Write((v__).get_nsresult(), msg__);
302 : // Sentinel = 'Tnsresult'
303 0 : (msg__)->WriteSentinel(2293764539);
304 0 : return;
305 : }
306 : case type__::TFileRequestGetMetadataResponse:
307 : {
308 0 : Write((v__).get_FileRequestGetMetadataResponse(), msg__);
309 : // Sentinel = 'TFileRequestGetMetadataResponse'
310 0 : (msg__)->WriteSentinel(18882654);
311 0 : return;
312 : }
313 : case type__::TFileRequestReadResponse:
314 : {
315 0 : Write((v__).get_FileRequestReadResponse(), msg__);
316 : // Sentinel = 'TFileRequestReadResponse'
317 0 : (msg__)->WriteSentinel(817963328);
318 0 : return;
319 : }
320 : case type__::TFileRequestWriteResponse:
321 : {
322 0 : Write((v__).get_FileRequestWriteResponse(), msg__);
323 : // Sentinel = 'TFileRequestWriteResponse'
324 0 : (msg__)->WriteSentinel(1937414566);
325 0 : return;
326 : }
327 : case type__::TFileRequestTruncateResponse:
328 : {
329 0 : Write((v__).get_FileRequestTruncateResponse(), msg__);
330 : // Sentinel = 'TFileRequestTruncateResponse'
331 0 : (msg__)->WriteSentinel(2329312254);
332 0 : return;
333 : }
334 : case type__::TFileRequestFlushResponse:
335 : {
336 0 : Write((v__).get_FileRequestFlushResponse(), msg__);
337 : // Sentinel = 'TFileRequestFlushResponse'
338 0 : (msg__)->WriteSentinel(4234370673);
339 0 : return;
340 : }
341 : case type__::TFileRequestGetFileResponse:
342 : {
343 0 : Write((v__).get_FileRequestGetFileResponse(), msg__);
344 : // Sentinel = 'TFileRequestGetFileResponse'
345 0 : (msg__)->WriteSentinel(2486481847);
346 0 : return;
347 : }
348 : default:
349 : {
350 0 : FatalError("unknown union type");
351 0 : return;
352 : }
353 : }
354 : }
355 :
356 0 : auto PBackgroundFileRequestParent::Read(
357 : FileRequestResponse* v__,
358 : const Message* msg__,
359 : PickleIterator* iter__) -> bool
360 : {
361 : typedef FileRequestResponse type__;
362 : int type;
363 0 : if ((!(Read((&(type)), msg__, iter__)))) {
364 0 : mozilla::ipc::UnionTypeReadError("FileRequestResponse");
365 0 : return false;
366 : }
367 : // Sentinel = 'FileRequestResponse'
368 0 : if ((!((msg__)->ReadSentinel(iter__, 1914989643)))) {
369 0 : mozilla::ipc::SentinelReadError("FileRequestResponse");
370 0 : return false;
371 : }
372 :
373 0 : switch (type) {
374 : case type__::Tnsresult:
375 : {
376 0 : nsresult tmp = nsresult();
377 0 : (*(v__)) = tmp;
378 0 : if ((!(Read((&((v__)->get_nsresult())), msg__, iter__)))) {
379 0 : FatalError("Error deserializing Union type");
380 0 : return false;
381 : }
382 : // Sentinel = 'Tnsresult'
383 0 : if ((!((msg__)->ReadSentinel(iter__, 2293764539)))) {
384 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
385 0 : return false;
386 : }
387 0 : return true;
388 : }
389 : case type__::TFileRequestGetMetadataResponse:
390 : {
391 0 : FileRequestGetMetadataResponse tmp = FileRequestGetMetadataResponse();
392 0 : (*(v__)) = tmp;
393 0 : if ((!(Read((&((v__)->get_FileRequestGetMetadataResponse())), msg__, iter__)))) {
394 0 : FatalError("Error deserializing Union type");
395 0 : return false;
396 : }
397 : // Sentinel = 'TFileRequestGetMetadataResponse'
398 0 : if ((!((msg__)->ReadSentinel(iter__, 18882654)))) {
399 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
400 0 : return false;
401 : }
402 0 : return true;
403 : }
404 : case type__::TFileRequestReadResponse:
405 : {
406 0 : FileRequestReadResponse tmp = FileRequestReadResponse();
407 0 : (*(v__)) = tmp;
408 0 : if ((!(Read((&((v__)->get_FileRequestReadResponse())), msg__, iter__)))) {
409 0 : FatalError("Error deserializing Union type");
410 0 : return false;
411 : }
412 : // Sentinel = 'TFileRequestReadResponse'
413 0 : if ((!((msg__)->ReadSentinel(iter__, 817963328)))) {
414 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
415 0 : return false;
416 : }
417 0 : return true;
418 : }
419 : case type__::TFileRequestWriteResponse:
420 : {
421 0 : FileRequestWriteResponse tmp = FileRequestWriteResponse();
422 0 : (*(v__)) = tmp;
423 0 : if ((!(Read((&((v__)->get_FileRequestWriteResponse())), msg__, iter__)))) {
424 0 : FatalError("Error deserializing Union type");
425 0 : return false;
426 : }
427 : // Sentinel = 'TFileRequestWriteResponse'
428 0 : if ((!((msg__)->ReadSentinel(iter__, 1937414566)))) {
429 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
430 0 : return false;
431 : }
432 0 : return true;
433 : }
434 : case type__::TFileRequestTruncateResponse:
435 : {
436 0 : FileRequestTruncateResponse tmp = FileRequestTruncateResponse();
437 0 : (*(v__)) = tmp;
438 0 : if ((!(Read((&((v__)->get_FileRequestTruncateResponse())), msg__, iter__)))) {
439 0 : FatalError("Error deserializing Union type");
440 0 : return false;
441 : }
442 : // Sentinel = 'TFileRequestTruncateResponse'
443 0 : if ((!((msg__)->ReadSentinel(iter__, 2329312254)))) {
444 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
445 0 : return false;
446 : }
447 0 : return true;
448 : }
449 : case type__::TFileRequestFlushResponse:
450 : {
451 0 : FileRequestFlushResponse tmp = FileRequestFlushResponse();
452 0 : (*(v__)) = tmp;
453 0 : if ((!(Read((&((v__)->get_FileRequestFlushResponse())), msg__, iter__)))) {
454 0 : FatalError("Error deserializing Union type");
455 0 : return false;
456 : }
457 : // Sentinel = 'TFileRequestFlushResponse'
458 0 : if ((!((msg__)->ReadSentinel(iter__, 4234370673)))) {
459 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
460 0 : return false;
461 : }
462 0 : return true;
463 : }
464 : case type__::TFileRequestGetFileResponse:
465 : {
466 0 : FileRequestGetFileResponse tmp = FileRequestGetFileResponse();
467 0 : (*(v__)) = tmp;
468 0 : if ((!(Read((&((v__)->get_FileRequestGetFileResponse())), msg__, iter__)))) {
469 0 : FatalError("Error deserializing Union type");
470 0 : return false;
471 : }
472 : // Sentinel = 'TFileRequestGetFileResponse'
473 0 : if ((!((msg__)->ReadSentinel(iter__, 2486481847)))) {
474 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
475 0 : return false;
476 : }
477 0 : return true;
478 : }
479 : default:
480 : {
481 0 : FatalError("unknown union type");
482 0 : return false;
483 : }
484 : }
485 : }
486 :
487 0 : auto PBackgroundFileRequestParent::Write(
488 : const FileRequestReadResponse& v__,
489 : Message* msg__) -> void
490 : {
491 0 : Write((v__).data(), msg__);
492 : // Sentinel = 'data'
493 0 : (msg__)->WriteSentinel(843352540);
494 0 : }
495 :
496 0 : auto PBackgroundFileRequestParent::Read(
497 : FileRequestReadResponse* v__,
498 : const Message* msg__,
499 : PickleIterator* iter__) -> bool
500 : {
501 0 : if ((!(Read((&((v__)->data())), msg__, iter__)))) {
502 0 : FatalError("Error deserializing 'data' (nsCString) member of 'FileRequestReadResponse'");
503 0 : return false;
504 : }
505 : // Sentinel = 'data'
506 0 : if ((!((msg__)->ReadSentinel(iter__, 843352540)))) {
507 0 : mozilla::ipc::SentinelReadError("Error deserializing 'data' (nsCString) member of 'FileRequestReadResponse'");
508 0 : return false;
509 : }
510 0 : return true;
511 : }
512 :
513 0 : auto PBackgroundFileRequestParent::Write(
514 : const FileRequestTruncateResponse& v__,
515 : Message* msg__) -> void
516 : {
517 0 : }
518 :
519 0 : auto PBackgroundFileRequestParent::Read(
520 : FileRequestTruncateResponse* v__,
521 : const Message* msg__,
522 : PickleIterator* iter__) -> bool
523 : {
524 0 : return true;
525 : }
526 :
527 0 : auto PBackgroundFileRequestParent::Write(
528 : const FileRequestGetFileResponse& v__,
529 : Message* msg__) -> void
530 : {
531 0 : Write((v__).fileParent(), msg__, false);
532 : // Sentinel = 'file'
533 0 : (msg__)->WriteSentinel(224874390);
534 : // skipping actor field that's meaningless on this side
535 0 : Write((v__).metadata(), msg__);
536 : // Sentinel = 'metadata'
537 0 : (msg__)->WriteSentinel(541737151);
538 0 : }
539 :
540 0 : auto PBackgroundFileRequestParent::Read(
541 : FileRequestGetFileResponse* v__,
542 : const Message* msg__,
543 : PickleIterator* iter__) -> bool
544 : {
545 0 : if ((!(Read((&((v__)->fileParent())), msg__, iter__, false)))) {
546 0 : FatalError("Error deserializing 'fileParent' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'");
547 0 : return false;
548 : }
549 : // Sentinel = 'file'
550 0 : if ((!((msg__)->ReadSentinel(iter__, 224874390)))) {
551 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileParent' (PPendingIPCBlob) member of 'FileRequestGetFileResponse'");
552 0 : return false;
553 : }
554 : // skipping actor field that's meaningless on this side
555 0 : if ((!(Read((&((v__)->metadata())), msg__, iter__)))) {
556 0 : FatalError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetFileResponse'");
557 0 : return false;
558 : }
559 : // Sentinel = 'metadata'
560 0 : if ((!((msg__)->ReadSentinel(iter__, 541737151)))) {
561 0 : mozilla::ipc::SentinelReadError("Error deserializing 'metadata' (FileRequestMetadata) member of 'FileRequestGetFileResponse'");
562 0 : return false;
563 : }
564 0 : return true;
565 : }
566 :
567 0 : auto PBackgroundFileRequestParent::Write(
568 : const FileRequestLastModified& v__,
569 : Message* msg__) -> void
570 : {
571 : typedef FileRequestLastModified type__;
572 0 : Write(int((v__).type()), msg__);
573 : // Sentinel = 'FileRequestLastModified'
574 0 : (msg__)->WriteSentinel(4176568879);
575 :
576 0 : switch ((v__).type()) {
577 : case type__::Tvoid_t:
578 : {
579 0 : Write((v__).get_void_t(), msg__);
580 : // Sentinel = 'Tvoid_t'
581 0 : (msg__)->WriteSentinel(3041273328);
582 0 : return;
583 : }
584 : case type__::Tint64_t:
585 : {
586 0 : Write((v__).get_int64_t(), msg__);
587 : // Sentinel = 'Tint64_t'
588 0 : (msg__)->WriteSentinel(650728676);
589 0 : return;
590 : }
591 : default:
592 : {
593 0 : FatalError("unknown union type");
594 0 : return;
595 : }
596 : }
597 : }
598 :
599 0 : auto PBackgroundFileRequestParent::Read(
600 : FileRequestLastModified* v__,
601 : const Message* msg__,
602 : PickleIterator* iter__) -> bool
603 : {
604 : typedef FileRequestLastModified type__;
605 : int type;
606 0 : if ((!(Read((&(type)), msg__, iter__)))) {
607 0 : mozilla::ipc::UnionTypeReadError("FileRequestLastModified");
608 0 : return false;
609 : }
610 : // Sentinel = 'FileRequestLastModified'
611 0 : if ((!((msg__)->ReadSentinel(iter__, 4176568879)))) {
612 0 : mozilla::ipc::SentinelReadError("FileRequestLastModified");
613 0 : return false;
614 : }
615 :
616 0 : switch (type) {
617 : case type__::Tvoid_t:
618 : {
619 : void_t tmp = void_t();
620 0 : (*(v__)) = tmp;
621 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
622 0 : FatalError("Error deserializing Union type");
623 0 : return false;
624 : }
625 : // Sentinel = 'Tvoid_t'
626 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
627 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
628 0 : return false;
629 : }
630 0 : return true;
631 : }
632 : case type__::Tint64_t:
633 : {
634 0 : int64_t tmp = int64_t();
635 0 : (*(v__)) = tmp;
636 0 : if ((!(Read((&((v__)->get_int64_t())), msg__, iter__)))) {
637 0 : FatalError("Error deserializing Union type");
638 0 : return false;
639 : }
640 : // Sentinel = 'Tint64_t'
641 0 : if ((!((msg__)->ReadSentinel(iter__, 650728676)))) {
642 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
643 0 : return false;
644 : }
645 0 : return true;
646 : }
647 : default:
648 : {
649 0 : FatalError("unknown union type");
650 0 : return false;
651 : }
652 : }
653 : }
654 :
655 0 : auto PBackgroundFileRequestParent::Write(
656 : const PBackgroundFileRequestParent* v__,
657 : Message* msg__,
658 : bool nullable__) -> void
659 : {
660 : int32_t id;
661 0 : if ((!(v__))) {
662 0 : if ((!(nullable__))) {
663 0 : FatalError("NULL actor value passed to non-nullable param");
664 : }
665 0 : id = 0;
666 : }
667 : else {
668 0 : id = (v__)->Id();
669 0 : if ((1) == (id)) {
670 0 : FatalError("actor has been |delete|d");
671 : }
672 : }
673 :
674 0 : Write(id, msg__);
675 0 : }
676 :
677 0 : auto PBackgroundFileRequestParent::Read(
678 : PBackgroundFileRequestParent** v__,
679 : const Message* msg__,
680 : PickleIterator* iter__,
681 : bool nullable__) -> bool
682 : {
683 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBackgroundFileRequest", PBackgroundFileRequestMsgStart);
684 0 : if ((actor).isNothing()) {
685 0 : return false;
686 : }
687 :
688 0 : (*(v__)) = static_cast<PBackgroundFileRequestParent*>((actor).value());
689 0 : return true;
690 : }
691 :
692 0 : auto PBackgroundFileRequestParent::Write(
693 : const FileRequestFlushResponse& v__,
694 : Message* msg__) -> void
695 : {
696 0 : }
697 :
698 0 : auto PBackgroundFileRequestParent::Read(
699 : FileRequestFlushResponse* v__,
700 : const Message* msg__,
701 : PickleIterator* iter__) -> bool
702 : {
703 0 : return true;
704 : }
705 :
706 0 : auto PBackgroundFileRequestParent::Write(
707 : const FileRequestMetadata& v__,
708 : Message* msg__) -> void
709 : {
710 0 : Write((v__).size(), msg__);
711 : // Sentinel = 'size'
712 0 : (msg__)->WriteSentinel(931048223);
713 0 : Write((v__).lastModified(), msg__);
714 : // Sentinel = 'lastModified'
715 0 : (msg__)->WriteSentinel(3456113257);
716 0 : }
717 :
718 0 : auto PBackgroundFileRequestParent::Read(
719 : FileRequestMetadata* v__,
720 : const Message* msg__,
721 : PickleIterator* iter__) -> bool
722 : {
723 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
724 0 : FatalError("Error deserializing 'size' (FileRequestSize) member of 'FileRequestMetadata'");
725 0 : return false;
726 : }
727 : // Sentinel = 'size'
728 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
729 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (FileRequestSize) member of 'FileRequestMetadata'");
730 0 : return false;
731 : }
732 0 : if ((!(Read((&((v__)->lastModified())), msg__, iter__)))) {
733 0 : FatalError("Error deserializing 'lastModified' (FileRequestLastModified) member of 'FileRequestMetadata'");
734 0 : return false;
735 : }
736 : // Sentinel = 'lastModified'
737 0 : if ((!((msg__)->ReadSentinel(iter__, 3456113257)))) {
738 0 : mozilla::ipc::SentinelReadError("Error deserializing 'lastModified' (FileRequestLastModified) member of 'FileRequestMetadata'");
739 0 : return false;
740 : }
741 0 : return true;
742 : }
743 :
744 0 : auto PBackgroundFileRequestParent::Write(
745 : const PPendingIPCBlobParent* v__,
746 : Message* msg__,
747 : bool nullable__) -> void
748 : {
749 : int32_t id;
750 0 : if ((!(v__))) {
751 0 : if ((!(nullable__))) {
752 0 : FatalError("NULL actor value passed to non-nullable param");
753 : }
754 0 : id = 0;
755 : }
756 : else {
757 0 : id = (v__)->Id();
758 0 : if ((1) == (id)) {
759 0 : FatalError("actor has been |delete|d");
760 : }
761 : }
762 :
763 0 : Write(id, msg__);
764 0 : }
765 :
766 0 : auto PBackgroundFileRequestParent::Read(
767 : PPendingIPCBlobParent** v__,
768 : const Message* msg__,
769 : PickleIterator* iter__,
770 : bool nullable__) -> bool
771 : {
772 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PPendingIPCBlob", PPendingIPCBlobMsgStart);
773 0 : if ((actor).isNothing()) {
774 0 : return false;
775 : }
776 :
777 0 : (*(v__)) = static_cast<PPendingIPCBlobParent*>((actor).value());
778 0 : return true;
779 : }
780 :
781 :
782 :
783 : } // namespace dom
784 : } // namespace mozilla
|