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

Generated by: LCOV version 1.13