phoneengine/contacthandling/src/cpecontactmatch.cpp
branchRCL_3
changeset 22 94dc1107e8b2
parent 0 5f000ab63145
equal deleted inserted replaced
20:3c221667e687 22:94dc1107e8b2
    79 CPEContactMatch::~CPEContactMatch()
    79 CPEContactMatch::~CPEContactMatch()
    80     {
    80     {
    81     delete iSpeedDialCommand;
    81     delete iSpeedDialCommand;
    82     if ( iContactThumbnailLoader && iThumbnailId )
    82     if ( iContactThumbnailLoader && iThumbnailId )
    83         {
    83         {
    84       	iContactThumbnailLoader->Cancel( iThumbnailId );
    84         iContactThumbnailLoader->Cancel( iThumbnailId );
    85         }
    85         }
    86     delete iThumbnailImage;
    86     delete iThumbnailImage;
    87     delete iContactThumbnailLoader;
    87     delete iContactThumbnailLoader;
    88     delete iContactMatcher;
    88     delete iContactMatcher;
    89     delete iContactFactory;
    89     delete iContactFactory;
   192 // -----------------------------------------------------------------------------
   192 // -----------------------------------------------------------------------------
   193 //
   193 //
   194 void CPEContactMatch::MatchWithContactIdL(
   194 void CPEContactMatch::MatchWithContactIdL(
   195         const TInt aCallId
   195         const TInt aCallId
   196         )
   196         )
   197 
       
   198     {
   197     {
   199     TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL" );
   198     TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL" );
   200     MPhCntMatch* match( NULL );
   199     MPhCntMatch* match( NULL );
   201     CPhCntContactId* contactId = NULL;
   200     CPhCntContactId* contactId( NULL );
   202     contactId = CreateContactIdL( iDataStore.CallClientInformation( aCallId ).ContactLink() );
   201     contactId = CreateContactIdL( iDataStore.CallClientInformation( aCallId ).ContactLink() );
   203     CleanupStack::PushL( contactId );
   202     CleanupStack::PushL( contactId );
   204     if ( iDataStore.CallType( aCallId ) == EPECallTypeVoIP )
   203     if ( iDataStore.CallType( aCallId ) == EPECallTypeVoIP )
   205         {
   204         {
   206         if ( contactId && contactId->IsValid() )
   205         if ( contactId && contactId->IsValid() )
   207             {
   206             {
   208             TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL > CPhCntMatcher::MatchVoipNumber" );
   207             TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL > CPhCntMatcher::MatchVoipNumber" );
   209             // Get contact based on contact id.
   208             // Get contact based on contact id.
   210             iContactMatcher->MatchVoipNumber( match, 
   209             iContactMatcher->MatchVoipNumber( match, 
       
   210                                               iDataStore.RemotePhoneNumber( aCallId ),
   211                                               *contactId );
   211                                               *contactId );
   212             }
   212             }
   213         else
   213         else
   214             {
   214             {
   215             User::Leave( KErrArgument );
   215             User::Leave( KErrArgument );
   218     else
   218     else
   219         {
   219         {
   220         if ( contactId && contactId->IsValid() )
   220         if ( contactId && contactId->IsValid() )
   221             {
   221             {
   222             TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL > CPhCntMatcher::MatchNumber" );
   222             TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL > CPhCntMatcher::MatchNumber" );
   223 	        iContactMatcher->MatchNumber( match, 
   223             iContactMatcher->MatchNumber( match, 
   224 	                                      iDataStore.RemotePhoneNumber( aCallId ),
   224                                           iDataStore.RemotePhoneNumber( aCallId ),
   225 	                                      *contactId );
   225                                           *contactId );
   226             }
   226             }
   227         else
   227         else
   228             {
   228             {
   229             User::Leave( KErrArgument );
   229             User::Leave( KErrArgument );
   230             }
   230             }
   231         }
   231         }
   232 
   232 
   233     if ( match != NULL )
   233     if ( match )
   234         {
   234         {
   235         TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL, Contact match found" );
   235         TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithContactIdL, Contact match found" );
   236         CopyContactFieldsDataL( *match, aCallId );
   236         CopyContactFieldsDataL( *match, aCallId );
   237 
   237 
   238         if ( match->HasThumbnailImage() )
   238         if ( match->HasThumbnailImage() )
   275         TEFLOGSTRING3( KTAINT, "CNT CPEContactMatch::MatchWithNumberL > CPhCntMatcher::MatchNumber, number: %S, call id: %d",
   275         TEFLOGSTRING3( KTAINT, "CNT CPEContactMatch::MatchWithNumberL > CPhCntMatcher::MatchNumber, number: %S, call id: %d",
   276             &remoteNumber, aCallId );
   276             &remoteNumber, aCallId );
   277         iContactMatcher->MatchNumber( match, remoteNumber );
   277         iContactMatcher->MatchNumber( match, remoteNumber );
   278         }
   278         }
   279 
   279 
   280     if ( match != NULL )
   280     if ( match )
   281         {
   281         {
   282         TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithNumberL, Contact match found" );
   282         TEFLOGSTRING( KTAINT, "CNT CPEContactMatch::MatchWithNumberL, Contact match found" );
   283         CopyContactFieldsDataL( *match, aCallId );
   283         CopyContactFieldsDataL( *match, aCallId );
   284 
   284 
   285         if ( match->HasThumbnailImage() )
   285         if ( match->HasThumbnailImage() )
   643 // -----------------------------------------------------------
   643 // -----------------------------------------------------------
   644 // CPEContactMatch::StoreUrisForServiceL
   644 // CPEContactMatch::StoreUrisForServiceL
   645 // -----------------------------------------------------------
   645 // -----------------------------------------------------------
   646 //
   646 //
   647 CDesCArray* CPEContactMatch::StoreUrisForServiceL( TUint aServiceId )
   647 CDesCArray* CPEContactMatch::StoreUrisForServiceL( TUint aServiceId )
   648     {	
   648     {
   649     CDesCArray* storeUris = new ( ELeave ) CDesC16ArrayFlat( 1 );
   649     CDesCArray* storeUris = new ( ELeave ) CDesC16ArrayFlat( 1 );
   650     CleanupStack::PushL( storeUris );
   650     CleanupStack::PushL( storeUris );
   651     
   651     
   652     // Get contact store id from Service Table
   652     // Get contact store id from Service Table
   653     // KSPMaxDesLength from spdefinitions.h
   653     // KSPMaxDesLength from spdefinitions.h