|
1 /* |
|
2 * Copyright (c) 2008 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::CancelAsyncRequest |
|
116 * for the paramter information please see the etelmm.h |
|
117 */ |
|
118 void CancelAsyncRequest(TInt aReqToCancel); |
|
119 |
|
120 /** |
|
121 * Access RMobilePhone::SendNetworkServiceRequestNoFdnCheck |
|
122 * for the paramter information please see the etelmm.h |
|
123 */ |
|
124 void SendNetworkServiceRequestNoFdnCheck( TRequestStatus& aReqStatus, |
|
125 const TDesC& aServiceString); |
|
126 |
|
127 /** |
|
128 * Access RMobileCall::DialNoFdnCheck |
|
129 * for the paramter information please see the etelmm.h |
|
130 */ |
|
131 void DialNoFdnCheck( TRequestStatus& aStatus, |
|
132 const TDesC8& aCallParams,const TDesC& aTelNumber ); |
|
133 |
|
134 /** |
|
135 * Access RMobileUssdMessaging::SendMessageNoFdnCheck |
|
136 * for the paramter information please see the etelmm.h |
|
137 */ |
|
138 void SendMessageNoFdnCheck( TRequestStatus& aReqStatus, |
|
139 const TDesC8& aMsgData, const TDesC8& aMsgAttributes ); |
|
140 /** |
|
141 * Access RMobileCall::DialCancel |
|
142 */ |
|
143 void DialCancel(); |
|
144 |
|
145 /** |
|
146 * Access RMobilePhone::GetCurrentActiveUSimApplication |
|
147 */ |
|
148 void GetCurrentActiveUSimApplication( TRequestStatus& aReqStatus, |
|
149 RMobilePhone::TAID& aAID ); |
|
150 |
|
151 |
|
152 /** |
|
153 * Check if there is an incoming call |
|
154 * @return ETrue if there is an incoming call |
|
155 */ |
|
156 TBool IsCallIncoming(); |
|
157 private: |
|
158 |
|
159 /** |
|
160 * Default C++ constructor |
|
161 */ |
|
162 CSatMultiModeApi(); |
|
163 |
|
164 /** |
|
165 * By default Symbian 2nd phase constructor is private. |
|
166 */ |
|
167 void ConstructL(); |
|
168 |
|
169 // New functions |
|
170 /** |
|
171 * Makes the connections to ETel Server |
|
172 */ |
|
173 void ConnectETelServerL(); |
|
174 |
|
175 /** |
|
176 * Loads and opens phone module |
|
177 * |
|
178 * @param aPhone reference to phone that is loaded |
|
179 * @param aModuleName Name of the phone module |
|
180 * @param aPhoneName Name of the phone |
|
181 */ |
|
182 void LoadPhoneModuleL( RMobilePhone& aPhone, const TDesC& aModuleName, |
|
183 const TDesC& aPhoneName ); |
|
184 |
|
185 /** |
|
186 * Open the RMobileCall |
|
187 */ |
|
188 void LoadMobileCallL(); |
|
189 |
|
190 /** |
|
191 * Open the RMobileUssdMessaging |
|
192 */ |
|
193 void LoadUssdMessagingL(); |
|
194 |
|
195 |
|
196 private: // data |
|
197 |
|
198 /** |
|
199 * The Etel server. |
|
200 * Own |
|
201 */ |
|
202 RTelServer iTelServer; |
|
203 |
|
204 /** |
|
205 * Used to access phone based functionality |
|
206 * Own |
|
207 */ |
|
208 RMobilePhone iPhone; |
|
209 |
|
210 /** |
|
211 * Phone module for Dummy TSY |
|
212 * Own |
|
213 */ |
|
214 RMobilePhone iDummyPhone; |
|
215 |
|
216 /** |
|
217 * RMmCustomAPI |
|
218 * Own |
|
219 */ |
|
220 RMmCustomAPI iCustomPhone; |
|
221 |
|
222 /** |
|
223 * Line needed by iCall |
|
224 * own |
|
225 */ |
|
226 RMobileLine iLine; |
|
227 |
|
228 /** |
|
229 * Access call based functionality |
|
230 * own |
|
231 */ |
|
232 RMobileCall iCall; |
|
233 |
|
234 /** |
|
235 * Access USSD Messaging |
|
236 * own |
|
237 */ |
|
238 RMobileUssdMessaging iUssd; |
|
239 |
|
240 /** |
|
241 * Pointer to Active Wrapper. Used in startup |
|
242 * Own. |
|
243 */ |
|
244 CSatSActiveWrapper* iWrapper; |
|
245 |
|
246 /** |
|
247 * Indicate if the iLine has been openned |
|
248 */ |
|
249 TBool iLineOpened; |
|
250 |
|
251 /** |
|
252 * Indicate if the iCall has been openned |
|
253 */ |
|
254 TBool iCallOpened; |
|
255 |
|
256 /** |
|
257 * Indicate if the iUssd has been openned |
|
258 */ |
|
259 TBool iUssdOpened; |
|
260 |
|
261 }; |
|
262 |
|
263 #endif // CSATMULTIMODEAPI_H |