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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : #ifndef PPluginStreamParent_h
       7                 : #define PPluginStreamParent_h
       8                 : 
       9                 : #include "mozilla/plugins/PPluginStream.h"
      10                 : namespace mozilla {
      11                 : namespace plugins {
      12                 : class PPluginInstanceParent;
      13                 : } // namespace plugins
      14                 : } // namespace mozilla
      15                 : 
      16                 : #ifdef DEBUG
      17                 : #include "prenv.h"
      18                 : #endif // DEBUG
      19                 : #include "base/id_map.h"
      20                 : #include "mozilla/ipc/RPCChannel.h"
      21                 : 
      22                 : 
      23                 : namespace mozilla {
      24                 : namespace plugins {
      25                 : class PPluginInstanceParent;
      26                 : } // namespace plugins
      27                 : } // namespace mozilla
      28                 : 
      29                 : namespace mozilla {
      30                 : namespace plugins {
      31                 : 
      32                 : 
      33                 : class /*NS_ABSTRACT_CLASS*/ PPluginStreamParent :
      34                 :     protected mozilla::ipc::RPCChannel::RPCListener,
      35                 :     protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
      36                 : {
      37                 :     friend class mozilla::plugins::PPluginInstanceParent;
      38                 : 
      39                 : protected:
      40                 :     typedef mozilla::ipc::ActorHandle ActorHandle;
      41                 :     typedef mozilla::ipc::Shmem Shmem;
      42                 :     typedef mozilla::plugins::Buffer Buffer;
      43                 :     typedef mozilla::plugins::PPluginInstanceParent PPluginInstanceParent;
      44                 :     typedef base::ProcessId ProcessId;
      45                 :     typedef mozilla::ipc::ProtocolId ProtocolId;
      46                 :     typedef mozilla::ipc::Transport Transport;
      47                 :     typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
      48                 : 
      49                 :     typedef PPluginStream::State State;
      50                 : 
      51                 :     virtual bool
      52                 :     AnswerNPN_Write(
      53                 :             const Buffer& data,
      54                 :             int32_t* written) = 0;
      55                 :     virtual bool
      56                 :     Answer__delete__(
      57                 :             const NPReason& reason,
      58                 :             const bool& artificial);
      59                 : 
      60                 :     virtual void
      61                 :     ActorDestroy(ActorDestroyReason why);
      62                 : 
      63                 : public:
      64                 :     typedef IPC::Message Message;
      65                 :     typedef mozilla::ipc::RPCChannel Channel;
      66                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      67                 :     typedef base::ProcessHandle ProcessHandle;
      68                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
      69                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
      70                 :     typedef mozilla::ipc::Trigger Trigger;
      71                 : 
      72                 : public:
      73                 :     PPluginStreamParent();
      74                 : 
      75                 :     virtual ~PPluginStreamParent();
      76                 : 
      77                 :     PPluginInstanceParent*
      78                 :     Manager();
      79                 : 
      80                 :     PPluginStream::State
      81                 :     state();
      82                 : 
      83                 :     static bool
      84                 :     Call__delete__(
      85                 :             PPluginStreamParent* actor,
      86                 :             const NPReason& reason,
      87                 :             const bool& artificial) NS_WARN_UNUSED_RESULT;
      88                 : 
      89                 :     virtual int32
      90                 :     Register(ChannelListener* aRouted);
      91                 :     virtual int32
      92                 :     RegisterID(
      93                 :             ChannelListener* aRouted,
      94                 :             int32 aId);
      95                 :     virtual ChannelListener*
      96                 :     Lookup(int32 aId);
      97                 :     virtual void
      98                 :     Unregister(int32 aId);
      99                 :     virtual void
     100                 :     RemoveManagee(
     101                 :             int32 aProtocolId,
     102                 :             ChannelListener* aListener);
     103                 :     virtual Shmem::SharedMemory*
     104                 :     CreateSharedMemory(
     105                 :             size_t aSize,
     106                 :             Shmem::SharedMemory::SharedMemoryType type,
     107                 :             bool unsafe,
     108                 :             Shmem::id_t* aId);
     109                 :     virtual bool
     110                 :     AdoptSharedMemory(
     111                 :             Shmem::SharedMemory* segment,
     112                 :             Shmem::id_t* aId);
     113                 :     virtual Shmem::SharedMemory*
     114                 :     LookupSharedMemory(Shmem::id_t aId);
     115                 :     virtual bool
     116                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     117                 :     virtual bool
     118                 :     DestroySharedMemory(Shmem& aShmem);
     119                 :     virtual ProcessHandle
     120                 :     OtherProcess() const;
     121                 :     virtual AsyncChannel*
     122                 :     GetIPCChannel();
     123                 : 
     124                 :     virtual Result
     125                 :     OnMessageReceived(const Message& __msg);
     126                 : 
     127                 :     virtual Result
     128                 :     OnMessageReceived(
     129                 :             const Message& __msg,
     130                 :             Message*& __reply);
     131                 : 
     132                 :     virtual Result
     133                 :     OnCallReceived(
     134                 :             const Message& __msg,
     135                 :             Message*& __reply);
     136                 : 
     137                 :     void
     138                 :     OnProcessingError(Result code);
     139                 : 
     140                 :     bool
     141                 :     OnReplyTimeout();
     142                 : 
     143                 :     void
     144                 :     OnChannelClose();
     145                 : 
     146                 :     void
     147                 :     OnChannelError();
     148                 : 
     149                 :     void
     150                 :     OnChannelConnected(int32 pid);
     151                 : 
     152                 :     // Methods for managing shmem
     153                 :     bool
     154                 :     AllocShmem(
     155                 :             size_t aSize,
     156                 :             Shmem::SharedMemory::SharedMemoryType aType,
     157                 :             Shmem* aMem);
     158                 : 
     159                 :     bool
     160                 :     AllocUnsafeShmem(
     161                 :             size_t aSize,
     162                 :             Shmem::SharedMemory::SharedMemoryType aType,
     163                 :             Shmem* aMem);
     164                 : 
     165                 :     bool
     166                 :     AdoptShmem(
     167                 :             Shmem& aMem,
     168                 :             Shmem* aOutMem);
     169                 : 
     170                 :     bool
     171                 :     DeallocShmem(Shmem& aMem);
     172                 : 
     173                 : private:
     174                 :     virtual void
     175                 :     FatalError(const char* const msg) const;
     176                 : 
     177                 :     void
     178                 :     DestroySubtree(ActorDestroyReason why);
     179                 : 
     180                 :     void
     181                 :     DeallocSubtree();
     182                 : 
     183                 :     template<typename T>
     184                 :     void
     185               0 :     Write(
     186                 :             const T& __v,
     187                 :             Message* __msg)
     188                 :     {
     189               0 :         IPC::WriteParam(__msg, __v);
     190               0 :     }
     191                 : 
     192                 :     template<typename T>
     193                 :     bool
     194               0 :     Read(
     195                 :             T* __v,
     196                 :             const Message* __msg,
     197                 :             void** __iter)
     198                 :     {
     199               0 :         return IPC::ReadParam(__msg, __iter, __v);
     200                 :     }
     201                 : 
     202                 :     void
     203                 :     Write(
     204                 :             PPluginStreamParent* __v,
     205                 :             Message* __msg,
     206                 :             bool __nullable);
     207                 : 
     208                 :     bool
     209                 :     Read(
     210                 :             PPluginStreamParent** __v,
     211                 :             const Message* __msg,
     212                 :             void** __iter,
     213                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     214                 : 
     215                 :     Channel* mChannel;
     216                 :     int32 mId;
     217                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     218                 :     State mState;
     219                 : };
     220                 : 
     221                 : 
     222                 : } // namespace plugins
     223                 : } // namespace mozilla
     224                 : 
     225                 : #if 0
     226                 : 
     227                 : //-----------------------------------------------------------------------------
     228                 : // Skeleton implementation of abstract actor class
     229                 : 
     230                 : // Header file contents
     231                 : namespace mozilla {
     232                 : namespace plugins {
     233                 : class PluginStreamParent :
     234                 :     public PPluginStreamParent
     235                 : {
     236                 :     virtual bool
     237                 :     AnswerNPN_Write(
     238                 :             const Buffer& data,
     239                 :             int32_t* written);
     240                 : 
     241                 :     PluginStreamParent();
     242                 :     virtual ~PluginStreamParent();
     243                 : };
     244                 : } // namespace plugins
     245                 : } // namespace mozilla
     246                 : 
     247                 : 
     248                 : // C++ file contents
     249                 : namespace mozilla {
     250                 : namespace plugins {
     251                 : bool
     252                 : PluginStreamParent::AnswerNPN_Write(
     253                 :         const Buffer& data,
     254                 :         int32_t* written)
     255                 : {
     256                 :     return false;
     257                 : }
     258                 : 
     259                 : PluginStreamParent::PluginStreamParent()
     260                 : {
     261                 :     MOZ_COUNT_CTOR(PluginStreamParent);
     262                 : }
     263                 : 
     264                 : PluginStreamParent::~PluginStreamParent()
     265                 : {
     266                 :     MOZ_COUNT_DTOR(PluginStreamParent);
     267                 : }
     268                 : 
     269                 : } // namespace plugins
     270                 : } // namespace mozilla
     271                 : #endif // if 0
     272                 : 
     273                 : #endif // ifndef PPluginStreamParent_h

Generated by: LCOV version 1.7