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

Generated by: LCOV version 1.7