33
|
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);
|
48
|
183 |
|
|
184 |
/**
|
|
185 |
* Check validity of a given Data Coding Cheme (Dcs).
|
|
186 |
* used by call control handler and send ussd handler
|
|
187 |
* @param aDcs Data Coding Cheme to be validated.
|
|
188 |
* @return TBool indicating Dcs validity.
|
|
189 |
*/
|
|
190 |
virtual TBool IsValidUssdDcs( const TUint8 aDcs );
|
33
|
191 |
|
|
192 |
private:
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Default C++ constructor
|
|
196 |
*/
|
|
197 |
CSatMultiModeApi();
|
|
198 |
|
|
199 |
/**
|
|
200 |
* By default Symbian 2nd phase constructor is private.
|
|
201 |
*/
|
|
202 |
void ConstructL();
|
|
203 |
|
|
204 |
// New functions
|
|
205 |
/**
|
|
206 |
* Makes the connections to ETel Server
|
|
207 |
*/
|
|
208 |
void ConnectETelServerL();
|
|
209 |
|
|
210 |
/**
|
|
211 |
* Loads and opens phone module
|
|
212 |
*
|
|
213 |
* @param aPhone reference to phone that is loaded
|
|
214 |
* @param aModuleName Name of the phone module
|
|
215 |
* @param aPhoneName Name of the phone
|
|
216 |
*/
|
|
217 |
void LoadPhoneModuleL( RMobilePhone& aPhone, const TDesC& aModuleName,
|
|
218 |
const TDesC& aPhoneName );
|
|
219 |
|
|
220 |
/**
|
|
221 |
* Open the RMobileUssdMessaging
|
|
222 |
*/
|
|
223 |
void LoadUssdMessagingL();
|
|
224 |
|
|
225 |
/**
|
|
226 |
* Open the RMobileCall
|
|
227 |
*/
|
|
228 |
TInt LoadMobileCall();
|
|
229 |
|
|
230 |
|
|
231 |
private: // data
|
|
232 |
|
|
233 |
/**
|
|
234 |
* The Etel server.
|
|
235 |
* Own
|
|
236 |
*/
|
|
237 |
RTelServer iTelServer;
|
|
238 |
|
|
239 |
/**
|
|
240 |
* Used to access phone based functionality
|
|
241 |
* Own
|
|
242 |
*/
|
|
243 |
RMobilePhone iPhone;
|
|
244 |
|
|
245 |
/**
|
|
246 |
* Phone module for Dummy TSY
|
|
247 |
* Own
|
|
248 |
*/
|
|
249 |
RMobilePhone iDummyPhone;
|
|
250 |
|
|
251 |
/**
|
|
252 |
* RMmCustomAPI
|
|
253 |
* Own
|
|
254 |
*/
|
|
255 |
RMmCustomAPI iCustomPhone;
|
|
256 |
|
|
257 |
/**
|
|
258 |
* Line needed by iCall
|
|
259 |
* own
|
|
260 |
*/
|
|
261 |
RMobileLine iLine;
|
|
262 |
|
|
263 |
/**
|
|
264 |
* Access call based functionality
|
|
265 |
* own
|
|
266 |
*/
|
|
267 |
RMobileCall iCall;
|
|
268 |
|
|
269 |
/**
|
|
270 |
* Access USSD Messaging
|
|
271 |
* own
|
|
272 |
*/
|
|
273 |
RMobileUssdMessaging iUssd;
|
|
274 |
|
|
275 |
/**
|
|
276 |
* Pointer to Active Wrapper. Used in startup
|
|
277 |
* Own.
|
|
278 |
*/
|
|
279 |
CSatSActiveWrapper* iWrapper;
|
|
280 |
|
|
281 |
/**
|
|
282 |
* Indicate if the iLine has been openned
|
|
283 |
*/
|
|
284 |
TBool iLineOpened;
|
|
285 |
|
|
286 |
/**
|
|
287 |
* Indicate if the iCall has been openned
|
|
288 |
*/
|
|
289 |
TBool iCallOpened;
|
|
290 |
|
|
291 |
/**
|
|
292 |
* Indicate if the iUssd has been openned
|
|
293 |
*/
|
|
294 |
TBool iUssdOpened;
|
|
295 |
|
|
296 |
};
|
|
297 |
|
|
298 |
#endif // CSATMULTIMODEAPI_H
|