Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
6 #ifndef mozilla_dom_mobilemessage_SmsChild_h
7 #define mozilla_dom_mobilemessage_SmsChild_h
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"
16 namespace mozilla {
17 namespace dom {
18 namespace mobilemessage {
20 class SmsChild : public PSmsChild
21 {
22 public:
23 SmsChild()
24 {
25 MOZ_COUNT_CTOR(SmsChild);
26 }
28 protected:
29 virtual ~SmsChild()
30 {
31 MOZ_COUNT_DTOR(SmsChild);
32 }
34 virtual void
35 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
37 virtual bool
38 RecvNotifyReceivedMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
40 virtual bool
41 RecvNotifyRetrievingMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
43 virtual bool
44 RecvNotifySendingMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
46 virtual bool
47 RecvNotifySentMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
49 virtual bool
50 RecvNotifyFailedMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
52 virtual bool
53 RecvNotifyDeliverySuccessMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
55 virtual bool
56 RecvNotifyDeliveryErrorMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
58 virtual bool
59 RecvNotifyReceivedSilentMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
61 virtual bool
62 RecvNotifyReadSuccessMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
64 virtual bool
65 RecvNotifyReadErrorMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
67 virtual PSmsRequestChild*
68 AllocPSmsRequestChild(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
70 virtual bool
71 DeallocPSmsRequestChild(PSmsRequestChild* aActor) MOZ_OVERRIDE;
73 virtual PMobileMessageCursorChild*
74 AllocPMobileMessageCursorChild(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
76 virtual bool
77 DeallocPMobileMessageCursorChild(PMobileMessageCursorChild* aActor) MOZ_OVERRIDE;
78 };
80 class SmsRequestChild : public PSmsRequestChild
81 {
82 friend class SmsChild;
84 nsCOMPtr<nsIMobileMessageCallback> mReplyRequest;
86 public:
87 SmsRequestChild(nsIMobileMessageCallback* aReplyRequest);
89 protected:
90 virtual ~SmsRequestChild()
91 {
92 MOZ_COUNT_DTOR(SmsRequestChild);
93 }
95 virtual void
96 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
98 virtual bool
99 Recv__delete__(const MessageReply& aReply) MOZ_OVERRIDE;
100 };
102 class MobileMessageCursorChild : public PMobileMessageCursorChild
103 , public nsICursorContinueCallback
104 {
105 friend class SmsChild;
107 nsCOMPtr<nsIMobileMessageCursorCallback> mCursorCallback;
109 public:
110 NS_DECL_ISUPPORTS
111 NS_DECL_NSICURSORCONTINUECALLBACK
113 MobileMessageCursorChild(nsIMobileMessageCursorCallback* aCallback);
115 protected:
116 virtual ~MobileMessageCursorChild()
117 {
118 MOZ_COUNT_DTOR(MobileMessageCursorChild);
119 }
121 virtual void
122 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
124 virtual bool
125 RecvNotifyResult(const MobileMessageCursorData& aData) MOZ_OVERRIDE;
127 virtual bool
128 Recv__delete__(const int32_t& aError) MOZ_OVERRIDE;
129 };
131 } // namespace mobilemessage
132 } // namespace dom
133 } // namespace mozilla
135 #endif // mozilla_dom_mobilemessage_SmsChild_h