LCOV - code coverage report
Current view: directory - objdir/ipc/ipdl/_ipdlheaders/mozilla/plugins - PBrowserStreamParent.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 PBrowserStreamParent_h
       7                 : #define PBrowserStreamParent_h
       8                 : 
       9                 : #include "mozilla/plugins/PBrowserStream.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*/ PBrowserStreamParent :
      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::IPCByteRanges IPCByteRanges;
      44                 :     typedef mozilla::plugins::PPluginInstanceParent PPluginInstanceParent;
      45                 :     typedef base::ProcessId ProcessId;
      46                 :     typedef mozilla::ipc::ProtocolId ProtocolId;
      47                 :     typedef mozilla::ipc::Transport Transport;
      48                 :     typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
      49                 : 
      50                 :     typedef PBrowserStream::State State;
      51                 : 
      52                 :     virtual bool
      53                 :     AnswerNPN_RequestRead(
      54                 :             const IPCByteRanges& ranges,
      55                 :             NPError* result) = 0;
      56                 :     virtual bool
      57                 :     RecvNPN_DestroyStream(const NPReason& reason) = 0;
      58                 :     virtual bool
      59                 :     RecvStreamDestroyed() = 0;
      60                 : 
      61                 :     virtual void
      62                 :     ActorDestroy(ActorDestroyReason why);
      63                 : 
      64                 : public:
      65                 :     typedef IPC::Message Message;
      66                 :     typedef mozilla::ipc::RPCChannel Channel;
      67                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      68                 :     typedef base::ProcessHandle ProcessHandle;
      69                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
      70                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
      71                 :     typedef mozilla::ipc::Trigger Trigger;
      72                 : 
      73                 : public:
      74                 :     PBrowserStreamParent();
      75                 : 
      76                 :     virtual ~PBrowserStreamParent();
      77                 : 
      78                 :     PPluginInstanceParent*
      79                 :     Manager();
      80                 : 
      81                 :     PBrowserStream::State
      82                 :     state();
      83                 : 
      84                 :     bool
      85                 :     SendWrite(
      86                 :             const int32_t& offset,
      87                 :             const Buffer& data,
      88                 :             const uint32_t& newlength) NS_WARN_UNUSED_RESULT;
      89                 : 
      90                 :     bool
      91                 :     SendNPP_StreamAsFile(const nsCString& fname) NS_WARN_UNUSED_RESULT;
      92                 : 
      93                 :     bool
      94                 :     SendNPP_DestroyStream(const NPReason& reason) NS_WARN_UNUSED_RESULT;
      95                 : 
      96                 :     static bool
      97                 :     Send__delete__(PBrowserStreamParent* actor) NS_WARN_UNUSED_RESULT;
      98                 : 
      99                 :     virtual int32
     100                 :     Register(ChannelListener* aRouted);
     101                 :     virtual int32
     102                 :     RegisterID(
     103                 :             ChannelListener* aRouted,
     104                 :             int32 aId);
     105                 :     virtual ChannelListener*
     106                 :     Lookup(int32 aId);
     107                 :     virtual void
     108                 :     Unregister(int32 aId);
     109                 :     virtual void
     110                 :     RemoveManagee(
     111                 :             int32 aProtocolId,
     112                 :             ChannelListener* aListener);
     113                 :     virtual Shmem::SharedMemory*
     114                 :     CreateSharedMemory(
     115                 :             size_t aSize,
     116                 :             Shmem::SharedMemory::SharedMemoryType type,
     117                 :             bool unsafe,
     118                 :             Shmem::id_t* aId);
     119                 :     virtual bool
     120                 :     AdoptSharedMemory(
     121                 :             Shmem::SharedMemory* segment,
     122                 :             Shmem::id_t* aId);
     123                 :     virtual Shmem::SharedMemory*
     124                 :     LookupSharedMemory(Shmem::id_t aId);
     125                 :     virtual bool
     126                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     127                 :     virtual bool
     128                 :     DestroySharedMemory(Shmem& aShmem);
     129                 :     virtual ProcessHandle
     130                 :     OtherProcess() const;
     131                 :     virtual AsyncChannel*
     132                 :     GetIPCChannel();
     133                 : 
     134                 :     virtual Result
     135                 :     OnMessageReceived(const Message& __msg);
     136                 : 
     137                 :     virtual Result
     138                 :     OnMessageReceived(
     139                 :             const Message& __msg,
     140                 :             Message*& __reply);
     141                 : 
     142                 :     virtual Result
     143                 :     OnCallReceived(
     144                 :             const Message& __msg,
     145                 :             Message*& __reply);
     146                 : 
     147                 :     void
     148                 :     OnProcessingError(Result code);
     149                 : 
     150                 :     bool
     151                 :     OnReplyTimeout();
     152                 : 
     153                 :     void
     154                 :     OnChannelClose();
     155                 : 
     156                 :     void
     157                 :     OnChannelError();
     158                 : 
     159                 :     void
     160                 :     OnChannelConnected(int32 pid);
     161                 : 
     162                 :     // Methods for managing shmem
     163                 :     bool
     164                 :     AllocShmem(
     165                 :             size_t aSize,
     166                 :             Shmem::SharedMemory::SharedMemoryType aType,
     167                 :             Shmem* aMem);
     168                 : 
     169                 :     bool
     170                 :     AllocUnsafeShmem(
     171                 :             size_t aSize,
     172                 :             Shmem::SharedMemory::SharedMemoryType aType,
     173                 :             Shmem* aMem);
     174                 : 
     175                 :     bool
     176                 :     AdoptShmem(
     177                 :             Shmem& aMem,
     178                 :             Shmem* aOutMem);
     179                 : 
     180                 :     bool
     181                 :     DeallocShmem(Shmem& aMem);
     182                 : 
     183                 : private:
     184                 :     virtual void
     185                 :     FatalError(const char* const msg) const;
     186                 : 
     187                 :     void
     188                 :     DestroySubtree(ActorDestroyReason why);
     189                 : 
     190                 :     void
     191                 :     DeallocSubtree();
     192                 : 
     193                 :     template<typename T>
     194                 :     void
     195               0 :     Write(
     196                 :             const T& __v,
     197                 :             Message* __msg)
     198                 :     {
     199               0 :         IPC::WriteParam(__msg, __v);
     200               0 :     }
     201                 : 
     202                 :     template<typename T>
     203                 :     bool
     204               0 :     Read(
     205                 :             T* __v,
     206                 :             const Message* __msg,
     207                 :             void** __iter)
     208                 :     {
     209               0 :         return IPC::ReadParam(__msg, __iter, __v);
     210                 :     }
     211                 : 
     212                 :     void
     213                 :     Write(
     214                 :             PBrowserStreamParent* __v,
     215                 :             Message* __msg,
     216                 :             bool __nullable);
     217                 : 
     218                 :     bool
     219                 :     Read(
     220                 :             PBrowserStreamParent** __v,
     221                 :             const Message* __msg,
     222                 :             void** __iter,
     223                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     224                 : 
     225                 :     Channel* mChannel;
     226                 :     int32 mId;
     227                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     228                 :     State mState;
     229                 : };
     230                 : 
     231                 : 
     232                 : } // namespace plugins
     233                 : } // namespace mozilla
     234                 : 
     235                 : #if 0
     236                 : 
     237                 : //-----------------------------------------------------------------------------
     238                 : // Skeleton implementation of abstract actor class
     239                 : 
     240                 : // Header file contents
     241                 : namespace mozilla {
     242                 : namespace plugins {
     243                 : class BrowserStreamParent :
     244                 :     public PBrowserStreamParent
     245                 : {
     246                 :     virtual bool
     247                 :     AnswerNPN_RequestRead(
     248                 :             const IPCByteRanges& ranges,
     249                 :             NPError* result);
     250                 : 
     251                 :     virtual bool
     252                 :     RecvNPN_DestroyStream(const NPReason& reason);
     253                 : 
     254                 :     virtual bool
     255                 :     RecvStreamDestroyed();
     256                 : 
     257                 :     BrowserStreamParent();
     258                 :     virtual ~BrowserStreamParent();
     259                 : };
     260                 : } // namespace plugins
     261                 : } // namespace mozilla
     262                 : 
     263                 : 
     264                 : // C++ file contents
     265                 : namespace mozilla {
     266                 : namespace plugins {
     267                 : bool
     268                 : BrowserStreamParent::AnswerNPN_RequestRead(
     269                 :         const IPCByteRanges& ranges,
     270                 :         NPError* result)
     271                 : {
     272                 :     return false;
     273                 : }
     274                 : 
     275                 : bool
     276                 : BrowserStreamParent::RecvNPN_DestroyStream(const NPReason& reason)
     277                 : {
     278                 :     return false;
     279                 : }
     280                 : 
     281                 : bool
     282                 : BrowserStreamParent::RecvStreamDestroyed()
     283                 : {
     284                 :     return false;
     285                 : }
     286                 : 
     287                 : BrowserStreamParent::BrowserStreamParent()
     288                 : {
     289                 :     MOZ_COUNT_CTOR(BrowserStreamParent);
     290                 : }
     291                 : 
     292                 : BrowserStreamParent::~BrowserStreamParent()
     293                 : {
     294                 :     MOZ_COUNT_DTOR(BrowserStreamParent);
     295                 : }
     296                 : 
     297                 : } // namespace plugins
     298                 : } // namespace mozilla
     299                 : #endif // if 0
     300                 : 
     301                 : #endif // ifndef PBrowserStreamParent_h

Generated by: LCOV version 1.7