LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PAltDataOutputStreamParent.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 119 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 17 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/net/PAltDataOutputStreamParent.h"
       8             : 
       9             : #include "mozilla/net/PNeckoParent.h"
      10             : 
      11             : #include "nsIFile.h"
      12             : #include "GeckoProfiler.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace net {
      16             : 
      17             : 
      18           0 : auto PAltDataOutputStreamParent::Recv__delete__() -> mozilla::ipc::IPCResult
      19             : {
      20           0 :     return IPC_OK();
      21             : }
      22             : 
      23             : 
      24           0 : MOZ_IMPLICIT PAltDataOutputStreamParent::PAltDataOutputStreamParent() :
      25             :     mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
      26           0 :     mState(PAltDataOutputStream::__Dead)
      27             : {
      28           0 :     MOZ_COUNT_CTOR(PAltDataOutputStreamParent);
      29           0 : }
      30             : 
      31           0 : PAltDataOutputStreamParent::~PAltDataOutputStreamParent()
      32             : {
      33           0 :     MOZ_COUNT_DTOR(PAltDataOutputStreamParent);
      34           0 : }
      35             : 
      36           0 : auto PAltDataOutputStreamParent::Manager() const -> PNeckoParent*
      37             : {
      38           0 :     return static_cast<PNeckoParent*>(IProtocol::Manager());
      39             : }
      40             : 
      41           0 : auto PAltDataOutputStreamParent::SendError(const nsresult& err) -> bool
      42             : {
      43           0 :     IPC::Message* msg__ = PAltDataOutputStream::Msg_Error(Id());
      44             : 
      45           0 :     Write(err, msg__);
      46             :     // Sentinel = 'err'
      47           0 :     (msg__)->WriteSentinel(2426675558);
      48             : 
      49             : 
      50             : 
      51             : 
      52           0 :     if (mozilla::ipc::LoggingEnabledFor("PAltDataOutputStreamParent")) {
      53           0 :         mozilla::ipc::LogMessageForProtocol("PAltDataOutputStreamParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      54             :     }
      55           0 :     AUTO_PROFILER_LABEL("PAltDataOutputStream::Msg_Error", OTHER);
      56           0 :     PAltDataOutputStream::Transition(PAltDataOutputStream::Msg_Error__ID, (&(mState)));
      57             : 
      58           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      59           0 :     return sendok__;
      60             : }
      61             : 
      62           0 : auto PAltDataOutputStreamParent::SendDeleteSelf() -> bool
      63             : {
      64           0 :     IPC::Message* msg__ = PAltDataOutputStream::Msg_DeleteSelf(Id());
      65             : 
      66             : 
      67             : 
      68             : 
      69             : 
      70           0 :     if (mozilla::ipc::LoggingEnabledFor("PAltDataOutputStreamParent")) {
      71           0 :         mozilla::ipc::LogMessageForProtocol("PAltDataOutputStreamParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      72             :     }
      73           0 :     AUTO_PROFILER_LABEL("PAltDataOutputStream::Msg_DeleteSelf", OTHER);
      74           0 :     PAltDataOutputStream::Transition(PAltDataOutputStream::Msg_DeleteSelf__ID, (&(mState)));
      75             : 
      76           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      77           0 :     return sendok__;
      78             : }
      79             : 
      80           0 : auto PAltDataOutputStreamParent::RemoveManagee(
      81             :         int32_t aProtocolId,
      82             :         ProtocolBase* aListener) -> void
      83             : {
      84           0 :     FatalError("unreached");
      85           0 :     return;
      86             : }
      87             : 
      88           0 : auto PAltDataOutputStreamParent::OnMessageReceived(const Message& msg__) -> PAltDataOutputStreamParent::Result
      89             : {
      90           0 :     switch ((msg__).type()) {
      91             :     case PAltDataOutputStream::Msg_WriteData__ID:
      92             :         {
      93           0 :             if (mozilla::ipc::LoggingEnabledFor("PAltDataOutputStreamParent")) {
      94           0 :                 mozilla::ipc::LogMessageForProtocol("PAltDataOutputStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
      95             :             }
      96           0 :             AUTO_PROFILER_LABEL("PAltDataOutputStream::Msg_WriteData", OTHER);
      97             : 
      98           0 :             PickleIterator iter__(msg__);
      99           0 :             nsCString data;
     100             : 
     101           0 :             if ((!(Read((&(data)), (&(msg__)), (&(iter__)))))) {
     102           0 :                 FatalError("Error deserializing 'nsCString'");
     103           0 :                 return MsgValueError;
     104             :             }
     105             :             // Sentinel = 'data'
     106           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
     107           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
     108           0 :                 return MsgValueError;
     109             :             }
     110           0 :             (msg__).EndRead(iter__, (msg__).type());
     111           0 :             PAltDataOutputStream::Transition(PAltDataOutputStream::Msg_WriteData__ID, (&(mState)));
     112           0 :             if ((!(RecvWriteData(mozilla::Move(data))))) {
     113           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     114             :                 // Error handled in mozilla::ipc::IPCResult
     115           0 :                 return MsgProcessingError;
     116             :             }
     117             : 
     118           0 :             return MsgProcessed;
     119             :         }
     120             :     case PAltDataOutputStream::Msg_Close__ID:
     121             :         {
     122           0 :             if (mozilla::ipc::LoggingEnabledFor("PAltDataOutputStreamParent")) {
     123           0 :                 mozilla::ipc::LogMessageForProtocol("PAltDataOutputStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     124             :             }
     125           0 :             AUTO_PROFILER_LABEL("PAltDataOutputStream::Msg_Close", OTHER);
     126             : 
     127           0 :             PAltDataOutputStream::Transition(PAltDataOutputStream::Msg_Close__ID, (&(mState)));
     128           0 :             if ((!(RecvClose()))) {
     129           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     130             :                 // Error handled in mozilla::ipc::IPCResult
     131           0 :                 return MsgProcessingError;
     132             :             }
     133             : 
     134           0 :             return MsgProcessed;
     135             :         }
     136             :     case PAltDataOutputStream::Msg___delete____ID:
     137             :         {
     138           0 :             if (mozilla::ipc::LoggingEnabledFor("PAltDataOutputStreamParent")) {
     139           0 :                 mozilla::ipc::LogMessageForProtocol("PAltDataOutputStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     140             :             }
     141           0 :             AUTO_PROFILER_LABEL("PAltDataOutputStream::Msg___delete__", OTHER);
     142             : 
     143           0 :             PickleIterator iter__(msg__);
     144             :             PAltDataOutputStreamParent* actor;
     145             : 
     146           0 :             if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
     147           0 :                 FatalError("Error deserializing 'PAltDataOutputStreamParent'");
     148           0 :                 return MsgValueError;
     149             :             }
     150             :             // Sentinel = 'actor'
     151           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
     152           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PAltDataOutputStreamParent'");
     153           0 :                 return MsgValueError;
     154             :             }
     155           0 :             (msg__).EndRead(iter__, (msg__).type());
     156           0 :             PAltDataOutputStream::Transition(PAltDataOutputStream::Msg___delete____ID, (&(mState)));
     157           0 :             if ((!(Recv__delete__()))) {
     158           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     159             :                 // Error handled in mozilla::ipc::IPCResult
     160           0 :                 return MsgProcessingError;
     161             :             }
     162             : 
     163             : 
     164           0 :             IProtocol* mgr = (actor)->Manager();
     165           0 :             (actor)->DestroySubtree(Deletion);
     166           0 :             (actor)->DeallocSubtree();
     167           0 :             (mgr)->RemoveManagee(PAltDataOutputStreamMsgStart, actor);
     168             : 
     169           0 :             return MsgProcessed;
     170             :         }
     171             :     case PAltDataOutputStream::Msg_DeleteSelf__ID:
     172             :         {
     173           0 :             if (mozilla::ipc::LoggingEnabledFor("PAltDataOutputStreamParent")) {
     174           0 :                 mozilla::ipc::LogMessageForProtocol("PAltDataOutputStreamParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     175             :             }
     176           0 :             AUTO_PROFILER_LABEL("PAltDataOutputStream::Msg_DeleteSelf", OTHER);
     177             : 
     178           0 :             PAltDataOutputStream::Transition(PAltDataOutputStream::Msg_DeleteSelf__ID, (&(mState)));
     179           0 :             if ((!(RecvDeleteSelf()))) {
     180           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     181             :                 // Error handled in mozilla::ipc::IPCResult
     182           0 :                 return MsgProcessingError;
     183             :             }
     184             : 
     185           0 :             return MsgProcessed;
     186             :         }
     187             :     default:
     188             :         {
     189           0 :             return MsgNotKnown;
     190             :         }
     191             :     }
     192             : }
     193             : 
     194           0 : auto PAltDataOutputStreamParent::OnMessageReceived(
     195             :         const Message& msg__,
     196             :         Message*& reply__) -> PAltDataOutputStreamParent::Result
     197             : {
     198           0 :     return MsgNotKnown;
     199             : }
     200             : 
     201           0 : auto PAltDataOutputStreamParent::OnCallReceived(
     202             :         const Message& msg__,
     203             :         Message*& reply__) -> PAltDataOutputStreamParent::Result
     204             : {
     205           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     206             :     return MsgNotKnown;
     207             : }
     208             : 
     209           0 : auto PAltDataOutputStreamParent::GetProtocolTypeId() -> int32_t
     210             : {
     211           0 :     return PAltDataOutputStreamMsgStart;
     212             : }
     213             : 
     214           0 : auto PAltDataOutputStreamParent::ProtocolName() const -> const char*
     215             : {
     216           0 :     return "PAltDataOutputStreamParent";
     217             : }
     218             : 
     219           0 : auto PAltDataOutputStreamParent::DestroySubtree(ActorDestroyReason why) -> void
     220             : {
     221             :     // Unregister from our manager.
     222           0 :     Unregister(Id());
     223             : 
     224             :     // Reject owning pending promises.
     225           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     226             : 
     227             :     // Finally, destroy "us".
     228           0 :     ActorDestroy(why);
     229           0 : }
     230             : 
     231           0 : auto PAltDataOutputStreamParent::DeallocSubtree() -> void
     232             : {
     233           0 : }
     234             : 
     235           0 : auto PAltDataOutputStreamParent::Write(
     236             :         const PAltDataOutputStreamParent* v__,
     237             :         Message* msg__,
     238             :         bool nullable__) -> void
     239             : {
     240             :     int32_t id;
     241           0 :     if ((!(v__))) {
     242           0 :         if ((!(nullable__))) {
     243           0 :             FatalError("NULL actor value passed to non-nullable param");
     244             :         }
     245           0 :         id = 0;
     246             :     }
     247             :     else {
     248           0 :         id = (v__)->Id();
     249           0 :         if ((1) == (id)) {
     250           0 :             FatalError("actor has been |delete|d");
     251             :         }
     252             :     }
     253             : 
     254           0 :     Write(id, msg__);
     255           0 : }
     256             : 
     257           0 : auto PAltDataOutputStreamParent::Read(
     258             :         PAltDataOutputStreamParent** v__,
     259             :         const Message* msg__,
     260             :         PickleIterator* iter__,
     261             :         bool nullable__) -> bool
     262             : {
     263           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PAltDataOutputStream", PAltDataOutputStreamMsgStart);
     264           0 :     if ((actor).isNothing()) {
     265           0 :         return false;
     266             :     }
     267             : 
     268           0 :     (*(v__)) = static_cast<PAltDataOutputStreamParent*>((actor).value());
     269           0 :     return true;
     270             : }
     271             : 
     272             : 
     273             : 
     274             : } // namespace net
     275             : } // namespace mozilla

Generated by: LCOV version 1.13