113 case MEngineMonitor::EPEMessageConnected: |
113 case MEngineMonitor::EPEMessageConnected: |
114 HandleConnectedL( aCallId ); |
114 HandleConnectedL( aCallId ); |
115 break; |
115 break; |
116 |
116 |
117 case MEngineMonitor::EPEMessageDialing: |
117 case MEngineMonitor::EPEMessageDialing: |
118 HandleDiallingL( aCallId ); |
118 HandleDialingL( aCallId ); |
119 break; |
119 break; |
120 |
120 |
121 case MEngineMonitor::EPEMessageConferenceIdle: |
121 case MEngineMonitor::EPEMessageConferenceIdle: |
122 HandleConferenceIdleL(); |
122 HandleConferenceIdleL(); |
123 break; |
123 break; |
263 // ----------------------------------------------------------- |
263 // ----------------------------------------------------------- |
264 // |
264 // |
265 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId ) |
265 void CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL( TInt aCallId ) |
266 { |
266 { |
267 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()"); |
267 __LOGMETHODSTARTEND(EPhoneUIStates, "CPhoneConferenceAndWaiting::MakeStateTransitionToConferenceAndSingleL()"); |
268 |
268 BeginUiUpdateLC(); |
269 BeginUiUpdateLC(); |
269 |
270 |
|
271 UpdateRemoteInfoDataL ( aCallId ); |
270 UpdateRemoteInfoDataL ( aCallId ); |
272 |
|
273 if ( IsConferenceBubbleInSelectionMode() ) |
271 if ( IsConferenceBubbleInSelectionMode() ) |
274 { |
272 { |
275 CloseSelectionListL(); |
273 CloseSelectionListL(); |
276 } |
274 } |
277 |
|
278 // Show bubble |
|
279 TPhoneCmdParamCallHeaderData callHeaderParam; |
275 TPhoneCmdParamCallHeaderData callHeaderParam; |
280 callHeaderParam.SetCallState( EPEStateConnected ); |
276 callHeaderParam.SetCallState( EPEStateConnected ); |
281 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
277 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
282 &callHeaderParam ); |
278 aCallId, &callHeaderParam ); |
283 |
|
284 |
|
285 if ( IsNumberEntryUsedL() ) |
279 if ( IsNumberEntryUsedL() ) |
286 { |
280 { |
287 if ( NeedToReturnToForegroundAppL() ) |
281 if ( NeedToReturnToForegroundAppL() ) |
288 { |
282 { |
289 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
283 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
290 |
|
291 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
284 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
292 } |
285 } |
293 } |
286 } |
294 else |
287 else |
295 { |
288 { |
297 } |
290 } |
298 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
291 SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
299 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
292 SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
300 |
293 |
301 EndUiUpdate(); |
294 EndUiUpdate(); |
302 |
|
303 // CBA updates in above if-else conditions |
295 // CBA updates in above if-else conditions |
304 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
296 iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
305 } |
297 } |
306 |
298 |
307 // ----------------------------------------------------------- |
299 // ----------------------------------------------------------- |
308 // CPhoneConferenceAndWaiting::HandleIdleL |
300 // CPhoneConferenceAndWaiting::HandleIdleL |
309 // ----------------------------------------------------------- |
301 // ----------------------------------------------------------- |
322 iRingingCallId = callStateData.CallId(); |
314 iRingingCallId = callStateData.CallId(); |
323 } |
315 } |
324 |
316 |
325 if( iRingingCallId == aCallId ) |
317 if( iRingingCallId == aCallId ) |
326 { |
318 { |
327 BeginUiUpdateLC(); |
319 BeginUiUpdateLC(); |
328 |
|
329 // Idle message came for waiting call |
|
330 // Close menu bar, if it is displayed |
|
331 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
320 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
332 |
|
333 // Remove call |
|
334 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
321 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
335 |
322 |
336 if ( IsNumberEntryUsedL() ) |
323 if ( IsNumberEntryUsedL() ) |
337 { |
324 { |
338 if ( NeedToReturnToForegroundAppL() ) |
325 if ( NeedToReturnToForegroundAppL() ) |
339 { |
326 { |
340 // Return phone to the background if menu application is needed to foreground. |
327 // Return phone to the background if menu application is needed to foreground. |
341 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
328 iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground ); |
342 |
|
343 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
329 iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility ); |
344 |
|
345 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
330 UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
346 } |
331 } |
347 } |
332 } |
348 else |
333 else |
349 { |
334 { |
365 else |
350 else |
366 { |
351 { |
367 SetTouchPaneButtons( EPhoneConferenceButtons ); |
352 SetTouchPaneButtons( EPhoneConferenceButtons ); |
368 } |
353 } |
369 EndUiUpdate(); |
354 EndUiUpdate(); |
370 |
|
371 // Go to conference state |
|
372 // CBA updates in above if-else conditions |
355 // CBA updates in above if-else conditions |
373 iStateMachine->ChangeState( EPhoneStateConference ); |
356 iStateMachine->ChangeState( EPhoneStateConference ); |
374 } |
357 } |
375 else |
358 else |
376 { |
359 { |
377 // Idle message came for conference member |
360 // Idle message came for conference member |
378 CPhoneConference::HandleIdleL( aCallId ); |
361 CPhoneConference::HandleIdleL( aCallId ); |
379 |
|
380 TPhoneCmdParamBoolean conferenceBubbleExists; |
362 TPhoneCmdParamBoolean conferenceBubbleExists; |
381 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
363 iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
382 &conferenceBubbleExists ); |
364 &conferenceBubbleExists ); |
383 |
|
384 if( !conferenceBubbleExists.Boolean() ) |
365 if( !conferenceBubbleExists.Boolean() ) |
385 { |
366 { |
386 HandleConferenceIdleL(); |
367 HandleConferenceIdleL(); |
387 } |
368 } |
388 } |
369 } |
393 // ----------------------------------------------------------- |
374 // ----------------------------------------------------------- |
394 // |
375 // |
395 void CPhoneConferenceAndWaiting::HandleConferenceIdleL() |
376 void CPhoneConferenceAndWaiting::HandleConferenceIdleL() |
396 { |
377 { |
397 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()"); |
378 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::HandleConferenceIdleL()"); |
398 |
|
399 BeginUiUpdateLC(); |
379 BeginUiUpdateLC(); |
400 |
|
401 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
380 iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
402 |
381 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
403 TPhoneCmdParamInteger activeCallCount; |
382 TPhoneCmdParamInteger activeCallCount; |
404 iViewCommandHandle->ExecuteCommandL( |
383 iViewCommandHandle->ExecuteCommandL( |
405 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
384 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
406 |
|
407 // Close menu bar, if it is displayed |
|
408 iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
409 |
|
410 switch( activeCallCount.Integer() ) |
385 switch( activeCallCount.Integer() ) |
411 { |
386 { |
412 case ENoActiveCalls: |
387 case ENoActiveCalls: |
413 // Go to incoming state |
388 // Go to incoming state |
414 { |
389 { |
423 |
398 |
424 // Bring up callhandling view |
399 // Bring up callhandling view |
425 BringIncomingToForegroundL(); |
400 BringIncomingToForegroundL(); |
426 |
401 |
427 SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam ); |
402 SetCallHeaderTextsForCallComingInL( iRingingCallId, EFalse, &callHeaderParam ); |
428 |
403 |
429 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
404 iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, |
430 iRingingCallId ,&callHeaderParam ); |
405 iRingingCallId ,&callHeaderParam ); |
431 iCbaManager->UpdateIncomingCbaL( iRingingCallId ); |
406 iCbaManager->UpdateIncomingCbaL( iRingingCallId ); |
432 UpdateSilenceButtonDimming(); |
407 UpdateSilenceButtonDimming(); |
433 |
408 |
434 // Hide number entry if visible |
409 // Hide number entry if visible |
435 if ( IsNumberEntryVisibleL() ) |
410 if ( IsNumberEntryVisibleL() ) |
436 { |
411 { |
437 SetNumberEntryVisibilityL(EFalse); |
412 SetNumberEntryVisibilityL(EFalse); |
438 } |
413 } |
439 |
|
440 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
414 SetTouchPaneButtons( EPhoneIncomingCallButtons ); |
441 SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent ); |
415 SetTouchPaneButtonEnabled( EPhoneCallComingCmdSilent ); |
442 SetRingingTonePlaybackL( iRingingCallId ); |
416 SetRingingTonePlaybackL( iRingingCallId ); |
443 SetToolbarDimming( ETrue ); |
417 SetToolbarDimming( ETrue ); |
444 iStateMachine->ChangeState( EPhoneStateIncoming ); |
418 iStateMachine->ChangeState( EPhoneStateIncoming ); |
445 break; |
419 } |
446 } |
420 break; |
447 |
421 |
448 case EOneActiveCall: |
422 case EOneActiveCall: |
449 if ( IsNumberEntryUsedL() ) |
423 if ( IsNumberEntryUsedL() ) |
450 { |
424 { |
451 // Show the number entry if it exists |
425 // Show the number entry if it exists |
452 SetNumberEntryVisibilityL(ETrue); |
426 SetNumberEntryVisibilityL(ETrue); |
453 } |
427 } |
454 // Go to waiting in single state |
428 // Go to waiting in single state |
455 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
429 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
456 |
430 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
457 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
458 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
431 iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
459 break; |
432 break; |
460 |
433 |
461 case ETwoActiveCalls: |
434 case ETwoActiveCalls: |
462 if ( IsNumberEntryUsedL() ) |
435 if ( IsNumberEntryUsedL() ) |
464 // Show the number entry if it exists |
437 // Show the number entry if it exists |
465 SetNumberEntryVisibilityL(ETrue); |
438 SetNumberEntryVisibilityL(ETrue); |
466 } |
439 } |
467 // Go to two singles and waiting state |
440 // Go to two singles and waiting state |
468 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
441 UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
469 |
442 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
470 SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
471 |
|
472 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
443 iStateMachine->ChangeState( EPhoneStateTwoSinglesAndWaiting ); |
473 break; |
444 break; |
474 default: |
445 default: |
475 // Too many active calls to handle reliable state change now. |
446 // Too many active calls to handle reliable state change now. |
476 // Waiting for all conference member idles |
447 // Waiting for all conference member idles |
477 // This case may happen when 'End all calls' because conferenceIdle may |
448 // This case may happen when 'End all calls' because conferenceIdle may |
478 // come earlier than idle for conference member |
449 // come earlier than idle for conference member |
479 break; |
450 break; |
480 } |
451 } |
481 EndUiUpdate(); |
452 EndUiUpdate(); |
482 } |
453 } |
483 |
454 |
484 // ----------------------------------------------------------- |
455 // ----------------------------------------------------------- |
490 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateInCallCbaL() "); |
461 __LOGMETHODSTARTEND( EPhoneUIStates, "CPhoneConferenceAndWaiting::UpdateInCallCbaL() "); |
491 UpdateCbaL ( EPhoneCallHandlingCallWaitingCBA ); |
462 UpdateCbaL ( EPhoneCallHandlingCallWaitingCBA ); |
492 } |
463 } |
493 |
464 |
494 // ----------------------------------------------------------- |
465 // ----------------------------------------------------------- |
495 // CPhoneConferenceAndWaiting::HandleDiallingL |
466 // CPhoneConferenceAndWaiting::HandleDialingL |
496 // ----------------------------------------------------------- |
467 // ----------------------------------------------------------- |
497 // |
468 // |
498 void CPhoneConferenceAndWaiting::HandleDiallingL( TInt aCallId ) |
469 void CPhoneConferenceAndWaiting::HandleDialingL( TInt aCallId ) |
499 { |
470 { |
500 __LOGMETHODSTARTEND( EPhoneUIStates, |
471 __LOGMETHODSTARTEND( EPhoneUIStates, |
501 "CPhoneConferenceAndWaiting::HandleDiallingL()"); |
472 "CPhoneConferenceAndWaiting::HandleDialingL()"); |
502 |
|
503 BeginUiUpdateLC(); |
|
504 // Hide number entry if it exists |
|
505 SetNumberEntryVisibilityL(EFalse); |
|
506 |
|
507 // Display call setup |
473 // Display call setup |
508 DisplayCallSetupL( aCallId ); |
474 DisplayCallSetupL( aCallId ); |
509 |
|
510 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
|
511 |
|
512 EndUiUpdate(); |
|
513 |
|
514 // Update conference and waiting and call setup softkeys |
|
515 UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
516 |
|
517 // Go to conference and waiting and call setup state |
475 // Go to conference and waiting and call setup state |
518 iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup ); |
476 iStateMachine->ChangeState( EPhoneStateConferenceAndWaitingAndCallSetup ); |
|
477 } |
|
478 |
|
479 // ----------------------------------------------------------- |
|
480 // CPhoneConferenceAndWaiting::DoStateSpecificCallSetUpDefinitionsL |
|
481 // ----------------------------------------------------------- |
|
482 // |
|
483 EXPORT_C void CPhoneConferenceAndWaiting::DoStateSpecificCallSetUpDefinitionsL() |
|
484 { |
|
485 SetTouchPaneButtons( EPhoneCallSetupButtons ); |
519 } |
486 } |
520 |
487 |
521 // ----------------------------------------------------------- |
488 // ----------------------------------------------------------- |
522 // CPhoneConferenceAndWaiting::HandleWentOneToOneL |
489 // CPhoneConferenceAndWaiting::HandleWentOneToOneL |
523 // ----------------------------------------------------------- |
490 // ----------------------------------------------------------- |