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