dom/mobilemessage/src/ipc/SmsChild.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:ad91989a5a8f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #ifndef mozilla_dom_mobilemessage_SmsChild_h
7 #define mozilla_dom_mobilemessage_SmsChild_h
8
9 #include "mozilla/dom/mobilemessage/PSmsChild.h"
10 #include "mozilla/dom/mobilemessage/PSmsRequestChild.h"
11 #include "mozilla/dom/mobilemessage/PMobileMessageCursorChild.h"
12 #include "nsIDOMDOMCursor.h"
13 #include "nsIMobileMessageCallback.h"
14 #include "nsIMobileMessageCursorCallback.h"
15
16 namespace mozilla {
17 namespace dom {
18 namespace mobilemessage {
19
20 class SmsChild : public PSmsChild
21 {
22 public:
23 SmsChild()
24 {
25 MOZ_COUNT_CTOR(SmsChild);
26 }
27
28 protected:
29 virtual ~SmsChild()
30 {
31 MOZ_COUNT_DTOR(SmsChild);
32 }
33
34 virtual void
35 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
36
37 virtual bool
38 RecvNotifyReceivedMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
39
40 virtual bool
41 RecvNotifyRetrievingMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
42
43 virtual bool
44 RecvNotifySendingMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
45
46 virtual bool
47 RecvNotifySentMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
48
49 virtual bool
50 RecvNotifyFailedMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
51
52 virtual bool
53 RecvNotifyDeliverySuccessMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
54
55 virtual bool
56 RecvNotifyDeliveryErrorMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
57
58 virtual bool
59 RecvNotifyReceivedSilentMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
60
61 virtual bool
62 RecvNotifyReadSuccessMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
63
64 virtual bool
65 RecvNotifyReadErrorMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
66
67 virtual PSmsRequestChild*
68 AllocPSmsRequestChild(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
69
70 virtual bool
71 DeallocPSmsRequestChild(PSmsRequestChild* aActor) MOZ_OVERRIDE;
72
73 virtual PMobileMessageCursorChild*
74 AllocPMobileMessageCursorChild(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
75
76 virtual bool
77 DeallocPMobileMessageCursorChild(PMobileMessageCursorChild* aActor) MOZ_OVERRIDE;
78 };
79
80 class SmsRequestChild : public PSmsRequestChild
81 {
82 friend class SmsChild;
83
84 nsCOMPtr<nsIMobileMessageCallback> mReplyRequest;
85
86 public:
87 SmsRequestChild(nsIMobileMessageCallback* aReplyRequest);
88
89 protected:
90 virtual ~SmsRequestChild()
91 {
92 MOZ_COUNT_DTOR(SmsRequestChild);
93 }
94
95 virtual void
96 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
97
98 virtual bool
99 Recv__delete__(const MessageReply& aReply) MOZ_OVERRIDE;
100 };
101
102 class MobileMessageCursorChild : public PMobileMessageCursorChild
103 , public nsICursorContinueCallback
104 {
105 friend class SmsChild;
106
107 nsCOMPtr<nsIMobileMessageCursorCallback> mCursorCallback;
108
109 public:
110 NS_DECL_ISUPPORTS
111 NS_DECL_NSICURSORCONTINUECALLBACK
112
113 MobileMessageCursorChild(nsIMobileMessageCursorCallback* aCallback);
114
115 protected:
116 virtual ~MobileMessageCursorChild()
117 {
118 MOZ_COUNT_DTOR(MobileMessageCursorChild);
119 }
120
121 virtual void
122 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
123
124 virtual bool
125 RecvNotifyResult(const MobileMessageCursorData& aData) MOZ_OVERRIDE;
126
127 virtual bool
128 Recv__delete__(const int32_t& aError) MOZ_OVERRIDE;
129 };
130
131 } // namespace mobilemessage
132 } // namespace dom
133 } // namespace mozilla
134
135 #endif // mozilla_dom_mobilemessage_SmsChild_h

mercurial