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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : #ifndef PHttpChannelChild_h
       7                 : #define PHttpChannelChild_h
       8                 : 
       9                 : #include "mozilla/net/PHttpChannel.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*/ PHttpChannelChild :
      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 IPC::InputStream InputStream;
      44                 :     typedef mozilla::net::PNeckoChild PNeckoChild;
      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 PHttpChannel::State State;
      51                 : 
      52                 :     virtual bool
      53                 :     RecvOnStartRequest(
      54                 :             const nsHttpResponseHead& responseHead,
      55                 :             const bool& useResponseHead,
      56                 :             const nsHttpHeaderArray& requestHeaders,
      57                 :             const bool& isFromCache,
      58                 :             const bool& cacheEntryAvailable,
      59                 :             const PRUint32& cacheExpirationTime,
      60                 :             const nsCString& cachedCharset,
      61                 :             const nsCString& securityInfoSerialization,
      62                 :             const PRNetAddr& selfAddr,
      63                 :             const PRNetAddr& peerAddr) = 0;
      64                 :     virtual bool
      65                 :     RecvOnTransportAndData(
      66                 :             const nsresult& status,
      67                 :             const PRUint64& progress,
      68                 :             const PRUint64& progressMax,
      69                 :             const nsCString& data,
      70                 :             const PRUint32& offset,
      71                 :             const PRUint32& count) = 0;
      72                 :     virtual bool
      73                 :     RecvOnStopRequest(const nsresult& statusCode) = 0;
      74                 :     virtual bool
      75                 :     RecvOnProgress(
      76                 :             const PRUint64& progress,
      77                 :             const PRUint64& progressMax) = 0;
      78                 :     virtual bool
      79                 :     RecvOnStatus(const nsresult& status) = 0;
      80                 :     virtual bool
      81                 :     RecvFailedAsyncOpen(const nsresult& status) = 0;
      82                 :     virtual bool
      83                 :     RecvRedirect1Begin(
      84                 :             const PRUint32& newChannelId,
      85                 :             const URI& newUri,
      86                 :             const PRUint32& redirectFlags,
      87                 :             const nsHttpResponseHead& responseHead) = 0;
      88                 :     virtual bool
      89                 :     RecvRedirect3Complete() = 0;
      90                 :     virtual bool
      91                 :     RecvAssociateApplicationCache(
      92                 :             const nsCString& groupID,
      93                 :             const nsCString& clientID) = 0;
      94                 :     virtual bool
      95                 :     RecvDeleteSelf() = 0;
      96                 : 
      97                 :     virtual void
      98                 :     ActorDestroy(ActorDestroyReason why);
      99                 : 
     100                 : public:
     101                 :     typedef IPC::Message Message;
     102                 :     typedef mozilla::ipc::RPCChannel Channel;
     103                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
     104                 :     typedef base::ProcessHandle ProcessHandle;
     105                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
     106                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
     107                 :     typedef mozilla::ipc::Trigger Trigger;
     108                 : 
     109                 : public:
     110                 :     PHttpChannelChild();
     111                 : 
     112                 :     virtual ~PHttpChannelChild();
     113                 : 
     114                 :     PNeckoChild*
     115                 :     Manager();
     116                 : 
     117                 :     PHttpChannel::State
     118                 :     state();
     119                 : 
     120                 :     bool
     121                 :     SendAsyncOpen(
     122                 :             const URI& uri,
     123                 :             const URI& original,
     124                 :             const URI& doc,
     125                 :             const URI& referrer,
     126                 :             const PRUint32& loadFlags,
     127                 :             const RequestHeaderTuples& requestHeaders,
     128                 :             const nsHttpAtom& requestMethod,
     129                 :             const InputStream& uploadStream,
     130                 :             const bool& uploadStreamHasHeaders,
     131                 :             const PRUint16& priority,
     132                 :             const PRUint8& redirectionLimit,
     133                 :             const bool& allowPipelining,
     134                 :             const bool& forceAllowThirdPartyCookie,
     135                 :             const bool& resumeAt,
     136                 :             const PRUint64& startPos,
     137                 :             const nsCString& entityID,
     138                 :             const bool& chooseApplicationCache,
     139                 :             const nsCString& appCacheClientID,
     140                 :             const bool& allowSpdy);
     141                 : 
     142                 :     bool
     143                 :     SendConnectChannel(const PRUint32& channelId);
     144                 : 
     145                 :     bool
     146                 :     SendSetPriority(const PRUint16& priority);
     147                 : 
     148                 :     bool
     149                 :     SendSetCacheTokenCachedCharset(const nsCString& charset);
     150                 : 
     151                 :     bool
     152                 :     SendUpdateAssociatedContentSecurity(
     153                 :             const PRInt32& high,
     154                 :             const PRInt32& low,
     155                 :             const PRInt32& broken,
     156                 :             const PRInt32& no);
     157                 : 
     158                 :     bool
     159                 :     SendSuspend();
     160                 : 
     161                 :     bool
     162                 :     SendResume();
     163                 : 
     164                 :     bool
     165                 :     SendCancel(const nsresult& status);
     166                 : 
     167                 :     bool
     168                 :     SendRedirect2Verify(
     169                 :             const nsresult& result,
     170                 :             const RequestHeaderTuples& changedHeaders);
     171                 : 
     172                 :     bool
     173                 :     SendDocumentChannelCleanup();
     174                 : 
     175                 :     bool
     176                 :     SendMarkOfflineCacheEntryAsForeign();
     177                 : 
     178                 :     static bool
     179                 :     Send__delete__(PHttpChannelChild* actor);
     180                 : 
     181                 :     virtual int32
     182                 :     Register(ChannelListener* aRouted);
     183                 :     virtual int32
     184                 :     RegisterID(
     185                 :             ChannelListener* aRouted,
     186                 :             int32 aId);
     187                 :     virtual ChannelListener*
     188                 :     Lookup(int32 aId);
     189                 :     virtual void
     190                 :     Unregister(int32 aId);
     191                 :     virtual void
     192                 :     RemoveManagee(
     193                 :             int32 aProtocolId,
     194                 :             ChannelListener* aListener);
     195                 :     virtual Shmem::SharedMemory*
     196                 :     CreateSharedMemory(
     197                 :             size_t aSize,
     198                 :             Shmem::SharedMemory::SharedMemoryType type,
     199                 :             bool unsafe,
     200                 :             Shmem::id_t* aId);
     201                 :     virtual bool
     202                 :     AdoptSharedMemory(
     203                 :             Shmem::SharedMemory* segment,
     204                 :             Shmem::id_t* aId);
     205                 :     virtual Shmem::SharedMemory*
     206                 :     LookupSharedMemory(Shmem::id_t aId);
     207                 :     virtual bool
     208                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     209                 :     virtual bool
     210                 :     DestroySharedMemory(Shmem& aShmem);
     211                 :     virtual ProcessHandle
     212                 :     OtherProcess() const;
     213                 :     virtual AsyncChannel*
     214                 :     GetIPCChannel();
     215                 : 
     216                 :     virtual Result
     217                 :     OnMessageReceived(const Message& __msg);
     218                 : 
     219                 :     virtual Result
     220                 :     OnMessageReceived(
     221                 :             const Message& __msg,
     222                 :             Message*& __reply);
     223                 : 
     224                 :     virtual Result
     225                 :     OnCallReceived(
     226                 :             const Message& __msg,
     227                 :             Message*& __reply);
     228                 : 
     229                 :     void
     230                 :     OnProcessingError(Result code);
     231                 : 
     232                 :     bool
     233                 :     OnReplyTimeout();
     234                 : 
     235                 :     void
     236                 :     OnChannelClose();
     237                 : 
     238                 :     void
     239                 :     OnChannelError();
     240                 : 
     241                 :     void
     242                 :     OnChannelConnected(int32 pid);
     243                 : 
     244                 :     // Methods for managing shmem
     245                 :     bool
     246                 :     AllocShmem(
     247                 :             size_t aSize,
     248                 :             Shmem::SharedMemory::SharedMemoryType aType,
     249                 :             Shmem* aMem);
     250                 : 
     251                 :     bool
     252                 :     AllocUnsafeShmem(
     253                 :             size_t aSize,
     254                 :             Shmem::SharedMemory::SharedMemoryType aType,
     255                 :             Shmem* aMem);
     256                 : 
     257                 :     bool
     258                 :     AdoptShmem(
     259                 :             Shmem& aMem,
     260                 :             Shmem* aOutMem);
     261                 : 
     262                 :     bool
     263                 :     DeallocShmem(Shmem& aMem);
     264                 : 
     265                 : private:
     266                 :     virtual void
     267                 :     FatalError(const char* const msg) const;
     268                 : 
     269                 :     void
     270                 :     DestroySubtree(ActorDestroyReason why);
     271                 : 
     272                 :     void
     273                 :     DeallocSubtree();
     274                 : 
     275                 :     template<typename T>
     276                 :     void
     277               0 :     Write(
     278                 :             const T& __v,
     279                 :             Message* __msg)
     280                 :     {
     281               0 :         IPC::WriteParam(__msg, __v);
     282               0 :     }
     283                 : 
     284                 :     template<typename T>
     285                 :     bool
     286               0 :     Read(
     287                 :             T* __v,
     288                 :             const Message* __msg,
     289                 :             void** __iter)
     290                 :     {
     291               0 :         return IPC::ReadParam(__msg, __iter, __v);
     292                 :     }
     293                 : 
     294                 :     void
     295                 :     Write(
     296                 :             PHttpChannelChild* __v,
     297                 :             Message* __msg,
     298                 :             bool __nullable);
     299                 : 
     300                 :     bool
     301                 :     Read(
     302                 :             PHttpChannelChild** __v,
     303                 :             const Message* __msg,
     304                 :             void** __iter,
     305                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     306                 : 
     307                 :     Channel* mChannel;
     308                 :     int32 mId;
     309                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     310                 :     State mState;
     311                 : };
     312                 : 
     313                 : 
     314                 : } // namespace net
     315                 : } // namespace mozilla
     316                 : 
     317                 : #if 0
     318                 : 
     319                 : //-----------------------------------------------------------------------------
     320                 : // Skeleton implementation of abstract actor class
     321                 : 
     322                 : // Header file contents
     323                 : namespace mozilla {
     324                 : namespace net {
     325                 : class HttpChannelChild :
     326                 :     public PHttpChannelChild
     327                 : {
     328                 :     virtual bool
     329                 :     RecvOnStartRequest(
     330                 :             const nsHttpResponseHead& responseHead,
     331                 :             const bool& useResponseHead,
     332                 :             const nsHttpHeaderArray& requestHeaders,
     333                 :             const bool& isFromCache,
     334                 :             const bool& cacheEntryAvailable,
     335                 :             const PRUint32& cacheExpirationTime,
     336                 :             const nsCString& cachedCharset,
     337                 :             const nsCString& securityInfoSerialization,
     338                 :             const PRNetAddr& selfAddr,
     339                 :             const PRNetAddr& peerAddr);
     340                 : 
     341                 :     virtual bool
     342                 :     RecvOnTransportAndData(
     343                 :             const nsresult& status,
     344                 :             const PRUint64& progress,
     345                 :             const PRUint64& progressMax,
     346                 :             const nsCString& data,
     347                 :             const PRUint32& offset,
     348                 :             const PRUint32& count);
     349                 : 
     350                 :     virtual bool
     351                 :     RecvOnStopRequest(const nsresult& statusCode);
     352                 : 
     353                 :     virtual bool
     354                 :     RecvOnProgress(
     355                 :             const PRUint64& progress,
     356                 :             const PRUint64& progressMax);
     357                 : 
     358                 :     virtual bool
     359                 :     RecvOnStatus(const nsresult& status);
     360                 : 
     361                 :     virtual bool
     362                 :     RecvFailedAsyncOpen(const nsresult& status);
     363                 : 
     364                 :     virtual bool
     365                 :     RecvRedirect1Begin(
     366                 :             const PRUint32& newChannelId,
     367                 :             const URI& newUri,
     368                 :             const PRUint32& redirectFlags,
     369                 :             const nsHttpResponseHead& responseHead);
     370                 : 
     371                 :     virtual bool
     372                 :     RecvRedirect3Complete();
     373                 : 
     374                 :     virtual bool
     375                 :     RecvAssociateApplicationCache(
     376                 :             const nsCString& groupID,
     377                 :             const nsCString& clientID);
     378                 : 
     379                 :     virtual bool
     380                 :     RecvDeleteSelf();
     381                 : 
     382                 :     HttpChannelChild();
     383                 :     virtual ~HttpChannelChild();
     384                 : };
     385                 : } // namespace net
     386                 : } // namespace mozilla
     387                 : 
     388                 : 
     389                 : // C++ file contents
     390                 : namespace mozilla {
     391                 : namespace net {
     392                 : bool
     393                 : HttpChannelChild::RecvOnStartRequest(
     394                 :         const nsHttpResponseHead& responseHead,
     395                 :         const bool& useResponseHead,
     396                 :         const nsHttpHeaderArray& requestHeaders,
     397                 :         const bool& isFromCache,
     398                 :         const bool& cacheEntryAvailable,
     399                 :         const PRUint32& cacheExpirationTime,
     400                 :         const nsCString& cachedCharset,
     401                 :         const nsCString& securityInfoSerialization,
     402                 :         const PRNetAddr& selfAddr,
     403                 :         const PRNetAddr& peerAddr)
     404                 : {
     405                 :     return false;
     406                 : }
     407                 : 
     408                 : bool
     409                 : HttpChannelChild::RecvOnTransportAndData(
     410                 :         const nsresult& status,
     411                 :         const PRUint64& progress,
     412                 :         const PRUint64& progressMax,
     413                 :         const nsCString& data,
     414                 :         const PRUint32& offset,
     415                 :         const PRUint32& count)
     416                 : {
     417                 :     return false;
     418                 : }
     419                 : 
     420                 : bool
     421                 : HttpChannelChild::RecvOnStopRequest(const nsresult& statusCode)
     422                 : {
     423                 :     return false;
     424                 : }
     425                 : 
     426                 : bool
     427                 : HttpChannelChild::RecvOnProgress(
     428                 :         const PRUint64& progress,
     429                 :         const PRUint64& progressMax)
     430                 : {
     431                 :     return false;
     432                 : }
     433                 : 
     434                 : bool
     435                 : HttpChannelChild::RecvOnStatus(const nsresult& status)
     436                 : {
     437                 :     return false;
     438                 : }
     439                 : 
     440                 : bool
     441                 : HttpChannelChild::RecvFailedAsyncOpen(const nsresult& status)
     442                 : {
     443                 :     return false;
     444                 : }
     445                 : 
     446                 : bool
     447                 : HttpChannelChild::RecvRedirect1Begin(
     448                 :         const PRUint32& newChannelId,
     449                 :         const URI& newUri,
     450                 :         const PRUint32& redirectFlags,
     451                 :         const nsHttpResponseHead& responseHead)
     452                 : {
     453                 :     return false;
     454                 : }
     455                 : 
     456                 : bool
     457                 : HttpChannelChild::RecvRedirect3Complete()
     458                 : {
     459                 :     return false;
     460                 : }
     461                 : 
     462                 : bool
     463                 : HttpChannelChild::RecvAssociateApplicationCache(
     464                 :         const nsCString& groupID,
     465                 :         const nsCString& clientID)
     466                 : {
     467                 :     return false;
     468                 : }
     469                 : 
     470                 : bool
     471                 : HttpChannelChild::RecvDeleteSelf()
     472                 : {
     473                 :     return false;
     474                 : }
     475                 : 
     476                 : HttpChannelChild::HttpChannelChild()
     477                 : {
     478                 :     MOZ_COUNT_CTOR(HttpChannelChild);
     479                 : }
     480                 : 
     481                 : HttpChannelChild::~HttpChannelChild()
     482                 : {
     483                 :     MOZ_COUNT_DTOR(HttpChannelChild);
     484                 : }
     485                 : 
     486                 : } // namespace net
     487                 : } // namespace mozilla
     488                 : #endif // if 0
     489                 : 
     490                 : #endif // ifndef PHttpChannelChild_h

Generated by: LCOV version 1.7