60 // Reset flag |
60 // Reset flag |
61 if ( iViewCommandHandle ) |
61 if ( iViewCommandHandle ) |
62 { |
62 { |
63 TPhoneCmdParamBoolean dtmfSendFlag; |
63 TPhoneCmdParamBoolean dtmfSendFlag; |
64 dtmfSendFlag.SetBoolean( EFalse ); |
64 dtmfSendFlag.SetBoolean( EFalse ); |
65 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, |
65 // <-- QT PHONE START --> |
66 &dtmfSendFlag ); |
66 iViewCommandHandle->ExecuteCommand( EPhoneViewSetDtmfOptionsFlag, |
|
67 &dtmfSendFlag ); |
|
68 // <-- QT PHONE END --> |
67 } |
69 } |
68 } |
70 } |
69 |
71 |
70 // ----------------------------------------------------------- |
72 // ----------------------------------------------------------- |
71 // CPhoneConferenceAndSingle::ConstructL() |
73 // CPhoneConferenceAndSingle::ConstructL() |
125 |
127 |
126 case MEngineMonitor::EPEMessageHeld: |
128 case MEngineMonitor::EPEMessageHeld: |
127 HandleHeldL( aCallId ); |
129 HandleHeldL( aCallId ); |
128 break; |
130 break; |
129 |
131 |
130 case MEngineMonitor::EPEMessageInValidEmergencyNumber: |
132 case MEngineMonitor::EPEMessageInValidEmergencyNumber: |
131 SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed ); |
133 SendGlobalErrorNoteL( EPhoneNoteTextNotAllowed ); |
132 break; |
134 break; |
133 |
135 |
134 case MEngineMonitor::EPEMessageValidEmergencyNumber: |
136 case MEngineMonitor::EPEMessageValidEmergencyNumber: |
135 DialVoiceCallL(); |
137 DialVoiceCallL(); |
136 break; |
138 break; |
137 |
139 |
138 case MEngineMonitor::EPEMessageAddedConferenceMember: |
140 case MEngineMonitor::EPEMessageAddedConferenceMember: |
139 HandleAddedConferenceMemberL( aCallId ); |
141 HandleAddedConferenceMemberL( aCallId ); |
140 break; |
142 break; |
141 |
143 |
196 |
198 |
197 // Set Conference And Single specific flag to view |
199 // Set Conference And Single specific flag to view |
198 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
200 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
199 conferenceAndSingleFlag.SetBoolean( ETrue ); |
201 conferenceAndSingleFlag.SetBoolean( ETrue ); |
200 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
202 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
201 &conferenceAndSingleFlag ); |
203 &conferenceAndSingleFlag ); |
202 |
204 |
203 // Set specific flag to view so that DTMF menu item available |
205 // Set specific flag to view so that DTMF menu item available |
204 TPhoneCmdParamBoolean dtmfSendFlag; |
206 TPhoneCmdParamBoolean dtmfSendFlag; |
205 dtmfSendFlag.SetBoolean( ETrue ); |
207 dtmfSendFlag.SetBoolean( ETrue ); |
206 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, |
208 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetDtmfOptionsFlag, |
207 &dtmfSendFlag ); |
209 &dtmfSendFlag ); |
208 |
210 |
209 TPhoneViewResponseId response; |
211 TPhoneViewResponseId response; |
210 TPhoneCmdParamCallStateData callStateData; |
212 TPhoneCmdParamCallStateData callStateData; |
211 TPhoneCmdParamBoolean booleaParam; |
213 TPhoneCmdParamBoolean booleaParam; |
212 TInt heldCallId( KErrNotFound ); |
214 TInt heldCallId( KErrNotFound ); |
303 void CPhoneConferenceAndSingle::HandleConnectedConferenceL() |
305 void CPhoneConferenceAndSingle::HandleConnectedConferenceL() |
304 { |
306 { |
305 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedConferenceL"); |
307 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleConnectedConferenceL"); |
306 // Update call state |
308 // Update call state |
307 TPhoneCmdParamCallHeaderData callHeaderParam; |
309 TPhoneCmdParamCallHeaderData callHeaderParam; |
308 callHeaderParam.SetCallState( EPEStateConnected ); |
310 // <-- QT PHONE START --> |
|
311 callHeaderParam.SetCallState( EPEStateConnectedConference ); |
|
312 // <-- QT PHONE END --> |
309 |
313 |
310 TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC ); |
314 TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC ); |
311 TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
315 TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
312 ResolveResourceID( EPhoneCLIConferenceCall ); |
316 ResolveResourceID( EPhoneCLIConferenceCall ); |
313 |
317 |
340 // |
344 // |
341 void CPhoneConferenceAndSingle::HandleHeldConferenceL() |
345 void CPhoneConferenceAndSingle::HandleHeldConferenceL() |
342 { |
346 { |
343 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleHeldConferenceL"); |
347 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndSingle::HandleHeldConferenceL"); |
344 TPhoneCmdParamCallHeaderData callHeaderParam; |
348 TPhoneCmdParamCallHeaderData callHeaderParam; |
345 callHeaderParam.SetCallState( EPEStateHeld ); |
349 // <-- QT PHONE START --> |
|
350 callHeaderParam.SetCallState( EPEStateHeldConference ); |
|
351 // <-- QT PHONE END --> |
346 |
352 |
347 TInt callLabelId; |
353 TInt callLabelId; |
348 TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
354 TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
349 callLabelId = CPhoneMainResourceResolver::Instance()-> |
355 callLabelId = CPhoneMainResourceResolver::Instance()-> |
350 ResolveResourceID( EPhoneCallOnHold ); |
356 ResolveResourceID( EPhoneCallOnHold ); |
380 // Display connected bubble |
386 // Display connected bubble |
381 TPhoneCmdParamCallHeaderData callHeaderParam; |
387 TPhoneCmdParamCallHeaderData callHeaderParam; |
382 callHeaderParam.SetCallState( EPEStateConnected ); |
388 callHeaderParam.SetCallState( EPEStateConnected ); |
383 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
389 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
384 &callHeaderParam ); |
390 &callHeaderParam ); |
385 |
391 |
|
392 // <-- QT PHONE START --> |
|
393 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
394 // <-- QT PHONE END --> |
386 } |
395 } |
387 |
396 |
388 // ----------------------------------------------------------- |
397 // ----------------------------------------------------------- |
389 // CPhoneConferenceAndSingle::HandleHeldL |
398 // CPhoneConferenceAndSingle::HandleHeldL |
390 // ----------------------------------------------------------- |
399 // ----------------------------------------------------------- |
405 callLabelId, |
414 callLabelId, |
406 CCoeEnv::Static() ); |
415 CCoeEnv::Static() ); |
407 callHeaderParam.SetLabelText( labelText ); |
416 callHeaderParam.SetLabelText( labelText ); |
408 |
417 |
409 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
418 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
410 &callHeaderParam ); |
419 &callHeaderParam ); |
|
420 |
|
421 // <-- QT PHONE START --> |
|
422 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
423 // <-- QT PHONE END --> |
411 } |
424 } |
412 |
425 |
413 // ----------------------------------------------------------- |
426 // ----------------------------------------------------------- |
414 // CPhoneConferenceAndSingle::HandleAddedConferenceMemberL |
427 // CPhoneConferenceAndSingle::HandleAddedConferenceMemberL |
415 // ----------------------------------------------------------- |
428 // ----------------------------------------------------------- |
431 EndUiUpdate(); |
444 EndUiUpdate(); |
432 |
445 |
433 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
446 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
434 conferenceAndSingleFlag.SetBoolean( EFalse ); |
447 conferenceAndSingleFlag.SetBoolean( EFalse ); |
435 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
448 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
436 &conferenceAndSingleFlag ); |
449 &conferenceAndSingleFlag ); |
437 |
450 |
438 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
451 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
439 iStateMachine->ChangeState( EPhoneStateConference ); |
452 iStateMachine->ChangeState( EPhoneStateConference ); |
440 } |
453 } |
441 |
454 |
455 // ----------------------------------------------------------- |
468 // ----------------------------------------------------------- |
456 // |
469 // |
457 void CPhoneConferenceAndSingle::HandleIncomingL( TInt aCallId ) |
470 void CPhoneConferenceAndSingle::HandleIncomingL( TInt aCallId ) |
458 { |
471 { |
459 __LOGMETHODSTARTEND( EPhoneUIStates, |
472 __LOGMETHODSTARTEND( EPhoneUIStates, |
460 "CPhoneConferenceAndSingle::HandleIncomingL"); |
473 "CPhoneConferenceAndSingle::HandleIncomingL"); |
461 |
474 |
462 BeginUiUpdateLC(); |
475 BeginUiUpdateLC(); |
463 |
476 |
464 TPhoneCmdParamBoolean dialerParam; |
477 TPhoneCmdParamBoolean dialerParam; |
465 dialerParam.SetBoolean( ETrue ); |
478 dialerParam.SetBoolean( ETrue ); |
469 |
482 |
470 // Close conference list |
483 // Close conference list |
471 TPhoneCmdParamBoolean booleanParam; |
484 TPhoneCmdParamBoolean booleanParam; |
472 booleanParam.SetBoolean( EFalse ); |
485 booleanParam.SetBoolean( EFalse ); |
473 iViewCommandHandle->ExecuteCommandL( |
486 iViewCommandHandle->ExecuteCommandL( |
474 EPhoneViewOpenConferenceList, &booleanParam ); |
487 EPhoneViewOpenConferenceList, &booleanParam ); |
475 |
488 |
476 iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW ); |
489 iViewCommandHandle->ExecuteCommandL( EPhoneViewCloseFSW ); |
477 |
490 |
|
491 // Check if HW Keys or Call UI should be disabled |
|
492 CheckDisableHWKeysAndCallUIL(); |
|
493 |
|
494 // <-- QT PHONE START --> |
|
495 // Display incoming call |
|
496 DisplayIncomingCallL( aCallId, dialerParam ); |
|
497 |
478 // Set touch controls |
498 // Set touch controls |
479 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
499 SetTouchPaneButtonDisabled( EPhoneCallComingCmdAnswer ); |
480 |
|
481 // Check if HW Keys or Call UI should be disabled |
|
482 CheckDisableHWKeysAndCallUIL(); |
|
483 |
|
484 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
500 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
485 |
501 // <-- QT PHONE END --> |
486 // Display incoming call |
502 |
487 DisplayIncomingCallL( aCallId, dialerParam ); |
|
488 |
|
489 EndUiUpdate(); |
503 EndUiUpdate(); |
490 |
504 |
491 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
505 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
492 conferenceAndSingleFlag.SetBoolean( EFalse ); |
506 conferenceAndSingleFlag.SetBoolean( EFalse ); |
493 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
507 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
494 &conferenceAndSingleFlag ); |
508 &conferenceAndSingleFlag ); |
495 |
509 |
496 // Go to Conference And Single And Waiting state |
510 // Go to Conference And Single And Waiting state |
497 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
511 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
498 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
512 iStateMachine->ChangeState( EPhoneStateConferenceAndSingleAndWaiting ); |
499 } |
513 } |
503 // ----------------------------------------------------------- |
517 // ----------------------------------------------------------- |
504 // |
518 // |
505 void CPhoneConferenceAndSingle::HandleIdleL( TInt aCallId ) |
519 void CPhoneConferenceAndSingle::HandleIdleL( TInt aCallId ) |
506 { |
520 { |
507 __LOGMETHODSTARTEND( EPhoneUIStates, |
521 __LOGMETHODSTARTEND( EPhoneUIStates, |
508 "CPhoneConferenceAndSingle::HandleIdleL"); |
522 "CPhoneConferenceAndSingle::HandleIdleL"); |
509 |
523 |
510 // If dialler is not open then close menu bar. |
524 // If dialler is not open then close menu bar. |
511 if ( !IsNumberEntryUsedL() ) |
525 if ( !IsNumberEntryUsedL() ) |
512 { |
526 { |
513 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
527 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
529 { |
543 { |
530 // Remove call |
544 // Remove call |
531 BeginUiUpdateLC(); |
545 BeginUiUpdateLC(); |
532 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
546 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
533 |
547 |
534 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
548 TPhoneCmdParamBoolean conferenceAndSingleFlag; |
535 conferenceAndSingleFlag.SetBoolean( EFalse ); |
549 conferenceAndSingleFlag.SetBoolean( EFalse ); |
536 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
550 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetConferenceAndSingleFlag, |
537 &conferenceAndSingleFlag ); |
551 &conferenceAndSingleFlag ); |
538 |
552 |
539 TPhoneCmdParamBoolean participantsVisibleFlag; |
553 TPhoneCmdParamBoolean participantsVisibleFlag; |
540 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetConferenceListVisibleFlag, |
554 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetConferenceListVisibleFlag, |
541 &participantsVisibleFlag ); |
555 &participantsVisibleFlag ); |
542 |
556 |
543 // if participants list is visible - do not change buttons or cba |
557 // if participants list is visible - do not change buttons or cba |
544 if( !participantsVisibleFlag.Boolean() ) |
558 if( !participantsVisibleFlag.Boolean() ) |
545 { |
559 { |
546 // Go to Conference state |
560 // Go to Conference state |
547 SetTouchPaneButtons( EPhoneConferenceButtons ); |
561 SetTouchPaneButtons( EPhoneConferenceButtons ); |
548 SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
562 SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
549 |
563 |
550 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
564 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
551 } |
565 } |
552 |
566 |
553 |
567 |
554 EndUiUpdate(); |
568 EndUiUpdate(); |
555 |
569 |
556 iStateMachine->ChangeState( EPhoneStateConference ); |
570 iStateMachine->ChangeState( EPhoneStateConference ); |
568 |
582 |
569 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
583 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
570 |
584 |
571 TPhoneCmdParamInteger intParam; |
585 TPhoneCmdParamInteger intParam; |
572 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls, |
586 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls, |
573 &intParam ); |
587 &intParam ); |
574 |
588 |
575 switch( intParam.Integer() ) |
589 switch( intParam.Integer() ) |
576 { |
590 { |
577 case EOneActiveCall: |
591 case EOneActiveCall: |
578 MakeStateTransitionToSingleL(); |
592 MakeStateTransitionToSingleL(); |
579 break; |
593 break; |
580 |
594 |
581 case ETwoActiveCalls: // Fall through |
595 case ETwoActiveCalls: // Fall through |
582 default: |
596 default: |
583 MakeStateTransitionToTwoSinglesL(); |
597 MakeStateTransitionToTwoSinglesL(); |
584 break; |
598 break; |
585 } |
599 } |
586 } |
600 } |
587 |
601 |
588 // -------------------------------------------------------------- |
602 // -------------------------------------------------------------- |
589 // CPhoneConferenceAndSingle::HandleKeyMessageL |
603 // CPhoneConferenceAndSingle::HandleKeyMessageL |
590 // -------------------------------------------------------------- |
604 // -------------------------------------------------------------- |
598 switch ( aCode ) |
612 switch ( aCode ) |
599 { |
613 { |
600 // send-key |
614 // send-key |
601 case EKeyYes: |
615 case EKeyYes: |
602 if( IsNumberEntryVisibleL() ) |
616 if( IsNumberEntryVisibleL() ) |
603 { |
617 { |
604 HandleSendL(); |
618 HandleSendL(); |
605 } |
619 } |
606 else |
620 else |
607 { |
621 { |
608 // Number entry is below so swap the call |
622 // Number entry is below so swap the call |
609 iStateMachine->SendPhoneEngineMessage( |
623 iStateMachine->SendPhoneEngineMessage( |
610 CPEPhoneModelIF::EPEMessageSwap ); |
624 CPEPhoneModelIF::EPEMessageSwap ); |
611 } |
625 } |
612 break; |
626 break; |
613 |
627 |
614 default: |
628 default: |
615 // do base operation |
629 // do base operation |
616 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |
630 CPhoneConference::HandleKeyMessageL( aMessage, aCode ); |