|
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_telephony_TelephonyChild_h |
|
7 #define mozilla_dom_telephony_TelephonyChild_h |
|
8 |
|
9 #include "mozilla/dom/telephony/TelephonyCommon.h" |
|
10 #include "mozilla/dom/telephony/PTelephonyChild.h" |
|
11 #include "mozilla/dom/telephony/PTelephonyRequestChild.h" |
|
12 #include "nsITelephonyProvider.h" |
|
13 |
|
14 BEGIN_TELEPHONY_NAMESPACE |
|
15 |
|
16 class TelephonyChild : public PTelephonyChild |
|
17 { |
|
18 public: |
|
19 TelephonyChild(nsITelephonyListener* aListener); |
|
20 |
|
21 protected: |
|
22 virtual ~TelephonyChild() {} |
|
23 |
|
24 virtual void |
|
25 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; |
|
26 |
|
27 virtual PTelephonyRequestChild* |
|
28 AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE; |
|
29 |
|
30 virtual bool |
|
31 DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) MOZ_OVERRIDE; |
|
32 |
|
33 virtual bool |
|
34 RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex, |
|
35 const nsString& aError) MOZ_OVERRIDE; |
|
36 |
|
37 virtual bool |
|
38 RecvNotifyCallStateChanged(const uint32_t& aClientId, |
|
39 const IPCCallStateData& aData) MOZ_OVERRIDE; |
|
40 |
|
41 virtual bool |
|
42 RecvNotifyCdmaCallWaiting(const uint32_t& aClientId, |
|
43 const nsString& aNumber) MOZ_OVERRIDE; |
|
44 |
|
45 virtual bool |
|
46 RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) MOZ_OVERRIDE; |
|
47 |
|
48 virtual bool |
|
49 RecvNotifyConferenceError(const nsString& aName, |
|
50 const nsString& aMessage) MOZ_OVERRIDE; |
|
51 |
|
52 virtual bool |
|
53 RecvNotifySupplementaryService(const uint32_t& aClientId, |
|
54 const int32_t& aCallIndex, |
|
55 const uint16_t& aNotification) MOZ_OVERRIDE; |
|
56 |
|
57 private: |
|
58 nsCOMPtr<nsITelephonyListener> mListener; |
|
59 }; |
|
60 |
|
61 class TelephonyRequestChild : public PTelephonyRequestChild |
|
62 { |
|
63 public: |
|
64 TelephonyRequestChild(nsITelephonyListener* aListener, |
|
65 nsITelephonyCallback* aCallback); |
|
66 |
|
67 protected: |
|
68 virtual ~TelephonyRequestChild() {} |
|
69 |
|
70 virtual void |
|
71 ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE; |
|
72 |
|
73 virtual bool |
|
74 Recv__delete__(const IPCTelephonyResponse& aResponse) MOZ_OVERRIDE; |
|
75 |
|
76 virtual bool |
|
77 RecvNotifyEnumerateCallState(const uint32_t& aClientId, |
|
78 const IPCCallStateData& aData) MOZ_OVERRIDE; |
|
79 |
|
80 virtual bool |
|
81 RecvNotifyDialError(const nsString& aError) MOZ_OVERRIDE; |
|
82 |
|
83 virtual bool |
|
84 RecvNotifyDialSuccess() MOZ_OVERRIDE; |
|
85 |
|
86 private: |
|
87 nsCOMPtr<nsITelephonyListener> mListener; |
|
88 nsCOMPtr<nsITelephonyCallback> mCallback; |
|
89 }; |
|
90 |
|
91 END_TELEPHONY_NAMESPACE |
|
92 |
|
93 #endif // mozilla_dom_telephony_TelephonyChild_h |