18 |
18 |
19 // INCLUDES |
19 // INCLUDES |
20 #include <pevirtualengine.h> |
20 #include <pevirtualengine.h> |
21 #include <StringLoader.h> |
21 #include <StringLoader.h> |
22 #include <mpeengineinfo.h> |
22 #include <mpeengineinfo.h> |
23 #include <FeatMgr.h> |
23 #include <featmgr.h> |
24 #include "cphonetwosinglesandwaiting.h" |
24 #include "cphonetwosinglesandwaiting.h" |
25 #include "tphonecmdparamboolean.h" |
25 #include "tphonecmdparamboolean.h" |
26 #include "mphonestatemachine.h" |
26 #include "mphonestatemachine.h" |
27 #include "tphonecmdparamboolean.h" |
27 #include "tphonecmdparamboolean.h" |
28 #include "tphonecmdparaminteger.h" |
28 #include "tphonecmdparaminteger.h" |
112 "CPhoneTwoSinglesAndWaiting::HandleKeyMessageL()"); |
112 "CPhoneTwoSinglesAndWaiting::HandleKeyMessageL()"); |
113 switch ( aCode ) |
113 switch ( aCode ) |
114 { |
114 { |
115 // send-key |
115 // send-key |
116 case EKeyYes: |
116 case EKeyYes: |
117 { |
117 { |
118 if( IsNumberEntryVisibleL() ) |
118 if( IsNumberEntryVisibleL() ) |
119 { |
119 { |
120 CallFromNumberEntryL(); |
120 CallFromNumberEntryL(); |
121 } |
121 } |
122 else |
122 else |
123 { |
123 { |
124 // Waiting call bubble is over number entry |
124 // Waiting call bubble is over number entry |
125 // so display not allowed note because we |
125 // so display not allowed note because we |
126 // can't answer the call |
126 // can't answer the call |
127 SendGlobalWarningNoteL( EPhoneNoteTextCallNotAllowed ); |
127 SendGlobalWarningNoteL( EPhoneNoteTextCallNotAllowed ); |
128 } |
128 } |
129 break; |
129 break; |
130 } |
130 } |
131 |
131 |
132 default: |
132 default: |
133 CPhoneTwoSingles::HandleKeyMessageL( aMessage, aCode ); |
133 CPhoneTwoSingles::HandleKeyMessageL( aMessage, aCode ); |
134 break; |
134 break; |
135 } |
135 } |
139 // CPhoneTwoSinglesAndWaiting::HandleKeyEventL |
139 // CPhoneTwoSinglesAndWaiting::HandleKeyEventL |
140 // ----------------------------------------------------------- |
140 // ----------------------------------------------------------- |
141 // |
141 // |
142 void CPhoneTwoSinglesAndWaiting::HandleKeyEventL( |
142 void CPhoneTwoSinglesAndWaiting::HandleKeyEventL( |
143 const TKeyEvent& aKeyEvent, |
143 const TKeyEvent& aKeyEvent, |
144 TEventCode aEventCode ) |
144 TEventCode /*aEventCode*/ ) |
145 { |
145 { |
146 if( EKeyDeviceF == aKeyEvent.iCode ) |
146 if( EKeyDeviceF == aKeyEvent.iCode ) |
147 { |
147 { |
148 __PHONELOG( EBasic, EPhoneUIStates, |
148 __PHONELOG( EBasic, EPhoneUIStates, |
149 "CPhoneTwoSinglesAndWaiting::HandleKeyMessageL-deviceF" ); |
149 "CPhoneTwoSinglesAndWaiting::HandleKeyMessageL-deviceF" ); |
299 } |
299 } |
300 else |
300 else |
301 { |
301 { |
302 // Set Two singles softkeys |
302 // Set Two singles softkeys |
303 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
303 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
304 |
304 |
305 // If numberentry is not open just check NeedToSendToBackgroundL and |
305 // If numberentry is not open just check NeedToSendToBackgroundL and |
306 // sendbackround if needed. |
306 // sendbackround if needed. |
307 if ( NeedToSendToBackgroundL() ) |
307 if ( NeedToSendToBackgroundL() ) |
308 { |
308 { |
309 // Return phone to the background if send to background is needed. |
309 // Return phone to the background if send to background is needed. |
322 |
322 |
323 // Go to two singles state |
323 // Go to two singles state |
324 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
324 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
325 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
325 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
326 // CBA updates in above if-else conditions |
326 // CBA updates in above if-else conditions |
327 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
327 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
328 } |
328 } |
329 |
329 |
330 // ----------------------------------------------------------- |
330 // ----------------------------------------------------------- |
331 // CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL |
331 // CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL |
332 // ----------------------------------------------------------- |
332 // ----------------------------------------------------------- |
334 void CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL() |
334 void CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL() |
335 { |
335 { |
336 __LOGMETHODSTARTEND( EPhoneUIStates, |
336 __LOGMETHODSTARTEND( EPhoneUIStates, |
337 "CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL()"); |
337 "CPhoneTwoSinglesAndWaiting::StateTransitionToSingleAndWaitingL()"); |
338 // Go to two singles state |
338 // Go to two singles state |
339 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
339 // <-- QT PHONE START --> |
|
340 TPhoneCmdParamInteger callIdParam; |
|
341 iViewCommandHandle->ExecuteCommandL( |
|
342 EPhoneViewGetExpandedBubbleCallId, &callIdParam ); |
|
343 |
|
344 if ( callIdParam.Integer()!=iRingingCallId ) |
|
345 { |
|
346 CPhoneGsmInCall::UpdateInCallCbaL(); |
|
347 } |
|
348 else |
|
349 { |
|
350 iCbaManager->SetCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
351 } |
|
352 // <-- QT PHONE END --> |
340 |
353 |
341 // Set touch controls |
354 // Set touch controls |
342 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
355 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
343 |
356 |
344 // Check if HW Keys or Call UI should be disabled |
357 // Check if HW Keys or Call UI should be disabled |
368 |
381 |
369 StringLoader::Load( |
382 StringLoader::Load( |
370 conferenceText, |
383 conferenceText, |
371 callLabelId, |
384 callLabelId, |
372 CCoeEnv::Static() ); |
385 CCoeEnv::Static() ); |
373 callHeaderParam.SetCLIText( conferenceText, CBubbleManager::ERight ); |
386 // <-- QT PHONE START --> |
|
387 callHeaderParam.SetCLIText( conferenceText, TPhoneCmdParamCallHeaderData::ERight ); |
|
388 |
|
389 callHeaderParam.SetCallState(EPEStateConnectedConference); |
|
390 // <-- QT PHONE END --> |
374 |
391 |
375 callHeaderParam.SetCiphering( |
392 callHeaderParam.SetCiphering( |
376 iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) ); |
393 iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) ); |
377 |
394 |
378 callHeaderParam.SetCipheringIndicatorAllowed( |
395 callHeaderParam.SetCipheringIndicatorAllowed( |
379 iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
396 iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
380 |
397 |
|
398 // <-- QT PHONE START --> |
381 // Service identifier must be given so that service specific settings |
399 // Service identifier must be given so that service specific settings |
382 // can be taken into account at phoneuiview. |
400 // can be taken into account at phoneuiview. |
383 callHeaderParam.SetServiceId( |
401 callHeaderParam.SetServiceId( |
384 iStateMachine->PhoneEngineInfo()->ServiceId( aCallId ) ); |
402 iStateMachine->PhoneEngineInfo()->ServiceId( aCallId ) ); |
385 |
403 |
386 // Set touch controls |
|
387 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
|
388 |
|
389 // Check if HW Keys or Call UI should be disabled |
404 // Check if HW Keys or Call UI should be disabled |
390 CheckDisableHWKeysAndCallUIL(); |
405 CheckDisableHWKeysAndCallUIL(); |
391 |
406 |
392 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
393 |
407 |
394 iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateConference, aCallId, |
408 iViewCommandHandle->ExecuteCommandL( EPhoneViewCreateConference, aCallId, |
395 &callHeaderParam ); |
409 &callHeaderParam ); |
396 |
410 |
397 // Clear the flag |
411 // Clear the flag |
398 TPhoneCmdParamBoolean booleanParam; |
412 TPhoneCmdParamBoolean booleanParam; |
399 booleanParam.SetBoolean( EFalse ); |
413 booleanParam.SetBoolean( EFalse ); |
400 iViewCommandHandle->ExecuteCommandL( |
414 iViewCommandHandle->ExecuteCommandL( |
401 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
415 EPhoneViewSetNeedToSendToBackgroundStatus, &booleanParam ); |
402 |
416 |
|
417 // Set touch controls |
|
418 SetTouchPaneButtonEnabled( EPhoneCallComingCmdAnswer ); |
|
419 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
420 |
|
421 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
422 |
|
423 // <-- QT PHONE END --> |
403 EndUiUpdate(); |
424 EndUiUpdate(); |
404 // Go to Conference And Waiting state |
425 // Go to Conference And Waiting state |
405 // No need for CBA update |
426 // No need for CBA update |
406 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
427 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
407 } |
428 } |
412 // |
433 // |
413 void CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL() |
434 void CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL() |
414 { |
435 { |
415 __LOGMETHODSTARTEND( EPhoneUIStates, |
436 __LOGMETHODSTARTEND( EPhoneUIStates, |
416 "CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL()"); |
437 "CPhoneTwoSinglesAndWaiting::UpdateInCallCbaL()"); |
417 UpdateCbaL ( EPhoneCallHandlingCallWaitingCBA ); |
438 |
|
439 // <-- QT PHONE START --> |
|
440 TPhoneCmdParamInteger callIdParam; |
|
441 iViewCommandHandle->ExecuteCommandL( |
|
442 EPhoneViewGetExpandedBubbleCallId, &callIdParam ); |
|
443 |
|
444 if ( callIdParam.Integer()!=iRingingCallId ) |
|
445 { |
|
446 CPhoneGsmInCall::UpdateInCallCbaL(); |
|
447 } |
|
448 else |
|
449 { |
|
450 iCbaManager->SetCbaL( EPhoneCallHandlingIncomingSoftRejectCBA ); |
|
451 } |
|
452 // <-- QT PHONE END --> |
418 } |
453 } |
419 |
454 |
420 // ----------------------------------------------------------- |
455 // ----------------------------------------------------------- |
421 // CPhoneTwoSinglesAndWaiting::HandleNumberEntryClearedL() |
456 // CPhoneTwoSinglesAndWaiting::HandleNumberEntryClearedL() |
422 // ----------------------------------------------------------- |
457 // ----------------------------------------------------------- |
425 { |
460 { |
426 __LOGMETHODSTARTEND( EPhoneUIStates, |
461 __LOGMETHODSTARTEND( EPhoneUIStates, |
427 "CPhoneTwoSinglesAndWaiting::HandleNumberEntryClearedL()"); |
462 "CPhoneTwoSinglesAndWaiting::HandleNumberEntryClearedL()"); |
428 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
463 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
429 } |
464 } |
430 |
465 |
|
466 // <-- QT PHONE START --> |
|
467 // ----------------------------------------------------------- |
|
468 // CPhoneTwoSinglesAndWaiting::HandleCommandL |
|
469 // ----------------------------------------------------------- |
|
470 // |
|
471 TBool CPhoneTwoSinglesAndWaiting::HandleCommandL( TInt aCommand ) |
|
472 { |
|
473 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
474 "CPhoneTwoSinglesAndWaiting::HandleCommandL() "); |
|
475 TBool commandStatus = ETrue; |
|
476 |
|
477 switch( aCommand ) |
|
478 { |
|
479 case EPhoneCmdUpdateUiControls: |
|
480 UpdateUiControlsL(); |
|
481 break; |
|
482 |
|
483 default: |
|
484 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
485 break; |
|
486 } |
|
487 |
|
488 return commandStatus; |
|
489 } |
|
490 |
|
491 // ----------------------------------------------------------- |
|
492 // CPhoneTwoSinglesAndWaiting::UpdateUiControlsL |
|
493 // ----------------------------------------------------------- |
|
494 // |
|
495 void CPhoneTwoSinglesAndWaiting::UpdateUiControlsL() |
|
496 { |
|
497 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneSingleAndWaiting::UpdateUiControlsL( ) "); |
|
498 UpdateInCallCbaL(); |
|
499 } |
|
500 |
|
501 // <-- QT PHONE END --> |
|
502 |
|
503 |
431 // End of File |
504 // End of File |