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

Generated by: LCOV version 1.13