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