|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Encapsule the access to ETel MM API in sat |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSATMULTIMODEAPI_H |
|
20 #define CSATMULTIMODEAPI_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "msatmultimodeapi.h" |
|
24 |
|
25 class CSatSActiveWrapper; |
|
26 |
|
27 /** |
|
28 * Encapsule the access to ETel MM API in sat |
|
29 * |
|
30 * This class is an active object. It will submit |
|
31 * Etel asynchronous request and wait for response. |
|
32 * Clients for this class will implement the interface |
|
33 * in MSatETelClient which is the callback function |
|
34 * when CSatMultiModeApi get the ETel request response. |
|
35 * |
|
36 * @lib satengine.lib |
|
37 * @since S60 v5.0 |
|
38 */ |
|
39 class CSatMultiModeApi : public CBase, |
|
40 public MSatMultiModeApi |
|
41 { |
|
42 |
|
43 public: |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 */ |
|
47 static CSatMultiModeApi* NewL(); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 virtual ~CSatMultiModeApi(); |
|
53 |
|
54 // from base class MSatMultiModeApi |
|
55 |
|
56 /** |
|
57 * Gives pointer to active RMobilePhone session |
|
58 * |
|
59 * @return pointer to active RMobilePhone server session |
|
60 */ |
|
61 RMobilePhone* Phone(); |
|
62 |
|
63 /** |
|
64 * Gives reference to active Dummy RMobilePhone session |
|
65 * |
|
66 * @return Reference to active Dummy RMobilePhone server session |
|
67 */ |
|
68 RMobilePhone* DummyPhone(); |
|
69 |
|
70 /** |
|
71 * Gives pointer to active RMmCustomApi session |
|
72 * |
|
73 * @return pointer to active RMmCustomApi server session |
|
74 */ |
|
75 RMmCustomAPI* CustomApi(); |
|
76 |
|
77 /** |
|
78 * Lowers error granularity to basic errors |
|
79 */ |
|
80 void LowerErrorGranularity(); |
|
81 |
|
82 /** |
|
83 * Raises error granularity to extended errors |
|
84 */ |
|
85 void RaiseErrorGranularity(); |
|
86 |
|
87 /** |
|
88 * Access RMobilePhone::GetNetworkRegistrationStatus |
|
89 * for the paramter information please see the etelmm.h |
|
90 */ |
|
91 void GetNetworkRegistrationStatus( TRequestStatus& aReqStatus, |
|
92 RMobilePhone::TMobilePhoneRegistrationStatus& aStatus ); |
|
93 |
|
94 /** |
|
95 * Access RMobilePhone::NotifyNetworkRegistrationStatusChange |
|
96 * for the paramter information please see the etelmm.h |
|
97 */ |
|
98 void NotifyNetworkRegistrationStatusChange( TRequestStatus& aReqStatus, |
|
99 RMobilePhone::TMobilePhoneRegistrationStatus& aStatus ); |
|
100 |
|
101 /** |
|
102 * Access RMobilePhone::NotifyNetworkRegistrationStatusChange |
|
103 * for the paramter information please see the etelmm.h |
|
104 */ |
|
105 void GetSubscriberId( TRequestStatus& aReqStatus, |
|
106 RMobilePhone::TMobilePhoneSubscriberId& aId ); |
|
107 |
|
108 /** |
|
109 * Access RMobilePhone::SendDTMFTones |
|
110 * for the paramter information please see the etelmm.h |
|
111 */ |
|
112 void SendDTMFTones( TRequestStatus& aReqStatus, const TDesC& aTones); |
|
113 |
|
114 /** |
|
115 * Access RMobilePhone::ContinueDTMFStringSending |
|
116 * for the paramter information please see the etelmm.h |
|
117 */ |
|
118 TInt ContinueDTMFStringSending( TBool aContinue ); |
|
119 |
|
120 /** |
|
121 * Access RMobilePhone::CancelAsyncRequest |
|
122 * for the paramter information please see the etelmm.h |
|
123 */ |
|
124 void CancelAsyncRequest(TInt aReqToCancel); |
|
125 |
|
126 /** |
|
127 * Access RMobilePhone::SendNetworkServiceRequestNoFdnCheck |
|
128 * for the paramter information please see the etelmm.h |
|
129 */ |
|
130 void SendNetworkServiceRequestNoFdnCheck( TRequestStatus& aReqStatus, |
|
131 const TDesC& aServiceString); |
|
132 |
|
133 /** |
|
134 * Access RMobileCall::DialNoFdnCheck |
|
135 * for the paramter information please see the etelmm.h |
|
136 */ |
|
137 void DialNoFdnCheck( TRequestStatus& aStatus, |
|
138 const TDesC8& aCallParams,const TDesC& aTelNumber ); |
|
139 |
|
140 /** |
|
141 * Access RMobileUssdMessaging::SendMessageNoFdnCheck |
|
142 * for the paramter information please see the etelmm.h |
|
143 */ |
|
144 void SendMessageNoFdnCheck( TRequestStatus& aReqStatus, |
|
145 const TDesC8& aMsgData, const TDesC8& aMsgAttributes ); |
|
146 /** |
|
147 * Access RMobileCall::DialCancel |
|
148 */ |
|
149 void DialCancel(); |
|
150 |
|
151 /** |
|
152 * Check if there is an incoming call |
|
153 * @return ETrue if there is an incoming call |
|
154 */ |
|
155 TBool IsCallIncoming(); |
|
156 |
|
157 /** |
|
158 * Access RMobileCall::NotifyMobileCallStatusChange |
|
159 */ |
|
160 void NotifyMobileCallStatusChange( TRequestStatus& aReqStatus, |
|
161 RMobileCall::TMobileCallStatus& aStatus) ; |
|
162 |
|
163 /** |
|
164 * Access RMobileCall::NotifyStatusChangeCancel |
|
165 */ |
|
166 void NotifyCallStatusChangeCancel(); |
|
167 /** |
|
168 * Access RMobilePhone::TerminateActiveCalls NotifyMobileCallStatusChange |
|
169 */ |
|
170 void TerminateActiveCalls(TRequestStatus& aReqStatus); |
|
171 |
|
172 |
|
173 /** |
|
174 * Access RMboileCall::GetMobileCallInfo |
|
175 */ |
|
176 TInt GetMobileCallInfo(TDes8& aCallInfo); |
|
177 |
|
178 /** |
|
179 * Access RMboileCall::DialEmergencyCall |
|
180 */ |
|
181 virtual void DialEmergencyCall(TRequestStatus& aReqStatus, |
|
182 const TDesC& aNumber); |
|
183 |
|
184 private: |
|
185 |
|
186 /** |
|
187 * Default C++ constructor |
|
188 */ |
|
189 CSatMultiModeApi(); |
|
190 |
|
191 /** |
|
192 * By default Symbian 2nd phase constructor is private. |
|
193 */ |
|
194 void ConstructL(); |
|
195 |
|
196 // New functions |
|
197 /** |
|
198 * Makes the connections to ETel Server |
|
199 */ |
|
200 void ConnectETelServerL(); |
|
201 |
|
202 /** |
|
203 * Loads and opens phone module |
|
204 * |
|
205 * @param aPhone reference to phone that is loaded |
|
206 * @param aModuleName Name of the phone module |
|
207 * @param aPhoneName Name of the phone |
|
208 */ |
|
209 void LoadPhoneModuleL( RMobilePhone& aPhone, const TDesC& aModuleName, |
|
210 const TDesC& aPhoneName ); |
|
211 |
|
212 /** |
|
213 * Open the RMobileUssdMessaging |
|
214 */ |
|
215 void LoadUssdMessagingL(); |
|
216 |
|
217 /** |
|
218 * Open the RMobileCall |
|
219 */ |
|
220 TInt LoadMobileCall(); |
|
221 |
|
222 |
|
223 private: // data |
|
224 |
|
225 /** |
|
226 * The Etel server. |
|
227 * Own |
|
228 */ |
|
229 RTelServer iTelServer; |
|
230 |
|
231 /** |
|
232 * Used to access phone based functionality |
|
233 * Own |
|
234 */ |
|
235 RMobilePhone iPhone; |
|
236 |
|
237 /** |
|
238 * Phone module for Dummy TSY |
|
239 * Own |
|
240 */ |
|
241 RMobilePhone iDummyPhone; |
|
242 |
|
243 /** |
|
244 * RMmCustomAPI |
|
245 * Own |
|
246 */ |
|
247 RMmCustomAPI iCustomPhone; |
|
248 |
|
249 /** |
|
250 * Line needed by iCall |
|
251 * own |
|
252 */ |
|
253 RMobileLine iLine; |
|
254 |
|
255 /** |
|
256 * Access call based functionality |
|
257 * own |
|
258 */ |
|
259 RMobileCall iCall; |
|
260 |
|
261 /** |
|
262 * Access USSD Messaging |
|
263 * own |
|
264 */ |
|
265 RMobileUssdMessaging iUssd; |
|
266 |
|
267 /** |
|
268 * Pointer to Active Wrapper. Used in startup |
|
269 * Own. |
|
270 */ |
|
271 CSatSActiveWrapper* iWrapper; |
|
272 |
|
273 /** |
|
274 * Indicate if the iLine has been openned |
|
275 */ |
|
276 TBool iLineOpened; |
|
277 |
|
278 /** |
|
279 * Indicate if the iCall has been openned |
|
280 */ |
|
281 TBool iCallOpened; |
|
282 |
|
283 /** |
|
284 * Indicate if the iUssd has been openned |
|
285 */ |
|
286 TBool iUssdOpened; |
|
287 |
|
288 }; |
|
289 |
|
290 #endif // CSATMULTIMODEAPI_H |