209 CPEPhoneModelIF::EPEMessageResumeConference ); |
213 CPEPhoneModelIF::EPEMessageResumeConference ); |
210 break; |
214 break; |
211 |
215 |
212 // Conference -> Drop participant |
216 // Conference -> Drop participant |
213 case EPhoneInCallCmdDropSelection: |
217 case EPhoneInCallCmdDropSelection: |
|
218 OpenDropParticipantSelectionL(); |
214 break; |
219 break; |
215 |
220 |
216 // Drop CBA |
221 // Drop CBA |
217 case EPhoneInCallCmdDrop: |
222 case EPhoneInCallCmdDrop: |
218 DropSelectedParticipantL(); |
223 DropSelectedParticipantL(); |
219 break; |
224 break; |
220 |
225 |
221 case EPhoneInCallCmdPrivateSelection: |
226 case EPhoneInCallCmdPrivateSelection: |
|
227 OpenPrivateSelectionL(); |
222 break; |
228 break; |
223 |
229 |
224 case EPhoneInCallCmdPrivate: |
230 case EPhoneInCallCmdPrivate: |
225 PrivateSelectedParticipantL(); |
231 PrivateSelectedParticipantL(); |
226 break; |
232 break; |
227 |
233 |
228 case EPhoneInCallCmdNewCall: |
234 case EPhoneInCallCmdNewCall: |
|
235 LaunchNewCallQueryL(); |
229 break; |
236 break; |
230 |
237 |
231 case EPhoneInCallCmdNewCallCall: |
238 case EPhoneInCallCmdNewCallCall: |
|
239 CallFromNewCallQueryL(); |
232 break; |
240 break; |
233 |
241 |
234 case EPhoneInCallCmdParticipants: |
242 case EPhoneInCallCmdParticipants: |
235 break; |
243 OpenParticipantsListL(); |
|
244 break; |
|
245 |
|
246 case EPhoneViewOpenNumberEntry: |
|
247 if ( IsConferenceBubbleInSelectionMode() ) |
|
248 { |
|
249 CloseSelectionListL(); |
|
250 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
251 } |
|
252 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
253 break; |
236 |
254 |
237 default: |
255 default: |
238 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
256 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
239 break; |
257 break; |
240 } |
258 } |
246 // CPhoneConference::UpdateInCallCbaL |
264 // CPhoneConference::UpdateInCallCbaL |
247 // ----------------------------------------------------------- |
265 // ----------------------------------------------------------- |
248 // |
266 // |
249 void CPhoneConference::UpdateInCallCbaL() |
267 void CPhoneConference::UpdateInCallCbaL() |
250 { |
268 { |
251 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
269 if ( iViewCommandHandle->HandleCommandL( EPhoneViewIsConferenceInExpandedMode ) |
|
270 != EPhoneViewResponseSuccess ) |
|
271 { |
|
272 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
273 } |
|
274 } |
|
275 |
|
276 // ----------------------------------------------------------- |
|
277 // CPhoneConference::OpenMenuBarL |
|
278 // ----------------------------------------------------------- |
|
279 // |
|
280 void CPhoneConference::OpenMenuBarL() |
|
281 { |
|
282 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
283 "CPhoneConference::OpenMenuBarL()"); |
|
284 TInt resourceId; |
|
285 |
|
286 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
287 { |
|
288 resourceId = EPhoneDtmfDialerMenubar; |
|
289 } |
|
290 else if ( IsNumberEntryVisibleL() ) |
|
291 { |
|
292 resourceId = EPhoneConfCallMenubarWithNumberEntry; |
|
293 } |
|
294 else if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) |
|
295 && IsConferenceBubbleInSelectionMode() ) |
|
296 { |
|
297 resourceId = EPhoneConfCallParticipantsMenubar; |
|
298 } |
|
299 else |
|
300 { |
|
301 resourceId = EPhoneConfCallMenubar; |
|
302 } |
|
303 |
|
304 TPhoneCmdParamInteger integerParam; |
|
305 integerParam.SetInteger( |
|
306 CPhoneMainResourceResolver::Instance()-> |
|
307 ResolveResourceID( resourceId ) ); |
|
308 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
309 &integerParam ); |
252 } |
310 } |
253 |
311 |
254 // ----------------------------------------------------------- |
312 // ----------------------------------------------------------- |
255 // CPhoneConference::HandleKeyEventL |
313 // CPhoneConference::HandleKeyEventL |
256 // ----------------------------------------------------------- |
314 // ----------------------------------------------------------- |
259 const TKeyEvent& aKeyEvent, |
317 const TKeyEvent& aKeyEvent, |
260 TEventCode aEventCode ) |
318 TEventCode aEventCode ) |
261 { |
319 { |
262 __LOGMETHODSTARTEND( EPhoneUIStates, |
320 __LOGMETHODSTARTEND( EPhoneUIStates, |
263 "CPhoneConference::HandleKeyEventL()"); |
321 "CPhoneConference::HandleKeyEventL()"); |
264 |
322 if ( IsConferenceBubbleInSelectionMode() ) |
265 if ( CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) ) |
323 { |
266 { |
324 if ( aKeyEvent.iCode == EKeyUpArrow || |
267 // Handle numeric keys when key events are received |
325 aKeyEvent.iCode == EKeyDownArrow ) |
268 // in conference state. |
326 { |
269 CPhoneGsmInCall::HandleNumericKeyEventL( aKeyEvent, aEventCode ); |
327 TPhoneCmdParamKeyEvent keyEventParam; |
|
328 keyEventParam.SetKeyEvent( aKeyEvent ); |
|
329 keyEventParam.SetEventCode( aEventCode ); |
|
330 |
|
331 iViewCommandHandle->ExecuteCommandL( |
|
332 EPhoneViewMoveHighLightInList, &keyEventParam ); |
|
333 } |
270 } |
334 } |
271 else |
335 else |
272 { |
336 { |
273 // Handle other key events. |
337 if ( CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) ) |
274 CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ); |
338 { |
275 } |
339 // Handle numeric keys when key events are received |
276 |
340 // in conference state. |
|
341 CPhoneGsmInCall::HandleNumericKeyEventL( aKeyEvent, aEventCode ); |
|
342 } |
|
343 else |
|
344 { |
|
345 // Handle other key events. |
|
346 CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ); |
|
347 } |
|
348 } |
277 } |
349 } |
278 |
350 |
279 // -------------------------------------------------------------- |
351 // -------------------------------------------------------------- |
280 // CPhoneConference::HandleKeyMessageL |
352 // CPhoneConference::HandleKeyMessageL |
281 // -------------------------------------------------------------- |
353 // -------------------------------------------------------------- |
375 |
454 |
376 switch( activeCallCount.Integer() ) |
455 switch( activeCallCount.Integer() ) |
377 { |
456 { |
378 case ENoActiveCalls: |
457 case ENoActiveCalls: |
379 MakeStateTransitionToIdleL(); |
458 MakeStateTransitionToIdleL(); |
380 break; |
459 break; |
381 |
460 |
382 case EOneActiveCall: |
461 case EOneActiveCall: |
383 { |
462 { |
384 // Fetch ringing call's id from view |
463 // Fetch ringing call's id from view |
385 TPhoneCmdParamCallStateData callStateData; |
464 TPhoneCmdParamCallStateData callStateData; |
386 callStateData.SetCallState( EPEStateRinging ); |
465 callStateData.SetCallState( EPEStateRinging ); |
387 iViewCommandHandle->HandleCommandL( |
466 iViewCommandHandle->HandleCommandL( |
388 EPhoneViewGetCallIdByState, &callStateData ); |
467 EPhoneViewGetCallIdByState, &callStateData ); |
389 |
468 |
390 if( callStateData.CallId() > KErrNotFound ) |
469 if( callStateData.CallId() > KErrNotFound ) |
391 { |
470 { |
|
471 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
472 KPSUidScreenSaver, |
|
473 KScreenSaverAllowScreenSaver, |
|
474 EPhoneScreensaverNotAllowed ); |
392 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
475 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
393 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
476 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
394 } |
477 } |
395 else |
478 else |
396 { |
479 { |
397 MakeStateTransitionToSingleL(); |
480 MakeStateTransitionToSingleL(); |
398 } |
481 } |
399 } |
482 } |
400 break; |
483 break; |
401 |
484 |
402 case ETwoActiveCalls: |
485 case ETwoActiveCalls: |
433 CCoeEnv::Static() ); |
516 CCoeEnv::Static() ); |
434 callHeaderParam.SetLabelText( labelText ); |
517 callHeaderParam.SetLabelText( labelText ); |
435 |
518 |
436 iViewCommandHandle->ExecuteCommandL( |
519 iViewCommandHandle->ExecuteCommandL( |
437 EPhoneViewUpdateBubble, aCallId, &callHeaderParam ); |
520 EPhoneViewUpdateBubble, aCallId, &callHeaderParam ); |
438 |
521 |
|
522 // Set Hold flag to view |
|
523 SetHoldFlagL(); |
|
524 |
439 if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
525 if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
440 { |
526 { |
441 SendGlobalInfoNoteL( EPhoneInformationConferenceOnHold, ETrue ); |
527 SendGlobalInfoNoteL( EPhoneInformationConferenceOnHold ); |
442 } |
528 } |
443 |
529 |
444 SetTouchPaneButtons( EPhoneConferenceButtons ); |
530 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
531 |
445 UpdateInCallCbaL(); |
532 UpdateInCallCbaL(); |
|
533 } |
|
534 |
|
535 |
|
536 // ----------------------------------------------------------- |
|
537 // CPhoneConference::DefineAndSetHoldFlagL |
|
538 // ----------------------------------------------------------- |
|
539 // |
|
540 void CPhoneConference::DefineAndSetHoldFlagL() |
|
541 { |
|
542 // Find out is conference held or not |
|
543 TPhoneCmdParamCallStateData callStateData; |
|
544 callStateData.SetCallId( KConferenceCallId ); |
|
545 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState, |
|
546 &callStateData ); |
|
547 |
|
548 // Set Hold flag to view |
|
549 TPhoneCmdParamBoolean holdFlag; |
|
550 |
|
551 if( callStateData.CallState() == EPEStateHeld ) |
|
552 { |
|
553 holdFlag.SetBoolean( ETrue ); |
|
554 } |
|
555 else |
|
556 { |
|
557 holdFlag.SetBoolean( EFalse ); |
|
558 } |
|
559 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
560 |
|
561 } |
|
562 |
|
563 // ----------------------------------------------------------- |
|
564 // CPhoneConference::SetHoldFlagL |
|
565 // ----------------------------------------------------------- |
|
566 // |
|
567 void CPhoneConference::SetHoldFlagL() |
|
568 { |
|
569 // Set Hold flag to view |
|
570 TPhoneCmdParamBoolean holdFlag; |
|
571 holdFlag.SetBoolean( ETrue ); |
|
572 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
573 |
446 } |
574 } |
447 |
575 |
448 // ----------------------------------------------------------- |
576 // ----------------------------------------------------------- |
449 // CPhoneConference::HandleConnectedConferenceL |
577 // CPhoneConference::HandleConnectedConferenceL |
450 // ----------------------------------------------------------- |
578 // ----------------------------------------------------------- |
475 holdFlag.SetBoolean( EFalse ); |
603 holdFlag.SetBoolean( EFalse ); |
476 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
604 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
477 |
605 |
478 if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
606 if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
479 { |
607 { |
480 SendGlobalInfoNoteL( EPhoneInformationConferenceActiveted, ETrue ); |
608 SendGlobalInfoNoteL( EPhoneInformationConferenceActiveted ); |
481 } |
609 } |
482 |
610 |
483 SetTouchPaneButtons( EPhoneConferenceButtons ); |
611 SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
484 |
612 |
485 UpdateInCallCbaL(); |
613 UpdateInCallCbaL(); |
|
614 } |
|
615 |
|
616 // ----------------------------------------------------------- |
|
617 // CPhoneConference::OpenDropParticipantSelectionL |
|
618 // ----------------------------------------------------------- |
|
619 // |
|
620 void CPhoneConference::OpenDropParticipantSelectionL() |
|
621 { |
|
622 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
623 "CPhoneConference::OpenDropParticipantSelectionL()"); |
|
624 TPhoneCmdParamBoolean booleanParam; |
|
625 booleanParam.SetBoolean( ETrue ); |
|
626 iViewCommandHandle->ExecuteCommandL( |
|
627 EPhoneViewOpenConferenceList, &booleanParam ); |
|
628 |
|
629 iCbaManager->SetCbaL( EPhoneDropParticipantCBA ); |
486 } |
630 } |
487 |
631 |
488 // ----------------------------------------------------------- |
632 // ----------------------------------------------------------- |
489 // CPhoneConference::DropSelectedParticipantL |
633 // CPhoneConference::DropSelectedParticipantL |
490 // ----------------------------------------------------------- |
634 // ----------------------------------------------------------- |
549 |
710 |
550 SetDefaultFlagsL(); |
711 SetDefaultFlagsL(); |
551 |
712 |
552 if ( IsNumberEntryUsedL() ) |
713 if ( IsNumberEntryUsedL() ) |
553 { |
714 { |
554 // Show the number entry if it exists |
715 if ( NeedToReturnToForegroundAppL() ) |
555 SetNumberEntryVisibilityL(ETrue); |
716 { |
556 } |
717 // Return phone to the background if menu application is needed to foreground. |
557 else if ( !TopAppIsDisplayedL() ) |
718 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
558 { |
719 |
|
720 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
|
721 |
|
722 // Set Number Entry CBA |
|
723 iCbaManager->SetCbaL( EPhoneNumberAcqCBA ); |
|
724 } |
|
725 else |
|
726 { |
|
727 // Show the number entry if it exists |
|
728 SetNumberEntryVisibilityL(ETrue); |
|
729 |
|
730 // Close dtmf dialer when call is disconnected. |
|
731 if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
732 { |
|
733 CloseDTMFEditorL(); |
|
734 // Display idle screen and update CBAs |
|
735 DisplayIdleScreenL(); |
|
736 } |
|
737 } |
|
738 } |
|
739 else if ( !TopAppIsDisplayedL() || NeedToReturnToForegroundAppL() ) |
|
740 { |
|
741 // Close menu bar, if it is displayed |
|
742 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
559 |
743 |
560 // Continue displaying current app but set up the |
744 // Continue displaying current app but set up the |
561 // idle screen in the background |
745 // idle screen in the background |
562 SetupIdleScreenInBackgroundL(); |
746 SetupIdleScreenInBackgroundL(); |
563 } |
747 } |
564 else |
748 else |
565 { |
749 { |
|
750 // Close menu bar, if it is displayed |
|
751 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
752 |
566 // Display idle screen |
753 // Display idle screen |
567 DisplayIdleScreenL(); |
754 DisplayIdleScreenL(); |
568 } |
755 } |
569 |
756 |
570 // Display call termination note, if necessary |
757 // Display call termination note, if necessary |
619 // Go to two singles state |
801 // Go to two singles state |
620 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
802 iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
621 } |
803 } |
622 |
804 |
623 // ----------------------------------------------------------- |
805 // ----------------------------------------------------------- |
|
806 // CPhoneConference::CloseSelectionListL |
|
807 // ----------------------------------------------------------- |
|
808 // |
|
809 void CPhoneConference::CloseSelectionListL() |
|
810 { |
|
811 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
812 "CPhoneConference::CloseSelectionListL()"); |
|
813 // Close conference list |
|
814 TPhoneCmdParamBoolean booleanParam; |
|
815 booleanParam.SetBoolean( EFalse ); |
|
816 iViewCommandHandle->ExecuteCommandL( |
|
817 EPhoneViewOpenConferenceList, &booleanParam ); |
|
818 } |
|
819 |
|
820 // ----------------------------------------------------------- |
624 // CPhoneConference::ToggleHold |
821 // CPhoneConference::ToggleHold |
625 // ----------------------------------------------------------- |
822 // ----------------------------------------------------------- |
626 // |
823 // |
627 void CPhoneConference::ToggleHoldL() |
824 void CPhoneConference::ToggleHoldL() |
628 { |
825 { |
629 __LOGMETHODSTARTEND( EPhoneUIStates, |
826 __LOGMETHODSTARTEND( EPhoneUIStates, |
630 "CPhoneConference::ToggleHoldL()"); |
827 "CPhoneConference::ToggleHoldL()"); |
631 |
828 TPhoneCmdParamBoolean hold; |
632 TPECallControlCaps callControlCaps = |
829 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &hold ); |
633 iStateMachine->PhoneEngineInfo()->CallControlCaps( KConferenceCallId ); |
830 |
634 |
831 if( hold.Boolean() ) |
635 if ( callControlCaps & MCCECallObserver::ECCECapsHold ) |
832 { |
636 { |
|
637 iStateMachine->SetCallId( KConferenceCallId ); |
|
638 iStateMachine->SendPhoneEngineMessage( |
833 iStateMachine->SendPhoneEngineMessage( |
639 CPEPhoneModelIF::EPEMessageHold ); |
834 CPEPhoneModelIF::EPEMessageResumeConference ); |
640 } |
835 } |
641 else if ( callControlCaps & MCCECallObserver::ECCECapsResume ) |
836 else |
642 { |
837 { |
643 iStateMachine->SetCallId( KConferenceCallId ); |
|
644 iStateMachine->SendPhoneEngineMessage( |
838 iStateMachine->SendPhoneEngineMessage( |
645 CPEPhoneModelIF::EPEMessageResume ); |
839 CPEPhoneModelIF::EPEMessageHoldConference ); |
646 } |
840 } |
647 else |
841 } |
648 { |
842 |
649 SendGlobalInfoNoteL( EPhoneNoteTextNotAllowed, ETrue ); |
843 // ----------------------------------------------------------- |
650 } |
844 // CPhoneConference::HandleDialingL |
651 } |
845 // ----------------------------------------------------------- |
652 |
846 // |
653 // ----------------------------------------------------------- |
847 void CPhoneConference::HandleDialingL( TInt aCallId ) |
654 // CPhoneConference::HandleDiallingL |
848 { |
655 // ----------------------------------------------------------- |
849 __LOGMETHODSTARTEND( EPhoneUIStates, |
656 // |
850 "CPhoneConference::HandleDialingL()"); |
657 void CPhoneConference::HandleDiallingL( TInt aCallId ) |
851 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
658 { |
852 KPSUidScreenSaver, |
659 __LOGMETHODSTARTEND( EPhoneUIStates, |
853 KScreenSaverAllowScreenSaver, |
660 "CPhoneConference::HandleDiallingL()"); |
854 EPhoneScreensaverNotAllowed ); |
661 BeginUiUpdateLC(); |
855 CloseSelectionListL(); |
662 |
|
663 SetNumberEntryVisibilityL(EFalse); |
|
664 |
856 |
665 // Display call setup |
857 // Display call setup |
666 DisplayCallSetupL( aCallId ); |
858 DisplayCallSetupL( aCallId ); |
667 |
859 |
668 // Conference is understood as single call in buttons enumerations. |
|
669 SetTouchPaneButtons(EPhoneCallSetupAndSingleButtons); |
|
670 |
|
671 EndUiUpdate(); |
|
672 |
|
673 // Set Call Setup CBA |
|
674 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
675 |
|
676 // Go to conference and call setup state |
860 // Go to conference and call setup state |
677 iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
861 iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
678 } |
862 } |
679 |
863 |
680 // ----------------------------------------------------------- |
864 // ----------------------------------------------------------- |
681 // CPhoneConference::DisplayCallSetupL |
865 // CPhoneConference::DoStateSpecificCallSetUpDefinitionsL |
682 // ----------------------------------------------------------- |
866 // ----------------------------------------------------------- |
683 // |
867 // |
684 void CPhoneConference::DisplayCallSetupL( TInt aCallId ) |
868 EXPORT_C void CPhoneConference::DoStateSpecificCallSetUpDefinitionsL() |
685 { |
869 { |
686 __LOGMETHODSTARTEND( EPhoneUIStates, |
870 // Show incoming call buttons |
687 "CPhoneConference::DisplayCallSetupL()"); |
871 SetTouchPaneButtons( EPhoneCallSetupAndSingleButtons ); |
688 |
872 } |
689 // Remove dialogs if necessary |
873 |
690 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
874 // --------------------------------------------------------- |
691 |
875 // CPhoneConference::CallFromNewCallQueryL |
692 // Capture keys when the phone is dialling |
876 // --------------------------------------------------------- |
693 CaptureKeysDuringCallNotificationL( ETrue ); |
877 // |
694 |
878 void CPhoneConference::CallFromNewCallQueryL() |
695 // Bring Phone app in the foreground |
879 { |
696 TPhoneCmdParamInteger uidParam; |
880 __LOGMETHODSTARTEND( EPhoneUIStates, |
697 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
881 "CPhoneConference::CallFromNewCallQueryL()"); |
698 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
882 // First get the phone number from the dialog |
699 &uidParam ); |
883 TPhoneCmdParamString phoneNumberParam; |
700 |
884 HBufC *content = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
701 // Display call setup header |
885 TPtr ptr( content->Des() ); |
702 DisplayHeaderForOutgoingCallL( aCallId ); |
886 phoneNumberParam.SetString( &ptr ); |
|
887 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetTextQueryContent, |
|
888 &phoneNumberParam ); |
|
889 |
|
890 // Store the phone number |
|
891 iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr ); |
|
892 |
|
893 // clean up stack |
|
894 CleanupStack::PopAndDestroy( content ); |
|
895 |
|
896 // Dial number |
|
897 DialVoiceCallL(); |
703 } |
898 } |
704 |
899 |
705 // ----------------------------------------------------------- |
900 // ----------------------------------------------------------- |
706 // CPhoneConference::HandleIncomingL |
901 // CPhoneConference::HandleIncomingL |
707 // ----------------------------------------------------------- |
902 // ----------------------------------------------------------- |
709 void CPhoneConference::HandleIncomingL( TInt aCallId ) |
904 void CPhoneConference::HandleIncomingL( TInt aCallId ) |
710 { |
905 { |
711 __LOGMETHODSTARTEND( EPhoneUIStates, |
906 __LOGMETHODSTARTEND( EPhoneUIStates, |
712 "CPhoneConference::HandleIncomingL()"); |
907 "CPhoneConference::HandleIncomingL()"); |
713 |
908 |
|
909 CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
910 KPSUidScreenSaver, |
|
911 KScreenSaverAllowScreenSaver, |
|
912 EPhoneScreensaverNotAllowed ); |
|
913 |
|
914 IsNumberEntryUsedL() ? |
|
915 BeginTransEffectLC( ECallUiAppear ) : |
|
916 BeginTransEffectLC( ENumberEntryOpen ); |
714 BeginUiUpdateLC(); |
917 BeginUiUpdateLC(); |
715 |
918 |
|
919 // Hide the number entry if it exists |
|
920 if ( IsNumberEntryUsedL() ) |
|
921 { |
|
922 SetNumberEntryVisibilityL( EFalse ); |
|
923 } |
|
924 |
|
925 // Indicate that the menu application on foreground needs to be sent back to the foreground |
|
926 // after call is ended. |
|
927 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
|
928 |
716 TPhoneCmdParamBoolean dialerParam; |
929 TPhoneCmdParamBoolean dialerParam; |
717 dialerParam.SetBoolean( ETrue ); |
930 dialerParam.SetBoolean( ETrue ); |
718 |
931 |
719 // Get allow waiting call header param value. |
932 // Get allow waiting call header param value. |
720 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
933 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
|
934 |
|
935 CloseSelectionListL(); |
|
936 |
721 // Close fast swap window if it's displayed |
937 // Close fast swap window if it's displayed |
722 CEikonEnv::Static()->DismissTaskList(); |
938 EikonEnv()->DismissTaskList(); |
723 |
939 |
724 // Check if HW Keys or Call UI should be disabled |
940 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
725 CheckDisableHWKeysAndCallUIL(); |
|
726 |
941 |
727 // Display incoming call |
942 // Display incoming call |
728 DisplayIncomingCallL( aCallId, dialerParam ); |
943 DisplayIncomingCallL( aCallId, dialerParam ); |
729 |
|
730 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
731 |
944 |
732 EndUiUpdate(); |
945 EndUiUpdate(); |
|
946 EndTransEffect(); |
733 |
947 |
734 // Go to incoming state |
948 // Go to incoming state |
735 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
949 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
736 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
950 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
737 } |
951 } |
740 // CPhoneConference::DisplayIncomingCallL |
954 // CPhoneConference::DisplayIncomingCallL |
741 // ----------------------------------------------------------- |
955 // ----------------------------------------------------------- |
742 // |
956 // |
743 void CPhoneConference::DisplayIncomingCallL( |
957 void CPhoneConference::DisplayIncomingCallL( |
744 TInt aCallId, |
958 TInt aCallId, |
745 const TPhoneCmdParamBoolean aCommandParam ) |
959 const TPhoneCmdParamBoolean /*aCommandParam*/ ) |
746 { |
960 { |
747 __LOGMETHODSTARTEND( EPhoneUIStates, |
961 __LOGMETHODSTARTEND( EPhoneUIStates, |
748 "CPhoneConference::DisplayIncomingCallL()"); |
962 "CPhoneConference::DisplayIncomingCallL()"); |
749 |
963 // Close menu bar, if it is displayed |
750 // Cannot delete active note, e.g. New call query, |
964 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
751 // but show waiting note with or without caller name |
965 |
752 if ( IsAnyQueryActiveL() || |
966 // Remove any phone dialogs if they are displayed |
753 ( !aCommandParam.Boolean() && iOnScreenDialer ) ) |
967 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
754 { |
|
755 CallWaitingNoteL( aCallId ); |
|
756 } |
|
757 else |
|
758 { |
|
759 // Remove any phone dialogs if they are displayed |
|
760 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
761 } |
|
762 |
968 |
763 // Indicate that the Phone needs to be sent to the background if |
969 // Indicate that the Phone needs to be sent to the background if |
764 // an application other than the top application is in the foreground |
970 // an application other than the top application is in the foreground |
765 TPhoneCmdParamBoolean booleanParam; |
971 SetNeedToReturnToForegroundAppStatusL( !TopAppIsDisplayedL() ); |
766 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
767 iViewCommandHandle->ExecuteCommandL( |
|
768 EPhoneViewSetNeedToSendToBackgroundStatus, |
|
769 &booleanParam ); |
|
770 |
972 |
771 // Bring Phone app in the foreground |
973 // Bring Phone app in the foreground |
772 TPhoneCmdParamInteger uidParam; |
974 TPhoneCmdParamInteger uidParam; |
773 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
975 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
774 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
976 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
806 // Go to Conference And Single state |
1008 // Go to Conference And Single state |
807 |
1009 |
808 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
1010 UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
809 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
1011 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
810 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
1012 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
|
1013 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
811 } |
1014 } |
812 else |
1015 else |
813 { |
1016 { |
814 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
1017 SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
815 } |
1018 } |
816 EndUiUpdate(); |
1019 EndUiUpdate(); |
817 } |
1020 } |
|
1021 |
|
1022 // ----------------------------------------------------------- |
|
1023 // CPhoneConference::OpenParticipantsListL |
|
1024 // ----------------------------------------------------------- |
|
1025 // |
|
1026 void CPhoneConference::OpenParticipantsListL() |
|
1027 { |
|
1028 BeginUiUpdateLC(); |
|
1029 |
|
1030 TPhoneCmdParamBoolean booleanParam; |
|
1031 booleanParam.SetBoolean( ETrue ); |
|
1032 |
|
1033 iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList, |
|
1034 &booleanParam ); |
|
1035 |
|
1036 SetTouchPaneButtons( EPhoneParticipantListButtons ); |
|
1037 |
|
1038 EndUiUpdate(); |
|
1039 |
|
1040 iCbaManager->SetCbaL( EPhoneParticipantListCBA ); |
|
1041 |
|
1042 // Find out is conference held or not |
|
1043 TPhoneCmdParamCallStateData callStateData; |
|
1044 callStateData.SetCallId( KConferenceCallId ); |
|
1045 iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState, |
|
1046 &callStateData ); |
|
1047 |
|
1048 if( callStateData.CallState() == EPEStateHeld ) |
|
1049 { |
|
1050 //set Private button to Dimmed. |
|
1051 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
1052 } |
|
1053 else |
|
1054 { |
|
1055 //set Private button to UnDimmed. |
|
1056 SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
|
1057 } |
|
1058 |
|
1059 } |
|
1060 |
|
1061 // ----------------------------------------------------------- |
|
1062 // CPhoneConference::IsConferenceBubbleInSelectionMode |
|
1063 // ----------------------------------------------------------- |
|
1064 // |
|
1065 TBool CPhoneConference::IsConferenceBubbleInSelectionMode() const |
|
1066 { |
|
1067 TPhoneCmdParamBoolean booleanParam; |
|
1068 |
|
1069 iViewCommandHandle->ExecuteCommand( |
|
1070 EPhoneViewGetIsConferenceInSelectionMode, &booleanParam ); |
|
1071 |
|
1072 return booleanParam.Boolean(); |
|
1073 } |
|
1074 |
|
1075 // --------------------------------------------------------- |
|
1076 // CPhoneState::HandleCreateNumberEntryL |
|
1077 // --------------------------------------------------------- |
|
1078 // |
|
1079 void CPhoneConference::HandleCreateNumberEntryL( const TKeyEvent& aKeyEvent, |
|
1080 TEventCode aEventCode ) |
|
1081 { |
|
1082 __LOGMETHODSTARTEND( EPhoneControl, "CPhoneConference::HandleCreateNumberEntryL() "); |
|
1083 if ( !IsConferenceBubbleInSelectionMode() ) |
|
1084 { |
|
1085 CPhoneGsmInCall::HandleCreateNumberEntryL( aKeyEvent,aEventCode ); |
|
1086 } |
|
1087 } |
818 |
1088 |
819 // ----------------------------------------------------------- |
1089 // ----------------------------------------------------------- |
820 // CPhoneConference::UpdateConferenceSecurityStatusL |
1090 // CPhoneConference::UpdateConferenceSecurityStatusL |
821 // ----------------------------------------------------------- |
1091 // ----------------------------------------------------------- |
822 // |
1092 // |