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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : #ifndef PNeckoChild_h
       7                 : #define PNeckoChild_h
       8                 : 
       9                 : #include "mozilla/net/PNecko.h"
      10                 : namespace mozilla {
      11                 : namespace dom {
      12                 : class PContentChild;
      13                 : } // namespace dom
      14                 : } // namespace mozilla
      15                 : 
      16                 : namespace mozilla {
      17                 : namespace net {
      18                 : class PHttpChannelChild;
      19                 : } // namespace net
      20                 : } // namespace mozilla
      21                 : 
      22                 : namespace mozilla {
      23                 : namespace net {
      24                 : class PCookieServiceChild;
      25                 : } // namespace net
      26                 : } // namespace mozilla
      27                 : 
      28                 : namespace mozilla {
      29                 : namespace dom {
      30                 : class PBrowserChild;
      31                 : } // namespace dom
      32                 : } // namespace mozilla
      33                 : 
      34                 : namespace mozilla {
      35                 : namespace net {
      36                 : class PWyciwygChannelChild;
      37                 : } // namespace net
      38                 : } // namespace mozilla
      39                 : 
      40                 : namespace mozilla {
      41                 : namespace net {
      42                 : class PFTPChannelChild;
      43                 : } // namespace net
      44                 : } // namespace mozilla
      45                 : 
      46                 : namespace mozilla {
      47                 : namespace net {
      48                 : class PWebSocketChild;
      49                 : } // namespace net
      50                 : } // namespace mozilla
      51                 : 
      52                 : #ifdef DEBUG
      53                 : #include "prenv.h"
      54                 : #endif // DEBUG
      55                 : #include "base/id_map.h"
      56                 : #include "mozilla/ipc/RPCChannel.h"
      57                 : 
      58                 : 
      59                 : namespace mozilla {
      60                 : namespace net {
      61                 : class PHttpChannelChild;
      62                 : } // namespace net
      63                 : } // namespace mozilla
      64                 : 
      65                 : 
      66                 : namespace mozilla {
      67                 : namespace net {
      68                 : class PWyciwygChannelChild;
      69                 : } // namespace net
      70                 : } // namespace mozilla
      71                 : 
      72                 : 
      73                 : namespace mozilla {
      74                 : namespace net {
      75                 : class PFTPChannelChild;
      76                 : } // namespace net
      77                 : } // namespace mozilla
      78                 : 
      79                 : 
      80                 : namespace mozilla {
      81                 : namespace dom {
      82                 : class PContentChild;
      83                 : } // namespace dom
      84                 : } // namespace mozilla
      85                 : 
      86                 : 
      87                 : namespace mozilla {
      88                 : namespace net {
      89                 : class PWebSocketChild;
      90                 : } // namespace net
      91                 : } // namespace mozilla
      92                 : 
      93                 : 
      94                 : namespace mozilla {
      95                 : namespace net {
      96                 : class PCookieServiceChild;
      97                 : } // namespace net
      98                 : } // namespace mozilla
      99                 : 
     100                 : namespace mozilla {
     101                 : namespace net {
     102                 : 
     103                 : 
     104                 : class /*NS_ABSTRACT_CLASS*/ PNeckoChild :
     105                 :     protected mozilla::ipc::RPCChannel::RPCListener,
     106                 :     protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
     107                 : {
     108                 :     friend class mozilla::net::PHttpChannelChild;
     109                 : 
     110                 :     friend class mozilla::net::PWyciwygChannelChild;
     111                 : 
     112                 :     friend class mozilla::net::PFTPChannelChild;
     113                 : 
     114                 :     friend class mozilla::dom::PContentChild;
     115                 : 
     116                 :     friend class mozilla::net::PWebSocketChild;
     117                 : 
     118                 :     friend class mozilla::net::PCookieServiceChild;
     119                 : 
     120                 : protected:
     121                 :     typedef mozilla::ipc::ActorHandle ActorHandle;
     122                 :     typedef mozilla::ipc::Shmem Shmem;
     123                 :     typedef mozilla::dom::PContentChild PContentChild;
     124                 :     typedef mozilla::net::PHttpChannelChild PHttpChannelChild;
     125                 :     typedef mozilla::net::PCookieServiceChild PCookieServiceChild;
     126                 :     typedef mozilla::dom::PBrowserChild PBrowserChild;
     127                 :     typedef mozilla::net::PWyciwygChannelChild PWyciwygChannelChild;
     128                 :     typedef mozilla::net::PFTPChannelChild PFTPChannelChild;
     129                 :     typedef mozilla::net::PWebSocketChild PWebSocketChild;
     130                 :     typedef base::ProcessId ProcessId;
     131                 :     typedef mozilla::ipc::ProtocolId ProtocolId;
     132                 :     typedef mozilla::ipc::Transport Transport;
     133                 :     typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
     134                 : 
     135                 :     typedef PNecko::State State;
     136                 : 
     137                 :     virtual bool
     138                 :     RecvPHttpChannelConstructor(
     139                 :             PHttpChannelChild* actor,
     140                 :             PBrowserChild* browser);
     141                 :     virtual PCookieServiceChild*
     142                 :     AllocPCookieService() = 0;
     143                 :     virtual bool
     144                 :     DeallocPCookieService(PCookieServiceChild* actor) = 0;
     145                 :     virtual PWyciwygChannelChild*
     146                 :     AllocPWyciwygChannel() = 0;
     147                 :     virtual bool
     148                 :     DeallocPWyciwygChannel(PWyciwygChannelChild* actor) = 0;
     149                 :     virtual PFTPChannelChild*
     150                 :     AllocPFTPChannel() = 0;
     151                 :     virtual bool
     152                 :     DeallocPFTPChannel(PFTPChannelChild* actor) = 0;
     153                 :     virtual PWebSocketChild*
     154                 :     AllocPWebSocket(PBrowserChild* browser) = 0;
     155                 :     virtual bool
     156                 :     DeallocPWebSocket(PWebSocketChild* actor) = 0;
     157                 :     virtual PHttpChannelChild*
     158                 :     AllocPHttpChannel(PBrowserChild* browser) = 0;
     159                 :     virtual bool
     160                 :     DeallocPHttpChannel(PHttpChannelChild* actor) = 0;
     161                 : 
     162                 :     virtual void
     163                 :     ActorDestroy(ActorDestroyReason why);
     164                 : 
     165                 : public:
     166                 :     typedef IPC::Message Message;
     167                 :     typedef mozilla::ipc::RPCChannel Channel;
     168                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
     169                 :     typedef base::ProcessHandle ProcessHandle;
     170                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
     171                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
     172                 :     typedef mozilla::ipc::Trigger Trigger;
     173                 : 
     174                 : public:
     175                 :     PNeckoChild();
     176                 : 
     177                 :     virtual ~PNeckoChild();
     178                 : 
     179                 :     PContentChild*
     180                 :     Manager();
     181                 : 
     182                 :     void
     183                 :     ManagedPHttpChannelChild(InfallibleTArray<PHttpChannelChild*>& aArr) const;
     184                 :     const InfallibleTArray<PHttpChannelChild*>&
     185                 :     ManagedPHttpChannelChild() const;
     186                 : 
     187                 :     void
     188                 :     ManagedPCookieServiceChild(InfallibleTArray<PCookieServiceChild*>& aArr) const;
     189                 :     const InfallibleTArray<PCookieServiceChild*>&
     190                 :     ManagedPCookieServiceChild() const;
     191                 : 
     192                 :     void
     193                 :     ManagedPWyciwygChannelChild(InfallibleTArray<PWyciwygChannelChild*>& aArr) const;
     194                 :     const InfallibleTArray<PWyciwygChannelChild*>&
     195                 :     ManagedPWyciwygChannelChild() const;
     196                 : 
     197                 :     void
     198                 :     ManagedPFTPChannelChild(InfallibleTArray<PFTPChannelChild*>& aArr) const;
     199                 :     const InfallibleTArray<PFTPChannelChild*>&
     200                 :     ManagedPFTPChannelChild() const;
     201                 : 
     202                 :     void
     203                 :     ManagedPWebSocketChild(InfallibleTArray<PWebSocketChild*>& aArr) const;
     204                 :     const InfallibleTArray<PWebSocketChild*>&
     205                 :     ManagedPWebSocketChild() const;
     206                 : 
     207                 :     PNecko::State
     208                 :     state();
     209                 : 
     210                 :     static bool
     211                 :     Send__delete__(PNeckoChild* actor);
     212                 : 
     213                 :     PCookieServiceChild*
     214                 :     SendPCookieServiceConstructor();
     215                 : 
     216                 :     PCookieServiceChild*
     217                 :     SendPCookieServiceConstructor(PCookieServiceChild* actor);
     218                 : 
     219                 :     PWyciwygChannelChild*
     220                 :     SendPWyciwygChannelConstructor();
     221                 : 
     222                 :     PWyciwygChannelChild*
     223                 :     SendPWyciwygChannelConstructor(PWyciwygChannelChild* actor);
     224                 : 
     225                 :     PFTPChannelChild*
     226                 :     SendPFTPChannelConstructor();
     227                 : 
     228                 :     PFTPChannelChild*
     229                 :     SendPFTPChannelConstructor(PFTPChannelChild* actor);
     230                 : 
     231                 :     PWebSocketChild*
     232                 :     SendPWebSocketConstructor(PBrowserChild* browser);
     233                 : 
     234                 :     PWebSocketChild*
     235                 :     SendPWebSocketConstructor(
     236                 :             PWebSocketChild* actor,
     237                 :             PBrowserChild* browser);
     238                 : 
     239                 :     bool
     240                 :     SendHTMLDNSPrefetch(
     241                 :             const nsString& hostname,
     242                 :             const PRUint16& flags);
     243                 : 
     244                 :     bool
     245                 :     SendCancelHTMLDNSPrefetch(
     246                 :             const nsString& hostname,
     247                 :             const PRUint16& flags,
     248                 :             const nsresult& reason);
     249                 : 
     250                 :     PHttpChannelChild*
     251                 :     SendPHttpChannelConstructor(PBrowserChild* browser);
     252                 : 
     253                 :     PHttpChannelChild*
     254                 :     SendPHttpChannelConstructor(
     255                 :             PHttpChannelChild* actor,
     256                 :             PBrowserChild* browser);
     257                 : 
     258                 :     virtual int32
     259                 :     Register(ChannelListener* aRouted);
     260                 :     virtual int32
     261                 :     RegisterID(
     262                 :             ChannelListener* aRouted,
     263                 :             int32 aId);
     264                 :     virtual ChannelListener*
     265                 :     Lookup(int32 aId);
     266                 :     virtual void
     267                 :     Unregister(int32 aId);
     268                 :     virtual void
     269                 :     RemoveManagee(
     270                 :             int32 aProtocolId,
     271                 :             ChannelListener* aListener);
     272                 :     virtual Shmem::SharedMemory*
     273                 :     CreateSharedMemory(
     274                 :             size_t aSize,
     275                 :             Shmem::SharedMemory::SharedMemoryType type,
     276                 :             bool unsafe,
     277                 :             Shmem::id_t* aId);
     278                 :     virtual bool
     279                 :     AdoptSharedMemory(
     280                 :             Shmem::SharedMemory* segment,
     281                 :             Shmem::id_t* aId);
     282                 :     virtual Shmem::SharedMemory*
     283                 :     LookupSharedMemory(Shmem::id_t aId);
     284                 :     virtual bool
     285                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     286                 :     virtual bool
     287                 :     DestroySharedMemory(Shmem& aShmem);
     288                 :     virtual ProcessHandle
     289                 :     OtherProcess() const;
     290                 :     virtual AsyncChannel*
     291                 :     GetIPCChannel();
     292                 : 
     293                 :     virtual Result
     294                 :     OnMessageReceived(const Message& __msg);
     295                 : 
     296                 :     virtual Result
     297                 :     OnMessageReceived(
     298                 :             const Message& __msg,
     299                 :             Message*& __reply);
     300                 : 
     301                 :     virtual Result
     302                 :     OnCallReceived(
     303                 :             const Message& __msg,
     304                 :             Message*& __reply);
     305                 : 
     306                 :     void
     307                 :     OnProcessingError(Result code);
     308                 : 
     309                 :     bool
     310                 :     OnReplyTimeout();
     311                 : 
     312                 :     void
     313                 :     OnChannelClose();
     314                 : 
     315                 :     void
     316                 :     OnChannelError();
     317                 : 
     318                 :     void
     319                 :     OnChannelConnected(int32 pid);
     320                 : 
     321                 :     // Methods for managing shmem
     322                 :     bool
     323                 :     AllocShmem(
     324                 :             size_t aSize,
     325                 :             Shmem::SharedMemory::SharedMemoryType aType,
     326                 :             Shmem* aMem);
     327                 : 
     328                 :     bool
     329                 :     AllocUnsafeShmem(
     330                 :             size_t aSize,
     331                 :             Shmem::SharedMemory::SharedMemoryType aType,
     332                 :             Shmem* aMem);
     333                 : 
     334                 :     bool
     335                 :     AdoptShmem(
     336                 :             Shmem& aMem,
     337                 :             Shmem* aOutMem);
     338                 : 
     339                 :     bool
     340                 :     DeallocShmem(Shmem& aMem);
     341                 : 
     342                 : private:
     343                 :     virtual void
     344                 :     FatalError(const char* const msg) const;
     345                 : 
     346                 :     void
     347                 :     DestroySubtree(ActorDestroyReason why);
     348                 : 
     349                 :     void
     350                 :     DeallocSubtree();
     351                 : 
     352                 :     template<typename T>
     353                 :     void
     354               0 :     Write(
     355                 :             const T& __v,
     356                 :             Message* __msg)
     357                 :     {
     358               0 :         IPC::WriteParam(__msg, __v);
     359               0 :     }
     360                 : 
     361                 :     template<typename T>
     362                 :     bool
     363               0 :     Read(
     364                 :             T* __v,
     365                 :             const Message* __msg,
     366                 :             void** __iter)
     367                 :     {
     368               0 :         return IPC::ReadParam(__msg, __iter, __v);
     369                 :     }
     370                 : 
     371                 :     void
     372                 :     Write(
     373                 :             PHttpChannelChild* __v,
     374                 :             Message* __msg,
     375                 :             bool __nullable);
     376                 : 
     377                 :     bool
     378                 :     Read(
     379                 :             PHttpChannelChild** __v,
     380                 :             const Message* __msg,
     381                 :             void** __iter,
     382                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     383                 : 
     384                 :     void
     385                 :     Write(
     386                 :             PBrowserChild* __v,
     387                 :             Message* __msg,
     388                 :             bool __nullable);
     389                 : 
     390                 :     bool
     391                 :     Read(
     392                 :             PBrowserChild** __v,
     393                 :             const Message* __msg,
     394                 :             void** __iter,
     395                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     396                 : 
     397                 :     void
     398                 :     Write(
     399                 :             PWyciwygChannelChild* __v,
     400                 :             Message* __msg,
     401                 :             bool __nullable);
     402                 : 
     403                 :     bool
     404                 :     Read(
     405                 :             PWyciwygChannelChild** __v,
     406                 :             const Message* __msg,
     407                 :             void** __iter,
     408                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     409                 : 
     410                 :     void
     411                 :     Write(
     412                 :             PNeckoChild* __v,
     413                 :             Message* __msg,
     414                 :             bool __nullable);
     415                 : 
     416                 :     bool
     417                 :     Read(
     418                 :             PNeckoChild** __v,
     419                 :             const Message* __msg,
     420                 :             void** __iter,
     421                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     422                 : 
     423                 :     void
     424                 :     Write(
     425                 :             PFTPChannelChild* __v,
     426                 :             Message* __msg,
     427                 :             bool __nullable);
     428                 : 
     429                 :     bool
     430                 :     Read(
     431                 :             PFTPChannelChild** __v,
     432                 :             const Message* __msg,
     433                 :             void** __iter,
     434                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     435                 : 
     436                 :     void
     437                 :     Write(
     438                 :             PWebSocketChild* __v,
     439                 :             Message* __msg,
     440                 :             bool __nullable);
     441                 : 
     442                 :     bool
     443                 :     Read(
     444                 :             PWebSocketChild** __v,
     445                 :             const Message* __msg,
     446                 :             void** __iter,
     447                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     448                 : 
     449                 :     void
     450                 :     Write(
     451                 :             PCookieServiceChild* __v,
     452                 :             Message* __msg,
     453                 :             bool __nullable);
     454                 : 
     455                 :     bool
     456                 :     Read(
     457                 :             PCookieServiceChild** __v,
     458                 :             const Message* __msg,
     459                 :             void** __iter,
     460                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     461                 : 
     462                 :     Channel* mChannel;
     463                 :     int32 mId;
     464                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     465                 :     State mState;
     466                 :     // Sorted by pointer value
     467                 :     InfallibleTArray<PHttpChannelChild*> mManagedPHttpChannelChild;
     468                 :     // Sorted by pointer value
     469                 :     InfallibleTArray<PCookieServiceChild*> mManagedPCookieServiceChild;
     470                 :     // Sorted by pointer value
     471                 :     InfallibleTArray<PWyciwygChannelChild*> mManagedPWyciwygChannelChild;
     472                 :     // Sorted by pointer value
     473                 :     InfallibleTArray<PFTPChannelChild*> mManagedPFTPChannelChild;
     474                 :     // Sorted by pointer value
     475                 :     InfallibleTArray<PWebSocketChild*> mManagedPWebSocketChild;
     476                 : };
     477                 : 
     478                 : 
     479                 : } // namespace net
     480                 : } // namespace mozilla
     481                 : 
     482                 : #if 0
     483                 : 
     484                 : //-----------------------------------------------------------------------------
     485                 : // Skeleton implementation of abstract actor class
     486                 : 
     487                 : // Header file contents
     488                 : namespace mozilla {
     489                 : namespace net {
     490                 : class NeckoChild :
     491                 :     public PNeckoChild
     492                 : {
     493                 :     virtual PCookieServiceChild*
     494                 :     AllocPCookieService();
     495                 : 
     496                 :     virtual bool
     497                 :     DeallocPCookieService(PCookieServiceChild* actor);
     498                 : 
     499                 :     virtual PWyciwygChannelChild*
     500                 :     AllocPWyciwygChannel();
     501                 : 
     502                 :     virtual bool
     503                 :     DeallocPWyciwygChannel(PWyciwygChannelChild* actor);
     504                 : 
     505                 :     virtual PFTPChannelChild*
     506                 :     AllocPFTPChannel();
     507                 : 
     508                 :     virtual bool
     509                 :     DeallocPFTPChannel(PFTPChannelChild* actor);
     510                 : 
     511                 :     virtual PWebSocketChild*
     512                 :     AllocPWebSocket(PBrowserChild* browser);
     513                 : 
     514                 :     virtual bool
     515                 :     DeallocPWebSocket(PWebSocketChild* actor);
     516                 : 
     517                 :     virtual PHttpChannelChild*
     518                 :     AllocPHttpChannel(PBrowserChild* browser);
     519                 : 
     520                 :     virtual bool
     521                 :     DeallocPHttpChannel(PHttpChannelChild* actor);
     522                 : 
     523                 :     NeckoChild();
     524                 :     virtual ~NeckoChild();
     525                 : };
     526                 : } // namespace net
     527                 : } // namespace mozilla
     528                 : 
     529                 : 
     530                 : // C++ file contents
     531                 : namespace mozilla {
     532                 : namespace net {
     533                 : PCookieServiceChild*
     534                 : NeckoChild::AllocPCookieService()
     535                 : {
     536                 :     return 0;
     537                 : }
     538                 : 
     539                 : bool
     540                 : NeckoChild::DeallocPCookieService(PCookieServiceChild* actor)
     541                 : {
     542                 :     return false;
     543                 : }
     544                 : 
     545                 : PWyciwygChannelChild*
     546                 : NeckoChild::AllocPWyciwygChannel()
     547                 : {
     548                 :     return 0;
     549                 : }
     550                 : 
     551                 : bool
     552                 : NeckoChild::DeallocPWyciwygChannel(PWyciwygChannelChild* actor)
     553                 : {
     554                 :     return false;
     555                 : }
     556                 : 
     557                 : PFTPChannelChild*
     558                 : NeckoChild::AllocPFTPChannel()
     559                 : {
     560                 :     return 0;
     561                 : }
     562                 : 
     563                 : bool
     564                 : NeckoChild::DeallocPFTPChannel(PFTPChannelChild* actor)
     565                 : {
     566                 :     return false;
     567                 : }
     568                 : 
     569                 : PWebSocketChild*
     570                 : NeckoChild::AllocPWebSocket(PBrowserChild* browser)
     571                 : {
     572                 :     return 0;
     573                 : }
     574                 : 
     575                 : bool
     576                 : NeckoChild::DeallocPWebSocket(PWebSocketChild* actor)
     577                 : {
     578                 :     return false;
     579                 : }
     580                 : 
     581                 : PHttpChannelChild*
     582                 : NeckoChild::AllocPHttpChannel(PBrowserChild* browser)
     583                 : {
     584                 :     return 0;
     585                 : }
     586                 : 
     587                 : bool
     588                 : NeckoChild::DeallocPHttpChannel(PHttpChannelChild* actor)
     589                 : {
     590                 :     return false;
     591                 : }
     592                 : 
     593                 : NeckoChild::NeckoChild()
     594                 : {
     595                 :     MOZ_COUNT_CTOR(NeckoChild);
     596                 : }
     597                 : 
     598                 : NeckoChild::~NeckoChild()
     599                 : {
     600                 :     MOZ_COUNT_DTOR(NeckoChild);
     601                 : }
     602                 : 
     603                 : } // namespace net
     604                 : } // namespace mozilla
     605                 : #endif // if 0
     606                 : 
     607                 : #endif // ifndef PNeckoChild_h

Generated by: LCOV version 1.7