Line data Source code
1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 :
7 : #include "mozilla/hal_sandbox/PHalParent.h"
8 :
9 : #include "mozilla/dom/PContentParent.h"
10 : #include "mozilla/dom/PBrowserParent.h"
11 :
12 : #include "nsIFile.h"
13 : #include "GeckoProfiler.h"
14 :
15 : namespace mozilla {
16 : namespace hal_sandbox {
17 :
18 :
19 0 : auto PHalParent::Recv__delete__() -> mozilla::ipc::IPCResult
20 : {
21 0 : return IPC_OK();
22 : }
23 :
24 :
25 1 : MOZ_IMPLICIT PHalParent::PHalParent() :
26 : mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
27 1 : mState(PHal::__Dead)
28 : {
29 1 : MOZ_COUNT_CTOR(PHalParent);
30 1 : }
31 :
32 0 : PHalParent::~PHalParent()
33 : {
34 0 : MOZ_COUNT_DTOR(PHalParent);
35 0 : }
36 :
37 0 : auto PHalParent::Manager() const -> PContentParent*
38 : {
39 0 : return static_cast<PContentParent*>(IProtocol::Manager());
40 : }
41 :
42 0 : auto PHalParent::SendNotifyBatteryChange(const BatteryInformation& aBatteryInfo) -> bool
43 : {
44 0 : IPC::Message* msg__ = PHal::Msg_NotifyBatteryChange(Id());
45 :
46 0 : Write(aBatteryInfo, msg__);
47 : // Sentinel = 'aBatteryInfo'
48 0 : (msg__)->WriteSentinel(2078351088);
49 :
50 :
51 :
52 :
53 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
54 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
55 : }
56 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifyBatteryChange", OTHER);
57 0 : PHal::Transition(PHal::Msg_NotifyBatteryChange__ID, (&(mState)));
58 :
59 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
60 0 : return sendok__;
61 : }
62 :
63 0 : auto PHalParent::SendNotifyNetworkChange(const NetworkInformation& aNetworkInfo) -> bool
64 : {
65 0 : IPC::Message* msg__ = PHal::Msg_NotifyNetworkChange(Id());
66 :
67 0 : Write(aNetworkInfo, msg__);
68 : // Sentinel = 'aNetworkInfo'
69 0 : (msg__)->WriteSentinel(1908218217);
70 :
71 :
72 :
73 :
74 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
75 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
76 : }
77 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifyNetworkChange", OTHER);
78 0 : PHal::Transition(PHal::Msg_NotifyNetworkChange__ID, (&(mState)));
79 :
80 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
81 0 : return sendok__;
82 : }
83 :
84 0 : auto PHalParent::SendNotifyWakeLockChange(const WakeLockInformation& aWakeLockInfo) -> bool
85 : {
86 0 : IPC::Message* msg__ = PHal::Msg_NotifyWakeLockChange(Id());
87 :
88 0 : Write(aWakeLockInfo, msg__);
89 : // Sentinel = 'aWakeLockInfo'
90 0 : (msg__)->WriteSentinel(1498930717);
91 :
92 :
93 :
94 :
95 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
96 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
97 : }
98 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifyWakeLockChange", OTHER);
99 0 : PHal::Transition(PHal::Msg_NotifyWakeLockChange__ID, (&(mState)));
100 :
101 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
102 0 : return sendok__;
103 : }
104 :
105 0 : auto PHalParent::SendNotifyScreenConfigurationChange(const ScreenConfiguration& aScreenOrientation) -> bool
106 : {
107 0 : IPC::Message* msg__ = PHal::Msg_NotifyScreenConfigurationChange(Id());
108 :
109 0 : Write(aScreenOrientation, msg__);
110 : // Sentinel = 'aScreenOrientation'
111 0 : (msg__)->WriteSentinel(2886778787);
112 :
113 :
114 :
115 :
116 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
117 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
118 : }
119 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifyScreenConfigurationChange", OTHER);
120 0 : PHal::Transition(PHal::Msg_NotifyScreenConfigurationChange__ID, (&(mState)));
121 :
122 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
123 0 : return sendok__;
124 : }
125 :
126 0 : auto PHalParent::SendNotifySwitchChange(const SwitchEvent& aEvent) -> bool
127 : {
128 0 : IPC::Message* msg__ = PHal::Msg_NotifySwitchChange(Id());
129 :
130 0 : Write(aEvent, msg__);
131 : // Sentinel = 'aEvent'
132 0 : (msg__)->WriteSentinel(3531117325);
133 :
134 :
135 :
136 :
137 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
138 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
139 : }
140 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifySwitchChange", OTHER);
141 0 : PHal::Transition(PHal::Msg_NotifySwitchChange__ID, (&(mState)));
142 :
143 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
144 0 : return sendok__;
145 : }
146 :
147 0 : auto PHalParent::SendNotifySystemClockChange(const int64_t& aClockDeltaMS) -> bool
148 : {
149 0 : IPC::Message* msg__ = PHal::Msg_NotifySystemClockChange(Id());
150 :
151 0 : Write(aClockDeltaMS, msg__);
152 : // Sentinel = 'aClockDeltaMS'
153 0 : (msg__)->WriteSentinel(490214104);
154 :
155 :
156 :
157 :
158 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
159 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
160 : }
161 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifySystemClockChange", OTHER);
162 0 : PHal::Transition(PHal::Msg_NotifySystemClockChange__ID, (&(mState)));
163 :
164 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
165 0 : return sendok__;
166 : }
167 :
168 0 : auto PHalParent::SendNotifySystemTimezoneChange(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) -> bool
169 : {
170 0 : IPC::Message* msg__ = PHal::Msg_NotifySystemTimezoneChange(Id());
171 :
172 0 : Write(aSystemTimezoneChangeInfo, msg__);
173 : // Sentinel = 'aSystemTimezoneChangeInfo'
174 0 : (msg__)->WriteSentinel(3797357450);
175 :
176 :
177 :
178 :
179 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
180 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
181 : }
182 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifySystemTimezoneChange", OTHER);
183 0 : PHal::Transition(PHal::Msg_NotifySystemTimezoneChange__ID, (&(mState)));
184 :
185 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
186 0 : return sendok__;
187 : }
188 :
189 0 : auto PHalParent::SendNotifySensorChange(const SensorData& aSensorData) -> bool
190 : {
191 0 : IPC::Message* msg__ = PHal::Msg_NotifySensorChange(Id());
192 :
193 0 : Write(aSensorData, msg__);
194 : // Sentinel = 'aSensorData'
195 0 : (msg__)->WriteSentinel(2949034804);
196 :
197 :
198 :
199 :
200 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
201 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
202 : }
203 0 : AUTO_PROFILER_LABEL("PHal::Msg_NotifySensorChange", OTHER);
204 0 : PHal::Transition(PHal::Msg_NotifySensorChange__ID, (&(mState)));
205 :
206 0 : bool sendok__ = (GetIPCChannel())->Send(msg__);
207 0 : return sendok__;
208 : }
209 :
210 0 : auto PHalParent::RemoveManagee(
211 : int32_t aProtocolId,
212 : ProtocolBase* aListener) -> void
213 : {
214 0 : FatalError("unreached");
215 0 : return;
216 : }
217 :
218 1 : auto PHalParent::OnMessageReceived(const Message& msg__) -> PHalParent::Result
219 : {
220 1 : switch ((msg__).type()) {
221 : case PHal::Msg_Vibrate__ID:
222 : {
223 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
224 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
225 : }
226 0 : AUTO_PROFILER_LABEL("PHal::Msg_Vibrate", OTHER);
227 :
228 0 : PickleIterator iter__(msg__);
229 0 : nsTArray<uint32_t> pattern;
230 0 : nsTArray<uint64_t> id;
231 : PBrowserParent* browser;
232 :
233 0 : if ((!(Read((&(pattern)), (&(msg__)), (&(iter__)))))) {
234 0 : FatalError("Error deserializing 'nsTArray'");
235 0 : return MsgValueError;
236 : }
237 : // Sentinel = 'pattern'
238 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2105892009)))) {
239 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
240 0 : return MsgValueError;
241 : }
242 0 : if ((!(Read((&(id)), (&(msg__)), (&(iter__)))))) {
243 0 : FatalError("Error deserializing 'nsTArray'");
244 0 : return MsgValueError;
245 : }
246 : // Sentinel = 'id'
247 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) {
248 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
249 0 : return MsgValueError;
250 : }
251 0 : if ((!(Read((&(browser)), (&(msg__)), (&(iter__)), false)))) {
252 0 : FatalError("Error deserializing 'PBrowserParent'");
253 0 : return MsgValueError;
254 : }
255 : // Sentinel = 'browser'
256 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2836343679)))) {
257 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PBrowserParent'");
258 0 : return MsgValueError;
259 : }
260 0 : (msg__).EndRead(iter__, (msg__).type());
261 0 : PHal::Transition(PHal::Msg_Vibrate__ID, (&(mState)));
262 0 : if ((!(RecvVibrate(mozilla::Move(pattern), mozilla::Move(id), mozilla::Move(browser))))) {
263 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
264 : // Error handled in mozilla::ipc::IPCResult
265 0 : return MsgProcessingError;
266 : }
267 :
268 0 : return MsgProcessed;
269 : }
270 : case PHal::Msg_CancelVibrate__ID:
271 : {
272 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
273 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
274 : }
275 0 : AUTO_PROFILER_LABEL("PHal::Msg_CancelVibrate", OTHER);
276 :
277 0 : PickleIterator iter__(msg__);
278 0 : nsTArray<uint64_t> id;
279 : PBrowserParent* browser;
280 :
281 0 : if ((!(Read((&(id)), (&(msg__)), (&(iter__)))))) {
282 0 : FatalError("Error deserializing 'nsTArray'");
283 0 : return MsgValueError;
284 : }
285 : // Sentinel = 'id'
286 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2794505629)))) {
287 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsTArray'");
288 0 : return MsgValueError;
289 : }
290 0 : if ((!(Read((&(browser)), (&(msg__)), (&(iter__)), false)))) {
291 0 : FatalError("Error deserializing 'PBrowserParent'");
292 0 : return MsgValueError;
293 : }
294 : // Sentinel = 'browser'
295 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2836343679)))) {
296 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PBrowserParent'");
297 0 : return MsgValueError;
298 : }
299 0 : (msg__).EndRead(iter__, (msg__).type());
300 0 : PHal::Transition(PHal::Msg_CancelVibrate__ID, (&(mState)));
301 0 : if ((!(RecvCancelVibrate(mozilla::Move(id), mozilla::Move(browser))))) {
302 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
303 : // Error handled in mozilla::ipc::IPCResult
304 0 : return MsgProcessingError;
305 : }
306 :
307 0 : return MsgProcessed;
308 : }
309 : case PHal::Msg_EnableBatteryNotifications__ID:
310 : {
311 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
312 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
313 : }
314 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableBatteryNotifications", OTHER);
315 :
316 0 : PHal::Transition(PHal::Msg_EnableBatteryNotifications__ID, (&(mState)));
317 0 : if ((!(RecvEnableBatteryNotifications()))) {
318 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
319 : // Error handled in mozilla::ipc::IPCResult
320 0 : return MsgProcessingError;
321 : }
322 :
323 0 : return MsgProcessed;
324 : }
325 : case PHal::Msg_DisableBatteryNotifications__ID:
326 : {
327 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
328 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
329 : }
330 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableBatteryNotifications", OTHER);
331 :
332 0 : PHal::Transition(PHal::Msg_DisableBatteryNotifications__ID, (&(mState)));
333 0 : if ((!(RecvDisableBatteryNotifications()))) {
334 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
335 : // Error handled in mozilla::ipc::IPCResult
336 0 : return MsgProcessingError;
337 : }
338 :
339 0 : return MsgProcessed;
340 : }
341 : case PHal::Msg_EnableNetworkNotifications__ID:
342 : {
343 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
344 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
345 : }
346 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableNetworkNotifications", OTHER);
347 :
348 0 : PHal::Transition(PHal::Msg_EnableNetworkNotifications__ID, (&(mState)));
349 0 : if ((!(RecvEnableNetworkNotifications()))) {
350 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
351 : // Error handled in mozilla::ipc::IPCResult
352 0 : return MsgProcessingError;
353 : }
354 :
355 0 : return MsgProcessed;
356 : }
357 : case PHal::Msg_DisableNetworkNotifications__ID:
358 : {
359 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
360 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
361 : }
362 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableNetworkNotifications", OTHER);
363 :
364 0 : PHal::Transition(PHal::Msg_DisableNetworkNotifications__ID, (&(mState)));
365 0 : if ((!(RecvDisableNetworkNotifications()))) {
366 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
367 : // Error handled in mozilla::ipc::IPCResult
368 0 : return MsgProcessingError;
369 : }
370 :
371 0 : return MsgProcessed;
372 : }
373 : case PHal::Msg_SetScreenEnabled__ID:
374 : {
375 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
376 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
377 : }
378 0 : AUTO_PROFILER_LABEL("PHal::Msg_SetScreenEnabled", OTHER);
379 :
380 0 : PickleIterator iter__(msg__);
381 : bool aEnabled;
382 :
383 0 : if ((!(Read((&(aEnabled)), (&(msg__)), (&(iter__)))))) {
384 0 : FatalError("Error deserializing 'bool'");
385 0 : return MsgValueError;
386 : }
387 : // Sentinel = 'aEnabled'
388 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2225039408)))) {
389 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
390 0 : return MsgValueError;
391 : }
392 0 : (msg__).EndRead(iter__, (msg__).type());
393 0 : PHal::Transition(PHal::Msg_SetScreenEnabled__ID, (&(mState)));
394 0 : if ((!(RecvSetScreenEnabled(mozilla::Move(aEnabled))))) {
395 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
396 : // Error handled in mozilla::ipc::IPCResult
397 0 : return MsgProcessingError;
398 : }
399 :
400 0 : return MsgProcessed;
401 : }
402 : case PHal::Msg_SetKeyLightEnabled__ID:
403 : {
404 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
405 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
406 : }
407 0 : AUTO_PROFILER_LABEL("PHal::Msg_SetKeyLightEnabled", OTHER);
408 :
409 0 : PickleIterator iter__(msg__);
410 : bool aEnabled;
411 :
412 0 : if ((!(Read((&(aEnabled)), (&(msg__)), (&(iter__)))))) {
413 0 : FatalError("Error deserializing 'bool'");
414 0 : return MsgValueError;
415 : }
416 : // Sentinel = 'aEnabled'
417 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2225039408)))) {
418 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
419 0 : return MsgValueError;
420 : }
421 0 : (msg__).EndRead(iter__, (msg__).type());
422 0 : PHal::Transition(PHal::Msg_SetKeyLightEnabled__ID, (&(mState)));
423 0 : if ((!(RecvSetKeyLightEnabled(mozilla::Move(aEnabled))))) {
424 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
425 : // Error handled in mozilla::ipc::IPCResult
426 0 : return MsgProcessingError;
427 : }
428 :
429 0 : return MsgProcessed;
430 : }
431 : case PHal::Msg_SetCpuSleepAllowed__ID:
432 : {
433 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
434 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
435 : }
436 0 : AUTO_PROFILER_LABEL("PHal::Msg_SetCpuSleepAllowed", OTHER);
437 :
438 0 : PickleIterator iter__(msg__);
439 : bool aAllowed;
440 :
441 0 : if ((!(Read((&(aAllowed)), (&(msg__)), (&(iter__)))))) {
442 0 : FatalError("Error deserializing 'bool'");
443 0 : return MsgValueError;
444 : }
445 : // Sentinel = 'aAllowed'
446 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 785233983)))) {
447 0 : mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
448 0 : return MsgValueError;
449 : }
450 0 : (msg__).EndRead(iter__, (msg__).type());
451 0 : PHal::Transition(PHal::Msg_SetCpuSleepAllowed__ID, (&(mState)));
452 0 : if ((!(RecvSetCpuSleepAllowed(mozilla::Move(aAllowed))))) {
453 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
454 : // Error handled in mozilla::ipc::IPCResult
455 0 : return MsgProcessingError;
456 : }
457 :
458 0 : return MsgProcessed;
459 : }
460 : case PHal::Msg_SetScreenBrightness__ID:
461 : {
462 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
463 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
464 : }
465 0 : AUTO_PROFILER_LABEL("PHal::Msg_SetScreenBrightness", OTHER);
466 :
467 0 : PickleIterator iter__(msg__);
468 : double aBrightness;
469 :
470 0 : if ((!(Read((&(aBrightness)), (&(msg__)), (&(iter__)))))) {
471 0 : FatalError("Error deserializing 'double'");
472 0 : return MsgValueError;
473 : }
474 : // Sentinel = 'aBrightness'
475 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2646084451)))) {
476 0 : mozilla::ipc::SentinelReadError("Error deserializing 'double'");
477 0 : return MsgValueError;
478 : }
479 0 : (msg__).EndRead(iter__, (msg__).type());
480 0 : PHal::Transition(PHal::Msg_SetScreenBrightness__ID, (&(mState)));
481 0 : if ((!(RecvSetScreenBrightness(mozilla::Move(aBrightness))))) {
482 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
483 : // Error handled in mozilla::ipc::IPCResult
484 0 : return MsgProcessingError;
485 : }
486 :
487 0 : return MsgProcessed;
488 : }
489 : case PHal::Msg_AdjustSystemClock__ID:
490 : {
491 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
492 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
493 : }
494 0 : AUTO_PROFILER_LABEL("PHal::Msg_AdjustSystemClock", OTHER);
495 :
496 0 : PickleIterator iter__(msg__);
497 : int64_t aDeltaMilliseconds;
498 :
499 0 : if ((!(Read((&(aDeltaMilliseconds)), (&(msg__)), (&(iter__)))))) {
500 0 : FatalError("Error deserializing 'int64_t'");
501 0 : return MsgValueError;
502 : }
503 : // Sentinel = 'aDeltaMilliseconds'
504 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 596392573)))) {
505 0 : mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
506 0 : return MsgValueError;
507 : }
508 0 : (msg__).EndRead(iter__, (msg__).type());
509 0 : PHal::Transition(PHal::Msg_AdjustSystemClock__ID, (&(mState)));
510 0 : if ((!(RecvAdjustSystemClock(mozilla::Move(aDeltaMilliseconds))))) {
511 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
512 : // Error handled in mozilla::ipc::IPCResult
513 0 : return MsgProcessingError;
514 : }
515 :
516 0 : return MsgProcessed;
517 : }
518 : case PHal::Msg_SetTimezone__ID:
519 : {
520 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
521 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
522 : }
523 0 : AUTO_PROFILER_LABEL("PHal::Msg_SetTimezone", OTHER);
524 :
525 0 : PickleIterator iter__(msg__);
526 0 : nsCString aTimezoneSpec;
527 :
528 0 : if ((!(Read((&(aTimezoneSpec)), (&(msg__)), (&(iter__)))))) {
529 0 : FatalError("Error deserializing 'nsCString'");
530 0 : return MsgValueError;
531 : }
532 : // Sentinel = 'aTimezoneSpec'
533 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2553958496)))) {
534 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
535 0 : return MsgValueError;
536 : }
537 0 : (msg__).EndRead(iter__, (msg__).type());
538 0 : PHal::Transition(PHal::Msg_SetTimezone__ID, (&(mState)));
539 0 : if ((!(RecvSetTimezone(mozilla::Move(aTimezoneSpec))))) {
540 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
541 : // Error handled in mozilla::ipc::IPCResult
542 0 : return MsgProcessingError;
543 : }
544 :
545 0 : return MsgProcessed;
546 : }
547 : case PHal::Msg_EnableSystemClockChangeNotifications__ID:
548 : {
549 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
550 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
551 : }
552 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableSystemClockChangeNotifications", OTHER);
553 :
554 0 : PHal::Transition(PHal::Msg_EnableSystemClockChangeNotifications__ID, (&(mState)));
555 0 : if ((!(RecvEnableSystemClockChangeNotifications()))) {
556 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
557 : // Error handled in mozilla::ipc::IPCResult
558 0 : return MsgProcessingError;
559 : }
560 :
561 0 : return MsgProcessed;
562 : }
563 : case PHal::Msg_DisableSystemClockChangeNotifications__ID:
564 : {
565 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
566 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
567 : }
568 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableSystemClockChangeNotifications", OTHER);
569 :
570 0 : PHal::Transition(PHal::Msg_DisableSystemClockChangeNotifications__ID, (&(mState)));
571 0 : if ((!(RecvDisableSystemClockChangeNotifications()))) {
572 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
573 : // Error handled in mozilla::ipc::IPCResult
574 0 : return MsgProcessingError;
575 : }
576 :
577 0 : return MsgProcessed;
578 : }
579 : case PHal::Msg_EnableSystemTimezoneChangeNotifications__ID:
580 : {
581 1 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
582 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
583 : }
584 2 : AUTO_PROFILER_LABEL("PHal::Msg_EnableSystemTimezoneChangeNotifications", OTHER);
585 :
586 1 : PHal::Transition(PHal::Msg_EnableSystemTimezoneChangeNotifications__ID, (&(mState)));
587 1 : if ((!(RecvEnableSystemTimezoneChangeNotifications()))) {
588 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
589 : // Error handled in mozilla::ipc::IPCResult
590 0 : return MsgProcessingError;
591 : }
592 :
593 1 : return MsgProcessed;
594 : }
595 : case PHal::Msg_DisableSystemTimezoneChangeNotifications__ID:
596 : {
597 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
598 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
599 : }
600 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableSystemTimezoneChangeNotifications", OTHER);
601 :
602 0 : PHal::Transition(PHal::Msg_DisableSystemTimezoneChangeNotifications__ID, (&(mState)));
603 0 : if ((!(RecvDisableSystemTimezoneChangeNotifications()))) {
604 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
605 : // Error handled in mozilla::ipc::IPCResult
606 0 : return MsgProcessingError;
607 : }
608 :
609 0 : return MsgProcessed;
610 : }
611 : case PHal::Msg_ModifyWakeLock__ID:
612 : {
613 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
614 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
615 : }
616 0 : AUTO_PROFILER_LABEL("PHal::Msg_ModifyWakeLock", OTHER);
617 :
618 0 : PickleIterator iter__(msg__);
619 0 : nsString aTopic;
620 : WakeLockControl aLockAdjust;
621 : WakeLockControl aHiddenAdjust;
622 : uint64_t aProcessID;
623 :
624 0 : if ((!(Read((&(aTopic)), (&(msg__)), (&(iter__)))))) {
625 0 : FatalError("Error deserializing 'nsString'");
626 0 : return MsgValueError;
627 : }
628 : // Sentinel = 'aTopic'
629 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2759450316)))) {
630 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
631 0 : return MsgValueError;
632 : }
633 0 : if ((!(Read((&(aLockAdjust)), (&(msg__)), (&(iter__)))))) {
634 0 : FatalError("Error deserializing 'WakeLockControl'");
635 0 : return MsgValueError;
636 : }
637 : // Sentinel = 'aLockAdjust'
638 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3857892778)))) {
639 0 : mozilla::ipc::SentinelReadError("Error deserializing 'WakeLockControl'");
640 0 : return MsgValueError;
641 : }
642 0 : if ((!(Read((&(aHiddenAdjust)), (&(msg__)), (&(iter__)))))) {
643 0 : FatalError("Error deserializing 'WakeLockControl'");
644 0 : return MsgValueError;
645 : }
646 : // Sentinel = 'aHiddenAdjust'
647 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2900615369)))) {
648 0 : mozilla::ipc::SentinelReadError("Error deserializing 'WakeLockControl'");
649 0 : return MsgValueError;
650 : }
651 0 : if ((!(Read((&(aProcessID)), (&(msg__)), (&(iter__)))))) {
652 0 : FatalError("Error deserializing 'uint64_t'");
653 0 : return MsgValueError;
654 : }
655 : // Sentinel = 'aProcessID'
656 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2181368637)))) {
657 0 : mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
658 0 : return MsgValueError;
659 : }
660 0 : (msg__).EndRead(iter__, (msg__).type());
661 0 : PHal::Transition(PHal::Msg_ModifyWakeLock__ID, (&(mState)));
662 0 : if ((!(RecvModifyWakeLock(mozilla::Move(aTopic), mozilla::Move(aLockAdjust), mozilla::Move(aHiddenAdjust), mozilla::Move(aProcessID))))) {
663 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
664 : // Error handled in mozilla::ipc::IPCResult
665 0 : return MsgProcessingError;
666 : }
667 :
668 0 : return MsgProcessed;
669 : }
670 : case PHal::Msg_EnableWakeLockNotifications__ID:
671 : {
672 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
673 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
674 : }
675 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableWakeLockNotifications", OTHER);
676 :
677 0 : PHal::Transition(PHal::Msg_EnableWakeLockNotifications__ID, (&(mState)));
678 0 : if ((!(RecvEnableWakeLockNotifications()))) {
679 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
680 : // Error handled in mozilla::ipc::IPCResult
681 0 : return MsgProcessingError;
682 : }
683 :
684 0 : return MsgProcessed;
685 : }
686 : case PHal::Msg_DisableWakeLockNotifications__ID:
687 : {
688 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
689 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
690 : }
691 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableWakeLockNotifications", OTHER);
692 :
693 0 : PHal::Transition(PHal::Msg_DisableWakeLockNotifications__ID, (&(mState)));
694 0 : if ((!(RecvDisableWakeLockNotifications()))) {
695 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
696 : // Error handled in mozilla::ipc::IPCResult
697 0 : return MsgProcessingError;
698 : }
699 :
700 0 : return MsgProcessed;
701 : }
702 : case PHal::Msg_EnableScreenConfigurationNotifications__ID:
703 : {
704 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
705 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
706 : }
707 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableScreenConfigurationNotifications", OTHER);
708 :
709 0 : PHal::Transition(PHal::Msg_EnableScreenConfigurationNotifications__ID, (&(mState)));
710 0 : if ((!(RecvEnableScreenConfigurationNotifications()))) {
711 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
712 : // Error handled in mozilla::ipc::IPCResult
713 0 : return MsgProcessingError;
714 : }
715 :
716 0 : return MsgProcessed;
717 : }
718 : case PHal::Msg_DisableScreenConfigurationNotifications__ID:
719 : {
720 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
721 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
722 : }
723 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableScreenConfigurationNotifications", OTHER);
724 :
725 0 : PHal::Transition(PHal::Msg_DisableScreenConfigurationNotifications__ID, (&(mState)));
726 0 : if ((!(RecvDisableScreenConfigurationNotifications()))) {
727 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
728 : // Error handled in mozilla::ipc::IPCResult
729 0 : return MsgProcessingError;
730 : }
731 :
732 0 : return MsgProcessed;
733 : }
734 : case PHal::Msg_UnlockScreenOrientation__ID:
735 : {
736 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
737 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
738 : }
739 0 : AUTO_PROFILER_LABEL("PHal::Msg_UnlockScreenOrientation", OTHER);
740 :
741 0 : PHal::Transition(PHal::Msg_UnlockScreenOrientation__ID, (&(mState)));
742 0 : if ((!(RecvUnlockScreenOrientation()))) {
743 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
744 : // Error handled in mozilla::ipc::IPCResult
745 0 : return MsgProcessingError;
746 : }
747 :
748 0 : return MsgProcessed;
749 : }
750 : case PHal::Msg_EnableSwitchNotifications__ID:
751 : {
752 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
753 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
754 : }
755 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableSwitchNotifications", OTHER);
756 :
757 0 : PickleIterator iter__(msg__);
758 : SwitchDevice aDevice;
759 :
760 0 : if ((!(Read((&(aDevice)), (&(msg__)), (&(iter__)))))) {
761 0 : FatalError("Error deserializing 'SwitchDevice'");
762 0 : return MsgValueError;
763 : }
764 : // Sentinel = 'aDevice'
765 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2436697236)))) {
766 0 : mozilla::ipc::SentinelReadError("Error deserializing 'SwitchDevice'");
767 0 : return MsgValueError;
768 : }
769 0 : (msg__).EndRead(iter__, (msg__).type());
770 0 : PHal::Transition(PHal::Msg_EnableSwitchNotifications__ID, (&(mState)));
771 0 : if ((!(RecvEnableSwitchNotifications(mozilla::Move(aDevice))))) {
772 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
773 : // Error handled in mozilla::ipc::IPCResult
774 0 : return MsgProcessingError;
775 : }
776 :
777 0 : return MsgProcessed;
778 : }
779 : case PHal::Msg_DisableSwitchNotifications__ID:
780 : {
781 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
782 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
783 : }
784 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableSwitchNotifications", OTHER);
785 :
786 0 : PickleIterator iter__(msg__);
787 : SwitchDevice aDevice;
788 :
789 0 : if ((!(Read((&(aDevice)), (&(msg__)), (&(iter__)))))) {
790 0 : FatalError("Error deserializing 'SwitchDevice'");
791 0 : return MsgValueError;
792 : }
793 : // Sentinel = 'aDevice'
794 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2436697236)))) {
795 0 : mozilla::ipc::SentinelReadError("Error deserializing 'SwitchDevice'");
796 0 : return MsgValueError;
797 : }
798 0 : (msg__).EndRead(iter__, (msg__).type());
799 0 : PHal::Transition(PHal::Msg_DisableSwitchNotifications__ID, (&(mState)));
800 0 : if ((!(RecvDisableSwitchNotifications(mozilla::Move(aDevice))))) {
801 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
802 : // Error handled in mozilla::ipc::IPCResult
803 0 : return MsgProcessingError;
804 : }
805 :
806 0 : return MsgProcessed;
807 : }
808 : case PHal::Msg_FactoryReset__ID:
809 : {
810 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
811 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
812 : }
813 0 : AUTO_PROFILER_LABEL("PHal::Msg_FactoryReset", OTHER);
814 :
815 0 : PickleIterator iter__(msg__);
816 0 : nsString aReason;
817 :
818 0 : if ((!(Read((&(aReason)), (&(msg__)), (&(iter__)))))) {
819 0 : FatalError("Error deserializing 'nsString'");
820 0 : return MsgValueError;
821 : }
822 : // Sentinel = 'aReason'
823 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 829905706)))) {
824 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
825 0 : return MsgValueError;
826 : }
827 0 : (msg__).EndRead(iter__, (msg__).type());
828 0 : PHal::Transition(PHal::Msg_FactoryReset__ID, (&(mState)));
829 0 : if ((!(RecvFactoryReset(mozilla::Move(aReason))))) {
830 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
831 : // Error handled in mozilla::ipc::IPCResult
832 0 : return MsgProcessingError;
833 : }
834 :
835 0 : return MsgProcessed;
836 : }
837 : case PHal::Msg_EnableSensorNotifications__ID:
838 : {
839 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
840 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
841 : }
842 0 : AUTO_PROFILER_LABEL("PHal::Msg_EnableSensorNotifications", OTHER);
843 :
844 0 : PickleIterator iter__(msg__);
845 : SensorType aSensor;
846 :
847 0 : if ((!(Read((&(aSensor)), (&(msg__)), (&(iter__)))))) {
848 0 : FatalError("Error deserializing 'SensorType'");
849 0 : return MsgValueError;
850 : }
851 : // Sentinel = 'aSensor'
852 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 942615000)))) {
853 0 : mozilla::ipc::SentinelReadError("Error deserializing 'SensorType'");
854 0 : return MsgValueError;
855 : }
856 0 : (msg__).EndRead(iter__, (msg__).type());
857 0 : PHal::Transition(PHal::Msg_EnableSensorNotifications__ID, (&(mState)));
858 0 : if ((!(RecvEnableSensorNotifications(mozilla::Move(aSensor))))) {
859 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
860 : // Error handled in mozilla::ipc::IPCResult
861 0 : return MsgProcessingError;
862 : }
863 :
864 0 : return MsgProcessed;
865 : }
866 : case PHal::Msg_DisableSensorNotifications__ID:
867 : {
868 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
869 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
870 : }
871 0 : AUTO_PROFILER_LABEL("PHal::Msg_DisableSensorNotifications", OTHER);
872 :
873 0 : PickleIterator iter__(msg__);
874 : SensorType aSensor;
875 :
876 0 : if ((!(Read((&(aSensor)), (&(msg__)), (&(iter__)))))) {
877 0 : FatalError("Error deserializing 'SensorType'");
878 0 : return MsgValueError;
879 : }
880 : // Sentinel = 'aSensor'
881 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 942615000)))) {
882 0 : mozilla::ipc::SentinelReadError("Error deserializing 'SensorType'");
883 0 : return MsgValueError;
884 : }
885 0 : (msg__).EndRead(iter__, (msg__).type());
886 0 : PHal::Transition(PHal::Msg_DisableSensorNotifications__ID, (&(mState)));
887 0 : if ((!(RecvDisableSensorNotifications(mozilla::Move(aSensor))))) {
888 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
889 : // Error handled in mozilla::ipc::IPCResult
890 0 : return MsgProcessingError;
891 : }
892 :
893 0 : return MsgProcessed;
894 : }
895 : case PHal::Msg___delete____ID:
896 : {
897 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
898 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
899 : }
900 0 : AUTO_PROFILER_LABEL("PHal::Msg___delete__", OTHER);
901 :
902 0 : PickleIterator iter__(msg__);
903 : PHalParent* actor;
904 :
905 0 : if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
906 0 : FatalError("Error deserializing 'PHalParent'");
907 0 : return MsgValueError;
908 : }
909 : // Sentinel = 'actor'
910 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
911 0 : mozilla::ipc::SentinelReadError("Error deserializing 'PHalParent'");
912 0 : return MsgValueError;
913 : }
914 0 : (msg__).EndRead(iter__, (msg__).type());
915 0 : PHal::Transition(PHal::Msg___delete____ID, (&(mState)));
916 0 : if ((!(Recv__delete__()))) {
917 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
918 : // Error handled in mozilla::ipc::IPCResult
919 0 : return MsgProcessingError;
920 : }
921 :
922 :
923 0 : IProtocol* mgr = (actor)->Manager();
924 0 : (actor)->DestroySubtree(Deletion);
925 0 : (actor)->DeallocSubtree();
926 0 : (mgr)->RemoveManagee(PHalMsgStart, actor);
927 :
928 0 : return MsgProcessed;
929 : }
930 : default:
931 : {
932 0 : return MsgNotKnown;
933 : }
934 : }
935 : }
936 :
937 0 : auto PHalParent::OnMessageReceived(
938 : const Message& msg__,
939 : Message*& reply__) -> PHalParent::Result
940 : {
941 0 : switch ((msg__).type()) {
942 : case PHal::Msg_GetCurrentBatteryInformation__ID:
943 : {
944 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
945 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
946 : }
947 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetCurrentBatteryInformation", OTHER);
948 :
949 0 : PHal::Transition(PHal::Msg_GetCurrentBatteryInformation__ID, (&(mState)));
950 0 : int32_t id__ = Id();
951 0 : BatteryInformation aBatteryInfo;
952 0 : if ((!(RecvGetCurrentBatteryInformation((&(aBatteryInfo)))))) {
953 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
954 : // Error handled in mozilla::ipc::IPCResult
955 0 : return MsgProcessingError;
956 : }
957 :
958 0 : reply__ = PHal::Reply_GetCurrentBatteryInformation(id__);
959 :
960 0 : Write(aBatteryInfo, reply__);
961 : // Sentinel = 'aBatteryInfo'
962 0 : (reply__)->WriteSentinel(2078351088);
963 0 : (reply__)->set_sync();
964 0 : (reply__)->set_reply();
965 :
966 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
967 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
968 : }
969 0 : return MsgProcessed;
970 : }
971 : case PHal::Msg_GetCurrentNetworkInformation__ID:
972 : {
973 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
974 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
975 : }
976 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetCurrentNetworkInformation", OTHER);
977 :
978 0 : PHal::Transition(PHal::Msg_GetCurrentNetworkInformation__ID, (&(mState)));
979 0 : int32_t id__ = Id();
980 0 : NetworkInformation aNetworkInfo;
981 0 : if ((!(RecvGetCurrentNetworkInformation((&(aNetworkInfo)))))) {
982 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
983 : // Error handled in mozilla::ipc::IPCResult
984 0 : return MsgProcessingError;
985 : }
986 :
987 0 : reply__ = PHal::Reply_GetCurrentNetworkInformation(id__);
988 :
989 0 : Write(aNetworkInfo, reply__);
990 : // Sentinel = 'aNetworkInfo'
991 0 : (reply__)->WriteSentinel(1908218217);
992 0 : (reply__)->set_sync();
993 0 : (reply__)->set_reply();
994 :
995 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
996 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
997 : }
998 0 : return MsgProcessed;
999 : }
1000 : case PHal::Msg_GetScreenEnabled__ID:
1001 : {
1002 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1003 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1004 : }
1005 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetScreenEnabled", OTHER);
1006 :
1007 0 : PHal::Transition(PHal::Msg_GetScreenEnabled__ID, (&(mState)));
1008 0 : int32_t id__ = Id();
1009 : bool enabled;
1010 0 : if ((!(RecvGetScreenEnabled((&(enabled)))))) {
1011 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1012 : // Error handled in mozilla::ipc::IPCResult
1013 0 : return MsgProcessingError;
1014 : }
1015 :
1016 0 : reply__ = PHal::Reply_GetScreenEnabled(id__);
1017 :
1018 0 : Write(enabled, reply__);
1019 : // Sentinel = 'enabled'
1020 0 : (reply__)->WriteSentinel(3743499116);
1021 0 : (reply__)->set_sync();
1022 0 : (reply__)->set_reply();
1023 :
1024 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1025 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1026 : }
1027 0 : return MsgProcessed;
1028 : }
1029 : case PHal::Msg_GetKeyLightEnabled__ID:
1030 : {
1031 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1032 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1033 : }
1034 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetKeyLightEnabled", OTHER);
1035 :
1036 0 : PHal::Transition(PHal::Msg_GetKeyLightEnabled__ID, (&(mState)));
1037 0 : int32_t id__ = Id();
1038 : bool enabled;
1039 0 : if ((!(RecvGetKeyLightEnabled((&(enabled)))))) {
1040 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1041 : // Error handled in mozilla::ipc::IPCResult
1042 0 : return MsgProcessingError;
1043 : }
1044 :
1045 0 : reply__ = PHal::Reply_GetKeyLightEnabled(id__);
1046 :
1047 0 : Write(enabled, reply__);
1048 : // Sentinel = 'enabled'
1049 0 : (reply__)->WriteSentinel(3743499116);
1050 0 : (reply__)->set_sync();
1051 0 : (reply__)->set_reply();
1052 :
1053 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1054 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1055 : }
1056 0 : return MsgProcessed;
1057 : }
1058 : case PHal::Msg_GetCpuSleepAllowed__ID:
1059 : {
1060 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1061 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1062 : }
1063 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetCpuSleepAllowed", OTHER);
1064 :
1065 0 : PHal::Transition(PHal::Msg_GetCpuSleepAllowed__ID, (&(mState)));
1066 0 : int32_t id__ = Id();
1067 : bool allowed;
1068 0 : if ((!(RecvGetCpuSleepAllowed((&(allowed)))))) {
1069 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1070 : // Error handled in mozilla::ipc::IPCResult
1071 0 : return MsgProcessingError;
1072 : }
1073 :
1074 0 : reply__ = PHal::Reply_GetCpuSleepAllowed(id__);
1075 :
1076 0 : Write(allowed, reply__);
1077 : // Sentinel = 'allowed'
1078 0 : (reply__)->WriteSentinel(1297156503);
1079 0 : (reply__)->set_sync();
1080 0 : (reply__)->set_reply();
1081 :
1082 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1083 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1084 : }
1085 0 : return MsgProcessed;
1086 : }
1087 : case PHal::Msg_GetScreenBrightness__ID:
1088 : {
1089 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1090 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1091 : }
1092 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetScreenBrightness", OTHER);
1093 :
1094 0 : PHal::Transition(PHal::Msg_GetScreenBrightness__ID, (&(mState)));
1095 0 : int32_t id__ = Id();
1096 : double brightness;
1097 0 : if ((!(RecvGetScreenBrightness((&(brightness)))))) {
1098 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1099 : // Error handled in mozilla::ipc::IPCResult
1100 0 : return MsgProcessingError;
1101 : }
1102 :
1103 0 : reply__ = PHal::Reply_GetScreenBrightness(id__);
1104 :
1105 0 : Write(brightness, reply__);
1106 : // Sentinel = 'brightness'
1107 0 : (reply__)->WriteSentinel(288670311);
1108 0 : (reply__)->set_sync();
1109 0 : (reply__)->set_reply();
1110 :
1111 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1112 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1113 : }
1114 0 : return MsgProcessed;
1115 : }
1116 : case PHal::Msg_GetTimezone__ID:
1117 : {
1118 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1119 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1120 : }
1121 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetTimezone", OTHER);
1122 :
1123 0 : PHal::Transition(PHal::Msg_GetTimezone__ID, (&(mState)));
1124 0 : int32_t id__ = Id();
1125 0 : nsCString aTimezoneSpec;
1126 0 : if ((!(RecvGetTimezone((&(aTimezoneSpec)))))) {
1127 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1128 : // Error handled in mozilla::ipc::IPCResult
1129 0 : return MsgProcessingError;
1130 : }
1131 :
1132 0 : reply__ = PHal::Reply_GetTimezone(id__);
1133 :
1134 0 : Write(aTimezoneSpec, reply__);
1135 : // Sentinel = 'aTimezoneSpec'
1136 0 : (reply__)->WriteSentinel(2553958496);
1137 0 : (reply__)->set_sync();
1138 0 : (reply__)->set_reply();
1139 :
1140 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1141 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1142 : }
1143 0 : return MsgProcessed;
1144 : }
1145 : case PHal::Msg_GetTimezoneOffset__ID:
1146 : {
1147 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1148 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1149 : }
1150 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetTimezoneOffset", OTHER);
1151 :
1152 0 : PHal::Transition(PHal::Msg_GetTimezoneOffset__ID, (&(mState)));
1153 0 : int32_t id__ = Id();
1154 : int32_t aTimezoneOffset;
1155 0 : if ((!(RecvGetTimezoneOffset((&(aTimezoneOffset)))))) {
1156 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1157 : // Error handled in mozilla::ipc::IPCResult
1158 0 : return MsgProcessingError;
1159 : }
1160 :
1161 0 : reply__ = PHal::Reply_GetTimezoneOffset(id__);
1162 :
1163 0 : Write(aTimezoneOffset, reply__);
1164 : // Sentinel = 'aTimezoneOffset'
1165 0 : (reply__)->WriteSentinel(4001217354);
1166 0 : (reply__)->set_sync();
1167 0 : (reply__)->set_reply();
1168 :
1169 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1170 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1171 : }
1172 0 : return MsgProcessed;
1173 : }
1174 : case PHal::Msg_GetWakeLockInfo__ID:
1175 : {
1176 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1177 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1178 : }
1179 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetWakeLockInfo", OTHER);
1180 :
1181 0 : PickleIterator iter__(msg__);
1182 0 : nsString aTopic;
1183 :
1184 0 : if ((!(Read((&(aTopic)), (&(msg__)), (&(iter__)))))) {
1185 0 : FatalError("Error deserializing 'nsString'");
1186 0 : return MsgValueError;
1187 : }
1188 : // Sentinel = 'aTopic'
1189 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2759450316)))) {
1190 0 : mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
1191 0 : return MsgValueError;
1192 : }
1193 0 : (msg__).EndRead(iter__, (msg__).type());
1194 0 : PHal::Transition(PHal::Msg_GetWakeLockInfo__ID, (&(mState)));
1195 0 : int32_t id__ = Id();
1196 0 : WakeLockInformation aWakeLockInfo;
1197 0 : if ((!(RecvGetWakeLockInfo(mozilla::Move(aTopic), (&(aWakeLockInfo)))))) {
1198 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1199 : // Error handled in mozilla::ipc::IPCResult
1200 0 : return MsgProcessingError;
1201 : }
1202 :
1203 0 : reply__ = PHal::Reply_GetWakeLockInfo(id__);
1204 :
1205 0 : Write(aWakeLockInfo, reply__);
1206 : // Sentinel = 'aWakeLockInfo'
1207 0 : (reply__)->WriteSentinel(1498930717);
1208 0 : (reply__)->set_sync();
1209 0 : (reply__)->set_reply();
1210 :
1211 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1212 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1213 : }
1214 0 : return MsgProcessed;
1215 : }
1216 : case PHal::Msg_LockScreenOrientation__ID:
1217 : {
1218 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1219 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1220 : }
1221 0 : AUTO_PROFILER_LABEL("PHal::Msg_LockScreenOrientation", OTHER);
1222 :
1223 0 : PickleIterator iter__(msg__);
1224 : ScreenOrientationInternal aOrientation;
1225 :
1226 0 : if ((!(Read((&(aOrientation)), (&(msg__)), (&(iter__)))))) {
1227 0 : FatalError("Error deserializing 'ScreenOrientationInternal'");
1228 0 : return MsgValueError;
1229 : }
1230 : // Sentinel = 'aOrientation'
1231 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1665072289)))) {
1232 0 : mozilla::ipc::SentinelReadError("Error deserializing 'ScreenOrientationInternal'");
1233 0 : return MsgValueError;
1234 : }
1235 0 : (msg__).EndRead(iter__, (msg__).type());
1236 0 : PHal::Transition(PHal::Msg_LockScreenOrientation__ID, (&(mState)));
1237 0 : int32_t id__ = Id();
1238 : bool allowed;
1239 0 : if ((!(RecvLockScreenOrientation(mozilla::Move(aOrientation), (&(allowed)))))) {
1240 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1241 : // Error handled in mozilla::ipc::IPCResult
1242 0 : return MsgProcessingError;
1243 : }
1244 :
1245 0 : reply__ = PHal::Reply_LockScreenOrientation(id__);
1246 :
1247 0 : Write(allowed, reply__);
1248 : // Sentinel = 'allowed'
1249 0 : (reply__)->WriteSentinel(1297156503);
1250 0 : (reply__)->set_sync();
1251 0 : (reply__)->set_reply();
1252 :
1253 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1254 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1255 : }
1256 0 : return MsgProcessed;
1257 : }
1258 : case PHal::Msg_GetCurrentSwitchState__ID:
1259 : {
1260 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1261 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
1262 : }
1263 0 : AUTO_PROFILER_LABEL("PHal::Msg_GetCurrentSwitchState", OTHER);
1264 :
1265 0 : PickleIterator iter__(msg__);
1266 : SwitchDevice aDevice;
1267 :
1268 0 : if ((!(Read((&(aDevice)), (&(msg__)), (&(iter__)))))) {
1269 0 : FatalError("Error deserializing 'SwitchDevice'");
1270 0 : return MsgValueError;
1271 : }
1272 : // Sentinel = 'aDevice'
1273 0 : if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2436697236)))) {
1274 0 : mozilla::ipc::SentinelReadError("Error deserializing 'SwitchDevice'");
1275 0 : return MsgValueError;
1276 : }
1277 0 : (msg__).EndRead(iter__, (msg__).type());
1278 0 : PHal::Transition(PHal::Msg_GetCurrentSwitchState__ID, (&(mState)));
1279 0 : int32_t id__ = Id();
1280 : SwitchState aState;
1281 0 : if ((!(RecvGetCurrentSwitchState(mozilla::Move(aDevice), (&(aState)))))) {
1282 0 : mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
1283 : // Error handled in mozilla::ipc::IPCResult
1284 0 : return MsgProcessingError;
1285 : }
1286 :
1287 0 : reply__ = PHal::Reply_GetCurrentSwitchState(id__);
1288 :
1289 0 : Write(aState, reply__);
1290 : // Sentinel = 'aState'
1291 0 : (reply__)->WriteSentinel(3694751962);
1292 0 : (reply__)->set_sync();
1293 0 : (reply__)->set_reply();
1294 :
1295 0 : if (mozilla::ipc::LoggingEnabledFor("PHalParent")) {
1296 0 : mozilla::ipc::LogMessageForProtocol("PHalParent", OtherPid(), "Sending reply ", (reply__)->type(), mozilla::ipc::MessageDirection::eSending);
1297 : }
1298 0 : return MsgProcessed;
1299 : }
1300 : default:
1301 : {
1302 0 : return MsgNotKnown;
1303 : }
1304 : }
1305 : }
1306 :
1307 0 : auto PHalParent::OnCallReceived(
1308 : const Message& msg__,
1309 : Message*& reply__) -> PHalParent::Result
1310 : {
1311 0 : MOZ_ASSERT_UNREACHABLE("message protocol not supported");
1312 : return MsgNotKnown;
1313 : }
1314 :
1315 0 : auto PHalParent::GetProtocolTypeId() -> int32_t
1316 : {
1317 0 : return PHalMsgStart;
1318 : }
1319 :
1320 0 : auto PHalParent::ProtocolName() const -> const char*
1321 : {
1322 0 : return "PHalParent";
1323 : }
1324 :
1325 0 : auto PHalParent::DestroySubtree(ActorDestroyReason why) -> void
1326 : {
1327 : // Unregister from our manager.
1328 0 : Unregister(Id());
1329 :
1330 : // Reject owning pending promises.
1331 0 : (GetIPCChannel())->RejectPendingPromisesForActor(this);
1332 :
1333 : // Finally, destroy "us".
1334 0 : ActorDestroy(why);
1335 0 : }
1336 :
1337 0 : auto PHalParent::DeallocSubtree() -> void
1338 : {
1339 0 : }
1340 :
1341 0 : auto PHalParent::Write(
1342 : const SwitchEvent& v__,
1343 : Message* msg__) -> void
1344 : {
1345 0 : Write((v__).device(), msg__);
1346 : // Sentinel = 'device'
1347 0 : (msg__)->WriteSentinel(1277795288);
1348 0 : Write((v__).status(), msg__);
1349 : // Sentinel = 'status'
1350 0 : (msg__)->WriteSentinel(3714608576);
1351 0 : }
1352 :
1353 0 : auto PHalParent::Read(
1354 : SwitchEvent* v__,
1355 : const Message* msg__,
1356 : PickleIterator* iter__) -> bool
1357 : {
1358 0 : if ((!(Read((&((v__)->device())), msg__, iter__)))) {
1359 0 : FatalError("Error deserializing 'device' (SwitchDevice) member of 'SwitchEvent'");
1360 0 : return false;
1361 : }
1362 : // Sentinel = 'device'
1363 0 : if ((!((msg__)->ReadSentinel(iter__, 1277795288)))) {
1364 0 : mozilla::ipc::SentinelReadError("Error deserializing 'device' (SwitchDevice) member of 'SwitchEvent'");
1365 0 : return false;
1366 : }
1367 0 : if ((!(Read((&((v__)->status())), msg__, iter__)))) {
1368 0 : FatalError("Error deserializing 'status' (SwitchState) member of 'SwitchEvent'");
1369 0 : return false;
1370 : }
1371 : // Sentinel = 'status'
1372 0 : if ((!((msg__)->ReadSentinel(iter__, 3714608576)))) {
1373 0 : mozilla::ipc::SentinelReadError("Error deserializing 'status' (SwitchState) member of 'SwitchEvent'");
1374 0 : return false;
1375 : }
1376 0 : return true;
1377 : }
1378 :
1379 0 : auto PHalParent::Write(
1380 : const PBrowserParent* v__,
1381 : Message* msg__,
1382 : bool nullable__) -> void
1383 : {
1384 : int32_t id;
1385 0 : if ((!(v__))) {
1386 0 : if ((!(nullable__))) {
1387 0 : FatalError("NULL actor value passed to non-nullable param");
1388 : }
1389 0 : id = 0;
1390 : }
1391 : else {
1392 0 : id = (v__)->Id();
1393 0 : if ((1) == (id)) {
1394 0 : FatalError("actor has been |delete|d");
1395 : }
1396 : }
1397 :
1398 0 : Write(id, msg__);
1399 0 : }
1400 :
1401 0 : auto PHalParent::Read(
1402 : PBrowserParent** v__,
1403 : const Message* msg__,
1404 : PickleIterator* iter__,
1405 : bool nullable__) -> bool
1406 : {
1407 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBrowser", PBrowserMsgStart);
1408 0 : if ((actor).isNothing()) {
1409 0 : return false;
1410 : }
1411 :
1412 0 : (*(v__)) = static_cast<PBrowserParent*>((actor).value());
1413 0 : return true;
1414 : }
1415 :
1416 0 : auto PHalParent::Write(
1417 : const ScreenConfiguration& v__,
1418 : Message* msg__) -> void
1419 : {
1420 0 : Write((v__).rect(), msg__);
1421 : // Sentinel = 'rect'
1422 0 : (msg__)->WriteSentinel(438776542);
1423 0 : Write((v__).orientation(), msg__);
1424 : // Sentinel = 'orientation'
1425 0 : (msg__)->WriteSentinel(759639429);
1426 0 : Write((v__).angle(), msg__);
1427 : // Sentinel = 'angle'
1428 0 : (msg__)->WriteSentinel(3388308388);
1429 0 : Write((v__).colorDepth(), msg__);
1430 : // Sentinel = 'colorDepth'
1431 0 : (msg__)->WriteSentinel(4107545146);
1432 0 : Write((v__).pixelDepth(), msg__);
1433 : // Sentinel = 'pixelDepth'
1434 0 : (msg__)->WriteSentinel(4055642053);
1435 0 : }
1436 :
1437 0 : auto PHalParent::Read(
1438 : ScreenConfiguration* v__,
1439 : const Message* msg__,
1440 : PickleIterator* iter__) -> bool
1441 : {
1442 0 : if ((!(Read((&((v__)->rect())), msg__, iter__)))) {
1443 0 : FatalError("Error deserializing 'rect' (nsIntRect) member of 'ScreenConfiguration'");
1444 0 : return false;
1445 : }
1446 : // Sentinel = 'rect'
1447 0 : if ((!((msg__)->ReadSentinel(iter__, 438776542)))) {
1448 0 : mozilla::ipc::SentinelReadError("Error deserializing 'rect' (nsIntRect) member of 'ScreenConfiguration'");
1449 0 : return false;
1450 : }
1451 0 : if ((!(Read((&((v__)->orientation())), msg__, iter__)))) {
1452 0 : FatalError("Error deserializing 'orientation' (ScreenOrientationInternal) member of 'ScreenConfiguration'");
1453 0 : return false;
1454 : }
1455 : // Sentinel = 'orientation'
1456 0 : if ((!((msg__)->ReadSentinel(iter__, 759639429)))) {
1457 0 : mozilla::ipc::SentinelReadError("Error deserializing 'orientation' (ScreenOrientationInternal) member of 'ScreenConfiguration'");
1458 0 : return false;
1459 : }
1460 0 : if ((!(Read((&((v__)->angle())), msg__, iter__)))) {
1461 0 : FatalError("Error deserializing 'angle' (uint16_t) member of 'ScreenConfiguration'");
1462 0 : return false;
1463 : }
1464 : // Sentinel = 'angle'
1465 0 : if ((!((msg__)->ReadSentinel(iter__, 3388308388)))) {
1466 0 : mozilla::ipc::SentinelReadError("Error deserializing 'angle' (uint16_t) member of 'ScreenConfiguration'");
1467 0 : return false;
1468 : }
1469 0 : if ((!(Read((&((v__)->colorDepth())), msg__, iter__)))) {
1470 0 : FatalError("Error deserializing 'colorDepth' (uint32_t) member of 'ScreenConfiguration'");
1471 0 : return false;
1472 : }
1473 : // Sentinel = 'colorDepth'
1474 0 : if ((!((msg__)->ReadSentinel(iter__, 4107545146)))) {
1475 0 : mozilla::ipc::SentinelReadError("Error deserializing 'colorDepth' (uint32_t) member of 'ScreenConfiguration'");
1476 0 : return false;
1477 : }
1478 0 : if ((!(Read((&((v__)->pixelDepth())), msg__, iter__)))) {
1479 0 : FatalError("Error deserializing 'pixelDepth' (uint32_t) member of 'ScreenConfiguration'");
1480 0 : return false;
1481 : }
1482 : // Sentinel = 'pixelDepth'
1483 0 : if ((!((msg__)->ReadSentinel(iter__, 4055642053)))) {
1484 0 : mozilla::ipc::SentinelReadError("Error deserializing 'pixelDepth' (uint32_t) member of 'ScreenConfiguration'");
1485 0 : return false;
1486 : }
1487 0 : return true;
1488 : }
1489 :
1490 0 : auto PHalParent::Write(
1491 : const BatteryInformation& v__,
1492 : Message* msg__) -> void
1493 : {
1494 0 : Write((v__).level(), msg__);
1495 : // Sentinel = 'level'
1496 0 : (msg__)->WriteSentinel(144336999);
1497 0 : Write((v__).charging(), msg__);
1498 : // Sentinel = 'charging'
1499 0 : (msg__)->WriteSentinel(253813181);
1500 0 : Write((v__).remainingTime(), msg__);
1501 : // Sentinel = 'remainingTime'
1502 0 : (msg__)->WriteSentinel(3991324882);
1503 0 : }
1504 :
1505 0 : auto PHalParent::Read(
1506 : BatteryInformation* v__,
1507 : const Message* msg__,
1508 : PickleIterator* iter__) -> bool
1509 : {
1510 0 : if ((!(Read((&((v__)->level())), msg__, iter__)))) {
1511 0 : FatalError("Error deserializing 'level' (double) member of 'BatteryInformation'");
1512 0 : return false;
1513 : }
1514 : // Sentinel = 'level'
1515 0 : if ((!((msg__)->ReadSentinel(iter__, 144336999)))) {
1516 0 : mozilla::ipc::SentinelReadError("Error deserializing 'level' (double) member of 'BatteryInformation'");
1517 0 : return false;
1518 : }
1519 0 : if ((!(Read((&((v__)->charging())), msg__, iter__)))) {
1520 0 : FatalError("Error deserializing 'charging' (bool) member of 'BatteryInformation'");
1521 0 : return false;
1522 : }
1523 : // Sentinel = 'charging'
1524 0 : if ((!((msg__)->ReadSentinel(iter__, 253813181)))) {
1525 0 : mozilla::ipc::SentinelReadError("Error deserializing 'charging' (bool) member of 'BatteryInformation'");
1526 0 : return false;
1527 : }
1528 0 : if ((!(Read((&((v__)->remainingTime())), msg__, iter__)))) {
1529 0 : FatalError("Error deserializing 'remainingTime' (double) member of 'BatteryInformation'");
1530 0 : return false;
1531 : }
1532 : // Sentinel = 'remainingTime'
1533 0 : if ((!((msg__)->ReadSentinel(iter__, 3991324882)))) {
1534 0 : mozilla::ipc::SentinelReadError("Error deserializing 'remainingTime' (double) member of 'BatteryInformation'");
1535 0 : return false;
1536 : }
1537 0 : return true;
1538 : }
1539 :
1540 0 : auto PHalParent::Write(
1541 : const WakeLockInformation& v__,
1542 : Message* msg__) -> void
1543 : {
1544 0 : Write((v__).topic(), msg__);
1545 : // Sentinel = 'topic'
1546 0 : (msg__)->WriteSentinel(261826960);
1547 0 : Write((v__).numLocks(), msg__);
1548 : // Sentinel = 'numLocks'
1549 0 : (msg__)->WriteSentinel(2358740108);
1550 0 : Write((v__).numHidden(), msg__);
1551 : // Sentinel = 'numHidden'
1552 0 : (msg__)->WriteSentinel(813961573);
1553 0 : Write((v__).lockingProcesses(), msg__);
1554 : // Sentinel = 'lockingProcesses'
1555 0 : (msg__)->WriteSentinel(1213055746);
1556 0 : }
1557 :
1558 0 : auto PHalParent::Read(
1559 : WakeLockInformation* v__,
1560 : const Message* msg__,
1561 : PickleIterator* iter__) -> bool
1562 : {
1563 0 : if ((!(Read((&((v__)->topic())), msg__, iter__)))) {
1564 0 : FatalError("Error deserializing 'topic' (nsString) member of 'WakeLockInformation'");
1565 0 : return false;
1566 : }
1567 : // Sentinel = 'topic'
1568 0 : if ((!((msg__)->ReadSentinel(iter__, 261826960)))) {
1569 0 : mozilla::ipc::SentinelReadError("Error deserializing 'topic' (nsString) member of 'WakeLockInformation'");
1570 0 : return false;
1571 : }
1572 0 : if ((!(Read((&((v__)->numLocks())), msg__, iter__)))) {
1573 0 : FatalError("Error deserializing 'numLocks' (uint32_t) member of 'WakeLockInformation'");
1574 0 : return false;
1575 : }
1576 : // Sentinel = 'numLocks'
1577 0 : if ((!((msg__)->ReadSentinel(iter__, 2358740108)))) {
1578 0 : mozilla::ipc::SentinelReadError("Error deserializing 'numLocks' (uint32_t) member of 'WakeLockInformation'");
1579 0 : return false;
1580 : }
1581 0 : if ((!(Read((&((v__)->numHidden())), msg__, iter__)))) {
1582 0 : FatalError("Error deserializing 'numHidden' (uint32_t) member of 'WakeLockInformation'");
1583 0 : return false;
1584 : }
1585 : // Sentinel = 'numHidden'
1586 0 : if ((!((msg__)->ReadSentinel(iter__, 813961573)))) {
1587 0 : mozilla::ipc::SentinelReadError("Error deserializing 'numHidden' (uint32_t) member of 'WakeLockInformation'");
1588 0 : return false;
1589 : }
1590 0 : if ((!(Read((&((v__)->lockingProcesses())), msg__, iter__)))) {
1591 0 : FatalError("Error deserializing 'lockingProcesses' (uint64_t[]) member of 'WakeLockInformation'");
1592 0 : return false;
1593 : }
1594 : // Sentinel = 'lockingProcesses'
1595 0 : if ((!((msg__)->ReadSentinel(iter__, 1213055746)))) {
1596 0 : mozilla::ipc::SentinelReadError("Error deserializing 'lockingProcesses' (uint64_t[]) member of 'WakeLockInformation'");
1597 0 : return false;
1598 : }
1599 0 : return true;
1600 : }
1601 :
1602 0 : auto PHalParent::Write(
1603 : const NetworkInformation& v__,
1604 : Message* msg__) -> void
1605 : {
1606 0 : Write((v__).type(), msg__);
1607 : // Sentinel = 'type'
1608 0 : (msg__)->WriteSentinel(2982068540);
1609 0 : Write((v__).isWifi(), msg__);
1610 : // Sentinel = 'isWifi'
1611 0 : (msg__)->WriteSentinel(68302097);
1612 0 : Write((v__).dhcpGateway(), msg__);
1613 : // Sentinel = 'dhcpGateway'
1614 0 : (msg__)->WriteSentinel(1492137774);
1615 0 : }
1616 :
1617 0 : auto PHalParent::Read(
1618 : NetworkInformation* v__,
1619 : const Message* msg__,
1620 : PickleIterator* iter__) -> bool
1621 : {
1622 0 : if ((!(Read((&((v__)->type())), msg__, iter__)))) {
1623 0 : FatalError("Error deserializing 'type' (uint32_t) member of 'NetworkInformation'");
1624 0 : return false;
1625 : }
1626 : // Sentinel = 'type'
1627 0 : if ((!((msg__)->ReadSentinel(iter__, 2982068540)))) {
1628 0 : mozilla::ipc::SentinelReadError("Error deserializing 'type' (uint32_t) member of 'NetworkInformation'");
1629 0 : return false;
1630 : }
1631 0 : if ((!(Read((&((v__)->isWifi())), msg__, iter__)))) {
1632 0 : FatalError("Error deserializing 'isWifi' (bool) member of 'NetworkInformation'");
1633 0 : return false;
1634 : }
1635 : // Sentinel = 'isWifi'
1636 0 : if ((!((msg__)->ReadSentinel(iter__, 68302097)))) {
1637 0 : mozilla::ipc::SentinelReadError("Error deserializing 'isWifi' (bool) member of 'NetworkInformation'");
1638 0 : return false;
1639 : }
1640 0 : if ((!(Read((&((v__)->dhcpGateway())), msg__, iter__)))) {
1641 0 : FatalError("Error deserializing 'dhcpGateway' (uint32_t) member of 'NetworkInformation'");
1642 0 : return false;
1643 : }
1644 : // Sentinel = 'dhcpGateway'
1645 0 : if ((!((msg__)->ReadSentinel(iter__, 1492137774)))) {
1646 0 : mozilla::ipc::SentinelReadError("Error deserializing 'dhcpGateway' (uint32_t) member of 'NetworkInformation'");
1647 0 : return false;
1648 : }
1649 0 : return true;
1650 : }
1651 :
1652 0 : auto PHalParent::Write(
1653 : const SystemTimezoneChangeInformation& v__,
1654 : Message* msg__) -> void
1655 : {
1656 0 : Write((v__).oldTimezoneOffsetMinutes(), msg__);
1657 : // Sentinel = 'oldTimezoneOffsetMinutes'
1658 0 : (msg__)->WriteSentinel(3940000210);
1659 0 : Write((v__).newTimezoneOffsetMinutes(), msg__);
1660 : // Sentinel = 'newTimezoneOffsetMinutes'
1661 0 : (msg__)->WriteSentinel(2391265445);
1662 0 : }
1663 :
1664 0 : auto PHalParent::Read(
1665 : SystemTimezoneChangeInformation* v__,
1666 : const Message* msg__,
1667 : PickleIterator* iter__) -> bool
1668 : {
1669 0 : if ((!(Read((&((v__)->oldTimezoneOffsetMinutes())), msg__, iter__)))) {
1670 0 : FatalError("Error deserializing 'oldTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
1671 0 : return false;
1672 : }
1673 : // Sentinel = 'oldTimezoneOffsetMinutes'
1674 0 : if ((!((msg__)->ReadSentinel(iter__, 3940000210)))) {
1675 0 : mozilla::ipc::SentinelReadError("Error deserializing 'oldTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
1676 0 : return false;
1677 : }
1678 0 : if ((!(Read((&((v__)->newTimezoneOffsetMinutes())), msg__, iter__)))) {
1679 0 : FatalError("Error deserializing 'newTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
1680 0 : return false;
1681 : }
1682 : // Sentinel = 'newTimezoneOffsetMinutes'
1683 0 : if ((!((msg__)->ReadSentinel(iter__, 2391265445)))) {
1684 0 : mozilla::ipc::SentinelReadError("Error deserializing 'newTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
1685 0 : return false;
1686 : }
1687 0 : return true;
1688 : }
1689 :
1690 0 : auto PHalParent::Write(
1691 : const SensorData& v__,
1692 : Message* msg__) -> void
1693 : {
1694 0 : Write((v__).sensor(), msg__);
1695 : // Sentinel = 'sensor'
1696 0 : (msg__)->WriteSentinel(1053903548);
1697 0 : Write((v__).timestamp(), msg__);
1698 : // Sentinel = 'timestamp'
1699 0 : (msg__)->WriteSentinel(2167067209);
1700 0 : Write((v__).values(), msg__);
1701 : // Sentinel = 'values'
1702 0 : (msg__)->WriteSentinel(3006433652);
1703 0 : Write((v__).accuracy(), msg__);
1704 : // Sentinel = 'accuracy'
1705 0 : (msg__)->WriteSentinel(354491327);
1706 0 : }
1707 :
1708 0 : auto PHalParent::Read(
1709 : SensorData* v__,
1710 : const Message* msg__,
1711 : PickleIterator* iter__) -> bool
1712 : {
1713 0 : if ((!(Read((&((v__)->sensor())), msg__, iter__)))) {
1714 0 : FatalError("Error deserializing 'sensor' (SensorType) member of 'SensorData'");
1715 0 : return false;
1716 : }
1717 : // Sentinel = 'sensor'
1718 0 : if ((!((msg__)->ReadSentinel(iter__, 1053903548)))) {
1719 0 : mozilla::ipc::SentinelReadError("Error deserializing 'sensor' (SensorType) member of 'SensorData'");
1720 0 : return false;
1721 : }
1722 0 : if ((!(Read((&((v__)->timestamp())), msg__, iter__)))) {
1723 0 : FatalError("Error deserializing 'timestamp' (PRTime) member of 'SensorData'");
1724 0 : return false;
1725 : }
1726 : // Sentinel = 'timestamp'
1727 0 : if ((!((msg__)->ReadSentinel(iter__, 2167067209)))) {
1728 0 : mozilla::ipc::SentinelReadError("Error deserializing 'timestamp' (PRTime) member of 'SensorData'");
1729 0 : return false;
1730 : }
1731 0 : if ((!(Read((&((v__)->values())), msg__, iter__)))) {
1732 0 : FatalError("Error deserializing 'values' (float[]) member of 'SensorData'");
1733 0 : return false;
1734 : }
1735 : // Sentinel = 'values'
1736 0 : if ((!((msg__)->ReadSentinel(iter__, 3006433652)))) {
1737 0 : mozilla::ipc::SentinelReadError("Error deserializing 'values' (float[]) member of 'SensorData'");
1738 0 : return false;
1739 : }
1740 0 : if ((!(Read((&((v__)->accuracy())), msg__, iter__)))) {
1741 0 : FatalError("Error deserializing 'accuracy' (SensorAccuracyType) member of 'SensorData'");
1742 0 : return false;
1743 : }
1744 : // Sentinel = 'accuracy'
1745 0 : if ((!((msg__)->ReadSentinel(iter__, 354491327)))) {
1746 0 : mozilla::ipc::SentinelReadError("Error deserializing 'accuracy' (SensorAccuracyType) member of 'SensorData'");
1747 0 : return false;
1748 : }
1749 0 : return true;
1750 : }
1751 :
1752 0 : auto PHalParent::Write(
1753 : const PHalParent* v__,
1754 : Message* msg__,
1755 : bool nullable__) -> void
1756 : {
1757 : int32_t id;
1758 0 : if ((!(v__))) {
1759 0 : if ((!(nullable__))) {
1760 0 : FatalError("NULL actor value passed to non-nullable param");
1761 : }
1762 0 : id = 0;
1763 : }
1764 : else {
1765 0 : id = (v__)->Id();
1766 0 : if ((1) == (id)) {
1767 0 : FatalError("actor has been |delete|d");
1768 : }
1769 : }
1770 :
1771 0 : Write(id, msg__);
1772 0 : }
1773 :
1774 0 : auto PHalParent::Read(
1775 : PHalParent** v__,
1776 : const Message* msg__,
1777 : PickleIterator* iter__,
1778 : bool nullable__) -> bool
1779 : {
1780 0 : Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PHal", PHalMsgStart);
1781 0 : if ((actor).isNothing()) {
1782 0 : return false;
1783 : }
1784 :
1785 0 : (*(v__)) = static_cast<PHalParent*>((actor).value());
1786 0 : return true;
1787 : }
1788 :
1789 :
1790 :
1791 : } // namespace hal_sandbox
1792 : } // namespace mozilla
|