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