152 |
153 |
153 if ( ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() ) && |
154 if ( ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() ) && |
154 ( !ContactInfoAvailable( aCallId ) ) ) |
155 ( !ContactInfoAvailable( aCallId ) ) ) |
155 { |
156 { |
156 // Set phonenumber/URI as the CLI text for the call header |
157 // Set phonenumber/URI as the CLI text for the call header |
157 aCallHeaderData->SetCLIText( |
158 aCallHeaderData->SetCLIText( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
158 iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
159 TPhoneCmdParamCallHeaderData::ELeft ); |
159 CBubbleManager::ELeft ); |
|
160 |
160 |
161 // No contact name, use phonenumber when available. |
161 // No contact name, use phonenumber when available. |
162 aCallHeaderData->SetParticipantListCLI( |
162 aCallHeaderData->SetParticipantListCLI( |
163 TPhoneCmdParamCallHeaderData::EPhoneParticipantCNAPText ); |
163 TPhoneCmdParamCallHeaderData::EPhoneParticipantCNAPText ); |
164 } |
164 } |
165 else |
165 else |
166 { |
166 { |
167 CBubbleManager::TPhoneClippingDirection cnapClippingDirection = CBubbleManager::ERight; |
167 TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection cnapClippingDirection = TPhoneCmdParamCallHeaderData::ERight; |
168 TBuf<KCntMaxTextFieldLength> remoteInfoText( KNullDesC ); |
168 TBuf<KCntMaxTextFieldLength> remoteInfoText( KNullDesC ); |
|
169 |
|
170 TBool secondaryCli = GetRemoteInfoDataL( aCallId, remoteInfoText ); |
|
171 cnapClippingDirection = TPhoneCmdParamCallHeaderData::ELeft; |
|
172 |
|
173 aCallHeaderData->SetCLIText( remoteInfoText, TPhoneCmdParamCallHeaderData::ERight ); |
169 |
174 |
170 /*If call is Private/PayPhone call then IsCallPrivateOrPayPhone |
175 if (secondaryCli) |
171 * will set SetIdentitySpecificCallHeaderData parameters therefore |
176 { |
172 * there is no need to call GetRemoteInfoDataL.*/ |
177 aCallHeaderData->SetCNAPText( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
173 if ( !IsCallPrivateOrPayPhone( aCallId, remoteInfoText ) ) |
|
174 { |
|
175 GetRemoteInfoDataL( aCallId, remoteInfoText ); |
|
176 cnapClippingDirection = CBubbleManager::ELeft; |
|
177 } |
|
178 |
|
179 // Set remote info data as the CLI text for the call header |
|
180 aCallHeaderData->SetCLIText( remoteInfoText, CBubbleManager::ERight ); |
|
181 aCallHeaderData->SetCNAPText( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
|
182 cnapClippingDirection ); |
178 cnapClippingDirection ); |
|
179 } |
183 } |
180 } |
184 |
181 |
185 SetCallerImage( aCallId, aCallHeaderData ); |
182 SetCallerImage( aCallId, aCallHeaderData ); |
186 |
183 |
187 // Set the Caller text |
184 // Set the Caller text |
266 const TInt aCallId, |
263 const TInt aCallId, |
267 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
264 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
268 { |
265 { |
269 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::GetCallType( ) "); |
266 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::GetCallType( ) "); |
270 // Set call header type. |
267 // Set call header type. |
271 TPECallType callType = iStateMachine.PhoneEngineInfo()->CallType( aCallId ); |
268 TPECallType callType = |
272 switch ( callType ) |
269 iStateMachine.PhoneEngineInfo()->CallType( aCallId ); |
273 { |
270 SetCallHeaderType( callType ); |
274 case EPECallTypeCSVoice: |
271 |
275 { |
272 if ( iStateMachine.PhoneEngineInfo()->CallALSLine( aCallId ) |
276 if ( iStateMachine.PhoneEngineInfo()->CallALSLine( aCallId ) |
273 == CCCECallParameters::ECCELineTypeAux ) |
277 == CCCECallParameters::ECCELineTypeAux ) |
274 { |
278 { |
275 aCallHeaderData->SetLine2( ETrue ); |
279 SetCallHeaderType( CBubbleManager::ELine2 ); |
276 } |
280 aCallHeaderData->SetLine2( ETrue ); |
277 |
281 } |
|
282 else |
|
283 { |
|
284 SetCallHeaderType( CBubbleManager::ENormal ); |
|
285 } |
|
286 } |
|
287 break; |
|
288 case EPECallTypeVideo: |
|
289 SetCallHeaderType( CBubbleManager::EVideo ); |
|
290 break; |
|
291 case EPECallTypeVoIP: |
|
292 SetCallHeaderType( CBubbleManager::EVoIPCall ); |
|
293 break; |
|
294 default: |
|
295 // None |
|
296 break; |
|
297 } |
|
298 __PHONELOG1( EBasic, EPhoneControl, |
278 __PHONELOG1( EBasic, EPhoneControl, |
299 "TPhoneCallHeaderParam::GetCallType() - callType: %d ", |
279 "TPhoneCallHeaderParam::GetCallType() - callType: %d ", |
300 callType ) |
280 callType ) |
301 return callType; |
281 return callType; |
302 } |
282 } |
363 |
343 |
364 if ( ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() ) && |
344 if ( ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() ) && |
365 ( !ContactInfoAvailable( aCallId ) ) && |
345 ( !ContactInfoAvailable( aCallId ) ) && |
366 ( !info.ShowNumber() ) ) |
346 ( !info.ShowNumber() ) ) |
367 { |
347 { |
368 // No contact info data available use the phone number. |
348 // No contact info data available; use the phone number |
369 aCallHeaderData->SetCLIText( |
349 aCallHeaderData->SetCLIText( |
370 iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
350 iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
371 CBubbleManager::ELeft); |
351 TPhoneCmdParamCallHeaderData::ELeft); |
372 |
352 |
373 // No contact name, use phonenumber when available. |
353 // No contact name, use phonenumber when available. |
374 aCallHeaderData->SetParticipantListCLI( |
354 aCallHeaderData->SetParticipantListCLI( |
375 TPhoneCmdParamCallHeaderData::EPhoneParticipantCNAPText ); |
355 TPhoneCmdParamCallHeaderData::EPhoneParticipantCNAPText ); |
376 } |
356 } |
377 else |
357 else |
378 { |
358 { |
379 TBuf<KCntMaxTextFieldLength> remoteInfoText( KNullDesC ); |
359 TBuf<KCntMaxTextFieldLength> remoteInfoText( KNullDesC ); |
380 |
360 |
381 /*If call is Private/PayPhone call then IsCallPrivateOrPayPhone |
361 GetRemoteInfoDataL( aCallId, remoteInfoText ); |
382 * will set SetIdentitySpecificCallHeaderData parameters therefore |
362 aCallHeaderData->SetCLIText( remoteInfoText, TPhoneCmdParamCallHeaderData::ERight ); |
383 * there is no need to call GetRemoteInfoDataL.*/ |
|
384 if ( !IsCallPrivateOrPayPhone( aCallId, remoteInfoText ) ) |
|
385 { |
|
386 GetRemoteInfoDataL( aCallId, remoteInfoText ); |
|
387 } |
|
388 |
|
389 // Set remote info data as the CLI text for the call header |
|
390 aCallHeaderData->SetCLIText( remoteInfoText, CBubbleManager::ERight ); |
|
391 } |
363 } |
392 |
364 |
393 // Fetch CNAP text and clipping direction |
365 // Fetch CNAP text and clipping direction |
394 CBubbleManager::TPhoneClippingDirection cnapClippingDirection; |
366 TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection cnapClippingDirection; |
395 GetCNAPText( aCallId, cnapText, cnapClippingDirection ); |
367 GetCNAPText( aCallId, cnapText, cnapClippingDirection ); |
396 |
368 |
397 // Set CNAP data |
369 // Set CNAP data |
398 aCallHeaderData->SetCNAPText( cnapText, cnapClippingDirection ); |
370 aCallHeaderData->SetCNAPText( cnapText, cnapClippingDirection ); |
399 |
371 |
408 |
380 |
409 // Set the call header CNAP data ( Contains possible CNAP name or received skype identification ). |
381 // Set the call header CNAP data ( Contains possible CNAP name or received skype identification ). |
410 if ( IsFeatureSupported( KTelephonyLVFlagUUS, aCallId ) ) |
382 if ( IsFeatureSupported( KTelephonyLVFlagUUS, aCallId ) ) |
411 { |
383 { |
412 aCallHeaderData->SetCNAPText( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ), |
384 aCallHeaderData->SetCNAPText( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ), |
413 CBubbleManager::ERight ); |
385 TPhoneCmdParamCallHeaderData::ERight ); |
414 } |
386 } |
415 } |
387 } |
416 |
388 |
417 // --------------------------------------------------------------------------- |
389 // --------------------------------------------------------------------------- |
418 // TPhoneCallHeaderParam::GetCNAPText |
390 // TPhoneCallHeaderParam::GetCNAPText |
419 // --------------------------------------------------------------------------- |
391 // --------------------------------------------------------------------------- |
420 // |
392 // |
421 void TPhoneCallHeaderParam::GetCNAPText( |
393 void TPhoneCallHeaderParam::GetCNAPText( |
422 const TInt aCallId, |
394 const TInt aCallId, |
423 TDes& aData, |
395 TDes& aData, |
424 CBubbleManager::TPhoneClippingDirection& aDirection ) const |
396 TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection& aDirection ) const |
425 { |
397 { |
426 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::GetCNAPText( ) "); |
398 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::GetCNAPText( ) "); |
427 |
399 |
428 // Set clipping direction |
400 // Set clipping direction |
429 aDirection = CBubbleManager::ERight; |
401 aDirection = TPhoneCmdParamCallHeaderData::ERight; |
430 |
402 |
431 // If it's not a private number show further info |
403 // If it's not a private number show further info |
432 if ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ) != |
404 if ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ) != |
433 EPEPrivateNumber ) |
405 EPEPrivateNumber ) |
434 { |
406 { |
485 void TPhoneCallHeaderParam::SetDivertIndicatorToCallHeader( |
457 void TPhoneCallHeaderParam::SetDivertIndicatorToCallHeader( |
486 const TInt aCallId, |
458 const TInt aCallId, |
487 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
459 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
488 { |
460 { |
489 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::SetDivertIndicatorToCallHeader( ) "); |
461 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::SetDivertIndicatorToCallHeader( ) "); |
490 TBool forwarded = iStateMachine.PhoneEngineInfo()->CallForwarded( aCallId ); |
462 if( iSetDivertIndication ) |
491 if ( forwarded ) |
463 { |
492 { |
464 aCallHeaderData->SetDiverted( ETrue ); |
493 aCallHeaderData->AddCallFlag( CBubbleManager::EDiverted ); |
|
494 } |
465 } |
495 |
466 |
496 if ( iStateMachine.PhoneEngineInfo()->CallALSLine( aCallId ) == CCCECallParameters::ECCELineTypeAux ) |
467 if ( iStateMachine.PhoneEngineInfo()->CallALSLine( aCallId ) == CCCECallParameters::ECCELineTypeAux ) |
497 { |
468 { |
498 __PHONELOG( EBasic, EPhoneControl, |
469 __PHONELOG( EBasic, EPhoneControl, |
499 "TPhoneCallHeaderParam::SetDivertIndicatorToCallHeader - CallALSLine() == CCCECallParameters::ECCELineTypeAux"); |
470 "TPhoneCallHeaderParam::SetDivertIndicatorToCallHeader - CallALSLine() == CCCECallParameters::ECCELineTypeAux"); |
500 aCallHeaderData->SetLine2( ETrue ); |
471 aCallHeaderData->SetLine2( ETrue ); |
501 } |
472 } |
|
473 } |
|
474 |
|
475 // --------------------------------------------------------------------------- |
|
476 // TPhoneCallHeaderParam::SetDivertIndication |
|
477 // --------------------------------------------------------------------------- |
|
478 // |
|
479 void TPhoneCallHeaderParam::SetDivertIndication( const TBool aDivertIndication ) |
|
480 { |
|
481 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::SetDivertIndication( ) "); |
|
482 iSetDivertIndication = aDivertIndication; |
|
483 __PHONELOG1( EBasic, EPhoneControl, |
|
484 "TPhoneCallHeaderParam::SetDivertIndication() - iSetDivertIndication: %d ", |
|
485 iSetDivertIndication ) |
502 } |
486 } |
503 |
487 |
504 // --------------------------------------------------------------------------- |
488 // --------------------------------------------------------------------------- |
505 // TPhoneCallHeaderParam::SetIncomingCallHeaderParamsL |
489 // TPhoneCallHeaderParam::SetIncomingCallHeaderParamsL |
506 // --------------------------------------------------------------------------- |
490 // --------------------------------------------------------------------------- |
537 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
521 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
538 { |
522 { |
539 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::SetOutgoingCallHeaderParamsL( ) "); |
523 __LOGMETHODSTARTEND(EPhoneControl, "TPhoneCallHeaderParam::SetOutgoingCallHeaderParamsL( ) "); |
540 // Set basic params must be called before update is called. |
524 // Set basic params must be called before update is called. |
541 SetBasicCallHeaderParamsL( aCallId, aCallHeaderData ); |
525 SetBasicCallHeaderParamsL( aCallId, aCallHeaderData ); |
|
526 |
542 // Set call header labels |
527 // Set call header labels |
543 SetCallHeaderLabels( aCallHeaderData ); |
|
544 SetCliParamatersL( aCallId, aCallHeaderData ); |
|
545 } |
|
546 |
|
547 // --------------------------------------------------------------------------- |
|
548 // TPhoneCallHeaderParam::SetCallHeaderLabels |
|
549 // --------------------------------------------------------------------------- |
|
550 // |
|
551 void TPhoneCallHeaderParam::SetCallHeaderLabels( |
|
552 TPhoneCmdParamCallHeaderData* aCallHeaderData ) |
|
553 { |
|
554 if ( aCallHeaderData->CallType() == EPECallTypeVideo ) |
528 if ( aCallHeaderData->CallType() == EPECallTypeVideo ) |
555 { |
529 { |
556 iManagerUtility.LoadCallHeaderTexts( |
530 iManagerUtility.LoadCallHeaderTexts( |
557 EPhoneOutgoingVideoCallLabel, |
531 EPhoneOutgoingVideoCallLabel, |
558 EPhoneOutgoingVideoCallLabelShort, |
532 EPhoneOutgoingVideoCallLabelShort, |
581 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
557 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
582 TBuf<KCntMaxTextFieldLength> remoteInfoText( KNullDesC ); |
558 TBuf<KCntMaxTextFieldLength> remoteInfoText( KNullDesC ); |
583 |
559 |
584 // Set call header type |
560 // Set call header type |
585 GetCallType( aCallId, aCallHeaderData ); |
561 GetCallType( aCallId, aCallHeaderData ); |
586 aCallHeaderData->SetCallFlag( CallHeaderType() ); |
|
587 |
562 |
588 // Set CLI text for the call header |
563 // Set CLI text for the call header |
589 GetRemoteInfoDataL( aCallId, remoteInfoText ); |
564 TBool secondaryCli = GetRemoteInfoDataL( aCallId, remoteInfoText ); |
590 if ( remoteInfoText != KNullDesC ) |
565 if ( remoteInfoText != KNullDesC ) |
591 { |
566 { |
592 aCallHeaderData->SetCLIText( remoteInfoText, CBubbleManager::ERight ); |
567 aCallHeaderData->SetCLIText( remoteInfoText, TPhoneCmdParamCallHeaderData::ERight ); |
593 if ( IsCallPrivateOrPayPhone( aCallId, remoteInfoText ) ) |
568 if ( secondaryCli ) |
594 { |
|
595 aCallHeaderData->SetCNAPText( remoteInfoText, CBubbleManager::ERight ); |
|
596 } |
|
597 else |
|
598 { |
569 { |
599 aCallHeaderData->SetCNAPText( iStateMachine.PhoneEngineInfo()-> |
570 aCallHeaderData->SetCNAPText( iStateMachine.PhoneEngineInfo()-> |
600 RemotePhoneNumber( aCallId ), CBubbleManager::ELeft ); |
571 RemotePhoneNumber( aCallId ), TPhoneCmdParamCallHeaderData::ELeft ); |
601 |
|
602 // No contact name, use phonenumber when available. |
|
603 if ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() |
|
604 && !ContactInfoAvailable( aCallId ) ) |
|
605 { |
|
606 aCallHeaderData->SetParticipantListCLI( |
|
607 TPhoneCmdParamCallHeaderData::EPhoneParticipantCNAPText ); |
|
608 } |
|
609 } |
572 } |
610 } |
573 } |
611 else |
574 else |
612 { |
575 { |
613 aCallHeaderData->SetCLIText( |
576 aCallHeaderData->SetCLIText( |
614 iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
577 iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ), |
615 CBubbleManager::ERight ); |
578 TPhoneCmdParamCallHeaderData::ELeft ); |
616 } |
579 } |
617 |
580 |
618 // If KTelephonyLVFlagUUS is enabled it will over write RemotePartyName setting. |
581 // If KTelephonyLVFlagUUS is enabled it will over write RemotePartyName setting. |
619 // Contains possible CNAP name or received skype identification |
582 // Contains possible CNAP name or received skype identification |
620 if ( IsFeatureSupported( KTelephonyLVFlagUUS, aCallId ) ) |
583 if ( IsFeatureSupported( KTelephonyLVFlagUUS, aCallId ) ) |
643 |
605 |
644 // Update caller image |
606 // Update caller image |
645 SetCallerImage( |
607 SetCallerImage( |
646 aCallId, |
608 aCallId, |
647 aCallHeaderData ); |
609 aCallHeaderData ); |
648 |
610 } |
649 // Update divert indication |
611 |
650 SetDivertIndicatorToCallHeader( aCallId, aCallHeaderData ); |
612 |
651 } |
|
652 |
|
653 // --------------------------------------------------------------------------- |
|
654 // TPhoneCallHeaderParam::IsCallPrivateOrPayPhone |
|
655 // --------------------------------------------------------------------------- |
|
656 // |
|
657 TBool TPhoneCallHeaderParam::IsCallPrivateOrPayPhone( const TInt aCallId, TDes& aData ) const |
|
658 { |
|
659 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::IsCallPrivateOrPayPhone() "); |
|
660 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
|
661 TBool ret( EFalse ); |
|
662 const RMobileCall::TMobileCallRemoteIdentityStatus identity = iStateMachine.PhoneEngineInfo()->RemoteIdentity( aCallId ); |
|
663 if ( ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ) == EPEPrivateNumber ) || |
|
664 identity == RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone || |
|
665 identity == RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone ) |
|
666 { |
|
667 SetIdentitySpecificCallHeaderData( aCallId, aData ); |
|
668 ret = ETrue; |
|
669 } |
|
670 |
|
671 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::IsCallPrivateOrPayPhone() - returns = %d ", ret); |
|
672 return ret; |
|
673 } |
|
674 |
613 |
675 // --------------------------------------------------------------------------- |
614 // --------------------------------------------------------------------------- |
676 // TPhoneCallHeaderParam::GetRemoteInfoDataL |
615 // TPhoneCallHeaderParam::GetRemoteInfoDataL |
677 // --------------------------------------------------------------------------- |
616 // --------------------------------------------------------------------------- |
678 // |
617 // |
679 void TPhoneCallHeaderParam::GetRemoteInfoDataL( |
618 TBool TPhoneCallHeaderParam::GetRemoteInfoDataL( |
680 const TInt aCallId, |
619 const TInt aCallId, |
681 TDes& aData ) const |
620 TDes& aData ) const |
682 { |
621 { |
683 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() "); |
622 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() "); |
684 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() - call id =%d ", aCallId); |
623 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::GetRemoteInfoDataL() - call id =%d ", aCallId); |
685 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
624 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
|
625 |
|
626 TBool secondaryCli(EFalse); |
|
627 |
686 if ( aCallId == KEmergencyCallId ) |
628 if ( aCallId == KEmergencyCallId ) |
687 { |
629 { |
688 // Set emergency label text |
630 // Set emergency label text |
689 iManagerUtility.LoadResource( aData, EPhoneEmergencyCallHeader ); |
631 iManagerUtility.LoadResource( aData, EPhoneEmergencyCallHeader ); |
690 } |
632 } |
691 else |
633 else |
692 { |
634 { |
|
635 const RMobileCall::TMobileCallRemoteIdentityStatus identity = iStateMachine.PhoneEngineInfo()->RemoteIdentity( aCallId ); |
693 // Note next if-statements are in priority order so be careful if you change order |
636 // Note next if-statements are in priority order so be careful if you change order |
694 // or add new if-statements. |
637 // or add new if-statements. |
695 if ( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ).Length() ) |
638 if ( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ).Length() ) |
696 { |
639 { |
697 // Display the contact name if it is available |
640 // Display the contact name if it is available |
698 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ) ); |
641 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteName( aCallId ) ); |
|
642 secondaryCli = ETrue; |
699 } |
643 } |
700 else if ( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ).Length() ) |
644 else if ( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ).Length() ) |
701 { |
645 { |
702 // Display the CNAP or UUS info if it is available. |
646 // Display the CNAP or UUS info if it is available. |
703 aData.Copy( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ) ); |
647 aData.Copy( iStateMachine.PhoneEngineInfo()->RemotePartyName( aCallId ) ); |
|
648 secondaryCli = ETrue; |
704 } |
649 } |
705 else if ( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length() ) |
650 else if ( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ).Length() ) |
706 { |
651 { |
707 // Display the company name if it is available |
652 // Display the company name if it is available |
708 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ) ); |
653 aData.Copy( iStateMachine.PhoneEngineInfo()->RemoteCompanyName( aCallId ) ); |
709 } |
654 } |
710 else if ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) == EPEStateRinging ) |
655 else if ( iStateMachine.PhoneEngineInfo()->CallDirection( aCallId ) == RMobileCall::EMobileTerminated ) |
711 { |
656 { |
712 SetIdentitySpecificCallHeaderData( aCallId, aData ); |
657 if ( EPEPrivateNumber == iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ) ) |
713 } |
658 { |
714 else |
659 if ( EPECallTypeVoIP == CallHeaderType() ) |
715 { |
660 { |
716 if ( ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) != EPEStateDialing ) && |
661 iManagerUtility.LoadResource( aData, iManagerUtility.Customization()->CustomizeCallHeaderText() ); |
717 ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) != EPEStateRinging ) && |
662 } |
718 ( iStateMachine.PhoneEngineInfo()->CallState( aCallId ) != EPEStateAnswering ) ) |
663 else |
719 { |
664 { |
720 iManagerUtility.GetInCallNumberTextL( aCallId, aData ); |
665 // private number |
721 } |
666 iManagerUtility.LoadResource( aData, EPhoneCLIWithheld ); |
722 } |
667 } |
723 } |
668 } |
724 } |
669 else if ( identity == RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone || |
725 |
670 identity == RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone ) |
726 // --------------------------------------------------------------------------- |
671 { |
727 // TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData |
672 __PHONELOG( EBasic, EPhoneControl, "GetRemoteInfoDataL : payphone" ); |
728 // --------------------------------------------------------------------------- |
673 // Display "Payphone". |
729 // |
674 iManagerUtility.LoadResource( aData, EPhoneCLIPayphone ); |
730 void TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData( const TInt aCallId, TDes& aData ) const |
675 } |
731 { |
676 else if ( identity == RMobileCall::ERemoteIdentityUnknown ) |
732 __LOGMETHODSTARTEND( EPhoneControl, "TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData() ") |
677 { |
733 __ASSERT_DEBUG( iStateMachine.PhoneEngineInfo(), Panic( EPhoneCtrlInvariant ) ); |
678 __PHONELOG( EBasic, EPhoneControl, "GetRemoteInfoDataL : unknown number" ); |
734 |
679 // Display "Unknown Number". |
735 const RMobileCall::TMobileCallRemoteIdentityStatus identity = iStateMachine.PhoneEngineInfo()->RemoteIdentity( aCallId ); |
680 iManagerUtility.LoadResource( aData, EPhoneCallCLIUnknown ); |
736 const TPEPhoneNumberIdType idType = iStateMachine.PhoneEngineInfo()->RemotePhoneNumberType( aCallId ); |
681 } |
737 |
682 else if ( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ).Length() ) |
738 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData() - RemoteIdentity: %d ", |
683 { |
739 identity ) |
684 // Display the number if it is available |
740 __PHONELOG1( EBasic, EPhoneControl, "TPhoneCallHeaderParam::SetIdentitySpecificCallHeaderData() - idType: %d ", |
685 aData.Copy( iStateMachine.PhoneEngineInfo()->RemotePhoneNumber( aCallId ) ); |
741 idType ) |
686 } |
742 // If ringing call is emergency call then do not set identity specific info to call header |
687 } |
743 // because emergency call header doesnt contain identity specific information. |
688 |
744 if ( aCallId == KEmergencyCallId ) |
689 } |
745 { |
690 return secondaryCli; |
746 // do nothing. |
691 } |
747 } |
692 |
748 else if ( idType == EPEPrivateNumber ) |
|
749 { |
|
750 // If call header has customized items and callheadertype is voip |
|
751 // then load customized text. |
|
752 if ( ( iManagerUtility.Customization() ) && ( CallHeaderType() == CBubbleManager::EVoIPCall ) ) |
|
753 { |
|
754 // Display private address |
|
755 iManagerUtility.LoadResource( aData, iManagerUtility.Customization()->CustomizeCallHeaderText() ); |
|
756 } |
|
757 else |
|
758 { |
|
759 // Display "private number". |
|
760 iManagerUtility.LoadResource( aData, EPhoneCLIWithheld ); |
|
761 } |
|
762 } |
|
763 else if( ( identity == RMobileCall::ERemoteIdentityUnavailableNoCliCoinOrPayphone ) || |
|
764 ( identity == RMobileCall::ERemoteIdentityAvailableNoCliCoinOrPayphone ) ) |
|
765 { |
|
766 // Display "Payphone". |
|
767 iManagerUtility.LoadResource( aData, EPhoneCLIPayphone ); |
|
768 } |
|
769 else if ( identity == RMobileCall::ERemoteIdentityUnknown ) |
|
770 { |
|
771 // Display "Call". |
|
772 iManagerUtility.LoadResource( aData, EPhoneCall ); |
|
773 } |
|
774 } |
|
775 |
|