689 User::LeaveIfError( plugin.GetRemotePartyName( aRemotePartyName ) ); |
689 User::LeaveIfError( plugin.GetRemotePartyName( aRemotePartyName ) ); |
690 |
690 |
691 RBuf parsedAddress; |
691 RBuf parsedAddress; |
692 CleanupClosePushL( parsedAddress ); |
692 CleanupClosePushL( parsedAddress ); |
693 TInt digitsformatching( 0 ); |
693 TInt digitsformatching( 0 ); |
694 User::LeaveIfError( plugin.GetAddressForMatching( parsedAddress, digitsformatching ) ); |
694 TBool allowUserNameMatch( EFalse ); |
695 |
695 User::LeaveIfError( plugin.GetAddressForMatching( |
|
696 parsedAddress, digitsformatching, allowUserNameMatch ) ); |
|
697 |
696 CDesCArray* array = new ( ELeave ) CDesC16ArrayFlat( 1 ); |
698 CDesCArray* array = new ( ELeave ) CDesC16ArrayFlat( 1 ); |
697 CleanupStack::PushL( array ); |
699 CleanupStack::PushL( array ); |
698 User::LeaveIfError( plugin.GetContactStoreUris( *array ) ); |
700 User::LeaveIfError( plugin.GetContactStoreUris( *array ) ); |
699 |
701 |
700 TEFLOGSTRING2( KTAINT, "CNT Extension Plugin > remoteParty: %S", &aRemotePartyName ) |
702 TEFLOGSTRING2( KTAINT, "CNT Extension Plugin > remoteParty: %S", &aRemotePartyName ) |
702 &parsedAddress, digitsformatching ) |
704 &parsedAddress, digitsformatching ) |
703 TEFLOGSTRING2( KTAINT, "CNT Extension Plugin > array count: %d", array->MdcaCount() ) |
705 TEFLOGSTRING2( KTAINT, "CNT Extension Plugin > array count: %d", array->MdcaCount() ) |
704 |
706 |
705 // Digits for matching. Supported range is between 4-20. |
707 // Digits for matching. Supported range is between 4-20. |
706 // If not valid value use whole address length for matching. |
708 // If not valid value use whole address length for matching. |
707 digitsformatching = ( digitsformatching < KMinValueOfMeaningfulDigits || |
709 if ( digitsformatching != 0 && |
708 digitsformatching > KMaxValueOfMeaningfulDigits ) ? |
710 ( digitsformatching < KMinValueOfMeaningfulDigits || |
709 parsedAddress.Length() : digitsformatching; |
711 digitsformatching > KMaxValueOfMeaningfulDigits ) ) |
710 |
712 { |
|
713 digitsformatching = parsedAddress.Length(); |
|
714 } |
|
715 |
711 // Use service specific parameters for matching. |
716 // Use service specific parameters for matching. |
712 TEFLOGSTRING3( KTAINT, "CNT MatchWithVoipAddressUsingExtensionL >\ |
717 TEFLOGSTRING3( KTAINT, "CNT MatchWithVoipAddressUsingExtensionL >\ |
713 CPhCntMatcher::MatchVoipNumber, NUMBER: %S, CALL ID: %d", |
718 CPhCntMatcher::MatchVoipNumber, NUMBER: %S, CALL ID: %d", |
714 &remoteNumber, aCallId ) |
719 &remoteNumber, aCallId ) |
715 iContactMatcher->MatchVoipNumber( aMatch, |
720 iContactMatcher->MatchVoipNumber( aMatch, |
716 parsedAddress.Left( Min( parsedAddress.Length(), KPEPhoneNumberMaxLength ) ), |
721 parsedAddress.Left( Min( parsedAddress.Length(), KPEPhoneNumberMaxLength ) ), |
717 ETrue, array, digitsformatching ); |
722 allowUserNameMatch, array, digitsformatching ); |
718 |
723 |
719 CleanupStack::PopAndDestroy( array ); |
724 CleanupStack::PopAndDestroy( array ); |
720 CleanupStack::PopAndDestroy( &parsedAddress ); |
725 CleanupStack::PopAndDestroy( &parsedAddress ); |
721 } |
726 } |
722 |
727 |