LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PRemotePrintJobChild.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 192 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 23 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/layout/PRemotePrintJobChild.h"
       8             : 
       9             : #include "mozilla/embedding/PPrintingChild.h"
      10             : 
      11             : #include "nsIFile.h"
      12             : #include "GeckoProfiler.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace layout {
      16             : 
      17             : 
      18           0 : auto PRemotePrintJobChild::Recv__delete__() -> mozilla::ipc::IPCResult
      19             : {
      20           0 :     return IPC_OK();
      21             : }
      22             : 
      23           0 : auto PRemotePrintJobChild::ActorDestroy(ActorDestroyReason aWhy) -> void
      24             : {
      25           0 : }
      26             : 
      27           0 : MOZ_IMPLICIT PRemotePrintJobChild::PRemotePrintJobChild() :
      28             :     mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
      29           0 :     mState(PRemotePrintJob::__Dead)
      30             : {
      31           0 :     MOZ_COUNT_CTOR(PRemotePrintJobChild);
      32           0 : }
      33             : 
      34           0 : PRemotePrintJobChild::~PRemotePrintJobChild()
      35             : {
      36           0 :     MOZ_COUNT_DTOR(PRemotePrintJobChild);
      37           0 : }
      38             : 
      39           0 : auto PRemotePrintJobChild::Manager() const -> PPrintingChild*
      40             : {
      41           0 :     return static_cast<PPrintingChild*>(IProtocol::Manager());
      42             : }
      43             : 
      44           0 : auto PRemotePrintJobChild::SendAbortPrint(const nsresult& aRv) -> bool
      45             : {
      46           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_AbortPrint(Id());
      47             : 
      48           0 :     Write(aRv, msg__);
      49             :     // Sentinel = 'aRv'
      50           0 :     (msg__)->WriteSentinel(2742041894);
      51             : 
      52             : 
      53             : 
      54             : 
      55           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
      56           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      57             :     }
      58           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_AbortPrint", OTHER);
      59           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_AbortPrint__ID, (&(mState)));
      60             : 
      61           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      62           0 :     return sendok__;
      63             : }
      64             : 
      65           0 : auto PRemotePrintJobChild::SendInitializePrint(
      66             :         const nsString& aDocumentTitle,
      67             :         const nsString& aPrintToFile,
      68             :         const int32_t& aStartPage,
      69             :         const int32_t& aEndPage) -> bool
      70             : {
      71           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_InitializePrint(Id());
      72             : 
      73           0 :     Write(aDocumentTitle, msg__);
      74             :     // Sentinel = 'aDocumentTitle'
      75           0 :     (msg__)->WriteSentinel(1351873518);
      76           0 :     Write(aPrintToFile, msg__);
      77             :     // Sentinel = 'aPrintToFile'
      78           0 :     (msg__)->WriteSentinel(977976703);
      79           0 :     Write(aStartPage, msg__);
      80             :     // Sentinel = 'aStartPage'
      81           0 :     (msg__)->WriteSentinel(1865995324);
      82           0 :     Write(aEndPage, msg__);
      83             :     // Sentinel = 'aEndPage'
      84           0 :     (msg__)->WriteSentinel(2700499489);
      85             : 
      86             : 
      87             : 
      88             : 
      89           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
      90           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      91             :     }
      92           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_InitializePrint", OTHER);
      93           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_InitializePrint__ID, (&(mState)));
      94             : 
      95           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      96           0 :     return sendok__;
      97             : }
      98             : 
      99           0 : auto PRemotePrintJobChild::SendProcessPage(const nsCString& aPageFileName) -> bool
     100             : {
     101           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_ProcessPage(Id());
     102             : 
     103           0 :     Write(aPageFileName, msg__);
     104             :     // Sentinel = 'aPageFileName'
     105           0 :     (msg__)->WriteSentinel(2438363810);
     106             : 
     107             : 
     108             : 
     109             : 
     110           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     111           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     112             :     }
     113           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_ProcessPage", OTHER);
     114           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_ProcessPage__ID, (&(mState)));
     115             : 
     116           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     117           0 :     return sendok__;
     118             : }
     119             : 
     120           0 : auto PRemotePrintJobChild::SendFinalizePrint() -> bool
     121             : {
     122           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_FinalizePrint(Id());
     123             : 
     124             : 
     125             : 
     126             : 
     127             : 
     128           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     129           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     130             :     }
     131           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_FinalizePrint", OTHER);
     132           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_FinalizePrint__ID, (&(mState)));
     133             : 
     134           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     135           0 :     return sendok__;
     136             : }
     137             : 
     138           0 : auto PRemotePrintJobChild::SendStateChange(
     139             :         const long& aStateFlags,
     140             :         const nsresult& aStatus) -> bool
     141             : {
     142           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_StateChange(Id());
     143             : 
     144           0 :     Write(aStateFlags, msg__);
     145             :     // Sentinel = 'aStateFlags'
     146           0 :     (msg__)->WriteSentinel(4037748614);
     147           0 :     Write(aStatus, msg__);
     148             :     // Sentinel = 'aStatus'
     149           0 :     (msg__)->WriteSentinel(236002576);
     150             : 
     151             : 
     152             : 
     153             : 
     154           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     155           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     156             :     }
     157           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_StateChange", OTHER);
     158           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_StateChange__ID, (&(mState)));
     159             : 
     160           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     161           0 :     return sendok__;
     162             : }
     163             : 
     164           0 : auto PRemotePrintJobChild::SendProgressChange(
     165             :         const long& aCurSelfProgress,
     166             :         const long& aMaxSelfProgress,
     167             :         const long& aCurTotalProgress,
     168             :         const long& aMaxTotalProgress) -> bool
     169             : {
     170           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_ProgressChange(Id());
     171             : 
     172           0 :     Write(aCurSelfProgress, msg__);
     173             :     // Sentinel = 'aCurSelfProgress'
     174           0 :     (msg__)->WriteSentinel(3889538918);
     175           0 :     Write(aMaxSelfProgress, msg__);
     176             :     // Sentinel = 'aMaxSelfProgress'
     177           0 :     (msg__)->WriteSentinel(2579322770);
     178           0 :     Write(aCurTotalProgress, msg__);
     179             :     // Sentinel = 'aCurTotalProgress'
     180           0 :     (msg__)->WriteSentinel(3893274129);
     181           0 :     Write(aMaxTotalProgress, msg__);
     182             :     // Sentinel = 'aMaxTotalProgress'
     183           0 :     (msg__)->WriteSentinel(1178224797);
     184             : 
     185             : 
     186             : 
     187             : 
     188           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     189           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     190             :     }
     191           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_ProgressChange", OTHER);
     192           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_ProgressChange__ID, (&(mState)));
     193             : 
     194           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     195           0 :     return sendok__;
     196             : }
     197             : 
     198           0 : auto PRemotePrintJobChild::SendStatusChange(const nsresult& aStatus) -> bool
     199             : {
     200           0 :     IPC::Message* msg__ = PRemotePrintJob::Msg_StatusChange(Id());
     201             : 
     202           0 :     Write(aStatus, msg__);
     203             :     // Sentinel = 'aStatus'
     204           0 :     (msg__)->WriteSentinel(236002576);
     205             : 
     206             : 
     207             : 
     208             : 
     209           0 :     if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     210           0 :         mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
     211             :     }
     212           0 :     AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_StatusChange", OTHER);
     213           0 :     PRemotePrintJob::Transition(PRemotePrintJob::Msg_StatusChange__ID, (&(mState)));
     214             : 
     215           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
     216           0 :     return sendok__;
     217             : }
     218             : 
     219           0 : auto PRemotePrintJobChild::RemoveManagee(
     220             :         int32_t aProtocolId,
     221             :         ProtocolBase* aListener) -> void
     222             : {
     223           0 :     FatalError("unreached");
     224           0 :     return;
     225             : }
     226             : 
     227           0 : auto PRemotePrintJobChild::OnMessageReceived(const Message& msg__) -> PRemotePrintJobChild::Result
     228             : {
     229           0 :     switch ((msg__).type()) {
     230             :     case PRemotePrintJob::Msg_AbortPrint__ID:
     231             :         {
     232           0 :             if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     233           0 :                 mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     234             :             }
     235           0 :             AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_AbortPrint", OTHER);
     236             : 
     237           0 :             PickleIterator iter__(msg__);
     238             :             nsresult aRv;
     239             : 
     240           0 :             if ((!(Read((&(aRv)), (&(msg__)), (&(iter__)))))) {
     241           0 :                 FatalError("Error deserializing 'nsresult'");
     242           0 :                 return MsgValueError;
     243             :             }
     244             :             // Sentinel = 'aRv'
     245           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2742041894)))) {
     246           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
     247           0 :                 return MsgValueError;
     248             :             }
     249           0 :             (msg__).EndRead(iter__, (msg__).type());
     250           0 :             PRemotePrintJob::Transition(PRemotePrintJob::Msg_AbortPrint__ID, (&(mState)));
     251           0 :             if ((!(RecvAbortPrint(mozilla::Move(aRv))))) {
     252           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     253             :                 // Error handled in mozilla::ipc::IPCResult
     254           0 :                 return MsgProcessingError;
     255             :             }
     256             : 
     257           0 :             return MsgProcessed;
     258             :         }
     259             :     case PRemotePrintJob::Msg_PrintInitializationResult__ID:
     260             :         {
     261           0 :             if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     262           0 :                 mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     263             :             }
     264           0 :             AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_PrintInitializationResult", OTHER);
     265             : 
     266           0 :             PickleIterator iter__(msg__);
     267             :             nsresult aRv;
     268             : 
     269           0 :             if ((!(Read((&(aRv)), (&(msg__)), (&(iter__)))))) {
     270           0 :                 FatalError("Error deserializing 'nsresult'");
     271           0 :                 return MsgValueError;
     272             :             }
     273             :             // Sentinel = 'aRv'
     274           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2742041894)))) {
     275           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
     276           0 :                 return MsgValueError;
     277             :             }
     278           0 :             (msg__).EndRead(iter__, (msg__).type());
     279           0 :             PRemotePrintJob::Transition(PRemotePrintJob::Msg_PrintInitializationResult__ID, (&(mState)));
     280           0 :             if ((!(RecvPrintInitializationResult(mozilla::Move(aRv))))) {
     281           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     282             :                 // Error handled in mozilla::ipc::IPCResult
     283           0 :                 return MsgProcessingError;
     284             :             }
     285             : 
     286           0 :             return MsgProcessed;
     287             :         }
     288             :     case PRemotePrintJob::Msg_PageProcessed__ID:
     289             :         {
     290           0 :             if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     291           0 :                 mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     292             :             }
     293           0 :             AUTO_PROFILER_LABEL("PRemotePrintJob::Msg_PageProcessed", OTHER);
     294             : 
     295           0 :             PRemotePrintJob::Transition(PRemotePrintJob::Msg_PageProcessed__ID, (&(mState)));
     296           0 :             if ((!(RecvPageProcessed()))) {
     297           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     298             :                 // Error handled in mozilla::ipc::IPCResult
     299           0 :                 return MsgProcessingError;
     300             :             }
     301             : 
     302           0 :             return MsgProcessed;
     303             :         }
     304             :     case PRemotePrintJob::Msg___delete____ID:
     305             :         {
     306           0 :             if (mozilla::ipc::LoggingEnabledFor("PRemotePrintJobChild")) {
     307           0 :                 mozilla::ipc::LogMessageForProtocol("PRemotePrintJobChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     308             :             }
     309           0 :             AUTO_PROFILER_LABEL("PRemotePrintJob::Msg___delete__", OTHER);
     310             : 
     311           0 :             PickleIterator iter__(msg__);
     312             :             PRemotePrintJobChild* actor;
     313             : 
     314           0 :             if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
     315           0 :                 FatalError("Error deserializing 'PRemotePrintJobChild'");
     316           0 :                 return MsgValueError;
     317             :             }
     318             :             // Sentinel = 'actor'
     319           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
     320           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PRemotePrintJobChild'");
     321           0 :                 return MsgValueError;
     322             :             }
     323           0 :             (msg__).EndRead(iter__, (msg__).type());
     324           0 :             PRemotePrintJob::Transition(PRemotePrintJob::Msg___delete____ID, (&(mState)));
     325           0 :             if ((!(Recv__delete__()))) {
     326           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     327             :                 // Error handled in mozilla::ipc::IPCResult
     328           0 :                 return MsgProcessingError;
     329             :             }
     330             : 
     331             : 
     332           0 :             IProtocol* mgr = (actor)->Manager();
     333           0 :             (actor)->DestroySubtree(Deletion);
     334           0 :             (actor)->DeallocSubtree();
     335           0 :             (mgr)->RemoveManagee(PRemotePrintJobMsgStart, actor);
     336             : 
     337           0 :             return MsgProcessed;
     338             :         }
     339             :     default:
     340             :         {
     341           0 :             return MsgNotKnown;
     342             :         }
     343             :     }
     344             : }
     345             : 
     346           0 : auto PRemotePrintJobChild::OnMessageReceived(
     347             :         const Message& msg__,
     348             :         Message*& reply__) -> PRemotePrintJobChild::Result
     349             : {
     350           0 :     return MsgNotKnown;
     351             : }
     352             : 
     353           0 : auto PRemotePrintJobChild::OnCallReceived(
     354             :         const Message& msg__,
     355             :         Message*& reply__) -> PRemotePrintJobChild::Result
     356             : {
     357           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     358             :     return MsgNotKnown;
     359             : }
     360             : 
     361           0 : auto PRemotePrintJobChild::GetProtocolTypeId() -> int32_t
     362             : {
     363           0 :     return PRemotePrintJobMsgStart;
     364             : }
     365             : 
     366           0 : auto PRemotePrintJobChild::ProtocolName() const -> const char*
     367             : {
     368           0 :     return "PRemotePrintJobChild";
     369             : }
     370             : 
     371           0 : auto PRemotePrintJobChild::DestroySubtree(ActorDestroyReason why) -> void
     372             : {
     373             :     // Unregister from our manager.
     374           0 :     Unregister(Id());
     375             : 
     376             :     // Reject owning pending promises.
     377           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     378             : 
     379             :     // Finally, destroy "us".
     380           0 :     ActorDestroy(why);
     381           0 : }
     382             : 
     383           0 : auto PRemotePrintJobChild::DeallocSubtree() -> void
     384             : {
     385           0 : }
     386             : 
     387           0 : auto PRemotePrintJobChild::Write(
     388             :         const PRemotePrintJobChild* v__,
     389             :         Message* msg__,
     390             :         bool nullable__) -> void
     391             : {
     392             :     int32_t id;
     393           0 :     if ((!(v__))) {
     394           0 :         if ((!(nullable__))) {
     395           0 :             FatalError("NULL actor value passed to non-nullable param");
     396             :         }
     397           0 :         id = 0;
     398             :     }
     399             :     else {
     400           0 :         id = (v__)->Id();
     401           0 :         if ((1) == (id)) {
     402           0 :             FatalError("actor has been |delete|d");
     403             :         }
     404             :     }
     405             : 
     406           0 :     Write(id, msg__);
     407           0 : }
     408             : 
     409           0 : auto PRemotePrintJobChild::Read(
     410             :         PRemotePrintJobChild** v__,
     411             :         const Message* msg__,
     412             :         PickleIterator* iter__,
     413             :         bool nullable__) -> bool
     414             : {
     415           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PRemotePrintJob", PRemotePrintJobMsgStart);
     416           0 :     if ((actor).isNothing()) {
     417           0 :         return false;
     418             :     }
     419             : 
     420           0 :     (*(v__)) = static_cast<PRemotePrintJobChild*>((actor).value());
     421           0 :     return true;
     422             : }
     423             : 
     424             : 
     425             : 
     426             : } // namespace layout
     427             : } // namespace mozilla

Generated by: LCOV version 1.13