LCOV - code coverage report
Current view: directory - objdir/ipc/ipdl/_ipdlheaders/mozilla/ipc - PTestShellParent.h (source / functions) Found Hit Coverage
Test: app.info Lines: 5 0 0.0 %
Date: 2012-06-02 Functions: 4 0 0.0 %

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : #ifndef PTestShellParent_h
       7                 : #define PTestShellParent_h
       8                 : 
       9                 : #include "mozilla/ipc/PTestShell.h"
      10                 : namespace mozilla {
      11                 : namespace dom {
      12                 : class PContentParent;
      13                 : } // namespace dom
      14                 : } // namespace mozilla
      15                 : 
      16                 : namespace mozilla {
      17                 : namespace ipc {
      18                 : class PTestShellCommandParent;
      19                 : } // namespace ipc
      20                 : } // namespace mozilla
      21                 : 
      22                 : namespace mozilla {
      23                 : namespace jsipc {
      24                 : class PContextWrapperParent;
      25                 : } // namespace jsipc
      26                 : } // namespace mozilla
      27                 : 
      28                 : #ifdef DEBUG
      29                 : #include "prenv.h"
      30                 : #endif // DEBUG
      31                 : #include "base/id_map.h"
      32                 : #include "mozilla/ipc/RPCChannel.h"
      33                 : 
      34                 : 
      35                 : namespace mozilla {
      36                 : namespace dom {
      37                 : class PContentParent;
      38                 : } // namespace dom
      39                 : } // namespace mozilla
      40                 : 
      41                 : 
      42                 : namespace mozilla {
      43                 : namespace jsipc {
      44                 : class PContextWrapperParent;
      45                 : } // namespace jsipc
      46                 : } // namespace mozilla
      47                 : 
      48                 : 
      49                 : namespace mozilla {
      50                 : namespace ipc {
      51                 : class PTestShellCommandParent;
      52                 : } // namespace ipc
      53                 : } // namespace mozilla
      54                 : 
      55                 : namespace mozilla {
      56                 : namespace ipc {
      57                 : 
      58                 : 
      59                 : class /*NS_ABSTRACT_CLASS*/ PTestShellParent :
      60                 :     protected mozilla::ipc::RPCChannel::RPCListener,
      61                 :     protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
      62                 : {
      63                 :     friend class mozilla::dom::PContentParent;
      64                 : 
      65                 :     friend class mozilla::jsipc::PContextWrapperParent;
      66                 : 
      67                 :     friend class mozilla::ipc::PTestShellCommandParent;
      68                 : 
      69                 : protected:
      70                 :     typedef mozilla::ipc::ActorHandle ActorHandle;
      71                 :     typedef mozilla::ipc::Shmem Shmem;
      72                 :     typedef mozilla::dom::PContentParent PContentParent;
      73                 :     typedef mozilla::ipc::PTestShellCommandParent PTestShellCommandParent;
      74                 :     typedef mozilla::jsipc::PContextWrapperParent PContextWrapperParent;
      75                 :     typedef base::ProcessId ProcessId;
      76                 :     typedef mozilla::ipc::ProtocolId ProtocolId;
      77                 :     typedef mozilla::ipc::Transport Transport;
      78                 :     typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
      79                 : 
      80                 :     typedef PTestShell::State State;
      81                 : 
      82                 :     virtual bool
      83                 :     RecvPContextWrapperConstructor(PContextWrapperParent* actor);
      84                 :     virtual PTestShellCommandParent*
      85                 :     AllocPTestShellCommand(const nsString& aCommand) = 0;
      86                 :     virtual bool
      87                 :     DeallocPTestShellCommand(PTestShellCommandParent* actor) = 0;
      88                 :     virtual PContextWrapperParent*
      89                 :     AllocPContextWrapper() = 0;
      90                 :     virtual bool
      91                 :     DeallocPContextWrapper(PContextWrapperParent* actor) = 0;
      92                 : 
      93                 :     virtual void
      94                 :     ActorDestroy(ActorDestroyReason why);
      95                 : 
      96                 : public:
      97                 :     typedef IPC::Message Message;
      98                 :     typedef mozilla::ipc::RPCChannel Channel;
      99                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
     100                 :     typedef base::ProcessHandle ProcessHandle;
     101                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
     102                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
     103                 :     typedef mozilla::ipc::Trigger Trigger;
     104                 : 
     105                 : public:
     106                 :     PTestShellParent();
     107                 : 
     108                 :     virtual ~PTestShellParent();
     109                 : 
     110                 :     PContentParent*
     111                 :     Manager();
     112                 : 
     113                 :     void
     114                 :     ManagedPTestShellCommandParent(InfallibleTArray<PTestShellCommandParent*>& aArr) const;
     115                 :     const InfallibleTArray<PTestShellCommandParent*>&
     116                 :     ManagedPTestShellCommandParent() const;
     117                 : 
     118                 :     void
     119                 :     ManagedPContextWrapperParent(InfallibleTArray<PContextWrapperParent*>& aArr) const;
     120                 :     const InfallibleTArray<PContextWrapperParent*>&
     121                 :     ManagedPContextWrapperParent() const;
     122                 : 
     123                 :     PTestShell::State
     124                 :     state();
     125                 : 
     126                 :     static bool
     127                 :     Send__delete__(PTestShellParent* actor) NS_WARN_UNUSED_RESULT;
     128                 : 
     129                 :     bool
     130                 :     SendExecuteCommand(const nsString& aCommand) NS_WARN_UNUSED_RESULT;
     131                 : 
     132                 :     PTestShellCommandParent*
     133                 :     SendPTestShellCommandConstructor(const nsString& aCommand) NS_WARN_UNUSED_RESULT;
     134                 : 
     135                 :     PTestShellCommandParent*
     136                 :     SendPTestShellCommandConstructor(
     137                 :             PTestShellCommandParent* actor,
     138                 :             const nsString& aCommand) NS_WARN_UNUSED_RESULT;
     139                 : 
     140                 :     virtual int32
     141                 :     Register(ChannelListener* aRouted);
     142                 :     virtual int32
     143                 :     RegisterID(
     144                 :             ChannelListener* aRouted,
     145                 :             int32 aId);
     146                 :     virtual ChannelListener*
     147                 :     Lookup(int32 aId);
     148                 :     virtual void
     149                 :     Unregister(int32 aId);
     150                 :     virtual void
     151                 :     RemoveManagee(
     152                 :             int32 aProtocolId,
     153                 :             ChannelListener* aListener);
     154                 :     virtual Shmem::SharedMemory*
     155                 :     CreateSharedMemory(
     156                 :             size_t aSize,
     157                 :             Shmem::SharedMemory::SharedMemoryType type,
     158                 :             bool unsafe,
     159                 :             Shmem::id_t* aId);
     160                 :     virtual bool
     161                 :     AdoptSharedMemory(
     162                 :             Shmem::SharedMemory* segment,
     163                 :             Shmem::id_t* aId);
     164                 :     virtual Shmem::SharedMemory*
     165                 :     LookupSharedMemory(Shmem::id_t aId);
     166                 :     virtual bool
     167                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     168                 :     virtual bool
     169                 :     DestroySharedMemory(Shmem& aShmem);
     170                 :     virtual ProcessHandle
     171                 :     OtherProcess() const;
     172                 :     virtual AsyncChannel*
     173                 :     GetIPCChannel();
     174                 : 
     175                 :     virtual Result
     176                 :     OnMessageReceived(const Message& __msg);
     177                 : 
     178                 :     virtual Result
     179                 :     OnMessageReceived(
     180                 :             const Message& __msg,
     181                 :             Message*& __reply);
     182                 : 
     183                 :     virtual Result
     184                 :     OnCallReceived(
     185                 :             const Message& __msg,
     186                 :             Message*& __reply);
     187                 : 
     188                 :     void
     189                 :     OnProcessingError(Result code);
     190                 : 
     191                 :     bool
     192                 :     OnReplyTimeout();
     193                 : 
     194                 :     void
     195                 :     OnChannelClose();
     196                 : 
     197                 :     void
     198                 :     OnChannelError();
     199                 : 
     200                 :     void
     201                 :     OnChannelConnected(int32 pid);
     202                 : 
     203                 :     // Methods for managing shmem
     204                 :     bool
     205                 :     AllocShmem(
     206                 :             size_t aSize,
     207                 :             Shmem::SharedMemory::SharedMemoryType aType,
     208                 :             Shmem* aMem);
     209                 : 
     210                 :     bool
     211                 :     AllocUnsafeShmem(
     212                 :             size_t aSize,
     213                 :             Shmem::SharedMemory::SharedMemoryType aType,
     214                 :             Shmem* aMem);
     215                 : 
     216                 :     bool
     217                 :     AdoptShmem(
     218                 :             Shmem& aMem,
     219                 :             Shmem* aOutMem);
     220                 : 
     221                 :     bool
     222                 :     DeallocShmem(Shmem& aMem);
     223                 : 
     224                 : private:
     225                 :     virtual void
     226                 :     FatalError(const char* const msg) const;
     227                 : 
     228                 :     void
     229                 :     DestroySubtree(ActorDestroyReason why);
     230                 : 
     231                 :     void
     232                 :     DeallocSubtree();
     233                 : 
     234                 :     template<typename T>
     235                 :     void
     236               0 :     Write(
     237                 :             const T& __v,
     238                 :             Message* __msg)
     239                 :     {
     240               0 :         IPC::WriteParam(__msg, __v);
     241               0 :     }
     242                 : 
     243                 :     template<typename T>
     244                 :     bool
     245               0 :     Read(
     246                 :             T* __v,
     247                 :             const Message* __msg,
     248                 :             void** __iter)
     249                 :     {
     250               0 :         return IPC::ReadParam(__msg, __iter, __v);
     251                 :     }
     252                 : 
     253                 :     void
     254                 :     Write(
     255                 :             PTestShellParent* __v,
     256                 :             Message* __msg,
     257                 :             bool __nullable);
     258                 : 
     259                 :     bool
     260                 :     Read(
     261                 :             PTestShellParent** __v,
     262                 :             const Message* __msg,
     263                 :             void** __iter,
     264                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     265                 : 
     266                 :     void
     267                 :     Write(
     268                 :             PContextWrapperParent* __v,
     269                 :             Message* __msg,
     270                 :             bool __nullable);
     271                 : 
     272                 :     bool
     273                 :     Read(
     274                 :             PContextWrapperParent** __v,
     275                 :             const Message* __msg,
     276                 :             void** __iter,
     277                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     278                 : 
     279                 :     void
     280                 :     Write(
     281                 :             PTestShellCommandParent* __v,
     282                 :             Message* __msg,
     283                 :             bool __nullable);
     284                 : 
     285                 :     bool
     286                 :     Read(
     287                 :             PTestShellCommandParent** __v,
     288                 :             const Message* __msg,
     289                 :             void** __iter,
     290                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     291                 : 
     292                 :     Channel* mChannel;
     293                 :     int32 mId;
     294                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     295                 :     State mState;
     296                 :     // Sorted by pointer value
     297                 :     InfallibleTArray<PTestShellCommandParent*> mManagedPTestShellCommandParent;
     298                 :     // Sorted by pointer value
     299                 :     InfallibleTArray<PContextWrapperParent*> mManagedPContextWrapperParent;
     300                 : };
     301                 : 
     302                 : 
     303                 : } // namespace ipc
     304                 : } // namespace mozilla
     305                 : 
     306                 : #if 0
     307                 : 
     308                 : //-----------------------------------------------------------------------------
     309                 : // Skeleton implementation of abstract actor class
     310                 : 
     311                 : // Header file contents
     312                 : namespace mozilla {
     313                 : namespace ipc {
     314                 : class TestShellParent :
     315                 :     public PTestShellParent
     316                 : {
     317                 :     virtual PTestShellCommandParent*
     318                 :     AllocPTestShellCommand(const nsString& aCommand);
     319                 : 
     320                 :     virtual bool
     321                 :     DeallocPTestShellCommand(PTestShellCommandParent* actor);
     322                 : 
     323                 :     virtual PContextWrapperParent*
     324                 :     AllocPContextWrapper();
     325                 : 
     326                 :     virtual bool
     327                 :     DeallocPContextWrapper(PContextWrapperParent* actor);
     328                 : 
     329                 :     TestShellParent();
     330                 :     virtual ~TestShellParent();
     331                 : };
     332                 : } // namespace ipc
     333                 : } // namespace mozilla
     334                 : 
     335                 : 
     336                 : // C++ file contents
     337                 : namespace mozilla {
     338                 : namespace ipc {
     339                 : PTestShellCommandParent*
     340                 : TestShellParent::AllocPTestShellCommand(const nsString& aCommand)
     341                 : {
     342                 :     return 0;
     343                 : }
     344                 : 
     345                 : bool
     346                 : TestShellParent::DeallocPTestShellCommand(PTestShellCommandParent* actor)
     347                 : {
     348                 :     return false;
     349                 : }
     350                 : 
     351                 : PContextWrapperParent*
     352                 : TestShellParent::AllocPContextWrapper()
     353                 : {
     354                 :     return 0;
     355                 : }
     356                 : 
     357                 : bool
     358                 : TestShellParent::DeallocPContextWrapper(PContextWrapperParent* actor)
     359                 : {
     360                 :     return false;
     361                 : }
     362                 : 
     363                 : TestShellParent::TestShellParent()
     364                 : {
     365                 :     MOZ_COUNT_CTOR(TestShellParent);
     366                 : }
     367                 : 
     368                 : TestShellParent::~TestShellParent()
     369                 : {
     370                 :     MOZ_COUNT_DTOR(TestShellParent);
     371                 : }
     372                 : 
     373                 : } // namespace ipc
     374                 : } // namespace mozilla
     375                 : #endif // if 0
     376                 : 
     377                 : #endif // ifndef PTestShellParent_h

Generated by: LCOV version 1.7