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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : #ifndef PWyciwygChannelChild_h
       7                 : #define PWyciwygChannelChild_h
       8                 : 
       9                 : #include "mozilla/net/PWyciwygChannel.h"
      10                 : namespace mozilla {
      11                 : namespace net {
      12                 : class PNeckoChild;
      13                 : } // namespace net
      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 net {
      25                 : class PNeckoChild;
      26                 : } // namespace net
      27                 : } // namespace mozilla
      28                 : 
      29                 : namespace mozilla {
      30                 : namespace net {
      31                 : 
      32                 : 
      33                 : class /*NS_ABSTRACT_CLASS*/ PWyciwygChannelChild :
      34                 :     protected mozilla::ipc::RPCChannel::RPCListener,
      35                 :     protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
      36                 : {
      37                 :     friend class mozilla::net::PNeckoChild;
      38                 : 
      39                 : protected:
      40                 :     typedef mozilla::ipc::ActorHandle ActorHandle;
      41                 :     typedef mozilla::ipc::Shmem Shmem;
      42                 :     typedef IPC::URI URI;
      43                 :     typedef mozilla::net::PNeckoChild PNeckoChild;
      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 PWyciwygChannel::State State;
      50                 : 
      51                 :     virtual bool
      52                 :     RecvOnStartRequest(
      53                 :             const nsresult& statusCode,
      54                 :             const PRInt32& contentLength,
      55                 :             const PRInt32& source,
      56                 :             const nsCString& charset,
      57                 :             const nsCString& securityInfo) = 0;
      58                 :     virtual bool
      59                 :     RecvOnDataAvailable(
      60                 :             const nsCString& data,
      61                 :             const PRUint32& offset) = 0;
      62                 :     virtual bool
      63                 :     RecvOnStopRequest(const nsresult& statusCode) = 0;
      64                 :     virtual bool
      65                 :     RecvCancelEarly(const nsresult& statusCode) = 0;
      66                 : 
      67                 :     virtual void
      68                 :     ActorDestroy(ActorDestroyReason why);
      69                 : 
      70                 : public:
      71                 :     typedef IPC::Message Message;
      72                 :     typedef mozilla::ipc::RPCChannel Channel;
      73                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      74                 :     typedef base::ProcessHandle ProcessHandle;
      75                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
      76                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
      77                 :     typedef mozilla::ipc::Trigger Trigger;
      78                 : 
      79                 : public:
      80                 :     PWyciwygChannelChild();
      81                 : 
      82                 :     virtual ~PWyciwygChannelChild();
      83                 : 
      84                 :     PNeckoChild*
      85                 :     Manager();
      86                 : 
      87                 :     PWyciwygChannel::State
      88                 :     state();
      89                 : 
      90                 :     static bool
      91                 :     Send__delete__(PWyciwygChannelChild* actor);
      92                 : 
      93                 :     bool
      94                 :     SendInit(const URI& uri);
      95                 : 
      96                 :     bool
      97                 :     SendAsyncOpen(
      98                 :             const URI& originalURI,
      99                 :             const PRUint32& loadFlags);
     100                 : 
     101                 :     bool
     102                 :     SendWriteToCacheEntry(const nsString& data);
     103                 : 
     104                 :     bool
     105                 :     SendCloseCacheEntry(const nsresult& reason);
     106                 : 
     107                 :     bool
     108                 :     SendSetCharsetAndSource(
     109                 :             const PRInt32& source,
     110                 :             const nsCString& charset);
     111                 : 
     112                 :     bool
     113                 :     SendSetSecurityInfo(const nsCString& securityInfo);
     114                 : 
     115                 :     bool
     116                 :     SendCancel(const nsresult& status);
     117                 : 
     118                 :     virtual int32
     119                 :     Register(ChannelListener* aRouted);
     120                 :     virtual int32
     121                 :     RegisterID(
     122                 :             ChannelListener* aRouted,
     123                 :             int32 aId);
     124                 :     virtual ChannelListener*
     125                 :     Lookup(int32 aId);
     126                 :     virtual void
     127                 :     Unregister(int32 aId);
     128                 :     virtual void
     129                 :     RemoveManagee(
     130                 :             int32 aProtocolId,
     131                 :             ChannelListener* aListener);
     132                 :     virtual Shmem::SharedMemory*
     133                 :     CreateSharedMemory(
     134                 :             size_t aSize,
     135                 :             Shmem::SharedMemory::SharedMemoryType type,
     136                 :             bool unsafe,
     137                 :             Shmem::id_t* aId);
     138                 :     virtual bool
     139                 :     AdoptSharedMemory(
     140                 :             Shmem::SharedMemory* segment,
     141                 :             Shmem::id_t* aId);
     142                 :     virtual Shmem::SharedMemory*
     143                 :     LookupSharedMemory(Shmem::id_t aId);
     144                 :     virtual bool
     145                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     146                 :     virtual bool
     147                 :     DestroySharedMemory(Shmem& aShmem);
     148                 :     virtual ProcessHandle
     149                 :     OtherProcess() const;
     150                 :     virtual AsyncChannel*
     151                 :     GetIPCChannel();
     152                 : 
     153                 :     virtual Result
     154                 :     OnMessageReceived(const Message& __msg);
     155                 : 
     156                 :     virtual Result
     157                 :     OnMessageReceived(
     158                 :             const Message& __msg,
     159                 :             Message*& __reply);
     160                 : 
     161                 :     virtual Result
     162                 :     OnCallReceived(
     163                 :             const Message& __msg,
     164                 :             Message*& __reply);
     165                 : 
     166                 :     void
     167                 :     OnProcessingError(Result code);
     168                 : 
     169                 :     bool
     170                 :     OnReplyTimeout();
     171                 : 
     172                 :     void
     173                 :     OnChannelClose();
     174                 : 
     175                 :     void
     176                 :     OnChannelError();
     177                 : 
     178                 :     void
     179                 :     OnChannelConnected(int32 pid);
     180                 : 
     181                 :     // Methods for managing shmem
     182                 :     bool
     183                 :     AllocShmem(
     184                 :             size_t aSize,
     185                 :             Shmem::SharedMemory::SharedMemoryType aType,
     186                 :             Shmem* aMem);
     187                 : 
     188                 :     bool
     189                 :     AllocUnsafeShmem(
     190                 :             size_t aSize,
     191                 :             Shmem::SharedMemory::SharedMemoryType aType,
     192                 :             Shmem* aMem);
     193                 : 
     194                 :     bool
     195                 :     AdoptShmem(
     196                 :             Shmem& aMem,
     197                 :             Shmem* aOutMem);
     198                 : 
     199                 :     bool
     200                 :     DeallocShmem(Shmem& aMem);
     201                 : 
     202                 : private:
     203                 :     virtual void
     204                 :     FatalError(const char* const msg) const;
     205                 : 
     206                 :     void
     207                 :     DestroySubtree(ActorDestroyReason why);
     208                 : 
     209                 :     void
     210                 :     DeallocSubtree();
     211                 : 
     212                 :     template<typename T>
     213                 :     void
     214               0 :     Write(
     215                 :             const T& __v,
     216                 :             Message* __msg)
     217                 :     {
     218               0 :         IPC::WriteParam(__msg, __v);
     219               0 :     }
     220                 : 
     221                 :     template<typename T>
     222                 :     bool
     223               0 :     Read(
     224                 :             T* __v,
     225                 :             const Message* __msg,
     226                 :             void** __iter)
     227                 :     {
     228               0 :         return IPC::ReadParam(__msg, __iter, __v);
     229                 :     }
     230                 : 
     231                 :     void
     232                 :     Write(
     233                 :             PWyciwygChannelChild* __v,
     234                 :             Message* __msg,
     235                 :             bool __nullable);
     236                 : 
     237                 :     bool
     238                 :     Read(
     239                 :             PWyciwygChannelChild** __v,
     240                 :             const Message* __msg,
     241                 :             void** __iter,
     242                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     243                 : 
     244                 :     Channel* mChannel;
     245                 :     int32 mId;
     246                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     247                 :     State mState;
     248                 : };
     249                 : 
     250                 : 
     251                 : } // namespace net
     252                 : } // namespace mozilla
     253                 : 
     254                 : #if 0
     255                 : 
     256                 : //-----------------------------------------------------------------------------
     257                 : // Skeleton implementation of abstract actor class
     258                 : 
     259                 : // Header file contents
     260                 : namespace mozilla {
     261                 : namespace net {
     262                 : class WyciwygChannelChild :
     263                 :     public PWyciwygChannelChild
     264                 : {
     265                 :     virtual bool
     266                 :     RecvOnStartRequest(
     267                 :             const nsresult& statusCode,
     268                 :             const PRInt32& contentLength,
     269                 :             const PRInt32& source,
     270                 :             const nsCString& charset,
     271                 :             const nsCString& securityInfo);
     272                 : 
     273                 :     virtual bool
     274                 :     RecvOnDataAvailable(
     275                 :             const nsCString& data,
     276                 :             const PRUint32& offset);
     277                 : 
     278                 :     virtual bool
     279                 :     RecvOnStopRequest(const nsresult& statusCode);
     280                 : 
     281                 :     virtual bool
     282                 :     RecvCancelEarly(const nsresult& statusCode);
     283                 : 
     284                 :     WyciwygChannelChild();
     285                 :     virtual ~WyciwygChannelChild();
     286                 : };
     287                 : } // namespace net
     288                 : } // namespace mozilla
     289                 : 
     290                 : 
     291                 : // C++ file contents
     292                 : namespace mozilla {
     293                 : namespace net {
     294                 : bool
     295                 : WyciwygChannelChild::RecvOnStartRequest(
     296                 :         const nsresult& statusCode,
     297                 :         const PRInt32& contentLength,
     298                 :         const PRInt32& source,
     299                 :         const nsCString& charset,
     300                 :         const nsCString& securityInfo)
     301                 : {
     302                 :     return false;
     303                 : }
     304                 : 
     305                 : bool
     306                 : WyciwygChannelChild::RecvOnDataAvailable(
     307                 :         const nsCString& data,
     308                 :         const PRUint32& offset)
     309                 : {
     310                 :     return false;
     311                 : }
     312                 : 
     313                 : bool
     314                 : WyciwygChannelChild::RecvOnStopRequest(const nsresult& statusCode)
     315                 : {
     316                 :     return false;
     317                 : }
     318                 : 
     319                 : bool
     320                 : WyciwygChannelChild::RecvCancelEarly(const nsresult& statusCode)
     321                 : {
     322                 :     return false;
     323                 : }
     324                 : 
     325                 : WyciwygChannelChild::WyciwygChannelChild()
     326                 : {
     327                 :     MOZ_COUNT_CTOR(WyciwygChannelChild);
     328                 : }
     329                 : 
     330                 : WyciwygChannelChild::~WyciwygChannelChild()
     331                 : {
     332                 :     MOZ_COUNT_DTOR(WyciwygChannelChild);
     333                 : }
     334                 : 
     335                 : } // namespace net
     336                 : } // namespace mozilla
     337                 : #endif // if 0
     338                 : 
     339                 : #endif // ifndef PWyciwygChannelChild_h

Generated by: LCOV version 1.7