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