Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/dom/PFilePickerChild.h"
8 : #include "ipc/IPCMessageUtils.h"
9 :
10 : #include "mozilla/dom/PBrowserChild.h"
11 : #include "mozilla/ipc/PChildToParentStreamChild.h"
12 : #include "mozilla/ipc/PIPCBlobInputStreamChild.h"
13 : #include "mozilla/ipc/PFileDescriptorSetChild.h"
14 : #include "mozilla/ipc/PParentToChildStreamChild.h"
15 :
16 : #include "nsIFile.h"
17 : #include "GeckoProfiler.h"
18 :
19 : namespace mozilla {
20 : namespace dom {
21 :
22 :
23 0 : auto PFilePickerChild::Recv__delete__(
24 : const MaybeInputData& data,
25 : const int16_t& result) -> mozilla::ipc::IPCResult
26 : {
27 0 : return IPC_OK();
28 : }
29 :
30 0 : auto PFilePickerChild::ActorDestroy(ActorDestroyReason aWhy) -> void
31 : {
32 0 : }
33 :
34 0 : MOZ_IMPLICIT PFilePickerChild::PFilePickerChild() :
35 : mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
36 0 : mState(PFilePicker::__Dead)
37 : {
38 0 : MOZ_COUNT_CTOR(PFilePickerChild);
39 0 : }
40 :
41 0 : PFilePickerChild::~PFilePickerChild()
42 : {
43 0 : MOZ_COUNT_DTOR(PFilePickerChild);
44 0 : }
45 :
46 0 : auto PFilePickerChild::Manager() const -> PBrowserChild*
47 : {
48 0 : return static_cast<PBrowserChild*>(IProtocol::Manager());
49 : }
50 :
51 0 : auto PFilePickerChild::SendOpen(
52 : const int16_t& selectedType,
53 : const bool& addToRecentDocs,
54 : const nsString& defaultFile,
55 : const nsString& defaultExtension,
56 : const nsTArray<nsString>& filters,
57 : const nsTArray<nsString>& filterNames,
58 : const nsString& displayDirectory,
59 : const nsString& displaySpecialDirectory,
60 : const nsString& okButtonLabel) -> bool
61 : {
62 0 : IPC::Message* msg__ = PFilePicker::Msg_Open(Id());
63 :
64 0 : Write(selectedType, msg__);
65 : // Sentinel = 'selectedType'
66 0 : (msg__)->WriteSentinel(2754221735);
67 0 : Write(addToRecentDocs, msg__);
68 : // Sentinel = 'addToRecentDocs'
69 0 : (msg__)->WriteSentinel(3834132697);
70 0 : Write(defaultFile, msg__);
71 : // Sentinel = 'defaultFile'
72 0 : (msg__)->WriteSentinel(3931097842);
73 0 : Write(defaultExtension, msg__);
74 : // Sentinel = 'defaultExtension'
75 0 : (msg__)->WriteSentinel(1359835382);
76 0 : Write(filters, msg__);
77 : // Sentinel = 'filters'
78 0 : (msg__)->WriteSentinel(4001190422);
79 0 : Write(filterNames, msg__);
80 : // Sentinel = 'filterNames'
81 0 : (msg__)->WriteSentinel(1860280721);
82 0 : Write(displayDirectory, msg__);
83 : // Sentinel = 'displayDirectory'
84 0 : (msg__)->WriteSentinel(2246103527);
85 0 : Write(displaySpecialDirectory, msg__);
86 : // Sentinel = 'displaySpecialDirectory'
87 0 : (msg__)->WriteSentinel(4025076023);
88 0 : Write(okButtonLabel, msg__);
89 : // Sentinel = 'okButtonLabel'
90 0 : (msg__)->WriteSentinel(670178141);
91 :
92 :
93 :
94 :
95 0 : if (mozilla::ipc::LoggingEnabledFor("PFilePickerChild")) {
96 0 : mozilla::ipc::LogMessageForProtocol("PFilePickerChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
97 : }
98 0 : AUTO_PROFILER_LABEL("PFilePicker::Msg_Open", OTHER);
99 0 : PFilePicker::Transition(PFilePicker::Msg_Open__ID, (&(mState)));
100 :
101 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
102 0 : return sendok__;
103 : }
104 :
105 0 : auto PFilePickerChild::RemoveManagee(
106 : int32_t aProtocolId,
107 : ProtocolBase* aListener) -> void
108 : {
109 0 : FatalError("unreached");
110 0 : return;
111 : }
112 :
113 0 : auto PFilePickerChild::OnMessageReceived(const Message& msg__) -> PFilePickerChild::Result
114 : {
115 0 : switch ((msg__).type()) {
116 : case PFilePicker::Msg___delete____ID:
117 : {
118 0 : if (mozilla::ipc::LoggingEnabledFor("PFilePickerChild")) {
119 0 : mozilla::ipc::LogMessageForProtocol("PFilePickerChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
120 : }
121 0 : AUTO_PROFILER_LABEL("PFilePicker::Msg___delete__", OTHER);
122 :
123 0 : PickleIterator iter__(msg__);
124 : PFilePickerChild* actor;
125 0 : MaybeInputData data;
126 : int16_t result;
127 :
128 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
129 0 : FatalError("Error deserializing 'PFilePickerChild'");
130 0 : return MsgValueError;
131 : }
132 : // Sentinel = 'actor'
133 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
134 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PFilePickerChild'");
135 0 : return MsgValueError;
136 : }
137 0 : if ((!(Read((&(data)), (&(msg__)), (&(iter__)))))) {
138 0 : FatalError("Error deserializing 'MaybeInputData'");
139 0 : return MsgValueError;
140 : }
141 : // Sentinel = 'data'
142 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
143 0 : mozilla::ipc::SentinelReadError("Error deserializing 'MaybeInputData'");
144 0 : return MsgValueError;
145 : }
146 0 : if ((!(Read((&(result)), (&(msg__)), (&(iter__)))))) {
147 0 : FatalError("Error deserializing 'int16_t'");
148 0 : return MsgValueError;
149 : }
150 : // Sentinel = 'result'
151 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3991766165)))) {
152 0 : mozilla::ipc::SentinelReadError("Error deserializing 'int16_t'");
153 0 : return MsgValueError;
154 : }
155 0 : (msg__).EndRead(iter__, (msg__).type());
156 0 : PFilePicker::Transition(PFilePicker::Msg___delete____ID, (&(mState)));
157 0 : if ((!(Recv__delete__(mozilla::Move(data), mozilla::Move(result))))) {
158 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
159 : // Error handled in mozilla::ipc::IPCResult
160 0 : return MsgProcessingError;
161 : }
162 :
163 :
164 0 : IProtocol* mgr = (actor)->Manager();
165 0 : (actor)->DestroySubtree(Deletion);
166 0 : (actor)->DeallocSubtree();
167 0 : (mgr)->RemoveManagee(PFilePickerMsgStart, actor);
168 :
169 0 : return MsgProcessed;
170 : }
171 : default:
172 : {
173 0 : return MsgNotKnown;
174 : }
175 : }
176 : }
177 :
178 0 : auto PFilePickerChild::OnMessageReceived(
179 : const Message& msg__,
180 : Message*& reply__) -> PFilePickerChild::Result
181 : {
182 0 : return MsgNotKnown;
183 : }
184 :
185 0 : auto PFilePickerChild::OnCallReceived(
186 : const Message& msg__,
187 : Message*& reply__) -> PFilePickerChild::Result
188 : {
189 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
190 : return MsgNotKnown;
191 : }
192 :
193 0 : auto PFilePickerChild::GetProtocolTypeId() -> int32_t
194 : {
195 0 : return PFilePickerMsgStart;
196 : }
197 :
198 0 : auto PFilePickerChild::ProtocolName() const -> const char*
199 : {
200 0 : return "PFilePickerChild";
201 : }
202 :
203 0 : auto PFilePickerChild::DestroySubtree(ActorDestroyReason why) -> void
204 : {
205 : // Unregister from our manager.
206 0 : Unregister(Id());
207 :
208 : // Reject owning pending promises.
209 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
210 :
211 : // Finally, destroy "us".
212 0 : ActorDestroy(why);
213 0 : }
214 :
215 0 : auto PFilePickerChild::DeallocSubtree() -> void
216 : {
217 0 : }
218 :
219 0 : auto PFilePickerChild::Write(
220 : const nsTArray<InputStreamParams>& v__,
221 : Message* msg__) -> void
222 : {
223 0 : uint32_t length = (v__).Length();
224 0 : Write(length, msg__);
225 : // Sentinel = ('length', 'InputStreamParams[]')
226 0 : (msg__)->WriteSentinel(348334258);
227 :
228 0 : for (auto& elem : v__) {
229 0 : Write(elem, msg__);
230 : // Sentinel = 'InputStreamParams[]'
231 0 : (msg__)->WriteSentinel(2927715197);
232 : }
233 0 : }
234 :
235 0 : auto PFilePickerChild::Read(
236 : nsTArray<InputStreamParams>* v__,
237 : const Message* msg__,
238 : PickleIterator* iter__) -> bool
239 : {
240 0 : nsTArray<InputStreamParams> fa;
241 : uint32_t length;
242 0 : if ((!(Read((&(length)), msg__, iter__)))) {
243 0 : mozilla::ipc::ArrayLengthReadError("InputStreamParams[]");
244 0 : return false;
245 : }
246 : // Sentinel = ('length', 'InputStreamParams[]')
247 0 : if ((!((msg__)->ReadSentinel(iter__, 348334258)))) {
248 0 : mozilla::ipc::SentinelReadError("InputStreamParams[]");
249 0 : return false;
250 : }
251 :
252 0 : InputStreamParams* elems = (fa).AppendElements(length);
253 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
254 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
255 0 : FatalError("Error deserializing 'InputStreamParams[i]'");
256 0 : return false;
257 : }
258 : // Sentinel = 'InputStreamParams[]'
259 0 : if ((!((msg__)->ReadSentinel(iter__, 2927715197)))) {
260 0 : mozilla::ipc::SentinelReadError("Error deserializing 'InputStreamParams[i]'");
261 0 : return false;
262 : }
263 : }
264 0 : (v__)->SwapElements(fa);
265 0 : return true;
266 : }
267 :
268 0 : auto PFilePickerChild::Write(
269 : const OptionalInputStreamParams& v__,
270 : Message* msg__) -> void
271 : {
272 : typedef OptionalInputStreamParams type__;
273 0 : Write(int((v__).type()), msg__);
274 : // Sentinel = 'OptionalInputStreamParams'
275 0 : (msg__)->WriteSentinel(1355174443);
276 :
277 0 : switch ((v__).type()) {
278 : case type__::Tvoid_t:
279 : {
280 0 : Write((v__).get_void_t(), msg__);
281 : // Sentinel = 'Tvoid_t'
282 0 : (msg__)->WriteSentinel(3041273328);
283 0 : return;
284 : }
285 : case type__::TInputStreamParams:
286 : {
287 0 : Write((v__).get_InputStreamParams(), msg__);
288 : // Sentinel = 'TInputStreamParams'
289 0 : (msg__)->WriteSentinel(55652096);
290 0 : return;
291 : }
292 : default:
293 : {
294 0 : FatalError("unknown union type");
295 0 : return;
296 : }
297 : }
298 : }
299 :
300 0 : auto PFilePickerChild::Read(
301 : OptionalInputStreamParams* v__,
302 : const Message* msg__,
303 : PickleIterator* iter__) -> bool
304 : {
305 : typedef OptionalInputStreamParams type__;
306 : int type;
307 0 : if ((!(Read((&(type)), msg__, iter__)))) {
308 0 : mozilla::ipc::UnionTypeReadError("OptionalInputStreamParams");
309 0 : return false;
310 : }
311 : // Sentinel = 'OptionalInputStreamParams'
312 0 : if ((!((msg__)->ReadSentinel(iter__, 1355174443)))) {
313 0 : mozilla::ipc::SentinelReadError("OptionalInputStreamParams");
314 0 : return false;
315 : }
316 :
317 0 : switch (type) {
318 : case type__::Tvoid_t:
319 : {
320 : void_t tmp = void_t();
321 0 : (*(v__)) = tmp;
322 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
323 0 : FatalError("Error deserializing Union type");
324 0 : return false;
325 : }
326 : // Sentinel = 'Tvoid_t'
327 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
328 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
329 0 : return false;
330 : }
331 0 : return true;
332 : }
333 : case type__::TInputStreamParams:
334 : {
335 0 : InputStreamParams tmp = InputStreamParams();
336 0 : (*(v__)) = tmp;
337 0 : if ((!(Read((&((v__)->get_InputStreamParams())), msg__, iter__)))) {
338 0 : FatalError("Error deserializing Union type");
339 0 : return false;
340 : }
341 : // Sentinel = 'TInputStreamParams'
342 0 : if ((!((msg__)->ReadSentinel(iter__, 55652096)))) {
343 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
344 0 : return false;
345 : }
346 0 : return true;
347 : }
348 : default:
349 : {
350 0 : FatalError("unknown union type");
351 0 : return false;
352 : }
353 : }
354 : }
355 :
356 0 : auto PFilePickerChild::Write(
357 : const InputBlobs& v__,
358 : Message* msg__) -> void
359 : {
360 0 : Write((v__).blobs(), msg__);
361 : // Sentinel = 'blobs'
362 0 : (msg__)->WriteSentinel(635500709);
363 0 : }
364 :
365 0 : auto PFilePickerChild::Read(
366 : InputBlobs* v__,
367 : const Message* msg__,
368 : PickleIterator* iter__) -> bool
369 : {
370 0 : if ((!(Read((&((v__)->blobs())), msg__, iter__)))) {
371 0 : FatalError("Error deserializing 'blobs' (IPCBlob[]) member of 'InputBlobs'");
372 0 : return false;
373 : }
374 : // Sentinel = 'blobs'
375 0 : if ((!((msg__)->ReadSentinel(iter__, 635500709)))) {
376 0 : mozilla::ipc::SentinelReadError("Error deserializing 'blobs' (IPCBlob[]) member of 'InputBlobs'");
377 0 : return false;
378 : }
379 0 : return true;
380 : }
381 :
382 0 : auto PFilePickerChild::Write(
383 : const IPCRemoteStream& v__,
384 : Message* msg__) -> void
385 : {
386 0 : Write((v__).delayedStart(), msg__);
387 : // Sentinel = 'delayedStart'
388 0 : (msg__)->WriteSentinel(1491822294);
389 0 : Write((v__).stream(), msg__);
390 : // Sentinel = 'stream'
391 0 : (msg__)->WriteSentinel(4152748422);
392 0 : }
393 :
394 0 : auto PFilePickerChild::Read(
395 : IPCRemoteStream* v__,
396 : const Message* msg__,
397 : PickleIterator* iter__) -> bool
398 : {
399 0 : if ((!(Read((&((v__)->delayedStart())), msg__, iter__)))) {
400 0 : FatalError("Error deserializing 'delayedStart' (bool) member of 'IPCRemoteStream'");
401 0 : return false;
402 : }
403 : // Sentinel = 'delayedStart'
404 0 : if ((!((msg__)->ReadSentinel(iter__, 1491822294)))) {
405 0 : mozilla::ipc::SentinelReadError("Error deserializing 'delayedStart' (bool) member of 'IPCRemoteStream'");
406 0 : return false;
407 : }
408 0 : if ((!(Read((&((v__)->stream())), msg__, iter__)))) {
409 0 : FatalError("Error deserializing 'stream' (IPCRemoteStreamType) member of 'IPCRemoteStream'");
410 0 : return false;
411 : }
412 : // Sentinel = 'stream'
413 0 : if ((!((msg__)->ReadSentinel(iter__, 4152748422)))) {
414 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stream' (IPCRemoteStreamType) member of 'IPCRemoteStream'");
415 0 : return false;
416 : }
417 0 : return true;
418 : }
419 :
420 0 : auto PFilePickerChild::Write(
421 : const nsTArray<HeaderEntry>& v__,
422 : Message* msg__) -> void
423 : {
424 0 : uint32_t length = (v__).Length();
425 0 : Write(length, msg__);
426 : // Sentinel = ('length', 'HeaderEntry[]')
427 0 : (msg__)->WriteSentinel(2689457705);
428 :
429 0 : for (auto& elem : v__) {
430 0 : Write(elem, msg__);
431 : // Sentinel = 'HeaderEntry[]'
432 0 : (msg__)->WriteSentinel(454836120);
433 : }
434 0 : }
435 :
436 0 : auto PFilePickerChild::Read(
437 : nsTArray<HeaderEntry>* v__,
438 : const Message* msg__,
439 : PickleIterator* iter__) -> bool
440 : {
441 0 : nsTArray<HeaderEntry> fa;
442 : uint32_t length;
443 0 : if ((!(Read((&(length)), msg__, iter__)))) {
444 0 : mozilla::ipc::ArrayLengthReadError("HeaderEntry[]");
445 0 : return false;
446 : }
447 : // Sentinel = ('length', 'HeaderEntry[]')
448 0 : if ((!((msg__)->ReadSentinel(iter__, 2689457705)))) {
449 0 : mozilla::ipc::SentinelReadError("HeaderEntry[]");
450 0 : return false;
451 : }
452 :
453 0 : HeaderEntry* elems = (fa).AppendElements(length);
454 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
455 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
456 0 : FatalError("Error deserializing 'HeaderEntry[i]'");
457 0 : return false;
458 : }
459 : // Sentinel = 'HeaderEntry[]'
460 0 : if ((!((msg__)->ReadSentinel(iter__, 454836120)))) {
461 0 : mozilla::ipc::SentinelReadError("Error deserializing 'HeaderEntry[i]'");
462 0 : return false;
463 : }
464 : }
465 0 : (v__)->SwapElements(fa);
466 0 : return true;
467 : }
468 :
469 0 : auto PFilePickerChild::Write(
470 : const FileInputStreamParams& v__,
471 : Message* msg__) -> void
472 : {
473 0 : Write((v__).fileDescriptorIndex(), msg__);
474 : // Sentinel = 'fileDescriptorIndex'
475 0 : (msg__)->WriteSentinel(587329112);
476 0 : Write((v__).behaviorFlags(), msg__);
477 : // Sentinel = 'behaviorFlags'
478 0 : (msg__)->WriteSentinel(2404401962);
479 0 : Write((v__).ioFlags(), msg__);
480 : // Sentinel = 'ioFlags'
481 0 : (msg__)->WriteSentinel(1483009730);
482 0 : }
483 :
484 0 : auto PFilePickerChild::Read(
485 : FileInputStreamParams* v__,
486 : const Message* msg__,
487 : PickleIterator* iter__) -> bool
488 : {
489 0 : if ((!(Read((&((v__)->fileDescriptorIndex())), msg__, iter__)))) {
490 0 : FatalError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'FileInputStreamParams'");
491 0 : return false;
492 : }
493 : // Sentinel = 'fileDescriptorIndex'
494 0 : if ((!((msg__)->ReadSentinel(iter__, 587329112)))) {
495 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'FileInputStreamParams'");
496 0 : return false;
497 : }
498 0 : if ((!(Read((&((v__)->behaviorFlags())), msg__, iter__)))) {
499 0 : FatalError("Error deserializing 'behaviorFlags' (int32_t) member of 'FileInputStreamParams'");
500 0 : return false;
501 : }
502 : // Sentinel = 'behaviorFlags'
503 0 : if ((!((msg__)->ReadSentinel(iter__, 2404401962)))) {
504 0 : mozilla::ipc::SentinelReadError("Error deserializing 'behaviorFlags' (int32_t) member of 'FileInputStreamParams'");
505 0 : return false;
506 : }
507 0 : if ((!(Read((&((v__)->ioFlags())), msg__, iter__)))) {
508 0 : FatalError("Error deserializing 'ioFlags' (int32_t) member of 'FileInputStreamParams'");
509 0 : return false;
510 : }
511 : // Sentinel = 'ioFlags'
512 0 : if ((!((msg__)->ReadSentinel(iter__, 1483009730)))) {
513 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ioFlags' (int32_t) member of 'FileInputStreamParams'");
514 0 : return false;
515 : }
516 0 : return true;
517 : }
518 :
519 0 : auto PFilePickerChild::Write(
520 : const PFilePickerChild* v__,
521 : Message* msg__,
522 : bool nullable__) -> void
523 : {
524 : int32_t id;
525 0 : if ((!(v__))) {
526 0 : if ((!(nullable__))) {
527 0 : FatalError("NULL actor value passed to non-nullable param");
528 : }
529 0 : id = 0;
530 : }
531 : else {
532 0 : id = (v__)->Id();
533 0 : if ((1) == (id)) {
534 0 : FatalError("actor has been |delete|d");
535 : }
536 : }
537 :
538 0 : Write(id, msg__);
539 0 : }
540 :
541 0 : auto PFilePickerChild::Read(
542 : PFilePickerChild** v__,
543 : const Message* msg__,
544 : PickleIterator* iter__,
545 : bool nullable__) -> bool
546 : {
547 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PFilePicker", PFilePickerMsgStart);
548 0 : if ((actor).isNothing()) {
549 0 : return false;
550 : }
551 :
552 0 : (*(v__)) = static_cast<PFilePickerChild*>((actor).value());
553 0 : return true;
554 : }
555 :
556 0 : auto PFilePickerChild::Write(
557 : const IPCBlobInputStreamParams& v__,
558 : Message* msg__) -> void
559 : {
560 0 : Write((v__).id(), msg__);
561 : // Sentinel = 'id'
562 0 : (msg__)->WriteSentinel(2794505629);
563 0 : }
564 :
565 0 : auto PFilePickerChild::Read(
566 : IPCBlobInputStreamParams* v__,
567 : const Message* msg__,
568 : PickleIterator* iter__) -> bool
569 : {
570 0 : if ((!(Read((&((v__)->id())), msg__, iter__)))) {
571 0 : FatalError("Error deserializing 'id' (nsID) member of 'IPCBlobInputStreamParams'");
572 0 : return false;
573 : }
574 : // Sentinel = 'id'
575 0 : if ((!((msg__)->ReadSentinel(iter__, 2794505629)))) {
576 0 : mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsID) member of 'IPCBlobInputStreamParams'");
577 0 : return false;
578 : }
579 0 : return true;
580 : }
581 :
582 0 : auto PFilePickerChild::Write(
583 : const IPCFile& v__,
584 : Message* msg__) -> void
585 : {
586 0 : Write((v__).name(), msg__);
587 : // Sentinel = 'name'
588 0 : (msg__)->WriteSentinel(15034981);
589 0 : Write((v__).lastModified(), msg__);
590 : // Sentinel = 'lastModified'
591 0 : (msg__)->WriteSentinel(3456113257);
592 0 : Write((v__).DOMPath(), msg__);
593 : // Sentinel = 'DOMPath'
594 0 : (msg__)->WriteSentinel(1724352494);
595 0 : Write((v__).fullPath(), msg__);
596 : // Sentinel = 'fullPath'
597 0 : (msg__)->WriteSentinel(385652698);
598 0 : Write((v__).isDirectory(), msg__);
599 : // Sentinel = 'isDirectory'
600 0 : (msg__)->WriteSentinel(2309743506);
601 0 : }
602 :
603 0 : auto PFilePickerChild::Read(
604 : IPCFile* v__,
605 : const Message* msg__,
606 : PickleIterator* iter__) -> bool
607 : {
608 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
609 0 : FatalError("Error deserializing 'name' (nsString) member of 'IPCFile'");
610 0 : return false;
611 : }
612 : // Sentinel = 'name'
613 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
614 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'IPCFile'");
615 0 : return false;
616 : }
617 0 : if ((!(Read((&((v__)->lastModified())), msg__, iter__)))) {
618 0 : FatalError("Error deserializing 'lastModified' (int64_t) member of 'IPCFile'");
619 0 : return false;
620 : }
621 : // Sentinel = 'lastModified'
622 0 : if ((!((msg__)->ReadSentinel(iter__, 3456113257)))) {
623 0 : mozilla::ipc::SentinelReadError("Error deserializing 'lastModified' (int64_t) member of 'IPCFile'");
624 0 : return false;
625 : }
626 0 : if ((!(Read((&((v__)->DOMPath())), msg__, iter__)))) {
627 0 : FatalError("Error deserializing 'DOMPath' (nsString) member of 'IPCFile'");
628 0 : return false;
629 : }
630 : // Sentinel = 'DOMPath'
631 0 : if ((!((msg__)->ReadSentinel(iter__, 1724352494)))) {
632 0 : mozilla::ipc::SentinelReadError("Error deserializing 'DOMPath' (nsString) member of 'IPCFile'");
633 0 : return false;
634 : }
635 0 : if ((!(Read((&((v__)->fullPath())), msg__, iter__)))) {
636 0 : FatalError("Error deserializing 'fullPath' (nsString) member of 'IPCFile'");
637 0 : return false;
638 : }
639 : // Sentinel = 'fullPath'
640 0 : if ((!((msg__)->ReadSentinel(iter__, 385652698)))) {
641 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fullPath' (nsString) member of 'IPCFile'");
642 0 : return false;
643 : }
644 0 : if ((!(Read((&((v__)->isDirectory())), msg__, iter__)))) {
645 0 : FatalError("Error deserializing 'isDirectory' (bool) member of 'IPCFile'");
646 0 : return false;
647 : }
648 : // Sentinel = 'isDirectory'
649 0 : if ((!((msg__)->ReadSentinel(iter__, 2309743506)))) {
650 0 : mozilla::ipc::SentinelReadError("Error deserializing 'isDirectory' (bool) member of 'IPCFile'");
651 0 : return false;
652 : }
653 0 : return true;
654 : }
655 :
656 0 : auto PFilePickerChild::Write(
657 : const IPCFileUnion& v__,
658 : Message* msg__) -> void
659 : {
660 : typedef IPCFileUnion type__;
661 0 : Write(int((v__).type()), msg__);
662 : // Sentinel = 'IPCFileUnion'
663 0 : (msg__)->WriteSentinel(1913022529);
664 :
665 0 : switch ((v__).type()) {
666 : case type__::Tvoid_t:
667 : {
668 0 : Write((v__).get_void_t(), msg__);
669 : // Sentinel = 'Tvoid_t'
670 0 : (msg__)->WriteSentinel(3041273328);
671 0 : return;
672 : }
673 : case type__::TIPCFile:
674 : {
675 0 : Write((v__).get_IPCFile(), msg__);
676 : // Sentinel = 'TIPCFile'
677 0 : (msg__)->WriteSentinel(3562676876);
678 0 : return;
679 : }
680 : default:
681 : {
682 0 : FatalError("unknown union type");
683 0 : return;
684 : }
685 : }
686 : }
687 :
688 0 : auto PFilePickerChild::Read(
689 : IPCFileUnion* v__,
690 : const Message* msg__,
691 : PickleIterator* iter__) -> bool
692 : {
693 : typedef IPCFileUnion type__;
694 : int type;
695 0 : if ((!(Read((&(type)), msg__, iter__)))) {
696 0 : mozilla::ipc::UnionTypeReadError("IPCFileUnion");
697 0 : return false;
698 : }
699 : // Sentinel = 'IPCFileUnion'
700 0 : if ((!((msg__)->ReadSentinel(iter__, 1913022529)))) {
701 0 : mozilla::ipc::SentinelReadError("IPCFileUnion");
702 0 : return false;
703 : }
704 :
705 0 : switch (type) {
706 : case type__::Tvoid_t:
707 : {
708 : void_t tmp = void_t();
709 0 : (*(v__)) = tmp;
710 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
711 0 : FatalError("Error deserializing Union type");
712 0 : return false;
713 : }
714 : // Sentinel = 'Tvoid_t'
715 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
716 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
717 0 : return false;
718 : }
719 0 : return true;
720 : }
721 : case type__::TIPCFile:
722 : {
723 0 : IPCFile tmp = IPCFile();
724 0 : (*(v__)) = tmp;
725 0 : if ((!(Read((&((v__)->get_IPCFile())), msg__, iter__)))) {
726 0 : FatalError("Error deserializing Union type");
727 0 : return false;
728 : }
729 : // Sentinel = 'TIPCFile'
730 0 : if ((!((msg__)->ReadSentinel(iter__, 3562676876)))) {
731 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
732 0 : return false;
733 : }
734 0 : return true;
735 : }
736 : default:
737 : {
738 0 : FatalError("unknown union type");
739 0 : return false;
740 : }
741 : }
742 : }
743 :
744 0 : auto PFilePickerChild::Write(
745 : const InputStreamParamsWithFds& v__,
746 : Message* msg__) -> void
747 : {
748 0 : Write((v__).stream(), msg__);
749 : // Sentinel = 'stream'
750 0 : (msg__)->WriteSentinel(4152748422);
751 0 : Write((v__).optionalFds(), msg__);
752 : // Sentinel = 'optionalFds'
753 0 : (msg__)->WriteSentinel(1021803302);
754 0 : }
755 :
756 0 : auto PFilePickerChild::Read(
757 : InputStreamParamsWithFds* v__,
758 : const Message* msg__,
759 : PickleIterator* iter__) -> bool
760 : {
761 0 : if ((!(Read((&((v__)->stream())), msg__, iter__)))) {
762 0 : FatalError("Error deserializing 'stream' (InputStreamParams) member of 'InputStreamParamsWithFds'");
763 0 : return false;
764 : }
765 : // Sentinel = 'stream'
766 0 : if ((!((msg__)->ReadSentinel(iter__, 4152748422)))) {
767 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stream' (InputStreamParams) member of 'InputStreamParamsWithFds'");
768 0 : return false;
769 : }
770 0 : if ((!(Read((&((v__)->optionalFds())), msg__, iter__)))) {
771 0 : FatalError("Error deserializing 'optionalFds' (OptionalFileDescriptorSet) member of 'InputStreamParamsWithFds'");
772 0 : return false;
773 : }
774 : // Sentinel = 'optionalFds'
775 0 : if ((!((msg__)->ReadSentinel(iter__, 1021803302)))) {
776 0 : mozilla::ipc::SentinelReadError("Error deserializing 'optionalFds' (OptionalFileDescriptorSet) member of 'InputStreamParamsWithFds'");
777 0 : return false;
778 : }
779 0 : return true;
780 : }
781 :
782 0 : auto PFilePickerChild::Write(
783 : const IPCBlobStream& v__,
784 : Message* msg__) -> void
785 : {
786 : typedef IPCBlobStream type__;
787 0 : Write(int((v__).type()), msg__);
788 : // Sentinel = 'IPCBlobStream'
789 0 : (msg__)->WriteSentinel(2926762354);
790 :
791 0 : switch ((v__).type()) {
792 : case type__::TPIPCBlobInputStreamParent:
793 : {
794 0 : FatalError("wrong side!");
795 0 : return;
796 : }
797 : case type__::TPIPCBlobInputStreamChild:
798 : {
799 0 : Write((v__).get_PIPCBlobInputStreamChild(), msg__, false);
800 : // Sentinel = 'TPIPCBlobInputStreamChild'
801 0 : (msg__)->WriteSentinel(3349556844);
802 0 : return;
803 : }
804 : case type__::TIPCStream:
805 : {
806 0 : Write((v__).get_IPCStream(), msg__);
807 : // Sentinel = 'TIPCStream'
808 0 : (msg__)->WriteSentinel(40701900);
809 0 : return;
810 : }
811 : default:
812 : {
813 0 : FatalError("unknown union type");
814 0 : return;
815 : }
816 : }
817 : }
818 :
819 0 : auto PFilePickerChild::Read(
820 : IPCBlobStream* v__,
821 : const Message* msg__,
822 : PickleIterator* iter__) -> bool
823 : {
824 : typedef IPCBlobStream type__;
825 : int type;
826 0 : if ((!(Read((&(type)), msg__, iter__)))) {
827 0 : mozilla::ipc::UnionTypeReadError("IPCBlobStream");
828 0 : return false;
829 : }
830 : // Sentinel = 'IPCBlobStream'
831 0 : if ((!((msg__)->ReadSentinel(iter__, 2926762354)))) {
832 0 : mozilla::ipc::SentinelReadError("IPCBlobStream");
833 0 : return false;
834 : }
835 :
836 0 : switch (type) {
837 : case type__::TPIPCBlobInputStreamParent:
838 : {
839 0 : PIPCBlobInputStreamChild* tmp = nullptr;
840 0 : (*(v__)) = tmp;
841 0 : if ((!(Read((&((v__)->get_PIPCBlobInputStreamChild())), msg__, iter__, false)))) {
842 0 : FatalError("Error deserializing Union type");
843 0 : return false;
844 : }
845 : // Sentinel = 'TPIPCBlobInputStreamParent'
846 0 : if ((!((msg__)->ReadSentinel(iter__, 2944059743)))) {
847 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
848 0 : return false;
849 : }
850 0 : return true;
851 : }
852 : case type__::TPIPCBlobInputStreamChild:
853 : {
854 0 : return false;
855 : }
856 : case type__::TIPCStream:
857 : {
858 0 : IPCStream tmp = IPCStream();
859 0 : (*(v__)) = tmp;
860 0 : if ((!(Read((&((v__)->get_IPCStream())), msg__, iter__)))) {
861 0 : FatalError("Error deserializing Union type");
862 0 : return false;
863 : }
864 : // Sentinel = 'TIPCStream'
865 0 : if ((!((msg__)->ReadSentinel(iter__, 40701900)))) {
866 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
867 0 : return false;
868 : }
869 0 : return true;
870 : }
871 : default:
872 : {
873 0 : FatalError("unknown union type");
874 0 : return false;
875 : }
876 : }
877 : }
878 :
879 0 : auto PFilePickerChild::Write(
880 : const nsTArray<IPCBlob>& v__,
881 : Message* msg__) -> void
882 : {
883 0 : uint32_t length = (v__).Length();
884 0 : Write(length, msg__);
885 : // Sentinel = ('length', 'IPCBlob[]')
886 0 : (msg__)->WriteSentinel(894413667);
887 :
888 0 : for (auto& elem : v__) {
889 0 : Write(elem, msg__);
890 : // Sentinel = 'IPCBlob[]'
891 0 : (msg__)->WriteSentinel(3337464726);
892 : }
893 0 : }
894 :
895 0 : auto PFilePickerChild::Read(
896 : nsTArray<IPCBlob>* v__,
897 : const Message* msg__,
898 : PickleIterator* iter__) -> bool
899 : {
900 0 : nsTArray<IPCBlob> fa;
901 : uint32_t length;
902 0 : if ((!(Read((&(length)), msg__, iter__)))) {
903 0 : mozilla::ipc::ArrayLengthReadError("IPCBlob[]");
904 0 : return false;
905 : }
906 : // Sentinel = ('length', 'IPCBlob[]')
907 0 : if ((!((msg__)->ReadSentinel(iter__, 894413667)))) {
908 0 : mozilla::ipc::SentinelReadError("IPCBlob[]");
909 0 : return false;
910 : }
911 :
912 0 : IPCBlob* elems = (fa).AppendElements(length);
913 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
914 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
915 0 : FatalError("Error deserializing 'IPCBlob[i]'");
916 0 : return false;
917 : }
918 : // Sentinel = 'IPCBlob[]'
919 0 : if ((!((msg__)->ReadSentinel(iter__, 3337464726)))) {
920 0 : mozilla::ipc::SentinelReadError("Error deserializing 'IPCBlob[i]'");
921 0 : return false;
922 : }
923 : }
924 0 : (v__)->SwapElements(fa);
925 0 : return true;
926 : }
927 :
928 0 : auto PFilePickerChild::Write(
929 : const nsTArray<FileDescriptor>& v__,
930 : Message* msg__) -> void
931 : {
932 0 : uint32_t length = (v__).Length();
933 0 : Write(length, msg__);
934 : // Sentinel = ('length', 'FileDescriptor[]')
935 0 : (msg__)->WriteSentinel(1697726450);
936 :
937 0 : for (auto& elem : v__) {
938 0 : Write(elem, msg__);
939 : // Sentinel = 'FileDescriptor[]'
940 0 : (msg__)->WriteSentinel(1630221245);
941 : }
942 0 : }
943 :
944 0 : auto PFilePickerChild::Read(
945 : nsTArray<FileDescriptor>* v__,
946 : const Message* msg__,
947 : PickleIterator* iter__) -> bool
948 : {
949 0 : nsTArray<FileDescriptor> fa;
950 : uint32_t length;
951 0 : if ((!(Read((&(length)), msg__, iter__)))) {
952 0 : mozilla::ipc::ArrayLengthReadError("FileDescriptor[]");
953 0 : return false;
954 : }
955 : // Sentinel = ('length', 'FileDescriptor[]')
956 0 : if ((!((msg__)->ReadSentinel(iter__, 1697726450)))) {
957 0 : mozilla::ipc::SentinelReadError("FileDescriptor[]");
958 0 : return false;
959 : }
960 :
961 0 : FileDescriptor* elems = (fa).AppendElements(length);
962 0 : for (uint32_t i = 0; (i) < (length); (++(i))) {
963 0 : if ((!(Read((&(elems[i])), msg__, iter__)))) {
964 0 : FatalError("Error deserializing 'FileDescriptor[i]'");
965 0 : return false;
966 : }
967 : // Sentinel = 'FileDescriptor[]'
968 0 : if ((!((msg__)->ReadSentinel(iter__, 1630221245)))) {
969 0 : mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor[i]'");
970 0 : return false;
971 : }
972 : }
973 0 : (v__)->SwapElements(fa);
974 0 : return true;
975 : }
976 :
977 0 : auto PFilePickerChild::Write(
978 : const MaybeInputData& v__,
979 : Message* msg__) -> void
980 : {
981 : typedef MaybeInputData type__;
982 0 : Write(int((v__).type()), msg__);
983 : // Sentinel = 'MaybeInputData'
984 0 : (msg__)->WriteSentinel(1327357166);
985 :
986 0 : switch ((v__).type()) {
987 : case type__::TInputBlobs:
988 : {
989 0 : Write((v__).get_InputBlobs(), msg__);
990 : // Sentinel = 'TInputBlobs'
991 0 : (msg__)->WriteSentinel(1636803371);
992 0 : return;
993 : }
994 : case type__::TInputDirectory:
995 : {
996 0 : Write((v__).get_InputDirectory(), msg__);
997 : // Sentinel = 'TInputDirectory'
998 0 : (msg__)->WriteSentinel(4032479102);
999 0 : return;
1000 : }
1001 : case type__::Tvoid_t:
1002 : {
1003 0 : Write((v__).get_void_t(), msg__);
1004 : // Sentinel = 'Tvoid_t'
1005 0 : (msg__)->WriteSentinel(3041273328);
1006 0 : return;
1007 : }
1008 : default:
1009 : {
1010 0 : FatalError("unknown union type");
1011 0 : return;
1012 : }
1013 : }
1014 : }
1015 :
1016 0 : auto PFilePickerChild::Read(
1017 : MaybeInputData* v__,
1018 : const Message* msg__,
1019 : PickleIterator* iter__) -> bool
1020 : {
1021 : typedef MaybeInputData type__;
1022 : int type;
1023 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1024 0 : mozilla::ipc::UnionTypeReadError("MaybeInputData");
1025 0 : return false;
1026 : }
1027 : // Sentinel = 'MaybeInputData'
1028 0 : if ((!((msg__)->ReadSentinel(iter__, 1327357166)))) {
1029 0 : mozilla::ipc::SentinelReadError("MaybeInputData");
1030 0 : return false;
1031 : }
1032 :
1033 0 : switch (type) {
1034 : case type__::TInputBlobs:
1035 : {
1036 0 : InputBlobs tmp = InputBlobs();
1037 0 : (*(v__)) = tmp;
1038 0 : if ((!(Read((&((v__)->get_InputBlobs())), msg__, iter__)))) {
1039 0 : FatalError("Error deserializing Union type");
1040 0 : return false;
1041 : }
1042 : // Sentinel = 'TInputBlobs'
1043 0 : if ((!((msg__)->ReadSentinel(iter__, 1636803371)))) {
1044 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1045 0 : return false;
1046 : }
1047 0 : return true;
1048 : }
1049 : case type__::TInputDirectory:
1050 : {
1051 0 : InputDirectory tmp = InputDirectory();
1052 0 : (*(v__)) = tmp;
1053 0 : if ((!(Read((&((v__)->get_InputDirectory())), msg__, iter__)))) {
1054 0 : FatalError("Error deserializing Union type");
1055 0 : return false;
1056 : }
1057 : // Sentinel = 'TInputDirectory'
1058 0 : if ((!((msg__)->ReadSentinel(iter__, 4032479102)))) {
1059 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1060 0 : return false;
1061 : }
1062 0 : return true;
1063 : }
1064 : case type__::Tvoid_t:
1065 : {
1066 : void_t tmp = void_t();
1067 0 : (*(v__)) = tmp;
1068 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
1069 0 : FatalError("Error deserializing Union type");
1070 0 : return false;
1071 : }
1072 : // Sentinel = 'Tvoid_t'
1073 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
1074 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1075 0 : return false;
1076 : }
1077 0 : return true;
1078 : }
1079 : default:
1080 : {
1081 0 : FatalError("unknown union type");
1082 0 : return false;
1083 : }
1084 : }
1085 : }
1086 :
1087 0 : auto PFilePickerChild::Write(
1088 : const SlicedInputStreamParams& v__,
1089 : Message* msg__) -> void
1090 : {
1091 0 : Write((v__).stream(), msg__);
1092 : // Sentinel = 'stream'
1093 0 : (msg__)->WriteSentinel(4152748422);
1094 0 : Write((v__).start(), msg__);
1095 : // Sentinel = 'start'
1096 0 : (msg__)->WriteSentinel(2088644401);
1097 0 : Write((v__).length(), msg__);
1098 : // Sentinel = 'length'
1099 0 : (msg__)->WriteSentinel(1726618354);
1100 0 : Write((v__).curPos(), msg__);
1101 : // Sentinel = 'curPos'
1102 0 : (msg__)->WriteSentinel(4042140974);
1103 0 : Write((v__).closed(), msg__);
1104 : // Sentinel = 'closed'
1105 0 : (msg__)->WriteSentinel(561249462);
1106 0 : }
1107 :
1108 0 : auto PFilePickerChild::Read(
1109 : SlicedInputStreamParams* v__,
1110 : const Message* msg__,
1111 : PickleIterator* iter__) -> bool
1112 : {
1113 0 : if ((!(Read((&((v__)->stream())), msg__, iter__)))) {
1114 0 : FatalError("Error deserializing 'stream' (InputStreamParams) member of 'SlicedInputStreamParams'");
1115 0 : return false;
1116 : }
1117 : // Sentinel = 'stream'
1118 0 : if ((!((msg__)->ReadSentinel(iter__, 4152748422)))) {
1119 0 : mozilla::ipc::SentinelReadError("Error deserializing 'stream' (InputStreamParams) member of 'SlicedInputStreamParams'");
1120 0 : return false;
1121 : }
1122 0 : if ((!(Read((&((v__)->start())), msg__, iter__)))) {
1123 0 : FatalError("Error deserializing 'start' (uint64_t) member of 'SlicedInputStreamParams'");
1124 0 : return false;
1125 : }
1126 : // Sentinel = 'start'
1127 0 : if ((!((msg__)->ReadSentinel(iter__, 2088644401)))) {
1128 0 : mozilla::ipc::SentinelReadError("Error deserializing 'start' (uint64_t) member of 'SlicedInputStreamParams'");
1129 0 : return false;
1130 : }
1131 0 : if ((!(Read((&((v__)->length())), msg__, iter__)))) {
1132 0 : FatalError("Error deserializing 'length' (uint64_t) member of 'SlicedInputStreamParams'");
1133 0 : return false;
1134 : }
1135 : // Sentinel = 'length'
1136 0 : if ((!((msg__)->ReadSentinel(iter__, 1726618354)))) {
1137 0 : mozilla::ipc::SentinelReadError("Error deserializing 'length' (uint64_t) member of 'SlicedInputStreamParams'");
1138 0 : return false;
1139 : }
1140 0 : if ((!(Read((&((v__)->curPos())), msg__, iter__)))) {
1141 0 : FatalError("Error deserializing 'curPos' (uint64_t) member of 'SlicedInputStreamParams'");
1142 0 : return false;
1143 : }
1144 : // Sentinel = 'curPos'
1145 0 : if ((!((msg__)->ReadSentinel(iter__, 4042140974)))) {
1146 0 : mozilla::ipc::SentinelReadError("Error deserializing 'curPos' (uint64_t) member of 'SlicedInputStreamParams'");
1147 0 : return false;
1148 : }
1149 0 : if ((!(Read((&((v__)->closed())), msg__, iter__)))) {
1150 0 : FatalError("Error deserializing 'closed' (bool) member of 'SlicedInputStreamParams'");
1151 0 : return false;
1152 : }
1153 : // Sentinel = 'closed'
1154 0 : if ((!((msg__)->ReadSentinel(iter__, 561249462)))) {
1155 0 : mozilla::ipc::SentinelReadError("Error deserializing 'closed' (bool) member of 'SlicedInputStreamParams'");
1156 0 : return false;
1157 : }
1158 0 : return true;
1159 : }
1160 :
1161 0 : auto PFilePickerChild::Write(
1162 : const IPCRemoteStreamType& v__,
1163 : Message* msg__) -> void
1164 : {
1165 : typedef IPCRemoteStreamType type__;
1166 0 : Write(int((v__).type()), msg__);
1167 : // Sentinel = 'IPCRemoteStreamType'
1168 0 : (msg__)->WriteSentinel(391674895);
1169 :
1170 0 : switch ((v__).type()) {
1171 : case type__::TPChildToParentStreamParent:
1172 : {
1173 0 : FatalError("wrong side!");
1174 0 : return;
1175 : }
1176 : case type__::TPChildToParentStreamChild:
1177 : {
1178 0 : Write((v__).get_PChildToParentStreamChild(), msg__, false);
1179 : // Sentinel = 'TPChildToParentStreamChild'
1180 0 : (msg__)->WriteSentinel(1882094295);
1181 0 : return;
1182 : }
1183 : case type__::TPParentToChildStreamParent:
1184 : {
1185 0 : FatalError("wrong side!");
1186 0 : return;
1187 : }
1188 : case type__::TPParentToChildStreamChild:
1189 : {
1190 0 : Write((v__).get_PParentToChildStreamChild(), msg__, false);
1191 : // Sentinel = 'TPParentToChildStreamChild'
1192 0 : (msg__)->WriteSentinel(190098493);
1193 0 : return;
1194 : }
1195 : default:
1196 : {
1197 0 : FatalError("unknown union type");
1198 0 : return;
1199 : }
1200 : }
1201 : }
1202 :
1203 0 : auto PFilePickerChild::Read(
1204 : IPCRemoteStreamType* v__,
1205 : const Message* msg__,
1206 : PickleIterator* iter__) -> bool
1207 : {
1208 : typedef IPCRemoteStreamType type__;
1209 : int type;
1210 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1211 0 : mozilla::ipc::UnionTypeReadError("IPCRemoteStreamType");
1212 0 : return false;
1213 : }
1214 : // Sentinel = 'IPCRemoteStreamType'
1215 0 : if ((!((msg__)->ReadSentinel(iter__, 391674895)))) {
1216 0 : mozilla::ipc::SentinelReadError("IPCRemoteStreamType");
1217 0 : return false;
1218 : }
1219 :
1220 0 : switch (type) {
1221 : case type__::TPChildToParentStreamParent:
1222 : {
1223 0 : PChildToParentStreamChild* tmp = nullptr;
1224 0 : (*(v__)) = tmp;
1225 0 : if ((!(Read((&((v__)->get_PChildToParentStreamChild())), msg__, iter__, false)))) {
1226 0 : FatalError("Error deserializing Union type");
1227 0 : return false;
1228 : }
1229 : // Sentinel = 'TPChildToParentStreamParent'
1230 0 : if ((!((msg__)->ReadSentinel(iter__, 2724777622)))) {
1231 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1232 0 : return false;
1233 : }
1234 0 : return true;
1235 : }
1236 : case type__::TPChildToParentStreamChild:
1237 : {
1238 0 : return false;
1239 : }
1240 : case type__::TPParentToChildStreamParent:
1241 : {
1242 0 : PParentToChildStreamChild* tmp = nullptr;
1243 0 : (*(v__)) = tmp;
1244 0 : if ((!(Read((&((v__)->get_PParentToChildStreamChild())), msg__, iter__, false)))) {
1245 0 : FatalError("Error deserializing Union type");
1246 0 : return false;
1247 : }
1248 : // Sentinel = 'TPParentToChildStreamParent'
1249 0 : if ((!((msg__)->ReadSentinel(iter__, 3335986876)))) {
1250 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1251 0 : return false;
1252 : }
1253 0 : return true;
1254 : }
1255 : case type__::TPParentToChildStreamChild:
1256 : {
1257 0 : return false;
1258 : }
1259 : default:
1260 : {
1261 0 : FatalError("unknown union type");
1262 0 : return false;
1263 : }
1264 : }
1265 : }
1266 :
1267 0 : auto PFilePickerChild::Write(
1268 : const TemporaryFileInputStreamParams& v__,
1269 : Message* msg__) -> void
1270 : {
1271 0 : Write((v__).fileDescriptorIndex(), msg__);
1272 : // Sentinel = 'fileDescriptorIndex'
1273 0 : (msg__)->WriteSentinel(587329112);
1274 0 : Write((v__).startPos(), msg__);
1275 : // Sentinel = 'startPos'
1276 0 : (msg__)->WriteSentinel(557207962);
1277 0 : Write((v__).endPos(), msg__);
1278 : // Sentinel = 'endPos'
1279 0 : (msg__)->WriteSentinel(881536245);
1280 0 : }
1281 :
1282 0 : auto PFilePickerChild::Read(
1283 : TemporaryFileInputStreamParams* v__,
1284 : const Message* msg__,
1285 : PickleIterator* iter__) -> bool
1286 : {
1287 0 : if ((!(Read((&((v__)->fileDescriptorIndex())), msg__, iter__)))) {
1288 0 : FatalError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'TemporaryFileInputStreamParams'");
1289 0 : return false;
1290 : }
1291 : // Sentinel = 'fileDescriptorIndex'
1292 0 : if ((!((msg__)->ReadSentinel(iter__, 587329112)))) {
1293 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileDescriptorIndex' (uint32_t) member of 'TemporaryFileInputStreamParams'");
1294 0 : return false;
1295 : }
1296 0 : if ((!(Read((&((v__)->startPos())), msg__, iter__)))) {
1297 0 : FatalError("Error deserializing 'startPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1298 0 : return false;
1299 : }
1300 : // Sentinel = 'startPos'
1301 0 : if ((!((msg__)->ReadSentinel(iter__, 557207962)))) {
1302 0 : mozilla::ipc::SentinelReadError("Error deserializing 'startPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1303 0 : return false;
1304 : }
1305 0 : if ((!(Read((&((v__)->endPos())), msg__, iter__)))) {
1306 0 : FatalError("Error deserializing 'endPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1307 0 : return false;
1308 : }
1309 : // Sentinel = 'endPos'
1310 0 : if ((!((msg__)->ReadSentinel(iter__, 881536245)))) {
1311 0 : mozilla::ipc::SentinelReadError("Error deserializing 'endPos' (uint64_t) member of 'TemporaryFileInputStreamParams'");
1312 0 : return false;
1313 : }
1314 0 : return true;
1315 : }
1316 :
1317 0 : auto PFilePickerChild::Write(
1318 : const MIMEInputStreamParams& v__,
1319 : Message* msg__) -> void
1320 : {
1321 0 : Write((v__).optionalStream(), msg__);
1322 : // Sentinel = 'optionalStream'
1323 0 : (msg__)->WriteSentinel(1003718562);
1324 0 : Write((v__).headers(), msg__);
1325 : // Sentinel = 'headers'
1326 0 : (msg__)->WriteSentinel(4284175217);
1327 0 : Write((v__).startedReading(), msg__);
1328 : // Sentinel = 'startedReading'
1329 0 : (msg__)->WriteSentinel(1906875903);
1330 0 : }
1331 :
1332 0 : auto PFilePickerChild::Read(
1333 : MIMEInputStreamParams* v__,
1334 : const Message* msg__,
1335 : PickleIterator* iter__) -> bool
1336 : {
1337 0 : if ((!(Read((&((v__)->optionalStream())), msg__, iter__)))) {
1338 0 : FatalError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'MIMEInputStreamParams'");
1339 0 : return false;
1340 : }
1341 : // Sentinel = 'optionalStream'
1342 0 : if ((!((msg__)->ReadSentinel(iter__, 1003718562)))) {
1343 0 : mozilla::ipc::SentinelReadError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'MIMEInputStreamParams'");
1344 0 : return false;
1345 : }
1346 0 : if ((!(Read((&((v__)->headers())), msg__, iter__)))) {
1347 0 : FatalError("Error deserializing 'headers' (HeaderEntry[]) member of 'MIMEInputStreamParams'");
1348 0 : return false;
1349 : }
1350 : // Sentinel = 'headers'
1351 0 : if ((!((msg__)->ReadSentinel(iter__, 4284175217)))) {
1352 0 : mozilla::ipc::SentinelReadError("Error deserializing 'headers' (HeaderEntry[]) member of 'MIMEInputStreamParams'");
1353 0 : return false;
1354 : }
1355 0 : if ((!(Read((&((v__)->startedReading())), msg__, iter__)))) {
1356 0 : FatalError("Error deserializing 'startedReading' (bool) member of 'MIMEInputStreamParams'");
1357 0 : return false;
1358 : }
1359 : // Sentinel = 'startedReading'
1360 0 : if ((!((msg__)->ReadSentinel(iter__, 1906875903)))) {
1361 0 : mozilla::ipc::SentinelReadError("Error deserializing 'startedReading' (bool) member of 'MIMEInputStreamParams'");
1362 0 : return false;
1363 : }
1364 0 : return true;
1365 : }
1366 :
1367 0 : auto PFilePickerChild::Write(
1368 : const InputDirectory& v__,
1369 : Message* msg__) -> void
1370 : {
1371 0 : Write((v__).directoryPath(), msg__);
1372 : // Sentinel = 'directoryPath'
1373 0 : (msg__)->WriteSentinel(3260914177);
1374 0 : }
1375 :
1376 0 : auto PFilePickerChild::Read(
1377 : InputDirectory* v__,
1378 : const Message* msg__,
1379 : PickleIterator* iter__) -> bool
1380 : {
1381 0 : if ((!(Read((&((v__)->directoryPath())), msg__, iter__)))) {
1382 0 : FatalError("Error deserializing 'directoryPath' (nsString) member of 'InputDirectory'");
1383 0 : return false;
1384 : }
1385 : // Sentinel = 'directoryPath'
1386 0 : if ((!((msg__)->ReadSentinel(iter__, 3260914177)))) {
1387 0 : mozilla::ipc::SentinelReadError("Error deserializing 'directoryPath' (nsString) member of 'InputDirectory'");
1388 0 : return false;
1389 : }
1390 0 : return true;
1391 : }
1392 :
1393 0 : auto PFilePickerChild::Write(
1394 : const InputStreamParams& v__,
1395 : Message* msg__) -> void
1396 : {
1397 : typedef InputStreamParams type__;
1398 0 : Write(int((v__).type()), msg__);
1399 : // Sentinel = 'InputStreamParams'
1400 0 : (msg__)->WriteSentinel(4114814015);
1401 :
1402 0 : switch ((v__).type()) {
1403 : case type__::TStringInputStreamParams:
1404 : {
1405 0 : Write((v__).get_StringInputStreamParams(), msg__);
1406 : // Sentinel = 'TStringInputStreamParams'
1407 0 : (msg__)->WriteSentinel(3395831651);
1408 0 : return;
1409 : }
1410 : case type__::TFileInputStreamParams:
1411 : {
1412 0 : Write((v__).get_FileInputStreamParams(), msg__);
1413 : // Sentinel = 'TFileInputStreamParams'
1414 0 : (msg__)->WriteSentinel(2543620282);
1415 0 : return;
1416 : }
1417 : case type__::TTemporaryFileInputStreamParams:
1418 : {
1419 0 : Write((v__).get_TemporaryFileInputStreamParams(), msg__);
1420 : // Sentinel = 'TTemporaryFileInputStreamParams'
1421 0 : (msg__)->WriteSentinel(587771548);
1422 0 : return;
1423 : }
1424 : case type__::TBufferedInputStreamParams:
1425 : {
1426 0 : Write((v__).get_BufferedInputStreamParams(), msg__);
1427 : // Sentinel = 'TBufferedInputStreamParams'
1428 0 : (msg__)->WriteSentinel(1698289307);
1429 0 : return;
1430 : }
1431 : case type__::TMIMEInputStreamParams:
1432 : {
1433 0 : Write((v__).get_MIMEInputStreamParams(), msg__);
1434 : // Sentinel = 'TMIMEInputStreamParams'
1435 0 : (msg__)->WriteSentinel(1948001964);
1436 0 : return;
1437 : }
1438 : case type__::TMultiplexInputStreamParams:
1439 : {
1440 0 : Write((v__).get_MultiplexInputStreamParams(), msg__);
1441 : // Sentinel = 'TMultiplexInputStreamParams'
1442 0 : (msg__)->WriteSentinel(3317853213);
1443 0 : return;
1444 : }
1445 : case type__::TSlicedInputStreamParams:
1446 : {
1447 0 : Write((v__).get_SlicedInputStreamParams(), msg__);
1448 : // Sentinel = 'TSlicedInputStreamParams'
1449 0 : (msg__)->WriteSentinel(445810472);
1450 0 : return;
1451 : }
1452 : case type__::TIPCBlobInputStreamParams:
1453 : {
1454 0 : Write((v__).get_IPCBlobInputStreamParams(), msg__);
1455 : // Sentinel = 'TIPCBlobInputStreamParams'
1456 0 : (msg__)->WriteSentinel(2436989998);
1457 0 : return;
1458 : }
1459 : default:
1460 : {
1461 0 : FatalError("unknown union type");
1462 0 : return;
1463 : }
1464 : }
1465 : }
1466 :
1467 0 : auto PFilePickerChild::Read(
1468 : InputStreamParams* v__,
1469 : const Message* msg__,
1470 : PickleIterator* iter__) -> bool
1471 : {
1472 : typedef InputStreamParams type__;
1473 : int type;
1474 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1475 0 : mozilla::ipc::UnionTypeReadError("InputStreamParams");
1476 0 : return false;
1477 : }
1478 : // Sentinel = 'InputStreamParams'
1479 0 : if ((!((msg__)->ReadSentinel(iter__, 4114814015)))) {
1480 0 : mozilla::ipc::SentinelReadError("InputStreamParams");
1481 0 : return false;
1482 : }
1483 :
1484 0 : switch (type) {
1485 : case type__::TStringInputStreamParams:
1486 : {
1487 0 : StringInputStreamParams tmp = StringInputStreamParams();
1488 0 : (*(v__)) = tmp;
1489 0 : if ((!(Read((&((v__)->get_StringInputStreamParams())), msg__, iter__)))) {
1490 0 : FatalError("Error deserializing Union type");
1491 0 : return false;
1492 : }
1493 : // Sentinel = 'TStringInputStreamParams'
1494 0 : if ((!((msg__)->ReadSentinel(iter__, 3395831651)))) {
1495 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1496 0 : return false;
1497 : }
1498 0 : return true;
1499 : }
1500 : case type__::TFileInputStreamParams:
1501 : {
1502 0 : FileInputStreamParams tmp = FileInputStreamParams();
1503 0 : (*(v__)) = tmp;
1504 0 : if ((!(Read((&((v__)->get_FileInputStreamParams())), msg__, iter__)))) {
1505 0 : FatalError("Error deserializing Union type");
1506 0 : return false;
1507 : }
1508 : // Sentinel = 'TFileInputStreamParams'
1509 0 : if ((!((msg__)->ReadSentinel(iter__, 2543620282)))) {
1510 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1511 0 : return false;
1512 : }
1513 0 : return true;
1514 : }
1515 : case type__::TTemporaryFileInputStreamParams:
1516 : {
1517 0 : TemporaryFileInputStreamParams tmp = TemporaryFileInputStreamParams();
1518 0 : (*(v__)) = tmp;
1519 0 : if ((!(Read((&((v__)->get_TemporaryFileInputStreamParams())), msg__, iter__)))) {
1520 0 : FatalError("Error deserializing Union type");
1521 0 : return false;
1522 : }
1523 : // Sentinel = 'TTemporaryFileInputStreamParams'
1524 0 : if ((!((msg__)->ReadSentinel(iter__, 587771548)))) {
1525 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1526 0 : return false;
1527 : }
1528 0 : return true;
1529 : }
1530 : case type__::TBufferedInputStreamParams:
1531 : {
1532 0 : BufferedInputStreamParams tmp = BufferedInputStreamParams();
1533 0 : (*(v__)) = tmp;
1534 0 : if ((!(Read((&((v__)->get_BufferedInputStreamParams())), msg__, iter__)))) {
1535 0 : FatalError("Error deserializing Union type");
1536 0 : return false;
1537 : }
1538 : // Sentinel = 'TBufferedInputStreamParams'
1539 0 : if ((!((msg__)->ReadSentinel(iter__, 1698289307)))) {
1540 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1541 0 : return false;
1542 : }
1543 0 : return true;
1544 : }
1545 : case type__::TMIMEInputStreamParams:
1546 : {
1547 0 : MIMEInputStreamParams tmp = MIMEInputStreamParams();
1548 0 : (*(v__)) = tmp;
1549 0 : if ((!(Read((&((v__)->get_MIMEInputStreamParams())), msg__, iter__)))) {
1550 0 : FatalError("Error deserializing Union type");
1551 0 : return false;
1552 : }
1553 : // Sentinel = 'TMIMEInputStreamParams'
1554 0 : if ((!((msg__)->ReadSentinel(iter__, 1948001964)))) {
1555 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1556 0 : return false;
1557 : }
1558 0 : return true;
1559 : }
1560 : case type__::TMultiplexInputStreamParams:
1561 : {
1562 0 : MultiplexInputStreamParams tmp = MultiplexInputStreamParams();
1563 0 : (*(v__)) = tmp;
1564 0 : if ((!(Read((&((v__)->get_MultiplexInputStreamParams())), msg__, iter__)))) {
1565 0 : FatalError("Error deserializing Union type");
1566 0 : return false;
1567 : }
1568 : // Sentinel = 'TMultiplexInputStreamParams'
1569 0 : if ((!((msg__)->ReadSentinel(iter__, 3317853213)))) {
1570 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1571 0 : return false;
1572 : }
1573 0 : return true;
1574 : }
1575 : case type__::TSlicedInputStreamParams:
1576 : {
1577 0 : SlicedInputStreamParams tmp = SlicedInputStreamParams();
1578 0 : (*(v__)) = tmp;
1579 0 : if ((!(Read((&((v__)->get_SlicedInputStreamParams())), msg__, iter__)))) {
1580 0 : FatalError("Error deserializing Union type");
1581 0 : return false;
1582 : }
1583 : // Sentinel = 'TSlicedInputStreamParams'
1584 0 : if ((!((msg__)->ReadSentinel(iter__, 445810472)))) {
1585 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1586 0 : return false;
1587 : }
1588 0 : return true;
1589 : }
1590 : case type__::TIPCBlobInputStreamParams:
1591 : {
1592 0 : IPCBlobInputStreamParams tmp = IPCBlobInputStreamParams();
1593 0 : (*(v__)) = tmp;
1594 0 : if ((!(Read((&((v__)->get_IPCBlobInputStreamParams())), msg__, iter__)))) {
1595 0 : FatalError("Error deserializing Union type");
1596 0 : return false;
1597 : }
1598 : // Sentinel = 'TIPCBlobInputStreamParams'
1599 0 : if ((!((msg__)->ReadSentinel(iter__, 2436989998)))) {
1600 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1601 0 : return false;
1602 : }
1603 0 : return true;
1604 : }
1605 : default:
1606 : {
1607 0 : FatalError("unknown union type");
1608 0 : return false;
1609 : }
1610 : }
1611 : }
1612 :
1613 0 : auto PFilePickerChild::Write(
1614 : const PParentToChildStreamChild* v__,
1615 : Message* msg__,
1616 : bool nullable__) -> void
1617 : {
1618 : int32_t id;
1619 0 : if ((!(v__))) {
1620 0 : if ((!(nullable__))) {
1621 0 : FatalError("NULL actor value passed to non-nullable param");
1622 : }
1623 0 : id = 0;
1624 : }
1625 : else {
1626 0 : id = (v__)->Id();
1627 0 : if ((1) == (id)) {
1628 0 : FatalError("actor has been |delete|d");
1629 : }
1630 : }
1631 :
1632 0 : Write(id, msg__);
1633 0 : }
1634 :
1635 0 : auto PFilePickerChild::Read(
1636 : PParentToChildStreamChild** v__,
1637 : const Message* msg__,
1638 : PickleIterator* iter__,
1639 : bool nullable__) -> bool
1640 : {
1641 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PParentToChildStream", PParentToChildStreamMsgStart);
1642 0 : if ((actor).isNothing()) {
1643 0 : return false;
1644 : }
1645 :
1646 0 : (*(v__)) = static_cast<PParentToChildStreamChild*>((actor).value());
1647 0 : return true;
1648 : }
1649 :
1650 0 : auto PFilePickerChild::Write(
1651 : const IPCStream& v__,
1652 : Message* msg__) -> void
1653 : {
1654 : typedef IPCStream type__;
1655 0 : Write(int((v__).type()), msg__);
1656 : // Sentinel = 'IPCStream'
1657 0 : (msg__)->WriteSentinel(442610715);
1658 :
1659 0 : switch ((v__).type()) {
1660 : case type__::TInputStreamParamsWithFds:
1661 : {
1662 0 : Write((v__).get_InputStreamParamsWithFds(), msg__);
1663 : // Sentinel = 'TInputStreamParamsWithFds'
1664 0 : (msg__)->WriteSentinel(2170706066);
1665 0 : return;
1666 : }
1667 : case type__::TIPCRemoteStream:
1668 : {
1669 0 : Write((v__).get_IPCRemoteStream(), msg__);
1670 : // Sentinel = 'TIPCRemoteStream'
1671 0 : (msg__)->WriteSentinel(2978132448);
1672 0 : return;
1673 : }
1674 : default:
1675 : {
1676 0 : FatalError("unknown union type");
1677 0 : return;
1678 : }
1679 : }
1680 : }
1681 :
1682 0 : auto PFilePickerChild::Read(
1683 : IPCStream* v__,
1684 : const Message* msg__,
1685 : PickleIterator* iter__) -> bool
1686 : {
1687 : typedef IPCStream type__;
1688 : int type;
1689 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1690 0 : mozilla::ipc::UnionTypeReadError("IPCStream");
1691 0 : return false;
1692 : }
1693 : // Sentinel = 'IPCStream'
1694 0 : if ((!((msg__)->ReadSentinel(iter__, 442610715)))) {
1695 0 : mozilla::ipc::SentinelReadError("IPCStream");
1696 0 : return false;
1697 : }
1698 :
1699 0 : switch (type) {
1700 : case type__::TInputStreamParamsWithFds:
1701 : {
1702 0 : InputStreamParamsWithFds tmp = InputStreamParamsWithFds();
1703 0 : (*(v__)) = tmp;
1704 0 : if ((!(Read((&((v__)->get_InputStreamParamsWithFds())), msg__, iter__)))) {
1705 0 : FatalError("Error deserializing Union type");
1706 0 : return false;
1707 : }
1708 : // Sentinel = 'TInputStreamParamsWithFds'
1709 0 : if ((!((msg__)->ReadSentinel(iter__, 2170706066)))) {
1710 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1711 0 : return false;
1712 : }
1713 0 : return true;
1714 : }
1715 : case type__::TIPCRemoteStream:
1716 : {
1717 0 : IPCRemoteStream tmp = IPCRemoteStream();
1718 0 : (*(v__)) = tmp;
1719 0 : if ((!(Read((&((v__)->get_IPCRemoteStream())), msg__, iter__)))) {
1720 0 : FatalError("Error deserializing Union type");
1721 0 : return false;
1722 : }
1723 : // Sentinel = 'TIPCRemoteStream'
1724 0 : if ((!((msg__)->ReadSentinel(iter__, 2978132448)))) {
1725 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1726 0 : return false;
1727 : }
1728 0 : return true;
1729 : }
1730 : default:
1731 : {
1732 0 : FatalError("unknown union type");
1733 0 : return false;
1734 : }
1735 : }
1736 : }
1737 :
1738 0 : auto PFilePickerChild::Write(
1739 : const StringInputStreamParams& v__,
1740 : Message* msg__) -> void
1741 : {
1742 0 : Write((v__).data(), msg__);
1743 : // Sentinel = 'data'
1744 0 : (msg__)->WriteSentinel(843352540);
1745 0 : }
1746 :
1747 0 : auto PFilePickerChild::Read(
1748 : StringInputStreamParams* v__,
1749 : const Message* msg__,
1750 : PickleIterator* iter__) -> bool
1751 : {
1752 0 : if ((!(Read((&((v__)->data())), msg__, iter__)))) {
1753 0 : FatalError("Error deserializing 'data' (nsCString) member of 'StringInputStreamParams'");
1754 0 : return false;
1755 : }
1756 : // Sentinel = 'data'
1757 0 : if ((!((msg__)->ReadSentinel(iter__, 843352540)))) {
1758 0 : mozilla::ipc::SentinelReadError("Error deserializing 'data' (nsCString) member of 'StringInputStreamParams'");
1759 0 : return false;
1760 : }
1761 0 : return true;
1762 : }
1763 :
1764 0 : auto PFilePickerChild::Write(
1765 : const MultiplexInputStreamParams& v__,
1766 : Message* msg__) -> void
1767 : {
1768 0 : Write((v__).streams(), msg__);
1769 : // Sentinel = 'streams'
1770 0 : (msg__)->WriteSentinel(4240383220);
1771 0 : Write((v__).currentStream(), msg__);
1772 : // Sentinel = 'currentStream'
1773 0 : (msg__)->WriteSentinel(682778074);
1774 0 : Write((v__).status(), msg__);
1775 : // Sentinel = 'status'
1776 0 : (msg__)->WriteSentinel(3714608576);
1777 0 : Write((v__).startedReadingCurrent(), msg__);
1778 : // Sentinel = 'startedReadingCurrent'
1779 0 : (msg__)->WriteSentinel(970542033);
1780 0 : }
1781 :
1782 0 : auto PFilePickerChild::Read(
1783 : MultiplexInputStreamParams* v__,
1784 : const Message* msg__,
1785 : PickleIterator* iter__) -> bool
1786 : {
1787 0 : if ((!(Read((&((v__)->streams())), msg__, iter__)))) {
1788 0 : FatalError("Error deserializing 'streams' (InputStreamParams[]) member of 'MultiplexInputStreamParams'");
1789 0 : return false;
1790 : }
1791 : // Sentinel = 'streams'
1792 0 : if ((!((msg__)->ReadSentinel(iter__, 4240383220)))) {
1793 0 : mozilla::ipc::SentinelReadError("Error deserializing 'streams' (InputStreamParams[]) member of 'MultiplexInputStreamParams'");
1794 0 : return false;
1795 : }
1796 0 : if ((!(Read((&((v__)->currentStream())), msg__, iter__)))) {
1797 0 : FatalError("Error deserializing 'currentStream' (uint32_t) member of 'MultiplexInputStreamParams'");
1798 0 : return false;
1799 : }
1800 : // Sentinel = 'currentStream'
1801 0 : if ((!((msg__)->ReadSentinel(iter__, 682778074)))) {
1802 0 : mozilla::ipc::SentinelReadError("Error deserializing 'currentStream' (uint32_t) member of 'MultiplexInputStreamParams'");
1803 0 : return false;
1804 : }
1805 0 : if ((!(Read((&((v__)->status())), msg__, iter__)))) {
1806 0 : FatalError("Error deserializing 'status' (nsresult) member of 'MultiplexInputStreamParams'");
1807 0 : return false;
1808 : }
1809 : // Sentinel = 'status'
1810 0 : if ((!((msg__)->ReadSentinel(iter__, 3714608576)))) {
1811 0 : mozilla::ipc::SentinelReadError("Error deserializing 'status' (nsresult) member of 'MultiplexInputStreamParams'");
1812 0 : return false;
1813 : }
1814 0 : if ((!(Read((&((v__)->startedReadingCurrent())), msg__, iter__)))) {
1815 0 : FatalError("Error deserializing 'startedReadingCurrent' (bool) member of 'MultiplexInputStreamParams'");
1816 0 : return false;
1817 : }
1818 : // Sentinel = 'startedReadingCurrent'
1819 0 : if ((!((msg__)->ReadSentinel(iter__, 970542033)))) {
1820 0 : mozilla::ipc::SentinelReadError("Error deserializing 'startedReadingCurrent' (bool) member of 'MultiplexInputStreamParams'");
1821 0 : return false;
1822 : }
1823 0 : return true;
1824 : }
1825 :
1826 0 : auto PFilePickerChild::Write(
1827 : const PFileDescriptorSetChild* v__,
1828 : Message* msg__,
1829 : bool nullable__) -> void
1830 : {
1831 : int32_t id;
1832 0 : if ((!(v__))) {
1833 0 : if ((!(nullable__))) {
1834 0 : FatalError("NULL actor value passed to non-nullable param");
1835 : }
1836 0 : id = 0;
1837 : }
1838 : else {
1839 0 : id = (v__)->Id();
1840 0 : if ((1) == (id)) {
1841 0 : FatalError("actor has been |delete|d");
1842 : }
1843 : }
1844 :
1845 0 : Write(id, msg__);
1846 0 : }
1847 :
1848 0 : auto PFilePickerChild::Read(
1849 : PFileDescriptorSetChild** v__,
1850 : const Message* msg__,
1851 : PickleIterator* iter__,
1852 : bool nullable__) -> bool
1853 : {
1854 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PFileDescriptorSet", PFileDescriptorSetMsgStart);
1855 0 : if ((actor).isNothing()) {
1856 0 : return false;
1857 : }
1858 :
1859 0 : (*(v__)) = static_cast<PFileDescriptorSetChild*>((actor).value());
1860 0 : return true;
1861 : }
1862 :
1863 0 : auto PFilePickerChild::Write(
1864 : const PIPCBlobInputStreamChild* v__,
1865 : Message* msg__,
1866 : bool nullable__) -> void
1867 : {
1868 : int32_t id;
1869 0 : if ((!(v__))) {
1870 0 : if ((!(nullable__))) {
1871 0 : FatalError("NULL actor value passed to non-nullable param");
1872 : }
1873 0 : id = 0;
1874 : }
1875 : else {
1876 0 : id = (v__)->Id();
1877 0 : if ((1) == (id)) {
1878 0 : FatalError("actor has been |delete|d");
1879 : }
1880 : }
1881 :
1882 0 : Write(id, msg__);
1883 0 : }
1884 :
1885 0 : auto PFilePickerChild::Read(
1886 : PIPCBlobInputStreamChild** v__,
1887 : const Message* msg__,
1888 : PickleIterator* iter__,
1889 : bool nullable__) -> bool
1890 : {
1891 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PIPCBlobInputStream", PIPCBlobInputStreamMsgStart);
1892 0 : if ((actor).isNothing()) {
1893 0 : return false;
1894 : }
1895 :
1896 0 : (*(v__)) = static_cast<PIPCBlobInputStreamChild*>((actor).value());
1897 0 : return true;
1898 : }
1899 :
1900 0 : auto PFilePickerChild::Write(
1901 : const OptionalFileDescriptorSet& v__,
1902 : Message* msg__) -> void
1903 : {
1904 : typedef OptionalFileDescriptorSet type__;
1905 0 : Write(int((v__).type()), msg__);
1906 : // Sentinel = 'OptionalFileDescriptorSet'
1907 0 : (msg__)->WriteSentinel(955222862);
1908 :
1909 0 : switch ((v__).type()) {
1910 : case type__::TPFileDescriptorSetParent:
1911 : {
1912 0 : FatalError("wrong side!");
1913 0 : return;
1914 : }
1915 : case type__::TPFileDescriptorSetChild:
1916 : {
1917 0 : Write((v__).get_PFileDescriptorSetChild(), msg__, false);
1918 : // Sentinel = 'TPFileDescriptorSetChild'
1919 0 : (msg__)->WriteSentinel(3477929935);
1920 0 : return;
1921 : }
1922 : case type__::TArrayOfFileDescriptor:
1923 : {
1924 0 : Write((v__).get_ArrayOfFileDescriptor(), msg__);
1925 : // Sentinel = 'TArrayOfFileDescriptor'
1926 0 : (msg__)->WriteSentinel(2366096715);
1927 0 : return;
1928 : }
1929 : case type__::Tvoid_t:
1930 : {
1931 0 : Write((v__).get_void_t(), msg__);
1932 : // Sentinel = 'Tvoid_t'
1933 0 : (msg__)->WriteSentinel(3041273328);
1934 0 : return;
1935 : }
1936 : default:
1937 : {
1938 0 : FatalError("unknown union type");
1939 0 : return;
1940 : }
1941 : }
1942 : }
1943 :
1944 0 : auto PFilePickerChild::Read(
1945 : OptionalFileDescriptorSet* v__,
1946 : const Message* msg__,
1947 : PickleIterator* iter__) -> bool
1948 : {
1949 : typedef OptionalFileDescriptorSet type__;
1950 : int type;
1951 0 : if ((!(Read((&(type)), msg__, iter__)))) {
1952 0 : mozilla::ipc::UnionTypeReadError("OptionalFileDescriptorSet");
1953 0 : return false;
1954 : }
1955 : // Sentinel = 'OptionalFileDescriptorSet'
1956 0 : if ((!((msg__)->ReadSentinel(iter__, 955222862)))) {
1957 0 : mozilla::ipc::SentinelReadError("OptionalFileDescriptorSet");
1958 0 : return false;
1959 : }
1960 :
1961 0 : switch (type) {
1962 : case type__::TPFileDescriptorSetParent:
1963 : {
1964 0 : PFileDescriptorSetChild* tmp = nullptr;
1965 0 : (*(v__)) = tmp;
1966 0 : if ((!(Read((&((v__)->get_PFileDescriptorSetChild())), msg__, iter__, false)))) {
1967 0 : FatalError("Error deserializing Union type");
1968 0 : return false;
1969 : }
1970 : // Sentinel = 'TPFileDescriptorSetParent'
1971 0 : if ((!((msg__)->ReadSentinel(iter__, 143041934)))) {
1972 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1973 0 : return false;
1974 : }
1975 0 : return true;
1976 : }
1977 : case type__::TPFileDescriptorSetChild:
1978 : {
1979 0 : return false;
1980 : }
1981 : case type__::TArrayOfFileDescriptor:
1982 : {
1983 0 : nsTArray<FileDescriptor> tmp;
1984 0 : (*(v__)) = tmp;
1985 0 : if ((!(Read((&((v__)->get_ArrayOfFileDescriptor())), msg__, iter__)))) {
1986 0 : FatalError("Error deserializing Union type");
1987 0 : return false;
1988 : }
1989 : // Sentinel = 'TArrayOfFileDescriptor'
1990 0 : if ((!((msg__)->ReadSentinel(iter__, 2366096715)))) {
1991 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
1992 0 : return false;
1993 : }
1994 0 : return true;
1995 : }
1996 : case type__::Tvoid_t:
1997 : {
1998 : void_t tmp = void_t();
1999 0 : (*(v__)) = tmp;
2000 0 : if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
2001 0 : FatalError("Error deserializing Union type");
2002 0 : return false;
2003 : }
2004 : // Sentinel = 'Tvoid_t'
2005 0 : if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
2006 0 : mozilla::ipc::SentinelReadError("Error deserializing Union type");
2007 0 : return false;
2008 : }
2009 0 : return true;
2010 : }
2011 : default:
2012 : {
2013 0 : FatalError("unknown union type");
2014 0 : return false;
2015 : }
2016 : }
2017 : }
2018 :
2019 0 : auto PFilePickerChild::Write(
2020 : const IPCBlob& v__,
2021 : Message* msg__) -> void
2022 : {
2023 0 : Write((v__).type(), msg__);
2024 : // Sentinel = 'type'
2025 0 : (msg__)->WriteSentinel(2982068540);
2026 0 : Write((v__).size(), msg__);
2027 : // Sentinel = 'size'
2028 0 : (msg__)->WriteSentinel(931048223);
2029 0 : Write((v__).inputStream(), msg__);
2030 : // Sentinel = 'inputStream'
2031 0 : (msg__)->WriteSentinel(2684883823);
2032 0 : Write((v__).file(), msg__);
2033 : // Sentinel = 'file'
2034 0 : (msg__)->WriteSentinel(224874390);
2035 0 : Write((v__).fileId(), msg__);
2036 : // Sentinel = 'fileId'
2037 0 : (msg__)->WriteSentinel(108004447);
2038 0 : }
2039 :
2040 0 : auto PFilePickerChild::Read(
2041 : IPCBlob* v__,
2042 : const Message* msg__,
2043 : PickleIterator* iter__) -> bool
2044 : {
2045 0 : if ((!(Read((&((v__)->type())), msg__, iter__)))) {
2046 0 : FatalError("Error deserializing 'type' (nsString) member of 'IPCBlob'");
2047 0 : return false;
2048 : }
2049 : // Sentinel = 'type'
2050 0 : if ((!((msg__)->ReadSentinel(iter__, 2982068540)))) {
2051 0 : mozilla::ipc::SentinelReadError("Error deserializing 'type' (nsString) member of 'IPCBlob'");
2052 0 : return false;
2053 : }
2054 0 : if ((!(Read((&((v__)->size())), msg__, iter__)))) {
2055 0 : FatalError("Error deserializing 'size' (uint64_t) member of 'IPCBlob'");
2056 0 : return false;
2057 : }
2058 : // Sentinel = 'size'
2059 0 : if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
2060 0 : mozilla::ipc::SentinelReadError("Error deserializing 'size' (uint64_t) member of 'IPCBlob'");
2061 0 : return false;
2062 : }
2063 0 : if ((!(Read((&((v__)->inputStream())), msg__, iter__)))) {
2064 0 : FatalError("Error deserializing 'inputStream' (IPCBlobStream) member of 'IPCBlob'");
2065 0 : return false;
2066 : }
2067 : // Sentinel = 'inputStream'
2068 0 : if ((!((msg__)->ReadSentinel(iter__, 2684883823)))) {
2069 0 : mozilla::ipc::SentinelReadError("Error deserializing 'inputStream' (IPCBlobStream) member of 'IPCBlob'");
2070 0 : return false;
2071 : }
2072 0 : if ((!(Read((&((v__)->file())), msg__, iter__)))) {
2073 0 : FatalError("Error deserializing 'file' (IPCFileUnion) member of 'IPCBlob'");
2074 0 : return false;
2075 : }
2076 : // Sentinel = 'file'
2077 0 : if ((!((msg__)->ReadSentinel(iter__, 224874390)))) {
2078 0 : mozilla::ipc::SentinelReadError("Error deserializing 'file' (IPCFileUnion) member of 'IPCBlob'");
2079 0 : return false;
2080 : }
2081 0 : if ((!(Read((&((v__)->fileId())), msg__, iter__)))) {
2082 0 : FatalError("Error deserializing 'fileId' (int64_t) member of 'IPCBlob'");
2083 0 : return false;
2084 : }
2085 : // Sentinel = 'fileId'
2086 0 : if ((!((msg__)->ReadSentinel(iter__, 108004447)))) {
2087 0 : mozilla::ipc::SentinelReadError("Error deserializing 'fileId' (int64_t) member of 'IPCBlob'");
2088 0 : return false;
2089 : }
2090 0 : return true;
2091 : }
2092 :
2093 0 : auto PFilePickerChild::Write(
2094 : const FileDescriptor& v__,
2095 : Message* msg__) -> void
2096 : {
2097 0 : FileDescriptor::PickleType pfd = (v__).ShareTo(FileDescriptor::IPDLPrivate(), OtherPid());
2098 0 : IPC::WriteParam(msg__, pfd);
2099 0 : }
2100 :
2101 0 : auto PFilePickerChild::Read(
2102 : FileDescriptor* v__,
2103 : const Message* msg__,
2104 : PickleIterator* iter__) -> bool
2105 : {
2106 0 : FileDescriptor::PickleType pfd;
2107 0 : if ((!(IPC::ReadParam(msg__, iter__, (&(pfd)))))) {
2108 0 : return false;
2109 : }
2110 :
2111 0 : FileDescriptor fd = FileDescriptor(FileDescriptor::IPDLPrivate(), pfd);
2112 0 : if ((!((fd).IsValid()))) {
2113 0 : mozilla::ipc::ProtocolErrorBreakpoint("[PFilePickerChild] Received an invalid file descriptor!");
2114 : }
2115 :
2116 0 : (*(v__)) = fd;
2117 0 : return true;
2118 : }
2119 :
2120 0 : auto PFilePickerChild::Write(
2121 : const BufferedInputStreamParams& v__,
2122 : Message* msg__) -> void
2123 : {
2124 0 : Write((v__).optionalStream(), msg__);
2125 : // Sentinel = 'optionalStream'
2126 0 : (msg__)->WriteSentinel(1003718562);
2127 0 : Write((v__).bufferSize(), msg__);
2128 : // Sentinel = 'bufferSize'
2129 0 : (msg__)->WriteSentinel(3444538779);
2130 0 : }
2131 :
2132 0 : auto PFilePickerChild::Read(
2133 : BufferedInputStreamParams* v__,
2134 : const Message* msg__,
2135 : PickleIterator* iter__) -> bool
2136 : {
2137 0 : if ((!(Read((&((v__)->optionalStream())), msg__, iter__)))) {
2138 0 : FatalError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'BufferedInputStreamParams'");
2139 0 : return false;
2140 : }
2141 : // Sentinel = 'optionalStream'
2142 0 : if ((!((msg__)->ReadSentinel(iter__, 1003718562)))) {
2143 0 : mozilla::ipc::SentinelReadError("Error deserializing 'optionalStream' (OptionalInputStreamParams) member of 'BufferedInputStreamParams'");
2144 0 : return false;
2145 : }
2146 0 : if ((!(Read((&((v__)->bufferSize())), msg__, iter__)))) {
2147 0 : FatalError("Error deserializing 'bufferSize' (uint32_t) member of 'BufferedInputStreamParams'");
2148 0 : return false;
2149 : }
2150 : // Sentinel = 'bufferSize'
2151 0 : if ((!((msg__)->ReadSentinel(iter__, 3444538779)))) {
2152 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bufferSize' (uint32_t) member of 'BufferedInputStreamParams'");
2153 0 : return false;
2154 : }
2155 0 : return true;
2156 : }
2157 :
2158 0 : auto PFilePickerChild::Write(
2159 : const HeaderEntry& v__,
2160 : Message* msg__) -> void
2161 : {
2162 0 : Write((v__).name(), msg__);
2163 : // Sentinel = 'name'
2164 0 : (msg__)->WriteSentinel(15034981);
2165 0 : Write((v__).value(), msg__);
2166 : // Sentinel = 'value'
2167 0 : (msg__)->WriteSentinel(3456818542);
2168 0 : }
2169 :
2170 0 : auto PFilePickerChild::Read(
2171 : HeaderEntry* v__,
2172 : const Message* msg__,
2173 : PickleIterator* iter__) -> bool
2174 : {
2175 0 : if ((!(Read((&((v__)->name())), msg__, iter__)))) {
2176 0 : FatalError("Error deserializing 'name' (nsCString) member of 'HeaderEntry'");
2177 0 : return false;
2178 : }
2179 : // Sentinel = 'name'
2180 0 : if ((!((msg__)->ReadSentinel(iter__, 15034981)))) {
2181 0 : mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsCString) member of 'HeaderEntry'");
2182 0 : return false;
2183 : }
2184 0 : if ((!(Read((&((v__)->value())), msg__, iter__)))) {
2185 0 : FatalError("Error deserializing 'value' (nsCString) member of 'HeaderEntry'");
2186 0 : return false;
2187 : }
2188 : // Sentinel = 'value'
2189 0 : if ((!((msg__)->ReadSentinel(iter__, 3456818542)))) {
2190 0 : mozilla::ipc::SentinelReadError("Error deserializing 'value' (nsCString) member of 'HeaderEntry'");
2191 0 : return false;
2192 : }
2193 0 : return true;
2194 : }
2195 :
2196 0 : auto PFilePickerChild::Write(
2197 : const PChildToParentStreamChild* v__,
2198 : Message* msg__,
2199 : bool nullable__) -> void
2200 : {
2201 : int32_t id;
2202 0 : if ((!(v__))) {
2203 0 : if ((!(nullable__))) {
2204 0 : FatalError("NULL actor value passed to non-nullable param");
2205 : }
2206 0 : id = 0;
2207 : }
2208 : else {
2209 0 : id = (v__)->Id();
2210 0 : if ((1) == (id)) {
2211 0 : FatalError("actor has been |delete|d");
2212 : }
2213 : }
2214 :
2215 0 : Write(id, msg__);
2216 0 : }
2217 :
2218 0 : auto PFilePickerChild::Read(
2219 : PChildToParentStreamChild** v__,
2220 : const Message* msg__,
2221 : PickleIterator* iter__,
2222 : bool nullable__) -> bool
2223 : {
2224 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PChildToParentStream", PChildToParentStreamMsgStart);
2225 0 : if ((actor).isNothing()) {
2226 0 : return false;
2227 : }
2228 :
2229 0 : (*(v__)) = static_cast<PChildToParentStreamChild*>((actor).value());
2230 0 : return true;
2231 : }
2232 :
2233 :
2234 :
2235 : } // namespace dom
2236 : } // namespace mozilla
|