LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PQuotaUsageRequestChild.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 231 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 27 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/quota/PQuotaUsageRequestChild.h"
       8             : 
       9             : #include "mozilla/dom/quota/PQuotaChild.h"
      10             : 
      11             : #include "nsIFile.h"
      12             : #include "GeckoProfiler.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : namespace quota {
      17             : 
      18             : 
      19           0 : auto PQuotaUsageRequestChild::Recv__delete__(const UsageRequestResponse& response) -> mozilla::ipc::IPCResult
      20             : {
      21           0 :     return IPC_OK();
      22             : }
      23             : 
      24           0 : auto PQuotaUsageRequestChild::ActorDestroy(ActorDestroyReason aWhy) -> void
      25             : {
      26           0 : }
      27             : 
      28           0 : MOZ_IMPLICIT PQuotaUsageRequestChild::PQuotaUsageRequestChild() :
      29             :     mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
      30           0 :     mState(PQuotaUsageRequest::__Dead)
      31             : {
      32           0 :     MOZ_COUNT_CTOR(PQuotaUsageRequestChild);
      33           0 : }
      34             : 
      35           0 : PQuotaUsageRequestChild::~PQuotaUsageRequestChild()
      36             : {
      37           0 :     MOZ_COUNT_DTOR(PQuotaUsageRequestChild);
      38           0 : }
      39             : 
      40           0 : auto PQuotaUsageRequestChild::Manager() const -> PQuotaChild*
      41             : {
      42           0 :     return static_cast<PQuotaChild*>(IProtocol::Manager());
      43             : }
      44             : 
      45           0 : auto PQuotaUsageRequestChild::SendCancel() -> bool
      46             : {
      47           0 :     IPC::Message* msg__ = PQuotaUsageRequest::Msg_Cancel(Id());
      48             : 
      49             : 
      50             : 
      51             : 
      52             : 
      53           0 :     if (mozilla::ipc::LoggingEnabledFor("PQuotaUsageRequestChild")) {
      54           0 :         mozilla::ipc::LogMessageForProtocol("PQuotaUsageRequestChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
      55             :     }
      56           0 :     AUTO_PROFILER_LABEL("PQuotaUsageRequest::Msg_Cancel", OTHER);
      57           0 :     PQuotaUsageRequest::Transition(PQuotaUsageRequest::Msg_Cancel__ID, (&(mState)));
      58             : 
      59           0 :     bool sendok__ = (GetIPCChannel())->Send(msg__);
      60           0 :     return sendok__;
      61             : }
      62             : 
      63           0 : auto PQuotaUsageRequestChild::RemoveManagee(
      64             :         int32_t aProtocolId,
      65             :         ProtocolBase* aListener) -> void
      66             : {
      67           0 :     FatalError("unreached");
      68           0 :     return;
      69             : }
      70             : 
      71           0 : auto PQuotaUsageRequestChild::OnMessageReceived(const Message& msg__) -> PQuotaUsageRequestChild::Result
      72             : {
      73           0 :     switch ((msg__).type()) {
      74             :     case PQuotaUsageRequest::Msg___delete____ID:
      75             :         {
      76           0 :             if (mozilla::ipc::LoggingEnabledFor("PQuotaUsageRequestChild")) {
      77           0 :                 mozilla::ipc::LogMessageForProtocol("PQuotaUsageRequestChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
      78             :             }
      79           0 :             AUTO_PROFILER_LABEL("PQuotaUsageRequest::Msg___delete__", OTHER);
      80             : 
      81           0 :             PickleIterator iter__(msg__);
      82             :             PQuotaUsageRequestChild* actor;
      83           0 :             UsageRequestResponse response;
      84             : 
      85           0 :             if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
      86           0 :                 FatalError("Error deserializing 'PQuotaUsageRequestChild'");
      87           0 :                 return MsgValueError;
      88             :             }
      89             :             // Sentinel = 'actor'
      90           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
      91           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'PQuotaUsageRequestChild'");
      92           0 :                 return MsgValueError;
      93             :             }
      94           0 :             if ((!(Read((&(response)), (&(msg__)), (&(iter__)))))) {
      95           0 :                 FatalError("Error deserializing 'UsageRequestResponse'");
      96           0 :                 return MsgValueError;
      97             :             }
      98             :             // Sentinel = 'response'
      99           0 :             if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2396115421)))) {
     100           0 :                 mozilla::ipc::SentinelReadError("Error deserializing 'UsageRequestResponse'");
     101           0 :                 return MsgValueError;
     102             :             }
     103           0 :             (msg__).EndRead(iter__, (msg__).type());
     104           0 :             PQuotaUsageRequest::Transition(PQuotaUsageRequest::Msg___delete____ID, (&(mState)));
     105           0 :             if ((!(Recv__delete__(mozilla::Move(response))))) {
     106           0 :                 mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
     107             :                 // Error handled in mozilla::ipc::IPCResult
     108           0 :                 return MsgProcessingError;
     109             :             }
     110             : 
     111             : 
     112           0 :             IProtocol* mgr = (actor)->Manager();
     113           0 :             (actor)->DestroySubtree(Deletion);
     114           0 :             (actor)->DeallocSubtree();
     115           0 :             (mgr)->RemoveManagee(PQuotaUsageRequestMsgStart, actor);
     116             : 
     117           0 :             return MsgProcessed;
     118             :         }
     119             :     default:
     120             :         {
     121           0 :             return MsgNotKnown;
     122             :         }
     123             :     }
     124             : }
     125             : 
     126           0 : auto PQuotaUsageRequestChild::OnMessageReceived(
     127             :         const Message& msg__,
     128             :         Message*& reply__) -> PQuotaUsageRequestChild::Result
     129             : {
     130           0 :     return MsgNotKnown;
     131             : }
     132             : 
     133           0 : auto PQuotaUsageRequestChild::OnCallReceived(
     134             :         const Message& msg__,
     135             :         Message*& reply__) -> PQuotaUsageRequestChild::Result
     136             : {
     137           0 :     MOZ_ASSERT_UNREACHABLE("message protocol not supported");
     138             :     return MsgNotKnown;
     139             : }
     140             : 
     141           0 : auto PQuotaUsageRequestChild::GetProtocolTypeId() -> int32_t
     142             : {
     143           0 :     return PQuotaUsageRequestMsgStart;
     144             : }
     145             : 
     146           0 : auto PQuotaUsageRequestChild::ProtocolName() const -> const char*
     147             : {
     148           0 :     return "PQuotaUsageRequestChild";
     149             : }
     150             : 
     151           0 : auto PQuotaUsageRequestChild::DestroySubtree(ActorDestroyReason why) -> void
     152             : {
     153             :     // Unregister from our manager.
     154           0 :     Unregister(Id());
     155             : 
     156             :     // Reject owning pending promises.
     157           0 :     (GetIPCChannel())->RejectPendingPromisesForActor(this);
     158             : 
     159             :     // Finally, destroy "us".
     160           0 :     ActorDestroy(why);
     161           0 : }
     162             : 
     163           0 : auto PQuotaUsageRequestChild::DeallocSubtree() -> void
     164             : {
     165           0 : }
     166             : 
     167           0 : auto PQuotaUsageRequestChild::Write(
     168             :         const nsTArray<OriginUsage>& v__,
     169             :         Message* msg__) -> void
     170             : {
     171           0 :     uint32_t length = (v__).Length();
     172           0 :     Write(length, msg__);
     173             :     // Sentinel = ('length', 'OriginUsage[]')
     174           0 :     (msg__)->WriteSentinel(3296018471);
     175             : 
     176           0 :     for (auto& elem : v__) {
     177           0 :         Write(elem, msg__);
     178             :         // Sentinel = 'OriginUsage[]'
     179           0 :         (msg__)->WriteSentinel(3349558786);
     180             :     }
     181           0 : }
     182             : 
     183           0 : auto PQuotaUsageRequestChild::Read(
     184             :         nsTArray<OriginUsage>* v__,
     185             :         const Message* msg__,
     186             :         PickleIterator* iter__) -> bool
     187             : {
     188           0 :     nsTArray<OriginUsage> fa;
     189             :     uint32_t length;
     190           0 :     if ((!(Read((&(length)), msg__, iter__)))) {
     191           0 :         mozilla::ipc::ArrayLengthReadError("OriginUsage[]");
     192           0 :         return false;
     193             :     }
     194             :     // Sentinel = ('length', 'OriginUsage[]')
     195           0 :     if ((!((msg__)->ReadSentinel(iter__, 3296018471)))) {
     196           0 :         mozilla::ipc::SentinelReadError("OriginUsage[]");
     197           0 :         return false;
     198             :     }
     199             : 
     200           0 :     OriginUsage* elems = (fa).AppendElements(length);
     201           0 :     for (uint32_t i = 0; (i) < (length); (++(i))) {
     202           0 :         if ((!(Read((&(elems[i])), msg__, iter__)))) {
     203           0 :             FatalError("Error deserializing 'OriginUsage[i]'");
     204           0 :             return false;
     205             :         }
     206             :         // Sentinel = 'OriginUsage[]'
     207           0 :         if ((!((msg__)->ReadSentinel(iter__, 3349558786)))) {
     208           0 :             mozilla::ipc::SentinelReadError("Error deserializing 'OriginUsage[i]'");
     209           0 :             return false;
     210             :         }
     211             :     }
     212           0 :     (v__)->SwapElements(fa);
     213           0 :     return true;
     214             : }
     215             : 
     216           0 : auto PQuotaUsageRequestChild::Write(
     217             :         const PQuotaUsageRequestChild* v__,
     218             :         Message* msg__,
     219             :         bool nullable__) -> void
     220             : {
     221             :     int32_t id;
     222           0 :     if ((!(v__))) {
     223           0 :         if ((!(nullable__))) {
     224           0 :             FatalError("NULL actor value passed to non-nullable param");
     225             :         }
     226           0 :         id = 0;
     227             :     }
     228             :     else {
     229           0 :         id = (v__)->Id();
     230           0 :         if ((1) == (id)) {
     231           0 :             FatalError("actor has been |delete|d");
     232             :         }
     233             :     }
     234             : 
     235           0 :     Write(id, msg__);
     236           0 : }
     237             : 
     238           0 : auto PQuotaUsageRequestChild::Read(
     239             :         PQuotaUsageRequestChild** v__,
     240             :         const Message* msg__,
     241             :         PickleIterator* iter__,
     242             :         bool nullable__) -> bool
     243             : {
     244           0 :     Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PQuotaUsageRequest", PQuotaUsageRequestMsgStart);
     245           0 :     if ((actor).isNothing()) {
     246           0 :         return false;
     247             :     }
     248             : 
     249           0 :     (*(v__)) = static_cast<PQuotaUsageRequestChild*>((actor).value());
     250           0 :     return true;
     251             : }
     252             : 
     253           0 : auto PQuotaUsageRequestChild::Write(
     254             :         const AllUsageResponse& v__,
     255             :         Message* msg__) -> void
     256             : {
     257           0 :     Write((v__).originUsages(), msg__);
     258             :     // Sentinel = 'originUsages'
     259           0 :     (msg__)->WriteSentinel(483864514);
     260           0 : }
     261             : 
     262           0 : auto PQuotaUsageRequestChild::Read(
     263             :         AllUsageResponse* v__,
     264             :         const Message* msg__,
     265             :         PickleIterator* iter__) -> bool
     266             : {
     267           0 :     if ((!(Read((&((v__)->originUsages())), msg__, iter__)))) {
     268           0 :         FatalError("Error deserializing 'originUsages' (OriginUsage[]) member of 'AllUsageResponse'");
     269           0 :         return false;
     270             :     }
     271             :     // Sentinel = 'originUsages'
     272           0 :     if ((!((msg__)->ReadSentinel(iter__, 483864514)))) {
     273           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'originUsages' (OriginUsage[]) member of 'AllUsageResponse'");
     274           0 :         return false;
     275             :     }
     276           0 :     return true;
     277             : }
     278             : 
     279           0 : auto PQuotaUsageRequestChild::Write(
     280             :         const UsageRequestResponse& v__,
     281             :         Message* msg__) -> void
     282             : {
     283             :     typedef UsageRequestResponse type__;
     284           0 :     Write(int((v__).type()), msg__);
     285             :     // Sentinel = 'UsageRequestResponse'
     286           0 :     (msg__)->WriteSentinel(3872348009);
     287             : 
     288           0 :     switch ((v__).type()) {
     289             :     case type__::Tnsresult:
     290             :         {
     291           0 :             Write((v__).get_nsresult(), msg__);
     292             :             // Sentinel = 'Tnsresult'
     293           0 :             (msg__)->WriteSentinel(2293764539);
     294           0 :             return;
     295             :         }
     296             :     case type__::TAllUsageResponse:
     297             :         {
     298           0 :             Write((v__).get_AllUsageResponse(), msg__);
     299             :             // Sentinel = 'TAllUsageResponse'
     300           0 :             (msg__)->WriteSentinel(3226243202);
     301           0 :             return;
     302             :         }
     303             :     case type__::TOriginUsageResponse:
     304             :         {
     305           0 :             Write((v__).get_OriginUsageResponse(), msg__);
     306             :             // Sentinel = 'TOriginUsageResponse'
     307           0 :             (msg__)->WriteSentinel(1702568234);
     308           0 :             return;
     309             :         }
     310             :     default:
     311             :         {
     312           0 :             FatalError("unknown union type");
     313           0 :             return;
     314             :         }
     315             :     }
     316             : }
     317             : 
     318           0 : auto PQuotaUsageRequestChild::Read(
     319             :         UsageRequestResponse* v__,
     320             :         const Message* msg__,
     321             :         PickleIterator* iter__) -> bool
     322             : {
     323             :     typedef UsageRequestResponse type__;
     324             :     int type;
     325           0 :     if ((!(Read((&(type)), msg__, iter__)))) {
     326           0 :         mozilla::ipc::UnionTypeReadError("UsageRequestResponse");
     327           0 :         return false;
     328             :     }
     329             :     // Sentinel = 'UsageRequestResponse'
     330           0 :     if ((!((msg__)->ReadSentinel(iter__, 3872348009)))) {
     331           0 :         mozilla::ipc::SentinelReadError("UsageRequestResponse");
     332           0 :         return false;
     333             :     }
     334             : 
     335           0 :     switch (type) {
     336             :     case type__::Tnsresult:
     337             :         {
     338           0 :             nsresult tmp = nsresult();
     339           0 :             (*(v__)) = tmp;
     340           0 :             if ((!(Read((&((v__)->get_nsresult())), msg__, iter__)))) {
     341           0 :                 FatalError("Error deserializing Union type");
     342           0 :                 return false;
     343             :             }
     344             :             // Sentinel = 'Tnsresult'
     345           0 :             if ((!((msg__)->ReadSentinel(iter__, 2293764539)))) {
     346           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     347           0 :                 return false;
     348             :             }
     349           0 :             return true;
     350             :         }
     351             :     case type__::TAllUsageResponse:
     352             :         {
     353           0 :             AllUsageResponse tmp = AllUsageResponse();
     354           0 :             (*(v__)) = tmp;
     355           0 :             if ((!(Read((&((v__)->get_AllUsageResponse())), msg__, iter__)))) {
     356           0 :                 FatalError("Error deserializing Union type");
     357           0 :                 return false;
     358             :             }
     359             :             // Sentinel = 'TAllUsageResponse'
     360           0 :             if ((!((msg__)->ReadSentinel(iter__, 3226243202)))) {
     361           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     362           0 :                 return false;
     363             :             }
     364           0 :             return true;
     365             :         }
     366             :     case type__::TOriginUsageResponse:
     367             :         {
     368           0 :             OriginUsageResponse tmp = OriginUsageResponse();
     369           0 :             (*(v__)) = tmp;
     370           0 :             if ((!(Read((&((v__)->get_OriginUsageResponse())), msg__, iter__)))) {
     371           0 :                 FatalError("Error deserializing Union type");
     372           0 :                 return false;
     373             :             }
     374             :             // Sentinel = 'TOriginUsageResponse'
     375           0 :             if ((!((msg__)->ReadSentinel(iter__, 1702568234)))) {
     376           0 :                 mozilla::ipc::SentinelReadError("Error deserializing Union type");
     377           0 :                 return false;
     378             :             }
     379           0 :             return true;
     380             :         }
     381             :     default:
     382             :         {
     383           0 :             FatalError("unknown union type");
     384           0 :             return false;
     385             :         }
     386             :     }
     387             : }
     388             : 
     389           0 : auto PQuotaUsageRequestChild::Write(
     390             :         const OriginUsageResponse& v__,
     391             :         Message* msg__) -> void
     392             : {
     393           0 :     Write((v__).usage(), msg__);
     394             :     // Sentinel = 'usage'
     395           0 :     (msg__)->WriteSentinel(3419176504);
     396           0 :     Write((v__).fileUsage(), msg__);
     397             :     // Sentinel = 'fileUsage'
     398           0 :     (msg__)->WriteSentinel(3321971858);
     399           0 :     Write((v__).limit(), msg__);
     400             :     // Sentinel = 'limit'
     401           0 :     (msg__)->WriteSentinel(3880566644);
     402           0 : }
     403             : 
     404           0 : auto PQuotaUsageRequestChild::Read(
     405             :         OriginUsageResponse* v__,
     406             :         const Message* msg__,
     407             :         PickleIterator* iter__) -> bool
     408             : {
     409           0 :     if ((!(Read((&((v__)->usage())), msg__, iter__)))) {
     410           0 :         FatalError("Error deserializing 'usage' (uint64_t) member of 'OriginUsageResponse'");
     411           0 :         return false;
     412             :     }
     413             :     // Sentinel = 'usage'
     414           0 :     if ((!((msg__)->ReadSentinel(iter__, 3419176504)))) {
     415           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'usage' (uint64_t) member of 'OriginUsageResponse'");
     416           0 :         return false;
     417             :     }
     418           0 :     if ((!(Read((&((v__)->fileUsage())), msg__, iter__)))) {
     419           0 :         FatalError("Error deserializing 'fileUsage' (uint64_t) member of 'OriginUsageResponse'");
     420           0 :         return false;
     421             :     }
     422             :     // Sentinel = 'fileUsage'
     423           0 :     if ((!((msg__)->ReadSentinel(iter__, 3321971858)))) {
     424           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'fileUsage' (uint64_t) member of 'OriginUsageResponse'");
     425           0 :         return false;
     426             :     }
     427           0 :     if ((!(Read((&((v__)->limit())), msg__, iter__)))) {
     428           0 :         FatalError("Error deserializing 'limit' (uint64_t) member of 'OriginUsageResponse'");
     429           0 :         return false;
     430             :     }
     431             :     // Sentinel = 'limit'
     432           0 :     if ((!((msg__)->ReadSentinel(iter__, 3880566644)))) {
     433           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'limit' (uint64_t) member of 'OriginUsageResponse'");
     434           0 :         return false;
     435             :     }
     436           0 :     return true;
     437             : }
     438             : 
     439           0 : auto PQuotaUsageRequestChild::Write(
     440             :         const OriginUsage& v__,
     441             :         Message* msg__) -> void
     442             : {
     443           0 :     Write((v__).origin(), msg__);
     444             :     // Sentinel = 'origin'
     445           0 :     (msg__)->WriteSentinel(1429924608);
     446           0 :     Write((v__).persisted(), msg__);
     447             :     // Sentinel = 'persisted'
     448           0 :     (msg__)->WriteSentinel(3547791474);
     449           0 :     Write((v__).usage(), msg__);
     450             :     // Sentinel = 'usage'
     451           0 :     (msg__)->WriteSentinel(3419176504);
     452           0 : }
     453             : 
     454           0 : auto PQuotaUsageRequestChild::Read(
     455             :         OriginUsage* v__,
     456             :         const Message* msg__,
     457             :         PickleIterator* iter__) -> bool
     458             : {
     459           0 :     if ((!(Read((&((v__)->origin())), msg__, iter__)))) {
     460           0 :         FatalError("Error deserializing 'origin' (nsCString) member of 'OriginUsage'");
     461           0 :         return false;
     462             :     }
     463             :     // Sentinel = 'origin'
     464           0 :     if ((!((msg__)->ReadSentinel(iter__, 1429924608)))) {
     465           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'origin' (nsCString) member of 'OriginUsage'");
     466           0 :         return false;
     467             :     }
     468           0 :     if ((!(Read((&((v__)->persisted())), msg__, iter__)))) {
     469           0 :         FatalError("Error deserializing 'persisted' (bool) member of 'OriginUsage'");
     470           0 :         return false;
     471             :     }
     472             :     // Sentinel = 'persisted'
     473           0 :     if ((!((msg__)->ReadSentinel(iter__, 3547791474)))) {
     474           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'persisted' (bool) member of 'OriginUsage'");
     475           0 :         return false;
     476             :     }
     477           0 :     if ((!(Read((&((v__)->usage())), msg__, iter__)))) {
     478           0 :         FatalError("Error deserializing 'usage' (uint64_t) member of 'OriginUsage'");
     479           0 :         return false;
     480             :     }
     481             :     // Sentinel = 'usage'
     482           0 :     if ((!((msg__)->ReadSentinel(iter__, 3419176504)))) {
     483           0 :         mozilla::ipc::SentinelReadError("Error deserializing 'usage' (uint64_t) member of 'OriginUsage'");
     484           0 :         return false;
     485             :     }
     486           0 :     return true;
     487             : }
     488             : 
     489             : 
     490             : 
     491             : } // namespace quota
     492             : } // namespace dom
     493             : } // namespace mozilla

Generated by: LCOV version 1.13