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

Generated by: LCOV version 1.13