author | hgs |
Fri, 03 Sep 2010 13:33:36 +0300 | |
changeset 65 | 2a5d4ab426d3 |
parent 46 | bc5a64e5bc3c |
child 51 | f39ed5e045e0 |
child 74 | d1c62c765e48 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2002-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: Message handler |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef CPEMESSAGEHANDLER_H |
|
21 |
#define CPEMESSAGEHANDLER_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <pevirtualengine.h> |
|
25 |
#include <DosSvrServices.h> |
|
26 |
#include <cphcltcommandhandler.h> |
|
27 |
#include <cphcltdialdata.h> |
|
28 |
||
29 |
#include "mpecallhandling.h" |
|
30 |
#include "mpecallcontrolif.h" |
|
31 |
||
32 |
// CONSTANTS |
|
33 |
const TInt KModeNormal = 0; // Normal System mode |
|
34 |
const TInt KModeFligth = 1; // Flight mode |
|
35 |
const TInt KModePDA = 2; // PDA mode |
|
36 |
||
37 |
// Valid characters in an dialing string |
|
38 |
_LIT( KPEClientValidChars, "+0123456789*#pwPW" ); |
|
39 |
_LIT( KPEValidDTMFChars, "0123456789*#pwPW" ); |
|
40 |
_LIT( KPEValidDTMFStringStopChars, "+pPwW" ); |
|
41 |
||
42 |
// Invalid characters in an dialing string, these chars can be removed from dial string |
|
43 |
_LIT( KPECharsThatCanBeDelete, "\"/ ().-" ); |
|
44 |
||
45 |
// MACROS |
|
46 |
// None. |
|
47 |
||
48 |
// DATA TYPES |
|
49 |
||
50 |
// Phone number prefix text, for prefix change |
|
51 |
typedef TBuf<10> TPEPrefixText; |
|
52 |
||
53 |
// FUNCTION PROTOTYPES |
|
54 |
// None. |
|
55 |
||
56 |
// FORWARD DECLARATIONS |
|
57 |
class MPEPhoneModelInternal; |
|
58 |
class MPECallHandling; |
|
59 |
class MEngineMonitor; |
|
60 |
class CPEGsmAudioData; |
|
61 |
class CPESimStateMonitor; |
|
62 |
class CPEMMParserBase; |
|
63 |
class CPETimer; |
|
64 |
class MPEAudioData; |
|
65 |
class MPELogHandling; |
|
66 |
class MPEContactHandling; |
|
67 |
class CPEMMHandlerContainer; |
|
68 |
class RTASecuritySession; |
|
69 |
class CPEClientInformation; |
|
70 |
class CPEClientServices; |
|
71 |
class CPEClientCallRequestMonitor; |
|
72 |
class CPEExternalDataHandler; |
|
73 |
class MPEDataStore; |
|
74 |
class CPhoneGsmOptionContainerBase; |
|
75 |
class CPEParserPhoneNumberHandler; |
|
76 |
class CPEParserSSHandler; |
|
77 |
class CPhoneGsmParserBase; |
|
78 |
class CPhoneGsmHandlerContainer; |
|
79 |
class CPhoneGsmParserResult; |
|
80 |
class CPEParserEmergencyNumberHandler; |
|
81 |
class CPEParserVoipNumberHandler; |
|
82 |
class CPEManualCallControlHandler; |
|
83 |
class MPEServiceHandling; |
|
84 |
||
85 |
// CLASS DECLARATION |
|
86 |
||
87 |
/** |
|
88 |
* Handles phone related messages from the MPEPhoneModelInternal object. |
|
89 |
* |
|
90 |
* @lib phoneenginebase.dll |
|
91 |
* @since S60_5.0 |
|
92 |
*/ |
|
93 |
NONSHARABLE_CLASS( CPEMessageHandler ) |
|
94 |
: |
|
95 |
public CBase, |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
96 |
public MPECallControlIF |
37 | 97 |
{ |
98 |
public: // Destructor |
|
99 |
||
100 |
/** |
|
101 |
* Two-phased constructor. |
|
102 |
*/ |
|
103 |
static CPEMessageHandler* NewL( |
|
104 |
MPEPhoneModelInternal& aModel, |
|
105 |
MPECallHandling& aCallHandling, |
|
106 |
MEngineMonitor& aEngineMonitor, |
|
107 |
CPEGsmAudioData& aAudioData, |
|
108 |
MPELogHandling& aLogHandling, |
|
109 |
MPEContactHandling& aContactHandling, |
|
110 |
CPESimStateMonitor& aSimStateMonitor, |
|
111 |
CPEExternalDataHandler& aGsmExternalDataHandler, |
|
112 |
MPEServiceHandling& aServiceHandling, |
|
113 |
RFs& aFsSession ); |
|
114 |
/** |
|
115 |
* Destructor. |
|
116 |
*/ |
|
117 |
~CPEMessageHandler(); |
|
118 |
||
119 |
public: // New functions |
|
120 |
||
121 |
/** |
|
122 |
* Handles answer call message from the phone application. |
|
123 |
* @param aAutomaticAnswer, ETrue if triggered by automatic answer |
|
124 |
* @return possible error code from the CallHandling subsystem. |
|
125 |
*/ |
|
126 |
TInt HandleAnswerCall( const TBool aAutomaticAnswer ); |
|
127 |
||
128 |
/** |
|
129 |
* Handles accessory mode changed message from AudioHandling subsystem. |
|
130 |
* @param aVideoCall, ETrue if call type video call |
|
131 |
* @return possible error code from the AudioHandling subsystem |
|
132 |
*/ |
|
133 |
TInt HandleAudioRouting( TBool aVideoCall, TInt aCallId ); |
|
134 |
||
135 |
/** |
|
136 |
* Handles route preference changed message from AudioHandling subsystem. |
|
137 |
* @return possible error code from the AudioHandling subsystem |
|
138 |
*/ |
|
139 |
TInt HandleRoutePreferenceChanged(); |
|
140 |
||
141 |
/** |
|
142 |
* Handles continue dtmf sending ('w' character in the dtmf string have defected stop in the dtmf sending) |
|
143 |
* @param aContinue, informs continue or not. |
|
144 |
*/ |
|
145 |
void HandleContinueDtmfSending( const TBool aContinue ); |
|
146 |
||
147 |
/** |
|
148 |
* Handles release all message from phone application |
|
149 |
* @return possible error code from the CallHandling subsystem. |
|
150 |
*/ |
|
151 |
TInt HandleReleaseAll( ); |
|
152 |
||
153 |
/** |
|
154 |
* Handles release message from phone application |
|
155 |
* @param aAutoResumeOption if options for autoresume. |
|
156 |
* @return Return possible error code. |
|
157 |
*/ |
|
158 |
TInt HandleReleaseCall( TPEHangUpOptions aAutoResumeOption = ETPEHangUpDefault ); |
|
159 |
||
160 |
/** |
|
161 |
* Handles send dtmf message from phone application |
|
162 |
* @return possible error code from the CallHandling subsystem. |
|
163 |
*/ |
|
164 |
TInt HandleSendDtmf(); |
|
165 |
||
166 |
/** |
|
167 |
* Handles audio mute message from the phone application. |
|
168 |
*/ |
|
169 |
void HandleSetAudioMute(); |
|
170 |
||
171 |
/** |
|
172 |
* Handles audio output message from the phone application. |
|
173 |
* @return possible error code from the AudioHandling subsystem. |
|
174 |
*/ |
|
175 |
TInt HandleSetAudioOutput(); |
|
176 |
||
177 |
/** |
|
178 |
* Handles change volume message from the phone application. |
|
179 |
*/ |
|
180 |
void HandleSetAudioVolume(); |
|
181 |
||
182 |
/** |
|
183 |
* Starts tone playing. |
|
184 |
*/ |
|
185 |
void HandlePlayDTMFL(); |
|
186 |
||
187 |
/** |
|
188 |
* Stops tone playing. |
|
189 |
* @return error code. |
|
190 |
*/ |
|
191 |
TInt HandleEndDTMF(); |
|
192 |
||
193 |
/** |
|
194 |
* Terminates all connected calls, waiting call, data connections. |
|
195 |
* @return errorCode. |
|
196 |
*/ |
|
197 |
TInt HandleTerminateAllConnections(); |
|
198 |
||
199 |
/** |
|
200 |
* Sets phone client information |
|
201 |
* @param aCallId, the dentification number of the call. |
|
202 |
* @param aMainPartOfPhoneNumber The phone number, |
|
203 |
* where extra chaters "/ ().-" and possible prefix are removed. |
|
204 |
*/ |
|
205 |
void SetClientInformation( const TInt aCallId, |
|
206 |
const TDesC& aMainPartOfPhoneNumber ); |
|
207 |
||
208 |
/** |
|
209 |
* Sets phone client information |
|
210 |
* @param aClientDialData Client dial data |
|
211 |
*/ |
|
212 |
void SetClientData( |
|
213 |
const CPhCltDialData& aClientDialData ); |
|
214 |
||
215 |
/** |
|
216 |
* Checks if the current char is removable |
|
217 |
* @param TChar, current character from inspected string. |
|
218 |
* @return TBool. |
|
219 |
*/ |
|
220 |
TBool IsItCharThatCanDelete( const TChar& aChar ) const; |
|
221 |
||
222 |
/** |
|
223 |
* Checks if the current char is valid |
|
224 |
* @param TChar, current character from inspected string. |
|
225 |
* @return TBool. |
|
226 |
*/ |
|
227 |
TBool IsValidChar( const TChar& aChar, const TDesC& aValidChars ) const; |
|
228 |
||
229 |
/** |
|
230 |
* Removes invalid char if it is removable |
|
231 |
* @param TDesc, current string from wich we are interested in. |
|
232 |
* @return TBool. |
|
233 |
*/ |
|
234 |
TBool RemoveInvalidChars( TDes& aString, |
|
235 |
const TDesC& aValidChars, |
|
236 |
const TBool aCheckForDelete ) const; |
|
237 |
||
238 |
/** |
|
239 |
* Handles EPEMessageDTMFSent message from call handling subsystem |
|
240 |
* @param ECCPErrorNone or KPEDontSendMessage |
|
241 |
*/ |
|
242 |
TInt HandleDtmfSent(); |
|
243 |
||
244 |
/** |
|
245 |
* Stops DTMF sending and resets DTMF processing state |
|
246 |
*/ |
|
247 |
void StopDtmfSending(); |
|
248 |
||
249 |
/** |
|
250 |
* Handles reject call message |
|
251 |
* @return possible error code from the CallHandling subsystem. |
|
252 |
*/ |
|
253 |
TInt HandleRejectCall(); |
|
254 |
||
255 |
/** |
|
256 |
* Called asyncronously from callback. Calls HandleSendDtmf() |
|
257 |
* function. |
|
258 |
* @param aAny Pointer to 'this' object. |
|
259 |
* @return error code. |
|
260 |
*/ |
|
261 |
static TInt CallBackHandleSendDtmf( TAny* aAny ); |
|
262 |
||
263 |
/** |
|
264 |
* Called asyncronously from callback. |
|
265 |
* @param aAny Pointer to 'this' object. |
|
266 |
* @return error code. |
|
267 |
*/ |
|
268 |
static TInt CallbackSendMessageStoppedDTMF( TAny* aAny ); |
|
269 |
||
270 |
/** |
|
271 |
* Handles build conference message from phone application |
|
272 |
* @return Return possible error code from the CallHandling subsystem. |
|
273 |
*/ |
|
274 |
TInt HandleBuildConferenceCall(); |
|
275 |
||
276 |
/** |
|
277 |
* Handles Going private in Conference Call |
|
278 |
* @return possible error code from the CallHandling subsystem. |
|
279 |
*/ |
|
280 |
TInt HandleGoOneToOne(); |
|
281 |
||
282 |
/** |
|
283 |
* Gets basic service group value. |
|
284 |
* @return basic service group. |
|
285 |
*/ |
|
286 |
inline RMobilePhone::TMobileService BasicServiceGroup(); |
|
287 |
||
288 |
/** |
|
289 |
* Handles add conference member message from phone application |
|
290 |
* @return possible error code. |
|
291 |
*/ |
|
292 |
TInt HandleAddConferenceMember(); |
|
293 |
||
294 |
/** |
|
295 |
* Handles dropped conference member message |
|
296 |
*/ |
|
297 |
void HandleDroppedConferenceMember(); |
|
298 |
||
299 |
/** |
|
300 |
* Handles EPEMessageALSLineChanged message. |
|
301 |
*/ |
|
302 |
void HandleALSLineChanged(); |
|
303 |
||
304 |
/** |
|
305 |
* Handles error message from the CallHandling subsystem. |
|
306 |
* @param aCallId is the identification number of the call. |
|
307 |
* @param aBusyCall informs that error cause was busy remote party. |
|
308 |
*/ |
|
309 |
void HandleCallHandlingError( const TInt aCallId, const TBool aBusyCall ); |
|
310 |
||
311 |
/** |
|
312 |
* Handles cancel SS string command. |
|
313 |
* @return Possible error code from the Settings utility subsystem. |
|
314 |
* Security module don't have return value from cancel command. |
|
315 |
*/ |
|
316 |
TInt HandleCancelSSstringCommand(); |
|
317 |
||
318 |
/** |
|
319 |
* Handles conference idle state |
|
320 |
* @param aCallId is the identification number of the call. |
|
321 |
* @return Return possible error code. |
|
322 |
*/ |
|
323 |
TInt HandleConferenceIdleState( const TInt aCallId ); |
|
324 |
||
325 |
/** |
|
326 |
* Handles connected message from the CallHandling subsystem. |
|
327 |
* @param aCallId, identification number of the call. |
|
328 |
* @return possible error code from the CallHandling subsystem. |
|
329 |
*/ |
|
330 |
TInt HandleConnectedState( const TInt aCallId ); |
|
331 |
||
332 |
/** |
|
333 |
* Handles video call logging in Connected state |
|
334 |
* @param aCallId is the identification number of the call. |
|
335 |
* @return Return possible error code. |
|
336 |
*/ |
|
337 |
TInt HandleVideoCallConnected( const TInt aCallId ); |
|
338 |
||
339 |
/** |
|
340 |
* Handles video call logging in Idle state |
|
341 |
* @param aCallId is the identification number of the call. |
|
342 |
* @return Return possible error code. |
|
343 |
*/ |
|
344 |
TInt HandleVideoCallIdle( const TInt aCallId ); |
|
345 |
||
346 |
/** |
|
347 |
* Handles EPEMessageSetALSLine message. |
|
348 |
*/ |
|
349 |
void HandleSetALSLineL(); |
|
350 |
||
351 |
/** |
|
352 |
* Handles dial message from phone application or phone client. |
|
353 |
* @param aClientCall, Informs is the current call client originated or not. |
|
354 |
* @return Return possible error code. |
|
355 |
*/ |
|
356 |
TInt HandleDialCall( const TBool aClientCall ); |
|
357 |
||
358 |
/** |
|
359 |
* Handles dial emergency message from phone application or phone client. |
|
360 |
* Phase one of emergency call initialization |
|
361 |
* @param aClientCall, Informs is the current call client originated or not. |
|
362 |
* @return Return possible error code. |
|
363 |
*/ |
|
364 |
TInt HandleDialEmergencyCall( const TBool aClientCall ); |
|
365 |
||
366 |
/** |
|
367 |
* Handles Sat dial request completed message from the phone application |
|
368 |
*/ |
|
369 |
void HandleSatCallRequestCompleted( ); |
|
370 |
||
371 |
/** |
|
372 |
* Phase two of emergency call initialization |
|
373 |
*/ |
|
374 |
void ContinueDialEmergency(); |
|
375 |
||
376 |
/** |
|
377 |
* Handles dialing state transition for voice and video calls |
|
378 |
* @param aCallId is the identification number of the call. |
|
379 |
*/ |
|
380 |
void HandleDialingStateL( const TInt aCallId ); |
|
381 |
||
382 |
/** |
|
383 |
* Handles incoming voice and video call |
|
384 |
* @param aCallId is the identification number of the call. |
|
385 |
*/ |
|
386 |
void HandleIncomingCallL( const TInt aCallId ); |
|
387 |
||
388 |
/** |
|
389 |
* Handles disconnecting without inband tones. |
|
390 |
* @param aCallId is the identification number of the call. |
|
391 |
* @return possible error code. |
|
392 |
*/ |
|
393 |
TInt HandleDisconnecting( const TInt aCallId ); |
|
394 |
||
395 |
/** |
|
396 |
* Handles disconnecting with inband tones. |
|
397 |
* @param aCallId is the identification number of the call. |
|
398 |
* @return possible error code. |
|
399 |
*/ |
|
400 |
TInt HandleDisconnectingWithInband( const TInt aCallId ); |
|
401 |
||
402 |
/** |
|
403 |
* Handles drop conference member message from phone application |
|
404 |
* @return possible error code from the CallHandling subsystem. |
|
405 |
*/ |
|
406 |
TInt HandleDropConferenceMember(); |
|
407 |
||
408 |
/** |
|
409 |
* Handles hold message from the phone application |
|
410 |
* @return possible error code from the CallHandling subsystem. |
|
411 |
*/ |
|
412 |
TInt HandleHoldCall( ); |
|
413 |
||
414 |
/** |
|
415 |
* Handles video call switch to video or voice from phoneui |
|
416 |
*/ |
|
417 |
TInt HandleSwitchToVideoOrVoice( const TInt aCallId ); |
|
418 |
||
419 |
/** |
|
420 |
* Continue switch to video call or voice call. |
|
421 |
* Calls dial method to create new video call or voice call |
|
422 |
* to same phonenumber. |
|
423 |
* @param aCallId is the identification number of the call. |
|
424 |
* @return possible error code from the CallHandling subsystem. |
|
425 |
*/ |
|
426 |
TInt ContinueSwitchToCall( const TInt aCallId ); |
|
427 |
||
428 |
/** |
|
429 |
* Handles idle state message from the CallHandling subsystem. |
|
430 |
* @param aCallId is the identification number of the call. |
|
431 |
* @return Return possible error code from the CallHandling subsystem. |
|
432 |
*/ |
|
433 |
TInt HandleVoiceCallIdleState( const TInt aCallId ); |
|
434 |
||
435 |
/** |
|
436 |
* Handles play DMTF message from phone application |
|
437 |
*/ |
|
438 |
void ProcessPlayDTMFL( ); |
|
439 |
||
440 |
/** |
|
441 |
* Handles end DTMF playing message from phone application |
|
442 |
* @return possible error code from the CallHandling subsystem. |
|
443 |
*/ |
|
444 |
TInt ProcessEndDTMF( ); |
|
445 |
||
446 |
/** |
|
447 |
* Handles resume message from phone application |
|
448 |
* @return possible error code from the CallHandling subsystem. |
|
449 |
*/ |
|
450 |
TInt HandleResumeCall( ); |
|
451 |
||
452 |
/** |
|
453 |
* Handles send USSD request from CPEGsmParserMiscHandler |
|
454 |
* @param aString, USSD string to be sent |
|
455 |
* @return Symbian OS error code |
|
456 |
*/ |
|
457 |
TInt HandleSendUssd( const TDesC& aString ); |
|
458 |
||
459 |
/** |
|
460 |
* Handles EPEMessageSimStateChanged from Dos Server. |
|
461 |
* @return None. |
|
462 |
*/ |
|
463 |
void HandleSimStateChanged( ); |
|
464 |
||
465 |
/** |
|
466 |
* Handles startup message from the phone application. |
|
467 |
* @return None. |
|
468 |
*/ |
|
469 |
void HandleStartUp(); |
|
470 |
||
471 |
/** |
|
472 |
* Handles Phone Number Edited message from phone application |
|
473 |
*/ |
|
474 |
void HandlePhoneNumberEditedL(); |
|
475 |
||
476 |
/** |
|
477 |
* Handles service enabled message from service handling subsystem |
|
478 |
* @since Series60_5.0 |
|
479 |
* @return possible error code from the ServiceHandling subsystem |
|
480 |
*/ |
|
481 |
TInt HandleServiceEnabled(); |
|
482 |
||
483 |
/** |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
484 |
* Handles remote party information changed |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
485 |
* @param aCallId is the identification number of the call. |
37 | 486 |
* @since Series60_5.2 |
487 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
488 |
void HandleRemotePartyInfoChanged( const TInt aCallId ); |
37 | 489 |
|
490 |
/** |
|
491 |
* Handles swap message from the phone application |
|
492 |
* @return possible error code from the CallHandling subsystem. |
|
493 |
*/ |
|
494 |
inline TInt HandleSwapCalls(); |
|
495 |
||
496 |
/** |
|
497 |
* Handles transfer message from phone application. |
|
498 |
* @return possible error code from the CallHandling subsystem. |
|
499 |
*/ |
|
500 |
inline TInt HandleTransferCalls(); |
|
501 |
||
502 |
/** |
|
503 |
* Sets basic service group for future using, |
|
504 |
* @param aServiceGroup, includes basic service group. |
|
505 |
* @return None. |
|
506 |
*/ |
|
507 |
inline void SetBasicServiceGroup( const RMobilePhone::TMobileService& aServiceGroup ); |
|
508 |
||
509 |
/** |
|
510 |
* Sets gsm parser error code for future using. |
|
511 |
* @param aGsmParserErrorCode, includes possible error code from parser process. |
|
512 |
* @return None. |
|
513 |
*/ |
|
514 |
inline void SetGsmParserErrorCode( TInt aGsmParserErrorCode); |
|
515 |
||
516 |
/** |
|
517 |
* Check is given number emergency number |
|
518 |
* @return Epoc errorcodes. |
|
519 |
*/ |
|
520 |
TInt HandleEmergencyCheck( ); |
|
521 |
||
522 |
/** |
|
523 |
* Stops playing a inband tone. |
|
524 |
*/ |
|
525 |
void HandleStopInbandTonePlay(); |
|
526 |
||
527 |
/** |
|
528 |
* Handles automatic answer off from customa api -> engineinfo. |
|
529 |
* @return TInt possible error code.. |
|
530 |
*/ |
|
531 |
void HandleAutomaticAnswerOff( ) const; |
|
532 |
||
533 |
/** |
|
534 |
* Handles AT dialing started |
|
535 |
* @param aSucceed true if succeeded |
|
536 |
*/ |
|
537 |
void HandleATDialingStarted( const TBool aSucceed ) const; |
|
538 |
||
539 |
/** |
|
540 |
* Replace active call |
|
541 |
* @return Possible error code |
|
542 |
*/ |
|
543 |
TInt HandleReplaceActive(); |
|
544 |
||
545 |
/** |
|
546 |
* Check if phone is locked, if locked leave with ECCPErrorAuthenticationFailed error. |
|
547 |
*/ |
|
548 |
void CheckIfPhoneIsLockedL(); |
|
549 |
||
550 |
/** |
|
551 |
* Handles unattended transfer request response. |
|
552 |
* @param aAcceptRequest ETrue to accept, EFalse to reject request. |
|
553 |
*/ |
|
554 |
TInt HandleUnattendedTransferRequestResponse( TBool aAcceptRequest ); |
|
555 |
||
556 |
/** |
|
557 |
* Handle unattended transfer |
|
558 |
* @return KErrNone if succesfull |
|
559 |
*/ |
|
560 |
TInt HandleUnattendedTransfer(); |
|
561 |
||
562 |
/** |
|
563 |
* Handle call forward |
|
564 |
* @return KErrNone if succesfull |
|
565 |
*/ |
|
566 |
TInt ForwardCallToAddress(); |
|
567 |
||
568 |
/** |
|
569 |
* Handle disable service |
|
570 |
*/ |
|
571 |
void HandleDisableService(); |
|
572 |
||
573 |
/** |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
574 |
* Adds SIM rejected MO CS call to logs. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
575 |
* @param aCallId is the identification number of the call. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
576 |
* @return KErrNone if succesfull |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
577 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
578 |
TInt AddSIMRejectedMoCsCallToLog( const TInt aCallId ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
579 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
580 |
/** |
37 | 581 |
* Handle dial service call |
582 |
*/ |
|
583 |
TInt HandleDialServiceCall( |
|
584 |
const TBool aClientCall ); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
585 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
586 |
/** |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
587 |
* Returns a boolean to indicate whether network connection |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
588 |
* is allowed or not. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
589 |
* @return Return a True or False. |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
590 |
*/ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
591 |
TBool IsNetworkConnectionAllowed() const; |
37 | 592 |
|
593 |
private: // New functions |
|
594 |
||
595 |
/** |
|
596 |
* C++ default constructor. |
|
597 |
*/ |
|
598 |
CPEMessageHandler( MPEPhoneModelInternal& aModel, |
|
599 |
MPECallHandling& aCallHandling, |
|
600 |
MEngineMonitor& aEngineMonitor, |
|
601 |
CPEGsmAudioData& aAudioData, |
|
602 |
MPELogHandling& aLogHandling, |
|
603 |
MPEContactHandling& aContactHandling, |
|
604 |
CPESimStateMonitor& aSimStateMonitor, |
|
605 |
CPEExternalDataHandler& aExternalDataHandler, |
|
606 |
MPEServiceHandling& aServiceHandling, |
|
607 |
RFs& aFsSession ); |
|
608 |
void ConstructL(); |
|
609 |
||
610 |
/** |
|
611 |
* Checks the status of phone number prefix change setting |
|
612 |
* and calls CPEMessageHandler::ChangePrefix for execution |
|
613 |
* If error occurs the phone number is left untouched |
|
614 |
* @param aPhoneNumber, phone number to be checked |
|
615 |
*/ |
|
616 |
void CheckPrefix(); |
|
617 |
||
618 |
/** |
|
619 |
* Replaces phone number prefix with the one provided |
|
620 |
* @param aPrefixText, prefix to be used in replacement |
|
621 |
* @return possible Symbian OS error code |
|
622 |
*/ |
|
623 |
TInt ChangePrefix( const TPEPrefixText& aPrefixText ); |
|
624 |
||
625 |
/** |
|
626 |
* Remove '+' begin of the string |
|
627 |
*/ |
|
628 |
void RemovePlusPrefix( TPEPhoneNumber& aPhoneNumber ); |
|
629 |
||
630 |
/** |
|
631 |
* Checks if automatic answer is on for audio accessory |
|
632 |
* @param TInt aCallId, call identification. |
|
633 |
* @return TBool. |
|
634 |
*/ |
|
635 |
TBool AutomaticAnswer( const TInt aCallId ) const; |
|
636 |
||
637 |
/** |
|
638 |
* Handle Client Call Data. |
|
639 |
* @return Return possible error. |
|
640 |
*/ |
|
641 |
void HandleClientCallData(); |
|
642 |
||
643 |
/** |
|
644 |
* HandleEngineInfo. Set information to EngineInfo. |
|
645 |
* @param TInt aCallId, call identification. |
|
646 |
* @return Return possible error. |
|
647 |
*/ |
|
648 |
TInt HandleEngineInfo( const TInt aCallId ); |
|
649 |
||
650 |
/** |
|
651 |
* Update Client information |
|
652 |
* @param TInt aCallId, call identification. |
|
653 |
*/ |
|
654 |
TInt UpdateClientInfo( const TInt aCallId ); |
|
655 |
||
656 |
/** |
|
657 |
* Check is phoneNumber emergency number and |
|
658 |
* should phonenumber hide for User |
|
659 |
* @param TInt aCallId, call identification. |
|
660 |
*/ |
|
661 |
void CheckAndHideIdentity( const TInt aCallId ); |
|
662 |
||
663 |
/** |
|
664 |
* Finds callInfo form TSY. |
|
665 |
* @param TInt aCallId, call identification. |
|
666 |
* @return Return possible error. |
|
667 |
*/ |
|
668 |
TInt FindCallInfo( const TInt aCallId ); |
|
669 |
||
670 |
/** |
|
671 |
* Set phonenumber for call logging |
|
672 |
* @param TInt aCallId, call identification. |
|
673 |
* @return None. |
|
674 |
*/ |
|
675 |
void SetPhoneNumberForCallLogging( const TInt aCallId ); |
|
676 |
||
677 |
/** |
|
678 |
* Store call information for logging |
|
679 |
* @param TInt aCallId, call identification. |
|
680 |
* @param TPEState aCallState, call's state. |
|
681 |
* @return None. |
|
682 |
*/ |
|
683 |
void SetLoggingInfo( const TInt aCallId, TPEState aCallState ); |
|
684 |
||
685 |
/** |
|
686 |
* Set name to the EngineInfo. |
|
687 |
* @param TInt aCallId, call identification |
|
688 |
* @return None. |
|
689 |
*/ |
|
690 |
void SetName( const TInt aCallId ); |
|
691 |
||
692 |
/** |
|
693 |
* Set rest of info to the EngineInfo. |
|
694 |
* @param TPEPhoneNumberIdType aPhoneNumberId, phonenumber type |
|
695 |
* @param TInt aCallId, call identification |
|
696 |
* @return None. |
|
697 |
*/ |
|
698 |
void HideIdentification( |
|
699 |
TPEPhoneNumberIdType aPhoneNumberId, |
|
700 |
const TInt aCallId ); |
|
701 |
||
702 |
/** |
|
703 |
* Checks is the current call the missed call. |
|
704 |
* @param TInt aCallId, call identification. |
|
705 |
* @param TPEState aCallState, call's state. |
|
706 |
* @return None. |
|
707 |
*/ |
|
708 |
void IsMissedCall( const TInt aCallId, TPEState aCallState ); |
|
709 |
||
710 |
/** |
|
711 |
* Notifies DevSound that there is no active call |
|
712 |
* and audio should be routed accordingly. |
|
713 |
*/ |
|
714 |
void ClearCallAudio(); |
|
715 |
||
716 |
/** |
|
717 |
* Remove pre and post fix from phone number. |
|
718 |
* @param TDes aString, phonenumber. |
|
719 |
* @return None |
|
720 |
*/ |
|
721 |
void RemovePreAndPostFix( TDes& aString ); |
|
722 |
||
723 |
/** |
|
724 |
* Remove pre fix from phone number. |
|
725 |
* @param TLex aLex, orginal phonenumber. |
|
726 |
* @return None |
|
727 |
*/ |
|
728 |
void RemovePrefix( TLex& aLex ); |
|
729 |
||
730 |
/** |
|
731 |
* Handle number part. |
|
732 |
* @param TLex aLex, orginal phonenumber. |
|
733 |
* @param TDes aNumberPart, TDes for edited phone numeber. |
|
734 |
* @return None |
|
735 |
*/ |
|
736 |
void HandleNumberPart( TLex& aLex, TDes& aNumberPart ); |
|
737 |
||
738 |
/** |
|
739 |
* EqualsLeft combare if aString contains aPrefix. |
|
740 |
* @param TDesC aString, orginal phonenumber. |
|
741 |
* @param TDes aPrefix, |
|
742 |
* @return TBool ETrue if match. |
|
743 |
*/ |
|
744 |
TBool EqualsLeft( const TDesC& aString, const TDesC& aPrefix ); |
|
745 |
||
746 |
/** |
|
747 |
* Handles dial message from phone application or phone client. |
|
748 |
* @param aClientCall, Informs is the current call client originated or not. |
|
749 |
* @return Return possible error code. |
|
750 |
*/ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
751 |
TInt HandleDialCallL( const TBool aClientCall ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
752 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
753 |
/** |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
754 |
* Reset CCCECallParameters to prevent of use a previous call´s parameters |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
755 |
*/ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
756 |
void ResetClientCallData(); |
37 | 757 |
|
758 |
/** |
|
759 |
* Checks if there are any connected video calls |
|
760 |
* @return EFalse: no active video call, |
|
761 |
* ETrue: active video call |
|
762 |
*/ |
|
763 |
TBool IsActiveVideo(); |
|
764 |
||
765 |
/** |
|
766 |
* Checks that string contains only valid dtmf characters |
|
767 |
* @param aString string to be checked |
|
768 |
* @return ETrue if valid dtmf string |
|
769 |
*/ |
|
770 |
TBool IsValidDtmfString( TDes& aString ); |
|
771 |
||
772 |
/** |
|
773 |
* Updates remote party info to Mediator. |
|
774 |
*/ |
|
775 |
void UpdateRemotePartyInfo(); |
|
776 |
||
777 |
private: // Data |
|
778 |
||
779 |
// MPEPhoneModelInternal owns this object. |
|
780 |
MPEPhoneModelInternal& iModel; |
|
781 |
// It is container for parser options |
|
782 |
CPhoneGsmOptionContainerBase* iOptions; |
|
783 |
// Handles phone number from the parser. |
|
784 |
// Not owned |
|
785 |
CPEParserPhoneNumberHandler* iPhoneNumberHandler; |
|
786 |
// Handles supplementary service requests from the parser. |
|
787 |
CPEParserSSHandler* iSSHandler; |
|
788 |
// MPECallHandling handles call related commands to CallHandling subsystem. |
|
789 |
MPECallHandling& iCallHandling; |
|
790 |
// MEngineMonitor handles interface structures to phone application |
|
791 |
MEngineMonitor& iEngineMonitor; |
|
792 |
// CPEGsmAudioData handles audio commands |
|
793 |
CPEGsmAudioData& iGsmAudioData; |
|
794 |
// CPELogsData object which handles logs related commands |
|
795 |
MPELogHandling& iLogHandling; |
|
796 |
// Handle to contact handling |
|
797 |
MPEContactHandling& iContactHandling; |
|
798 |
// Handle to external data handler |
|
799 |
CPEExternalDataHandler& iExternalDataHandler; |
|
800 |
// Mobile call info. |
|
801 |
RMobileCall::TMobileCallInfoV3* iCallInfo; |
|
802 |
// Sim state monitor |
|
803 |
CPESimStateMonitor& iSimStateMonitor; |
|
804 |
// Handle to a file server session |
|
805 |
RFs& iFsSession; |
|
806 |
// Handles call request from the client/server interface. |
|
807 |
CPEClientServices* iClientServices; |
|
808 |
// Automatic answer timer. |
|
809 |
CPETimer* iAutomaticAnswerTimer; |
|
810 |
// Number parser object |
|
811 |
CPhoneGsmParserBase* iParser; |
|
812 |
// Container for parser handlers. |
|
813 |
CPhoneGsmHandlerContainer* iParserHandlerContainer; |
|
814 |
// Includes identification number of the waiting call. |
|
815 |
TInt iWaitingCallId; |
|
816 |
// Call start time |
|
817 |
TTime iTime; |
|
818 |
//Current emergency call state. |
|
819 |
TBool iEmergencyCallActive; |
|
820 |
// |
|
821 |
TBool iBtaaDisconnected; |
|
822 |
//Client Information, member variable because emergency call from phone client |
|
823 |
//is not allowed to allocate memory. |
|
824 |
CPEClientInformation* iClientInformation; |
|
825 |
// Dial Data |
|
826 |
CPhCltDialData* iClientDialData; |
|
827 |
// Instances will contain the results of the parsing |
|
828 |
CPhoneGsmParserResult* iResult; |
|
829 |
// Handles emergency number from the parser. |
|
830 |
// Not owned |
|
831 |
CPEParserEmergencyNumberHandler* iEmergencyNumberHandler; |
|
832 |
// Handles voip number from the parser. |
|
833 |
// Not owned |
|
834 |
CPEParserVoipNumberHandler* iVoipNumberHandler; |
|
835 |
// Handles manual call control. |
|
836 |
// Owned |
|
837 |
CPEManualCallControlHandler* iManualCallControlHandler; |
|
838 |
MPEServiceHandling& iServiceHandling; |
|
839 |
// reference to data store |
|
840 |
MPEDataStore& iDataStore; |
|
841 |
// Asyncromous callback |
|
842 |
CAsyncCallBack* iAsyncCallBack; |
|
843 |
// Includes basic service value. |
|
844 |
RMobilePhone::TMobileService iBasicServiceGroup; |
|
845 |
// Includes possible Gsm Parser error code. |
|
846 |
TInt iGsmParserErrorCode; |
|
847 |
// Cheks if audio is registred and system is ready for startup |
|
848 |
TBool iPEReadyForStartUpMessageSent; |
|
849 |
}; |
|
850 |
||
851 |
#include "cpemessagehandler.inl" |
|
852 |
||
853 |
#endif // CPEMESSAGEHANDLER_H |
|
854 |
||
855 |
// End of File |