139 case MEngineMonitor::EPEMessageWentOneToOne: |
139 case MEngineMonitor::EPEMessageWentOneToOne: |
140 HandleWentOneToOneL( aCallId ); |
140 HandleWentOneToOneL( aCallId ); |
141 break; |
141 break; |
142 |
142 |
143 case MEngineMonitor::EPEMessageHeld: |
143 case MEngineMonitor::EPEMessageHeld: |
144 { |
|
145 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
146 callHeaderParam.SetCallState( EPEStateHeld ); |
|
147 TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
|
148 TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
149 ResolveResourceID( EPhoneCallOnHold ); |
|
150 |
|
151 StringLoader::Load( labelText, callLabelId, CCoeEnv::Static() ); |
|
152 callHeaderParam.SetLabelText( labelText ); |
|
153 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
154 &callHeaderParam ); |
|
155 } |
|
156 break; |
|
157 |
|
158 case MEngineMonitor::EPEMessageConnected: |
144 case MEngineMonitor::EPEMessageConnected: |
159 { |
145 { |
160 TPhoneCmdParamCallHeaderData callHeaderParam; |
146 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId ); |
161 callHeaderParam.SetCallState( EPEStateConnected ); |
|
162 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
163 &callHeaderParam ); |
|
164 } |
147 } |
165 break; |
148 break; |
166 |
149 |
167 case MEngineMonitor::EPEMessageDialing: |
150 case MEngineMonitor::EPEMessageDialing: |
168 HandleDiallingL( aCallId ); |
151 HandleDialingL( aCallId ); |
169 break; |
152 break; |
170 |
153 |
171 case MEngineMonitor::EPEMessageIncoming: |
154 case MEngineMonitor::EPEMessageIncoming: |
172 HandleIncomingL( aCallId ); |
155 HandleIncomingL( aCallId ); |
173 break; |
156 break; |
217 break; |
199 break; |
218 |
200 |
219 case EPhoneInCallCmdPrivateSelection: |
201 case EPhoneInCallCmdPrivateSelection: |
220 case EPhoneInCallCmdDropSelection: |
202 case EPhoneInCallCmdDropSelection: |
221 case EPhoneInCallCmdNewCall: |
203 case EPhoneInCallCmdNewCall: |
222 case EPhoneInCallCmdNewCallCall: |
|
223 case EPhoneInCallCmdParticipants: |
204 case EPhoneInCallCmdParticipants: |
224 break; |
205 break; |
225 |
206 |
226 default: |
207 default: |
227 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
208 commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
228 break; |
209 break; |
229 } |
210 } |
230 return commandStatus; |
211 return commandStatus; |
231 } |
|
232 |
|
233 // ----------------------------------------------------------- |
|
234 // CPhoneConference::UpdateInCallCbaL |
|
235 // ----------------------------------------------------------- |
|
236 // |
|
237 void CPhoneConference::UpdateInCallCbaL() |
|
238 { |
|
239 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
240 } |
212 } |
241 |
213 |
242 // ----------------------------------------------------------- |
214 // ----------------------------------------------------------- |
243 // CPhoneConference::HandleKeyEventL |
215 // CPhoneConference::HandleKeyEventL |
244 // ----------------------------------------------------------- |
216 // ----------------------------------------------------------- |
383 // ----------------------------------------------------------- |
355 // ----------------------------------------------------------- |
384 // |
356 // |
385 void CPhoneConference::HandleHeldConferenceL( TInt aCallId ) |
357 void CPhoneConference::HandleHeldConferenceL( TInt aCallId ) |
386 { |
358 { |
387 __LOGMETHODSTARTEND( EPhoneUIStates, |
359 __LOGMETHODSTARTEND( EPhoneUIStates, |
388 "CPhoneConference::HandleHeldConferenceL()"); |
360 "CPhoneConference::HandleHeldConferenceL()"); |
389 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
390 callHeaderParam.SetCallState( EPEStateHeldConference ); |
|
391 |
|
392 TInt callLabelId; |
|
393 TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
|
394 callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
395 ResolveResourceID( EPhoneCallOnHold ); |
|
396 StringLoader::Load( |
|
397 labelText, |
|
398 callLabelId, |
|
399 CCoeEnv::Static() ); |
|
400 callHeaderParam.SetLabelText( labelText ); |
|
401 |
|
402 iViewCommandHandle->ExecuteCommandL( |
361 iViewCommandHandle->ExecuteCommandL( |
403 EPhoneViewUpdateBubble, aCallId, &callHeaderParam ); |
362 EPhoneViewUpdateBubble, aCallId ); |
404 SetTouchPaneButtons( EPhoneConferenceButtons ); |
363 UpdateUiCommands(); |
405 UpdateInCallCbaL(); |
|
406 } |
364 } |
407 |
365 |
408 // ----------------------------------------------------------- |
366 // ----------------------------------------------------------- |
409 // CPhoneConference::HandleConnectedConferenceL |
367 // CPhoneConference::HandleConnectedConferenceL |
410 // ----------------------------------------------------------- |
368 // ----------------------------------------------------------- |
411 // |
369 // |
412 void CPhoneConference::HandleConnectedConferenceL() |
370 void CPhoneConference::HandleConnectedConferenceL() |
413 { |
371 { |
414 __LOGMETHODSTARTEND( EPhoneUIStates, |
372 __LOGMETHODSTARTEND( EPhoneUIStates, |
415 "CPhoneConference::HandleConnectedConferenceL()"); |
373 "CPhoneConference::HandleConnectedConferenceL()"); |
416 TPhoneCmdParamCallHeaderData callHeaderParam; |
|
417 callHeaderParam.SetCallState( EPEStateConnectedConference ); |
|
418 |
|
419 TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC ); |
|
420 TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
421 ResolveResourceID( EPhoneCLIConferenceCall ); |
|
422 |
|
423 StringLoader::Load( |
|
424 conferenceText, |
|
425 callLabelId, |
|
426 CCoeEnv::Static() ); |
|
427 callHeaderParam.SetLabelText( conferenceText ); |
|
428 |
|
429 iViewCommandHandle->ExecuteCommandL( |
374 iViewCommandHandle->ExecuteCommandL( |
430 EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam ); |
375 EPhoneViewUpdateBubble, KConferenceCallId ); |
431 |
376 UpdateUiCommands(); |
432 // Set Hold flag to view |
|
433 TPhoneCmdParamBoolean holdFlag; |
|
434 holdFlag.SetBoolean( EFalse ); |
|
435 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
436 |
|
437 SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
438 UpdateInCallCbaL(); |
|
439 } |
377 } |
440 |
378 |
441 // ----------------------------------------------------------- |
379 // ----------------------------------------------------------- |
442 // CPhoneConference::DropSelectedParticipantL |
380 // CPhoneConference::DropSelectedParticipantL |
443 // ----------------------------------------------------------- |
381 // ----------------------------------------------------------- |
492 { |
429 { |
493 __LOGMETHODSTARTEND( EPhoneUIStates, |
430 __LOGMETHODSTARTEND( EPhoneUIStates, |
494 "CPhoneConference::MakeStateTransitionToIdleL()"); |
431 "CPhoneConference::MakeStateTransitionToIdleL()"); |
495 SetDefaultFlagsL(); |
432 SetDefaultFlagsL(); |
496 |
433 |
497 if ( IsNumberEntryUsedL() ) |
434 if ( iNumberEntryManager->IsNumberEntryUsedL() ) |
498 { |
435 { |
499 SetNumberEntryVisibilityL(ETrue); |
436 iNumberEntryManager->SetNumberEntryVisibilityL(ETrue); |
500 } |
|
501 else if ( !TopAppIsDisplayedL() ) |
|
502 { |
|
503 |
|
504 // Continue displaying current app but set up the |
|
505 // idle screen in the background |
|
506 SetupIdleScreenInBackgroundL(); |
|
507 } |
437 } |
508 else |
438 else |
509 { |
439 { |
510 DisplayIdleScreenL(); |
440 RemoveDialogsAndSendPhoneToBackgroundL(); |
511 } |
441 } |
512 DisplayCallTerminationNoteL(); |
442 DisplayCallTerminationNoteL(); |
513 UpdateCbaL( EPhoneEmptyCBA ); |
443 UpdateUiCommands(); |
514 iStateMachine->ChangeState( EPhoneStateIdle ); |
444 iStateMachine->ChangeState( EPhoneStateIdle ); |
515 } |
445 } |
516 |
446 |
517 // ----------------------------------------------------------- |
447 // ----------------------------------------------------------- |
518 // CPhoneConference::MakeStateTransitionToSingleL |
448 // CPhoneConference::MakeStateTransitionToSingleL |
555 // |
476 // |
556 void CPhoneConference::ToggleHoldL() |
477 void CPhoneConference::ToggleHoldL() |
557 { |
478 { |
558 __LOGMETHODSTARTEND( EPhoneUIStates, |
479 __LOGMETHODSTARTEND( EPhoneUIStates, |
559 "CPhoneConference::ToggleHoldL()"); |
480 "CPhoneConference::ToggleHoldL()"); |
560 |
481 iStateMachine->SetCallId( KConferenceCallId ); |
561 iStateMachine->SetCallId( KConferenceCallId ); |
|
562 iStateMachine->SendPhoneEngineMessage( |
482 iStateMachine->SendPhoneEngineMessage( |
563 CPEPhoneModelIF::EPEMessageSwapConference ); |
483 CPEPhoneModelIF::EPEMessageSwapConference ); |
564 } |
484 } |
565 |
485 |
566 // ----------------------------------------------------------- |
486 // ----------------------------------------------------------- |
567 // CPhoneConference::HandleDiallingL |
487 // CPhoneConference::HandleDialingL |
568 // ----------------------------------------------------------- |
488 // ----------------------------------------------------------- |
569 // |
489 // |
570 void CPhoneConference::HandleDiallingL( TInt aCallId ) |
490 void CPhoneConference::HandleDialingL( TInt aCallId ) |
571 { |
491 { |
572 __LOGMETHODSTARTEND( EPhoneUIStates, |
492 __LOGMETHODSTARTEND( EPhoneUIStates, |
573 "CPhoneConference::HandleDiallingL()"); |
493 "CPhoneConference::HandleDialingL()"); |
574 BeginUiUpdateLC(); |
494 DisplayCallHeaderL( aCallId, ESetNEVisibilityFalse); |
575 SetNumberEntryVisibilityL(EFalse); |
|
576 DisplayCallSetupL( aCallId ); |
|
577 SetTouchPaneButtons(EPhoneCallSetupAndSingleButtons); |
|
578 EndUiUpdate(); |
|
579 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
580 iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
495 iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
581 } |
496 } |
582 |
497 |
583 // ----------------------------------------------------------- |
498 // ----------------------------------------------------------- |
584 // CPhoneConference::DisplayCallSetupL |
|
585 // ----------------------------------------------------------- |
|
586 // |
|
587 void CPhoneConference::DisplayCallSetupL( TInt aCallId ) |
|
588 { |
|
589 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
590 "CPhoneConference::DisplayCallSetupL()"); |
|
591 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
592 TPhoneCmdParamInteger uidParam; |
|
593 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
594 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
595 &uidParam ); |
|
596 DisplayHeaderForOutgoingCallL( aCallId ); |
|
597 } |
|
598 |
|
599 // ----------------------------------------------------------- |
|
600 // CPhoneConference::HandleIncomingL |
499 // CPhoneConference::HandleIncomingL |
601 // ----------------------------------------------------------- |
500 // ----------------------------------------------------------- |
602 // |
501 // |
603 void CPhoneConference::HandleIncomingL( TInt aCallId ) |
502 void CPhoneConference::HandleIncomingL( TInt aCallId ) |
604 { |
503 { |
605 __LOGMETHODSTARTEND( EPhoneUIStates, |
504 __LOGMETHODSTARTEND( EPhoneUIStates, |
606 "CPhoneConference::HandleIncomingL()"); |
505 "CPhoneConference::HandleIncomingL()"); |
607 BeginUiUpdateLC(); |
506 DisplayCallHeaderL( aCallId, ECheckIfNEUsedBeforeSettingVisibilityFalse ); |
608 TPhoneCmdParamBoolean dialerParam; |
|
609 dialerParam.SetBoolean( ETrue ); |
|
610 |
|
611 // Get allow waiting call header param value. |
|
612 AllowShowingOfWaitingCallHeaderL( dialerParam ); |
|
613 // Close fast swap window if it's displayed |
|
614 CEikonEnv::Static()->DismissTaskList(); |
|
615 |
|
616 CheckDisableHWKeysAndCallUIL(); |
|
617 DisplayIncomingCallL( aCallId, dialerParam ); |
|
618 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
619 EndUiUpdate(); |
|
620 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
621 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
507 iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
622 } |
|
623 |
|
624 // ----------------------------------------------------------- |
|
625 // CPhoneConference::DisplayIncomingCallL |
|
626 // ----------------------------------------------------------- |
|
627 // |
|
628 void CPhoneConference::DisplayIncomingCallL( |
|
629 TInt aCallId, |
|
630 const TPhoneCmdParamBoolean aCommandParam ) |
|
631 { |
|
632 __LOGMETHODSTARTEND( EPhoneUIStates, |
|
633 "CPhoneConference::DisplayIncomingCallL()"); |
|
634 // Cannot delete active note, e.g. New call query, |
|
635 // but show waiting note with or without caller name |
|
636 if ( IsAnyQueryActiveL() || !aCommandParam.Boolean() ) |
|
637 { |
|
638 CallWaitingNoteL( aCallId ); |
|
639 } |
|
640 else |
|
641 { |
|
642 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
643 } |
|
644 // Indicate that the Phone needs to be sent to the background if |
|
645 // an application other than the top application is in the foreground |
|
646 TPhoneCmdParamBoolean booleanParam; |
|
647 booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
648 iViewCommandHandle->ExecuteCommandL( |
|
649 EPhoneViewSetNeedToSendToBackgroundStatus, |
|
650 &booleanParam ); |
|
651 |
|
652 TPhoneCmdParamInteger uidParam; |
|
653 uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
654 iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
655 &uidParam ); |
|
656 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
|
657 &uidParam ); |
|
658 DisplayHeaderForCallComingInL( aCallId, ETrue ); // waiting call |
|
659 } |
508 } |
660 |
509 |
661 // ----------------------------------------------------------- |
510 // ----------------------------------------------------------- |
662 // CPhoneConference::HandleWentOneToOneL |
511 // CPhoneConference::HandleWentOneToOneL |
663 // ----------------------------------------------------------- |
512 // ----------------------------------------------------------- |