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

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

Generated by: LCOV version 1.7