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

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : #ifndef PObjectWrapperChild_h
       7                 : #define PObjectWrapperChild_h
       8                 : 
       9                 : #include "mozilla/jsipc/PObjectWrapper.h"
      10                 : namespace mozilla {
      11                 : namespace jsipc {
      12                 : class PContextWrapperChild;
      13                 : } // namespace jsipc
      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 jsipc {
      25                 : class PContextWrapperChild;
      26                 : } // namespace jsipc
      27                 : } // namespace mozilla
      28                 : 
      29                 : namespace mozilla {
      30                 : namespace jsipc {
      31                 : 
      32                 : 
      33                 : class /*NS_ABSTRACT_CLASS*/ PObjectWrapperChild :
      34                 :     protected mozilla::ipc::RPCChannel::RPCListener,
      35                 :     protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
      36                 : {
      37                 :     friend class mozilla::jsipc::PContextWrapperChild;
      38                 : 
      39                 : protected:
      40                 :     typedef mozilla::ipc::ActorHandle ActorHandle;
      41                 :     typedef mozilla::jsipc::JSVariant JSVariant;
      42                 :     typedef mozilla::jsipc::OperationStatus OperationStatus;
      43                 :     typedef mozilla::ipc::Shmem Shmem;
      44                 :     typedef mozilla::void_t void_t;
      45                 :     typedef mozilla::jsipc::PContextWrapperChild PContextWrapperChild;
      46                 :     typedef base::ProcessId ProcessId;
      47                 :     typedef mozilla::ipc::ProtocolId ProtocolId;
      48                 :     typedef mozilla::ipc::Transport Transport;
      49                 :     typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
      50                 : 
      51                 :     typedef PObjectWrapper::State State;
      52                 : 
      53                 :     virtual bool
      54                 :     Recv__delete__();
      55                 :     virtual bool
      56                 :     AnswerAddProperty(
      57                 :             const nsString& id,
      58                 :             OperationStatus* status) = 0;
      59                 :     virtual bool
      60                 :     AnswerGetProperty(
      61                 :             const nsString& id,
      62                 :             OperationStatus* status,
      63                 :             JSVariant* vp) = 0;
      64                 :     virtual bool
      65                 :     AnswerSetProperty(
      66                 :             const nsString& id,
      67                 :             const JSVariant& v,
      68                 :             OperationStatus* status,
      69                 :             JSVariant* vp) = 0;
      70                 :     virtual bool
      71                 :     AnswerDelProperty(
      72                 :             const nsString& id,
      73                 :             OperationStatus* status,
      74                 :             JSVariant* vp) = 0;
      75                 :     virtual bool
      76                 :     AnswerNewEnumerateInit(
      77                 :             OperationStatus* status,
      78                 :             JSVariant* statep,
      79                 :             int* idp) = 0;
      80                 :     virtual bool
      81                 :     AnswerNewEnumerateNext(
      82                 :             const JSVariant& in_state,
      83                 :             OperationStatus* status,
      84                 :             JSVariant* statep,
      85                 :             nsString* idp) = 0;
      86                 :     virtual bool
      87                 :     RecvNewEnumerateDestroy(const JSVariant& in_state) = 0;
      88                 :     virtual bool
      89                 :     AnswerNewResolve(
      90                 :             const nsString& id,
      91                 :             const int& flags,
      92                 :             OperationStatus* status,
      93                 :             PObjectWrapperChild** obj2) = 0;
      94                 :     virtual bool
      95                 :     AnswerConvert(
      96                 :             const JSType& type,
      97                 :             OperationStatus* status,
      98                 :             JSVariant* vp) = 0;
      99                 :     virtual bool
     100                 :     AnswerCall(
     101                 :             PObjectWrapperChild* receiver,
     102                 :             const InfallibleTArray<JSVariant>& argv,
     103                 :             OperationStatus* status,
     104                 :             JSVariant* rval) = 0;
     105                 :     virtual bool
     106                 :     AnswerConstruct(
     107                 :             const InfallibleTArray<JSVariant>& argv,
     108                 :             OperationStatus* status,
     109                 :             PObjectWrapperChild** rval) = 0;
     110                 :     virtual bool
     111                 :     AnswerHasInstance(
     112                 :             const JSVariant& v,
     113                 :             OperationStatus* status,
     114                 :             JSBool* bp) = 0;
     115                 : 
     116                 :     virtual void
     117                 :     ActorDestroy(ActorDestroyReason why);
     118                 : 
     119                 : public:
     120                 :     typedef IPC::Message Message;
     121                 :     typedef mozilla::ipc::RPCChannel Channel;
     122                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
     123                 :     typedef base::ProcessHandle ProcessHandle;
     124                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
     125                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
     126                 :     typedef mozilla::ipc::Trigger Trigger;
     127                 : 
     128                 : public:
     129                 :     PObjectWrapperChild();
     130                 : 
     131                 :     virtual ~PObjectWrapperChild();
     132                 : 
     133                 :     PContextWrapperChild*
     134                 :     Manager();
     135                 : 
     136                 :     PObjectWrapper::State
     137                 :     state();
     138                 : 
     139                 :     virtual int32
     140                 :     Register(ChannelListener* aRouted);
     141                 :     virtual int32
     142                 :     RegisterID(
     143                 :             ChannelListener* aRouted,
     144                 :             int32 aId);
     145                 :     virtual ChannelListener*
     146                 :     Lookup(int32 aId);
     147                 :     virtual void
     148                 :     Unregister(int32 aId);
     149                 :     virtual void
     150                 :     RemoveManagee(
     151                 :             int32 aProtocolId,
     152                 :             ChannelListener* aListener);
     153                 :     virtual Shmem::SharedMemory*
     154                 :     CreateSharedMemory(
     155                 :             size_t aSize,
     156                 :             Shmem::SharedMemory::SharedMemoryType type,
     157                 :             bool unsafe,
     158                 :             Shmem::id_t* aId);
     159                 :     virtual bool
     160                 :     AdoptSharedMemory(
     161                 :             Shmem::SharedMemory* segment,
     162                 :             Shmem::id_t* aId);
     163                 :     virtual Shmem::SharedMemory*
     164                 :     LookupSharedMemory(Shmem::id_t aId);
     165                 :     virtual bool
     166                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     167                 :     virtual bool
     168                 :     DestroySharedMemory(Shmem& aShmem);
     169                 :     virtual ProcessHandle
     170                 :     OtherProcess() const;
     171                 :     virtual AsyncChannel*
     172                 :     GetIPCChannel();
     173                 : 
     174                 :     virtual Result
     175                 :     OnMessageReceived(const Message& __msg);
     176                 : 
     177                 :     virtual Result
     178                 :     OnMessageReceived(
     179                 :             const Message& __msg,
     180                 :             Message*& __reply);
     181                 : 
     182                 :     virtual Result
     183                 :     OnCallReceived(
     184                 :             const Message& __msg,
     185                 :             Message*& __reply);
     186                 : 
     187                 :     void
     188                 :     OnProcessingError(Result code);
     189                 : 
     190                 :     bool
     191                 :     OnReplyTimeout();
     192                 : 
     193                 :     void
     194                 :     OnChannelClose();
     195                 : 
     196                 :     void
     197                 :     OnChannelError();
     198                 : 
     199                 :     void
     200                 :     OnChannelConnected(int32 pid);
     201                 : 
     202                 :     // Methods for managing shmem
     203                 :     bool
     204                 :     AllocShmem(
     205                 :             size_t aSize,
     206                 :             Shmem::SharedMemory::SharedMemoryType aType,
     207                 :             Shmem* aMem);
     208                 : 
     209                 :     bool
     210                 :     AllocUnsafeShmem(
     211                 :             size_t aSize,
     212                 :             Shmem::SharedMemory::SharedMemoryType aType,
     213                 :             Shmem* aMem);
     214                 : 
     215                 :     bool
     216                 :     AdoptShmem(
     217                 :             Shmem& aMem,
     218                 :             Shmem* aOutMem);
     219                 : 
     220                 :     bool
     221                 :     DeallocShmem(Shmem& aMem);
     222                 : 
     223                 : private:
     224                 :     virtual void
     225                 :     FatalError(const char* const msg) const;
     226                 : 
     227                 :     void
     228                 :     DestroySubtree(ActorDestroyReason why);
     229                 : 
     230                 :     void
     231                 :     DeallocSubtree();
     232                 : 
     233                 :     template<typename T>
     234                 :     void
     235               0 :     Write(
     236                 :             const T& __v,
     237                 :             Message* __msg)
     238                 :     {
     239               0 :         IPC::WriteParam(__msg, __v);
     240               0 :     }
     241                 : 
     242                 :     template<typename T>
     243                 :     bool
     244               0 :     Read(
     245                 :             T* __v,
     246                 :             const Message* __msg,
     247                 :             void** __iter)
     248                 :     {
     249               0 :         return IPC::ReadParam(__msg, __iter, __v);
     250                 :     }
     251                 : 
     252                 :     void
     253                 :     Write(
     254                 :             PObjectWrapperChild* __v,
     255                 :             Message* __msg,
     256                 :             bool __nullable);
     257                 : 
     258                 :     bool
     259                 :     Read(
     260                 :             PObjectWrapperChild** __v,
     261                 :             const Message* __msg,
     262                 :             void** __iter,
     263                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     264                 : 
     265                 :     void
     266                 :     Write(
     267                 :             const InfallibleTArray<JSVariant>& __v,
     268                 :             Message* __msg);
     269                 : 
     270                 :     bool
     271                 :     Read(
     272                 :             InfallibleTArray<JSVariant>* __v,
     273                 :             const Message* __msg,
     274                 :             void** __iter) NS_WARN_UNUSED_RESULT;
     275                 : 
     276                 :     void
     277                 :     Write(
     278                 :             const OperationStatus& __v,
     279                 :             Message* __msg);
     280                 : 
     281                 :     bool
     282                 :     Read(
     283                 :             OperationStatus* __v,
     284                 :             const Message* __msg,
     285                 :             void** __iter) NS_WARN_UNUSED_RESULT;
     286                 : 
     287                 :     void
     288                 :     Write(
     289                 :             const JSVariant& __v,
     290                 :             Message* __msg);
     291                 : 
     292                 :     bool
     293                 :     Read(
     294                 :             JSVariant* __v,
     295                 :             const Message* __msg,
     296                 :             void** __iter) NS_WARN_UNUSED_RESULT;
     297                 : 
     298                 :     Channel* mChannel;
     299                 :     int32 mId;
     300                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     301                 :     State mState;
     302                 : };
     303                 : 
     304                 : 
     305                 : } // namespace jsipc
     306                 : } // namespace mozilla
     307                 : 
     308                 : #if 0
     309                 : 
     310                 : //-----------------------------------------------------------------------------
     311                 : // Skeleton implementation of abstract actor class
     312                 : 
     313                 : // Header file contents
     314                 : namespace mozilla {
     315                 : namespace jsipc {
     316                 : class ObjectWrapperChild :
     317                 :     public PObjectWrapperChild
     318                 : {
     319                 :     virtual bool
     320                 :     AnswerAddProperty(
     321                 :             const nsString& id,
     322                 :             OperationStatus* status);
     323                 : 
     324                 :     virtual bool
     325                 :     AnswerGetProperty(
     326                 :             const nsString& id,
     327                 :             OperationStatus* status,
     328                 :             JSVariant* vp);
     329                 : 
     330                 :     virtual bool
     331                 :     AnswerSetProperty(
     332                 :             const nsString& id,
     333                 :             const JSVariant& v,
     334                 :             OperationStatus* status,
     335                 :             JSVariant* vp);
     336                 : 
     337                 :     virtual bool
     338                 :     AnswerDelProperty(
     339                 :             const nsString& id,
     340                 :             OperationStatus* status,
     341                 :             JSVariant* vp);
     342                 : 
     343                 :     virtual bool
     344                 :     AnswerNewEnumerateInit(
     345                 :             OperationStatus* status,
     346                 :             JSVariant* statep,
     347                 :             int* idp);
     348                 : 
     349                 :     virtual bool
     350                 :     AnswerNewEnumerateNext(
     351                 :             const JSVariant& in_state,
     352                 :             OperationStatus* status,
     353                 :             JSVariant* statep,
     354                 :             nsString* idp);
     355                 : 
     356                 :     virtual bool
     357                 :     RecvNewEnumerateDestroy(const JSVariant& in_state);
     358                 : 
     359                 :     virtual bool
     360                 :     AnswerNewResolve(
     361                 :             const nsString& id,
     362                 :             const int& flags,
     363                 :             OperationStatus* status,
     364                 :             PObjectWrapperChild** obj2);
     365                 : 
     366                 :     virtual bool
     367                 :     AnswerConvert(
     368                 :             const JSType& type,
     369                 :             OperationStatus* status,
     370                 :             JSVariant* vp);
     371                 : 
     372                 :     virtual bool
     373                 :     AnswerCall(
     374                 :             PObjectWrapperChild* receiver,
     375                 :             const InfallibleTArray<JSVariant>& argv,
     376                 :             OperationStatus* status,
     377                 :             JSVariant* rval);
     378                 : 
     379                 :     virtual bool
     380                 :     AnswerConstruct(
     381                 :             const InfallibleTArray<JSVariant>& argv,
     382                 :             OperationStatus* status,
     383                 :             PObjectWrapperChild** rval);
     384                 : 
     385                 :     virtual bool
     386                 :     AnswerHasInstance(
     387                 :             const JSVariant& v,
     388                 :             OperationStatus* status,
     389                 :             JSBool* bp);
     390                 : 
     391                 :     ObjectWrapperChild();
     392                 :     virtual ~ObjectWrapperChild();
     393                 : };
     394                 : } // namespace jsipc
     395                 : } // namespace mozilla
     396                 : 
     397                 : 
     398                 : // C++ file contents
     399                 : namespace mozilla {
     400                 : namespace jsipc {
     401                 : bool
     402                 : ObjectWrapperChild::AnswerAddProperty(
     403                 :         const nsString& id,
     404                 :         OperationStatus* status)
     405                 : {
     406                 :     return false;
     407                 : }
     408                 : 
     409                 : bool
     410                 : ObjectWrapperChild::AnswerGetProperty(
     411                 :         const nsString& id,
     412                 :         OperationStatus* status,
     413                 :         JSVariant* vp)
     414                 : {
     415                 :     return false;
     416                 : }
     417                 : 
     418                 : bool
     419                 : ObjectWrapperChild::AnswerSetProperty(
     420                 :         const nsString& id,
     421                 :         const JSVariant& v,
     422                 :         OperationStatus* status,
     423                 :         JSVariant* vp)
     424                 : {
     425                 :     return false;
     426                 : }
     427                 : 
     428                 : bool
     429                 : ObjectWrapperChild::AnswerDelProperty(
     430                 :         const nsString& id,
     431                 :         OperationStatus* status,
     432                 :         JSVariant* vp)
     433                 : {
     434                 :     return false;
     435                 : }
     436                 : 
     437                 : bool
     438                 : ObjectWrapperChild::AnswerNewEnumerateInit(
     439                 :         OperationStatus* status,
     440                 :         JSVariant* statep,
     441                 :         int* idp)
     442                 : {
     443                 :     return false;
     444                 : }
     445                 : 
     446                 : bool
     447                 : ObjectWrapperChild::AnswerNewEnumerateNext(
     448                 :         const JSVariant& in_state,
     449                 :         OperationStatus* status,
     450                 :         JSVariant* statep,
     451                 :         nsString* idp)
     452                 : {
     453                 :     return false;
     454                 : }
     455                 : 
     456                 : bool
     457                 : ObjectWrapperChild::RecvNewEnumerateDestroy(const JSVariant& in_state)
     458                 : {
     459                 :     return false;
     460                 : }
     461                 : 
     462                 : bool
     463                 : ObjectWrapperChild::AnswerNewResolve(
     464                 :         const nsString& id,
     465                 :         const int& flags,
     466                 :         OperationStatus* status,
     467                 :         PObjectWrapperChild** obj2)
     468                 : {
     469                 :     return false;
     470                 : }
     471                 : 
     472                 : bool
     473                 : ObjectWrapperChild::AnswerConvert(
     474                 :         const JSType& type,
     475                 :         OperationStatus* status,
     476                 :         JSVariant* vp)
     477                 : {
     478                 :     return false;
     479                 : }
     480                 : 
     481                 : bool
     482                 : ObjectWrapperChild::AnswerCall(
     483                 :         PObjectWrapperChild* receiver,
     484                 :         const InfallibleTArray<JSVariant>& argv,
     485                 :         OperationStatus* status,
     486                 :         JSVariant* rval)
     487                 : {
     488                 :     return false;
     489                 : }
     490                 : 
     491                 : bool
     492                 : ObjectWrapperChild::AnswerConstruct(
     493                 :         const InfallibleTArray<JSVariant>& argv,
     494                 :         OperationStatus* status,
     495                 :         PObjectWrapperChild** rval)
     496                 : {
     497                 :     return false;
     498                 : }
     499                 : 
     500                 : bool
     501                 : ObjectWrapperChild::AnswerHasInstance(
     502                 :         const JSVariant& v,
     503                 :         OperationStatus* status,
     504                 :         JSBool* bp)
     505                 : {
     506                 :     return false;
     507                 : }
     508                 : 
     509                 : ObjectWrapperChild::ObjectWrapperChild()
     510                 : {
     511                 :     MOZ_COUNT_CTOR(ObjectWrapperChild);
     512                 : }
     513                 : 
     514                 : ObjectWrapperChild::~ObjectWrapperChild()
     515                 : {
     516                 :     MOZ_COUNT_DTOR(ObjectWrapperChild);
     517                 : }
     518                 : 
     519                 : } // namespace jsipc
     520                 : } // namespace mozilla
     521                 : #endif // if 0
     522                 : 
     523                 : #endif // ifndef PObjectWrapperChild_h

Generated by: LCOV version 1.7