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

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

Generated by: LCOV version 1.7