LCOV - code coverage report
Current view: directory - objdir/ipc/ipdl/_ipdlheaders/mozilla/dom - PStorageChild.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 PStorageChild_h
       7                 : #define PStorageChild_h
       8                 : 
       9                 : #include "mozilla/dom/PStorage.h"
      10                 : namespace mozilla {
      11                 : namespace dom {
      12                 : class PContentChild;
      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 PContentChild;
      26                 : } // namespace dom
      27                 : } // namespace mozilla
      28                 : 
      29                 : namespace mozilla {
      30                 : namespace dom {
      31                 : 
      32                 : 
      33                 : class /*NS_ABSTRACT_CLASS*/ PStorageChild :
      34                 :     protected mozilla::ipc::RPCChannel::RPCListener,
      35                 :     protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
      36                 : {
      37                 :     friend class mozilla::dom::PContentChild;
      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::PContentChild PContentChild;
      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                 : 
      54                 :     virtual void
      55                 :     ActorDestroy(ActorDestroyReason why);
      56                 : 
      57                 : public:
      58                 :     typedef IPC::Message Message;
      59                 :     typedef mozilla::ipc::RPCChannel Channel;
      60                 :     typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
      61                 :     typedef base::ProcessHandle ProcessHandle;
      62                 :     typedef mozilla::ipc::AsyncChannel AsyncChannel;
      63                 :     typedef mozilla::ipc::SharedMemory SharedMemory;
      64                 :     typedef mozilla::ipc::Trigger Trigger;
      65                 : 
      66                 : public:
      67                 :     PStorageChild();
      68                 : 
      69                 :     virtual ~PStorageChild();
      70                 : 
      71                 :     PContentChild*
      72                 :     Manager();
      73                 : 
      74                 :     PStorage::State
      75                 :     state();
      76                 : 
      77                 :     static bool
      78                 :     Send__delete__(PStorageChild* actor);
      79                 : 
      80                 :     bool
      81                 :     SendInit(
      82                 :             const bool& useDB,
      83                 :             const bool& canUseChromePersist,
      84                 :             const bool& sessionOnly,
      85                 :             const nsCString& domain,
      86                 :             const nsCString& scopeDBKey,
      87                 :             const nsCString& quotaDomainDBKey,
      88                 :             const nsCString& quotaETLDplus1DomainDBKey,
      89                 :             const PRUint32& storageType);
      90                 : 
      91                 :     bool
      92                 :     SendGetKeys(
      93                 :             const bool& callerSecure,
      94                 :             InfallibleTArray<nsString>* keys);
      95                 : 
      96                 :     bool
      97                 :     SendGetLength(
      98                 :             const bool& callerSecure,
      99                 :             const bool& sessionOnly,
     100                 :             PRUint32* length,
     101                 :             nsresult* rv);
     102                 : 
     103                 :     bool
     104                 :     SendGetKey(
     105                 :             const bool& callerSecure,
     106                 :             const bool& sessionOnly,
     107                 :             const PRUint32& index,
     108                 :             nsString* key,
     109                 :             nsresult* rv);
     110                 : 
     111                 :     bool
     112                 :     SendGetValue(
     113                 :             const bool& callerSecure,
     114                 :             const bool& sessionOnly,
     115                 :             const nsString& key,
     116                 :             StorageItem* item,
     117                 :             nsresult* rv);
     118                 : 
     119                 :     bool
     120                 :     SendSetValue(
     121                 :             const bool& callerSecure,
     122                 :             const bool& sessionOnly,
     123                 :             const nsString& key,
     124                 :             const nsString& data,
     125                 :             nsString* oldValue,
     126                 :             nsresult* rv);
     127                 : 
     128                 :     bool
     129                 :     SendRemoveValue(
     130                 :             const bool& callerSecure,
     131                 :             const bool& sessionOnly,
     132                 :             const nsString& key,
     133                 :             nsString* oldValue,
     134                 :             nsresult* rv);
     135                 : 
     136                 :     bool
     137                 :     SendClear(
     138                 :             const bool& callerSecure,
     139                 :             const bool& sessionOnly,
     140                 :             PRInt32* oldCount,
     141                 :             nsresult* rv);
     142                 : 
     143                 :     bool
     144                 :     SendGetDBValue(
     145                 :             const nsString& key,
     146                 :             nsString* value,
     147                 :             bool* secure,
     148                 :             nsresult* rv);
     149                 : 
     150                 :     bool
     151                 :     SendSetDBValue(
     152                 :             const nsString& key,
     153                 :             const nsString& value,
     154                 :             const bool& secure,
     155                 :             nsresult* rv);
     156                 : 
     157                 :     bool
     158                 :     SendSetSecure(
     159                 :             const nsString& key,
     160                 :             const bool& secure,
     161                 :             nsresult* rv);
     162                 : 
     163                 :     virtual int32
     164                 :     Register(ChannelListener* aRouted);
     165                 :     virtual int32
     166                 :     RegisterID(
     167                 :             ChannelListener* aRouted,
     168                 :             int32 aId);
     169                 :     virtual ChannelListener*
     170                 :     Lookup(int32 aId);
     171                 :     virtual void
     172                 :     Unregister(int32 aId);
     173                 :     virtual void
     174                 :     RemoveManagee(
     175                 :             int32 aProtocolId,
     176                 :             ChannelListener* aListener);
     177                 :     virtual Shmem::SharedMemory*
     178                 :     CreateSharedMemory(
     179                 :             size_t aSize,
     180                 :             Shmem::SharedMemory::SharedMemoryType type,
     181                 :             bool unsafe,
     182                 :             Shmem::id_t* aId);
     183                 :     virtual bool
     184                 :     AdoptSharedMemory(
     185                 :             Shmem::SharedMemory* segment,
     186                 :             Shmem::id_t* aId);
     187                 :     virtual Shmem::SharedMemory*
     188                 :     LookupSharedMemory(Shmem::id_t aId);
     189                 :     virtual bool
     190                 :     IsTrackingSharedMemory(Shmem::SharedMemory* segment);
     191                 :     virtual bool
     192                 :     DestroySharedMemory(Shmem& aShmem);
     193                 :     virtual ProcessHandle
     194                 :     OtherProcess() const;
     195                 :     virtual AsyncChannel*
     196                 :     GetIPCChannel();
     197                 : 
     198                 :     virtual Result
     199                 :     OnMessageReceived(const Message& __msg);
     200                 : 
     201                 :     virtual Result
     202                 :     OnMessageReceived(
     203                 :             const Message& __msg,
     204                 :             Message*& __reply);
     205                 : 
     206                 :     virtual Result
     207                 :     OnCallReceived(
     208                 :             const Message& __msg,
     209                 :             Message*& __reply);
     210                 : 
     211                 :     void
     212                 :     OnProcessingError(Result code);
     213                 : 
     214                 :     bool
     215                 :     OnReplyTimeout();
     216                 : 
     217                 :     void
     218                 :     OnChannelClose();
     219                 : 
     220                 :     void
     221                 :     OnChannelError();
     222                 : 
     223                 :     void
     224                 :     OnChannelConnected(int32 pid);
     225                 : 
     226                 :     // Methods for managing shmem
     227                 :     bool
     228                 :     AllocShmem(
     229                 :             size_t aSize,
     230                 :             Shmem::SharedMemory::SharedMemoryType aType,
     231                 :             Shmem* aMem);
     232                 : 
     233                 :     bool
     234                 :     AllocUnsafeShmem(
     235                 :             size_t aSize,
     236                 :             Shmem::SharedMemory::SharedMemoryType aType,
     237                 :             Shmem* aMem);
     238                 : 
     239                 :     bool
     240                 :     AdoptShmem(
     241                 :             Shmem& aMem,
     242                 :             Shmem* aOutMem);
     243                 : 
     244                 :     bool
     245                 :     DeallocShmem(Shmem& aMem);
     246                 : 
     247                 : private:
     248                 :     virtual void
     249                 :     FatalError(const char* const msg) const;
     250                 : 
     251                 :     void
     252                 :     DestroySubtree(ActorDestroyReason why);
     253                 : 
     254                 :     void
     255                 :     DeallocSubtree();
     256                 : 
     257                 :     template<typename T>
     258                 :     void
     259               0 :     Write(
     260                 :             const T& __v,
     261                 :             Message* __msg)
     262                 :     {
     263               0 :         IPC::WriteParam(__msg, __v);
     264               0 :     }
     265                 : 
     266                 :     template<typename T>
     267                 :     bool
     268               0 :     Read(
     269                 :             T* __v,
     270                 :             const Message* __msg,
     271                 :             void** __iter)
     272                 :     {
     273               0 :         return IPC::ReadParam(__msg, __iter, __v);
     274                 :     }
     275                 : 
     276                 :     void
     277                 :     Write(
     278                 :             const ItemData& __v,
     279                 :             Message* __msg);
     280                 : 
     281                 :     bool
     282                 :     Read(
     283                 :             ItemData* __v,
     284                 :             const Message* __msg,
     285                 :             void** __iter) NS_WARN_UNUSED_RESULT;
     286                 : 
     287                 :     void
     288                 :     Write(
     289                 :             PStorageChild* __v,
     290                 :             Message* __msg,
     291                 :             bool __nullable);
     292                 : 
     293                 :     bool
     294                 :     Read(
     295                 :             PStorageChild** __v,
     296                 :             const Message* __msg,
     297                 :             void** __iter,
     298                 :             bool __nullable) NS_WARN_UNUSED_RESULT;
     299                 : 
     300                 :     void
     301                 :     Write(
     302                 :             const StorageItem& __v,
     303                 :             Message* __msg);
     304                 : 
     305                 :     bool
     306                 :     Read(
     307                 :             StorageItem* __v,
     308                 :             const Message* __msg,
     309                 :             void** __iter) NS_WARN_UNUSED_RESULT;
     310                 : 
     311                 :     Channel* mChannel;
     312                 :     int32 mId;
     313                 :     mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
     314                 :     State mState;
     315                 : };
     316                 : 
     317                 : 
     318                 : } // namespace dom
     319                 : } // namespace mozilla
     320                 : 
     321                 : #if 0
     322                 : 
     323                 : //-----------------------------------------------------------------------------
     324                 : // Skeleton implementation of abstract actor class
     325                 : 
     326                 : // Header file contents
     327                 : namespace mozilla {
     328                 : namespace dom {
     329                 : class StorageChild :
     330                 :     public PStorageChild
     331                 : {
     332                 :     StorageChild();
     333                 :     virtual ~StorageChild();
     334                 : };
     335                 : } // namespace dom
     336                 : } // namespace mozilla
     337                 : 
     338                 : 
     339                 : // C++ file contents
     340                 : namespace mozilla {
     341                 : namespace dom {
     342                 : StorageChild::StorageChild()
     343                 : {
     344                 :     MOZ_COUNT_CTOR(StorageChild);
     345                 : }
     346                 : 
     347                 : StorageChild::~StorageChild()
     348                 : {
     349                 :     MOZ_COUNT_DTOR(StorageChild);
     350                 : }
     351                 : 
     352                 : } // namespace dom
     353                 : } // namespace mozilla
     354                 : #endif // if 0
     355                 : 
     356                 : #endif // ifndef PStorageChild_h

Generated by: LCOV version 1.7