LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PDNSRequestChild.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 160 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 21 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/PDNSRequestChild.h"
       8             : 
       9             : #include "mozilla/net/PNeckoChild.h"
      10             : 
      11             : #include "nsIFile.h"
      12             : #include "GeckoProfiler.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace net {
      16             : 
      17             : 
      18           0 : auto PDNSRequestChild::ActorDestroy(ActorDestroyReason aWhy) -> void
      19             : {
      20           0 : }
      21             : 
      22           0 : MOZ_IMPLICIT PDNSRequestChild::PDNSRequestChild() :
      23             :     mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
      24           0 :     mState(PDNSRequest::__Dead)
      25             : {
      26           0 :     MOZ_COUNT_CTOR(PDNSRequestChild);
      27           0 : }
      28             : 
      29           0 : PDNSRequestChild::~PDNSRequestChild()
      30             : {
      31           0 :     MOZ_COUNT_DTOR(PDNSRequestChild);
      32           0 : }
      33             : 
      34           0 : auto PDNSRequestChild::Manager() const -> PNeckoChild*
      35             : {
      36           0 :     return static_cast<PNeckoChild*>(IProtocol::Manager());
      37             : }
      38             : 
      39           0 : auto PDNSRequestChild::SendCancelDNSRequest(
      40             :         const nsCString& hostName,
      41             :         const OriginAttributes& originAttributes,
      42             :         const uint32_t& flags,
      43             :         const nsCString& networkInterface,
      44             :         const nsresult& reason) -> bool
      45             : {
      46           0 :     IPC::Message* msg__ = PDNSRequest::Msg_CancelDNSRequest(Id());
      47             : 
      48           0 :     Write(hostName, msg__);
      49             :     // Sentinel = 'hostName'
      50           0 :     (msg__)->WriteSentinel(1367899915);
      51           0 :     Write(originAttributes, msg__);
      52             :     // Sentinel = 'originAttributes'
      53           0 :     (msg__)->WriteSentinel(2655275965);
      54           0 :     Write(flags, msg__);
      55             :     // Sentinel = 'flags'
      56           0 :     (msg__)->WriteSentinel(2550519284);
      57           0 :     Write(networkInterface, msg__);
      58             :     // Sentinel = 'networkInterface'
      59           0 :     (msg__)->WriteSentinel(1813484207);
      60           0 :     Write(reason, msg__);
      61             :     // Sentinel = 'reason'
      62           0 :     (msg__)->WriteSentinel(4151390930);
      63             : 
      64             : 
      65             : 
      66             : 
      67           0 :     if (mozilla::ipc::LoggingEnabledFor("PDNSRequestChild")) {
      68           0 :         mozilla::ipc::LogMessageForProtocol("PDNSRequestChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      69             :     }
      70           0 :     AUTO_PROFILER_LABEL("PDNSRequest::Msg_CancelDNSRequest", OTHER);
      71           0 :     PDNSRequest::Transition(PDNSRequest::Msg_CancelDNSRequest__ID, (&(mState)));
      72             : 
      73           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      74           0 :     return sendok__;
      75             : }
      76             : 
      77           0 : auto PDNSRequestChild::Send__delete__(PDNSRequestChild* actor) -> bool
      78             : {
      79           0 :     if ((!(actor))) {
      80           0 :         return false;
      81             :     }
      82             : 
      83           0 :     IPC::Message* msg__ = PDNSRequest::Msg___delete__((actor)->Id());
      84             : 
      85           0 :     (actor)->Write(actor, msg__, false);
      86             :     // Sentinel = 'actor'
      87           0 :     (msg__)->WriteSentinel(875202478);
      88             : 
      89             : 
      90             : 
      91           0 :     if (mozilla::ipc::LoggingEnabledFor("PDNSRequestChild")) {
      92           0 :         mozilla::ipc::LogMessageForProtocol("PDNSRequestChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      93             :     }
      94           0 :     AUTO_PROFILER_LABEL("PDNSRequest::Msg___delete__", OTHER);
      95           0 :     PDNSRequest::Transition(PDNSRequest::Msg___delete____ID, (&((actor)->mState)));
      96             : 
      97           0 :     bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);
      98             : 
      99           0 :     IProtocol* mgr = (actor)->Manager();
     100           0 :     (actor)->DestroySubtree(Deletion);
     101           0 :     (actor)->DeallocSubtree();
     102           0 :     (mgr)->RemoveManagee(PDNSRequestMsgStart, actor);
     103           0 :     return sendok__;
     104             : }
     105             : 
     106           0 : auto PDNSRequestChild::RemoveManagee(
     107             :         int32_t aProtocolId,
     108             :         ProtocolBase* aListener) -> void
     109             : {
     110           0 :     FatalError("unreached");
     111           0 :     return;
     112             : }
     113             : 
     114           0 : auto PDNSRequestChild::OnMessageReceived(const Message& msg__) -> PDNSRequestChild::Result
     115             : {
     116           0 :     switch ((msg__).type()) {
     117             :     case PDNSRequest::Reply___delete____ID:
     118             :         {
     119           0 :             return MsgProcessed;
     120             :         }
     121             :     case PDNSRequest::Msg_LookupCompleted__ID:
     122             :         {
     123           0 :             if (mozilla::ipc::LoggingEnabledFor("PDNSRequestChild")) {
     124           0 :                 mozilla::ipc::LogMessageForProtocol("PDNSRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
     125             :             }
     126           0 :             AUTO_PROFILER_LABEL("PDNSRequest::Msg_LookupCompleted", OTHER);
     127             : 
     128           0 :             PickleIterator iter__(msg__);
     129           0 :             DNSRequestResponse reply;
     130             : 
     131           0 :             if ((!(Read((&(reply)), (&(msg__)), (&(iter__)))))) {
     132           0 :                 FatalError("Error deserializing 'DNSRequestResponse'");
     133           0 :                 return MsgValueError;
     134             :             }
     135             :             // Sentinel = 'reply'
     136           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3357927609)))) {
     137           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'DNSRequestResponse'");
     138           0 :                 return MsgValueError;
     139             :             }
     140           0 :             (msg__).EndRead(iter__, (msg__).type());
     141           0 :             PDNSRequest::Transition(PDNSRequest::Msg_LookupCompleted__ID, (&(mState)));
     142           0 :             if ((!(RecvLookupCompleted(mozilla::Move(reply))))) {
     143           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     144             :                 // Error handled in mozilla::ipc::IPCResult
     145           0 :                 return MsgProcessingError;
     146             :             }
     147             : 
     148           0 :             return MsgProcessed;
     149             :         }
     150             :     default:
     151             :         {
     152           0 :             return MsgNotKnown;
     153             :         }
     154             :     }
     155             : }
     156             : 
     157           0 : auto PDNSRequestChild::OnMessageReceived(
     158             :         const Message& msg__,
     159             :         Message*& reply__) -> PDNSRequestChild::Result
     160             : {
     161           0 :     return MsgNotKnown;
     162             : }
     163             : 
     164           0 : auto PDNSRequestChild::OnCallReceived(
     165             :         const Message& msg__,
     166             :         Message*& reply__) -> PDNSRequestChild::Result
     167             : {
     168           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     169             :     return MsgNotKnown;
     170             : }
     171             : 
     172           0 : auto PDNSRequestChild::GetProtocolTypeId() -> int32_t
     173             : {
     174           0 :     return PDNSRequestMsgStart;
     175             : }
     176             : 
     177           0 : auto PDNSRequestChild::ProtocolName() const -> const char*
     178             : {
     179           0 :     return "PDNSRequestChild";
     180             : }
     181             : 
     182           0 : auto PDNSRequestChild::DestroySubtree(ActorDestroyReason why) -> void
     183             : {
     184             :     // Unregister from our manager.
     185           0 :     Unregister(Id());
     186             : 
     187             :     // Reject owning pending promises.
     188           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     189             : 
     190             :     // Finally, destroy "us".
     191           0 :     ActorDestroy(why);
     192           0 : }
     193             : 
     194           0 : auto PDNSRequestChild::DeallocSubtree() -> void
     195             : {
     196           0 : }
     197             : 
     198           0 : auto PDNSRequestChild::Write(
     199             :         const DNSRequestResponse& v__,
     200             :         Message* msg__) -> void
     201             : {
     202             :     typedef DNSRequestResponse type__;
     203           0 :     Write(int((v__).type()), msg__);
     204             :     // Sentinel = 'DNSRequestResponse'
     205           0 :     (msg__)->WriteSentinel(1300723575);
     206             : 
     207           0 :     switch ((v__).type()) {
     208             :     case type__::TDNSRecord:
     209             :         {
     210           0 :             Write((v__).get_DNSRecord(), msg__);
     211             :             // Sentinel = 'TDNSRecord'
     212           0 :             (msg__)->WriteSentinel(2640728140);
     213           0 :             return;
     214             :         }
     215             :     case type__::Tnsresult:
     216             :         {
     217           0 :             Write((v__).get_nsresult(), msg__);
     218             :             // Sentinel = 'Tnsresult'
     219           0 :             (msg__)->WriteSentinel(2293764539);
     220           0 :             return;
     221             :         }
     222             :     default:
     223             :         {
     224           0 :             FatalError("unknown union type");
     225           0 :             return;
     226             :         }
     227             :     }
     228             : }
     229             : 
     230           0 : auto PDNSRequestChild::Read(
     231             :         DNSRequestResponse* v__,
     232             :         const Message* msg__,
     233             :         PickleIterator* iter__) -> bool
     234             : {
     235             :     typedef DNSRequestResponse type__;
     236             :     int type;
     237           0 :     if ((!(Read((&(type)), msg__, iter__)))) {
     238           0 :         mozilla::ipc::UnionTypeReadError("DNSRequestResponse");
     239           0 :         return false;
     240             :     }
     241             :     // Sentinel = 'DNSRequestResponse'
     242           0 :     if ((!((msg__)->ReadSentinel(iter__, 1300723575)))) {
     243           0 :         mozilla::ipc::SentinelReadError("DNSRequestResponse");
     244           0 :         return false;
     245             :     }
     246             : 
     247           0 :     switch (type) {
     248             :     case type__::TDNSRecord:
     249             :         {
     250           0 :             DNSRecord tmp = DNSRecord();
     251           0 :             (*(v__)) = tmp;
     252           0 :             if ((!(Read((&((v__)->get_DNSRecord())), msg__, iter__)))) {
     253           0 :                 FatalError("Error deserializing Union type");
     254           0 :                 return false;
     255             :             }
     256             :             // Sentinel = 'TDNSRecord'
     257           0 :             if ((!((msg__)->ReadSentinel(iter__, 2640728140)))) {
     258           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     259           0 :                 return false;
     260             :             }
     261           0 :             return true;
     262             :         }
     263             :     case type__::Tnsresult:
     264             :         {
     265           0 :             nsresult tmp = nsresult();
     266           0 :             (*(v__)) = tmp;
     267           0 :             if ((!(Read((&((v__)->get_nsresult())), msg__, iter__)))) {
     268           0 :                 FatalError("Error deserializing Union type");
     269           0 :                 return false;
     270             :             }
     271             :             // Sentinel = 'Tnsresult'
     272           0 :             if ((!((msg__)->ReadSentinel(iter__, 2293764539)))) {
     273           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     274           0 :                 return false;
     275             :             }
     276           0 :             return true;
     277             :         }
     278             :     default:
     279             :         {
     280           0 :             FatalError("unknown union type");
     281           0 :             return false;
     282             :         }
     283             :     }
     284             : }
     285             : 
     286           0 : auto PDNSRequestChild::Write(
     287             :         const PDNSRequestChild* v__,
     288             :         Message* msg__,
     289             :         bool nullable__) -> void
     290             : {
     291             :     int32_t id;
     292           0 :     if ((!(v__))) {
     293           0 :         if ((!(nullable__))) {
     294           0 :             FatalError("NULL actor value passed to non-nullable param");
     295             :         }
     296           0 :         id = 0;
     297             :     }
     298             :     else {
     299           0 :         id = (v__)->Id();
     300           0 :         if ((1) == (id)) {
     301           0 :             FatalError("actor has been |delete|d");
     302             :         }
     303             :     }
     304             : 
     305           0 :     Write(id, msg__);
     306           0 : }
     307             : 
     308           0 : auto PDNSRequestChild::Read(
     309             :         PDNSRequestChild** v__,
     310             :         const Message* msg__,
     311             :         PickleIterator* iter__,
     312             :         bool nullable__) -> bool
     313             : {
     314           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PDNSRequest", PDNSRequestMsgStart);
     315           0 :     if ((actor).isNothing()) {
     316           0 :         return false;
     317             :     }
     318             : 
     319           0 :     (*(v__)) = static_cast<PDNSRequestChild*>((actor).value());
     320           0 :     return true;
     321             : }
     322             : 
     323           0 : auto PDNSRequestChild::Write(
     324             :         const DNSRecord& v__,
     325             :         Message* msg__) -> void
     326             : {
     327           0 :     Write((v__).canonicalName(), msg__);
     328             :     // Sentinel = 'canonicalName'
     329           0 :     (msg__)->WriteSentinel(2117440974);
     330           0 :     Write((v__).addrs(), msg__);
     331             :     // Sentinel = 'addrs'
     332           0 :     (msg__)->WriteSentinel(2934080597);
     333           0 : }
     334             : 
     335           0 : auto PDNSRequestChild::Read(
     336             :         DNSRecord* v__,
     337             :         const Message* msg__,
     338             :         PickleIterator* iter__) -> bool
     339             : {
     340           0 :     if ((!(Read((&((v__)->canonicalName())), msg__, iter__)))) {
     341           0 :         FatalError("Error deserializing 'canonicalName' (nsCString) member of 'DNSRecord'");
     342           0 :         return false;
     343             :     }
     344             :     // Sentinel = 'canonicalName'
     345           0 :     if ((!((msg__)->ReadSentinel(iter__, 2117440974)))) {
     346           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'canonicalName' (nsCString) member of 'DNSRecord'");
     347           0 :         return false;
     348             :     }
     349           0 :     if ((!(Read((&((v__)->addrs())), msg__, iter__)))) {
     350           0 :         FatalError("Error deserializing 'addrs' (NetAddrArray) member of 'DNSRecord'");
     351           0 :         return false;
     352             :     }
     353             :     // Sentinel = 'addrs'
     354           0 :     if ((!((msg__)->ReadSentinel(iter__, 2934080597)))) {
     355           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'addrs' (NetAddrArray) member of 'DNSRecord'");
     356           0 :         return false;
     357             :     }
     358           0 :     return true;
     359             : }
     360             : 
     361             : 
     362             : 
     363             : } // namespace net
     364             : } // namespace mozilla

Generated by: LCOV version 1.13