439 // |
435 // |
440 void CPhoneConference::HandleConferenceIdleL() |
436 void CPhoneConference::HandleConferenceIdleL() |
441 { |
437 { |
442 __LOGMETHODSTARTEND( EPhoneUIStates, |
438 __LOGMETHODSTARTEND( EPhoneUIStates, |
443 "CPhoneConference::HandleConferenceIdleL()"); |
439 "CPhoneConference::HandleConferenceIdleL()"); |
444 TransitionHandlerL().BeginTransEffectLC( EPhoneTransEffectPhoneUiClose ); |
440 BeginTransEffectLC( ENumberEntryClose ); |
445 TransitionHandlerL().BeginUiUpdateLC(); |
441 BeginUiUpdateLC(); |
|
442 |
446 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
443 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
|
444 |
447 TPhoneCmdParamInteger activeCallCount; |
445 TPhoneCmdParamInteger activeCallCount; |
448 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
446 iViewCommandHandle->ExecuteCommandL( |
449 |
447 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
|
448 |
450 switch( activeCallCount.Integer() ) |
449 switch( activeCallCount.Integer() ) |
451 { |
450 { |
452 case ENoActiveCalls: |
451 case ENoActiveCalls: |
453 MakeStateTransitionToIdleL(); |
452 MakeStateTransitionToIdleL(); |
454 break; |
453 break; |
|
454 |
455 case EOneActiveCall: |
455 case EOneActiveCall: |
456 if ( !MakeTransitionToWaitingInSingleL() ) |
456 { |
|
457 // Fetch ringing call's id from view |
|
458 TPhoneCmdParamCallStateData callStateData; |
|
459 callStateData.SetCallState( EPEStateRinging ); |
|
460 iViewCommandHandle->HandleCommandL( |
|
461 EPhoneViewGetCallIdByState, &callStateData ); |
|
462 |
|
463 if( callStateData.CallId() > KErrNotFound ) |
|
464 { |
|
465 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
466 KPSUidScreenSaver, |
|
467 KScreenSaverAllowScreenSaver, |
|
468 EPhoneScreensaverNotAllowed ); |
|
469 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
470 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
471 } |
|
472 else |
457 { |
473 { |
458 MakeStateTransitionToSingleL(); |
474 MakeStateTransitionToSingleL(); |
459 } |
475 } |
|
476 } |
460 break; |
477 break; |
461 |
478 |
462 case ETwoActiveCalls: |
479 case ETwoActiveCalls: |
463 MakeStateTransitionToTwoSinglesL(); |
480 MakeStateTransitionToTwoSinglesL(); |
464 break; |
481 break; |
465 |
482 |
466 default: |
483 default: |
467 MakeStateTransitionToTwoSinglesL(); |
484 MakeStateTransitionToTwoSinglesL(); |
468 break; |
485 break; |
469 } |
486 } |
470 TransitionHandlerL().EndUiUpdateAndEffect(); |
487 EndUiUpdate(); |
|
488 EndTransEffect(); |
471 } |
489 } |
472 |
490 |
473 // ----------------------------------------------------------- |
491 // ----------------------------------------------------------- |
474 // CPhoneConference::HandleHeldConferenceL |
492 // CPhoneConference::HandleHeldConferenceL |
475 // ----------------------------------------------------------- |
493 // ----------------------------------------------------------- |
676 // |
699 // |
677 void CPhoneConference::MakeStateTransitionToIdleL() |
700 void CPhoneConference::MakeStateTransitionToIdleL() |
678 { |
701 { |
679 __LOGMETHODSTARTEND( EPhoneUIStates, |
702 __LOGMETHODSTARTEND( EPhoneUIStates, |
680 "CPhoneConference::MakeStateTransitionToIdleL()"); |
703 "CPhoneConference::MakeStateTransitionToIdleL()"); |
|
704 |
681 SetDefaultFlagsL(); |
705 SetDefaultFlagsL(); |
682 |
706 |
683 if ( IsNumberEntryUsedL() ) |
707 if ( IsNumberEntryUsedL() ) |
684 { |
708 { |
685 if ( NeedToReturnToForegroundAppL() ) |
709 if ( NeedToReturnToForegroundAppL() ) |
686 { |
710 { |
687 // Return phone to the background if menu application is needed to foreground. |
711 // Return phone to the background if menu application is needed to foreground. |
688 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
712 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
|
713 |
689 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
714 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
|
715 |
690 // Set Number Entry CBA |
716 // Set Number Entry CBA |
691 iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
717 iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
692 } |
718 } |
693 else |
719 else |
694 { |
720 { |
695 // Show the number entry if it exists |
721 // Show the number entry if it exists |
696 SetNumberEntryVisibilityL(ETrue); |
722 SetNumberEntryVisibilityL(ETrue); |
|
723 |
697 // Close dtmf dialer when call is disconnected. |
724 // Close dtmf dialer when call is disconnected. |
698 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
725 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
699 { |
726 { |
700 CloseDTMFEditorL(); |
727 CloseDTMFEditorL(); |
701 // Display idle screen and update CBAs |
728 // Display idle screen and update CBAs |
702 DisplayIdleScreenL(); |
729 DisplayIdleScreenL(); |
703 } |
730 } |
704 } |
731 } |
705 } |
732 } |
706 else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() ) |
733 else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() ) |
707 { |
734 { |
|
735 // Close menu bar, if it is displayed |
708 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
736 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
737 |
709 // Continue displaying current app but set up the |
738 // Continue displaying current app but set up the |
710 // idle screen in the background |
739 // idle screen in the background |
711 SetupIdleScreenInBackgroundL(); |
740 SetupIdleScreenInBackgroundL(); |
712 } |
741 } |
713 else |
742 else |
714 { |
743 { |
|
744 // Close menu bar, if it is displayed |
715 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
745 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
746 |
|
747 // Display idle screen |
716 DisplayIdleScreenL(); |
748 DisplayIdleScreenL(); |
717 } |
749 } |
718 |
750 |
719 // Display call termination note, if necessary |
751 // Display call termination note, if necessary |
720 DisplayCallTerminationNoteL(); |
752 DisplayCallTerminationNoteL(); |
|
753 |
721 UpdateCbaL( EPhoneEmptyCBA ); |
754 UpdateCbaL( EPhoneEmptyCBA ); |
|
755 // Go to idle state |
722 iStateMachine->ChangeState( EPhoneStateIdle ); |
756 iStateMachine->ChangeState( EPhoneStateIdle ); |
723 } |
757 } |
724 |
758 |
725 // ----------------------------------------------------------- |
759 // ----------------------------------------------------------- |
726 // CPhoneConference::MakeTransitionToWaitingInSingleL |
|
727 // ----------------------------------------------------------- |
|
728 // |
|
729 TBool CPhoneConference::MakeTransitionToWaitingInSingleL() |
|
730 { |
|
731 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
732 "CPhoneConference::MakeTransitionToWaitingInSingleL()"); |
|
733 TBool retValue(EFalse); |
|
734 TPhoneCmdParamCallStateData callStateData; |
|
735 callStateData.SetCallState( EPEStateRinging ); |
|
736 iViewCommandHandle->HandleCommandL( |
|
737 EPhoneViewGetCallIdByState, &callStateData ); |
|
738 |
|
739 if ( callStateData.CallId() > KErrNotFound ) |
|
740 { |
|
741 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
742 KPSUidScreenSaver, |
|
743 KScreenSaverAllowScreenSaver, |
|
744 EPhoneScreensaverNotAllowed ); |
|
745 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
746 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
747 retValue = ETrue; |
|
748 } |
|
749 return retValue; |
|
750 } |
|
751 |
|
752 // ----------------------------------------------------------- |
|
753 // CPhoneConference::MakeStateTransitionToSingleL |
760 // CPhoneConference::MakeStateTransitionToSingleL |
754 // ----------------------------------------------------------- |
761 // ----------------------------------------------------------- |
755 // |
762 // |
756 void CPhoneConference::MakeStateTransitionToSingleL() |
763 void CPhoneConference::MakeStateTransitionToSingleL() |
757 { |
764 { |
758 __LOGMETHODSTARTEND( EPhoneUIStates, |
765 __LOGMETHODSTARTEND( EPhoneUIStates, |
759 "CPhoneConference::MakeStateTransitionToSingleL()"); |
766 "CPhoneConference::MakeStateTransitionToSingleL()"); |
|
767 // Close menu bar, if it is displayed |
760 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
768 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
761 SetTouchPaneButtons( EPhoneIncallButtons ); |
769 |
|
770 |
|
771 SetTouchPaneButtons( EPhoneIncallButtons ); |
|
772 |
|
773 // Go to single state |
762 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
774 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
763 iStateMachine->ChangeState( EPhoneStateSingle ); |
775 iStateMachine->ChangeState( EPhoneStateSingle ); |
764 } |
776 } |
765 |
777 |
766 // ----------------------------------------------------------- |
778 // ----------------------------------------------------------- |
767 // CPhoneConference::MakeTransitionToTwoSinglesL |
779 // CPhoneConference::MakeTransitionToTwoSinglesL |
768 // ----------------------------------------------------------- |
780 // ----------------------------------------------------------- |
769 // |
781 // |
770 void CPhoneConference::MakeStateTransitionToTwoSinglesL() |
782 void CPhoneConference::MakeStateTransitionToTwoSinglesL() |
771 { |
783 { |
772 __LOGMETHODSTARTEND( EPhoneUIStates, |
784 __LOGMETHODSTARTEND( EPhoneUIStates, |
773 "CPhoneConference::MakeStateTransitionToTwoSinglesL()"); |
785 "CPhoneConference::MakeStateTransitionToTwoSinglesL()"); |
|
786 // Close menu bar, if it is displayed |
774 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
787 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
775 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
788 |
|
789 |
|
790 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
|
791 |
|
792 // Set Two singles softkeys |
776 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
793 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
777 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
794 |
|
795 // Go to two singles state |
|
796 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
778 } |
797 } |
779 |
798 |
780 // ----------------------------------------------------------- |
799 // ----------------------------------------------------------- |
781 // CPhoneConference::CloseSelectionListL |
800 // CPhoneConference::CloseSelectionListL |
782 // ----------------------------------------------------------- |
801 // ----------------------------------------------------------- |
878 // |
897 // |
879 void CPhoneConference::HandleIncomingL( TInt aCallId ) |
898 void CPhoneConference::HandleIncomingL( TInt aCallId ) |
880 { |
899 { |
881 __LOGMETHODSTARTEND( EPhoneUIStates, |
900 __LOGMETHODSTARTEND( EPhoneUIStates, |
882 "CPhoneConference::HandleIncomingL()"); |
901 "CPhoneConference::HandleIncomingL()"); |
|
902 |
883 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
903 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
884 KPSUidScreenSaver, |
904 KPSUidScreenSaver, |
885 KScreenSaverAllowScreenSaver, |
905 KScreenSaverAllowScreenSaver, |
886 EPhoneScreensaverNotAllowed ); |
906 EPhoneScreensaverNotAllowed ); |
887 TransitionHandlerL().IncomingCallUiUpdateLC(); |
907 |
|
908 IsNumberEntryUsedL() ? |
|
909 BeginTransEffectLC( ECallUiAppear ) : |
|
910 BeginTransEffectLC( ENumberEntryOpen ); |
|
911 BeginUiUpdateLC(); |
888 |
912 |
889 // Hide the number entry if it exists |
913 // Hide the number entry if it exists |
890 if ( IsNumberEntryUsedL() ) |
914 if ( IsNumberEntryUsedL() ) |
891 { |
915 { |
892 SetNumberEntryVisibilityL( EFalse ); |
916 SetNumberEntryVisibilityL( EFalse ); |
893 } |
917 } |
894 |
918 |
895 // Indicate that the menu application on foreground needs to be sent back to the foreground |
919 // Indicate that the menu application on foreground needs to be sent back to the foreground |
896 // after call is ended. |
920 // after call is ended. |
897 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
921 TPhoneCmdParamBoolean booleanParam; |
898 |
922 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
899 // Get allow waiting call header param value. |
923 iViewCommandHandle->ExecuteCommandL( |
|
924 EPhoneViewSetNeedToReturnToForegroundAppStatus, |
|
925 &booleanParam ); |
|
926 |
900 TPhoneCmdParamBoolean dialerParam; |
927 TPhoneCmdParamBoolean dialerParam; |
901 dialerParam.SetBoolean( ETrue ); |
928 dialerParam.SetBoolean( ETrue ); |
|
929 |
|
930 // Get allow waiting call header param value. |
902 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
931 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
903 |
932 |
904 CloseSelectionListL(); |
933 CloseSelectionListL(); |
905 |
934 |
906 // Close fast swap window if it's displayed |
935 // Close fast swap window if it's displayed |
907 EikonEnv()->DismissTaskList(); |
936 CEikonEnv::Static()->DismissTaskList(); |
908 |
937 |
909 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
938 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
910 |
939 |
|
940 // Display incoming call |
911 DisplayIncomingCallL( aCallId, dialerParam ); |
941 DisplayIncomingCallL( aCallId, dialerParam ); |
912 TransitionHandlerL().EndUiUpdateAndEffect(); |
942 |
913 |
943 EndUiUpdate(); |
|
944 EndTransEffect(); |
|
945 |
|
946 // Go to incoming state |
914 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
947 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
915 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
948 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
916 } |
949 } |
917 |
950 |
918 // ----------------------------------------------------------- |
951 // ----------------------------------------------------------- |
919 // CPhoneConference::DisplayIncomingCallL |
952 // CPhoneConference::DisplayIncomingCallL |
920 // ----------------------------------------------------------- |
953 // ----------------------------------------------------------- |
921 // |
954 // |
922 void CPhoneConference::DisplayIncomingCallL( |
955 void CPhoneConference::DisplayIncomingCallL( |
923 TInt aCallId, |
956 TInt aCallId, |
924 const TPhoneCmdParamBoolean /*aCommandParam*/ ) |
957 const TPhoneCmdParamBoolean aCommandParam ) |
925 { |
958 { |
926 __LOGMETHODSTARTEND( EPhoneUIStates, |
959 __LOGMETHODSTARTEND( EPhoneUIStates, |
927 "CPhoneConference::DisplayIncomingCallL()"); |
960 "CPhoneConference::DisplayIncomingCallL()"); |
928 // Close menu bar, if it is displayed |
961 // Close menu bar, if it is displayed |
929 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
962 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
979 } |
1016 } |
980 else |
1017 else |
981 { |
1018 { |
982 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
1019 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
983 } |
1020 } |
984 TransitionHandlerL().EndUiUpdate(); |
1021 EndUiUpdate(); |
985 } |
1022 } |
986 |
1023 |
987 // ----------------------------------------------------------- |
1024 // ----------------------------------------------------------- |
988 // CPhoneConference::OpenParticipantsListL |
1025 // CPhoneConference::OpenParticipantsListL |
989 // ----------------------------------------------------------- |
1026 // ----------------------------------------------------------- |
990 // |
1027 // |
991 void CPhoneConference::OpenParticipantsListL() |
1028 void CPhoneConference::OpenParticipantsListL() |
992 { |
1029 { |
993 TransitionHandlerL().BeginUiUpdateLC(); |
1030 BeginUiUpdateLC(); |
994 |
1031 |
995 TPhoneCmdParamBoolean booleanParam; |
1032 TPhoneCmdParamBoolean booleanParam; |
996 booleanParam.SetBoolean( ETrue ); |
1033 booleanParam.SetBoolean( ETrue ); |
997 |
1034 |
998 iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList, |
1035 iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList, |
999 &booleanParam ); |
1036 &booleanParam ); |
1000 |
1037 |
1001 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
1038 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
1002 |
1039 |
1003 TransitionHandlerL().EndUiUpdate(); |
1040 EndUiUpdate(); |
1004 |
1041 |
1005 iCbaManager->SetCbaL( EPhoneParticipantListCBA ); |
1042 iCbaManager->SetCbaL( EPhoneParticipantListCBA ); |
1006 |
1043 |
1007 // Find out is conference held or not |
1044 // Find out is conference held or not |
1008 TPhoneCmdParamCallStateData callStateData; |
1045 TPhoneCmdParamCallStateData callStateData; |