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

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

Generated by: LCOV version 1.7