LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PGamepadEventChannelParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 475 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 31 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.13