phoneengine/PhoneCntFinder/ContactService/src/cphcntcontactmatchstrategy.cpp
branchRCL_3
changeset 14 b8d67d6176f5
parent 0 5f000ab63145
child 23 40a3f856b14d
--- a/phoneengine/PhoneCntFinder/ContactService/src/cphcntcontactmatchstrategy.cpp	Tue May 25 12:41:50 2010 +0300
+++ b/phoneengine/PhoneCntFinder/ContactService/src/cphcntcontactmatchstrategy.cpp	Wed Jun 09 09:41:11 2010 +0300
@@ -20,11 +20,13 @@
 #include <centralrepository.h>
 #include <telconfigcrkeys.h>
 #include <CVPbkContactStoreUriArray.h>
+#include <cntdb.h>  // KBestMatchingPhoneNumbers
 
 #include "cphcntcontactmatchstrategy.h"
 #include "cphcntcontactstoreuris.h"
 #include "CPhoneRawMatchNumberExtractor.h"
 
+
 // Digit count used to match CS number.
 const TInt KPhCntMatchMin = 7;
 const TInt KPhCntMatchMax = 11;
@@ -37,11 +39,11 @@
     CVPbkContactManager& aContactManager,
     CPhCntContactStoreUris& aContactStoreUris,
     MVPbkContactFindObserver& aObserver,
-    CVPbkPhoneNumberMatchStrategy::TVPbkPhoneNumberMatchFlags aMatchFlag ) :
+    TUint32 aMatchFlags ) :
     iContactManager( aContactManager ),
     iContactStoreUris( aContactStoreUris ),
     iObserver( aObserver ),
-    iMatchFlag( aMatchFlag )
+    iMatchFlags( aMatchFlags )
     {
     iContactStoreUris.SetObserver( *this );
     }
@@ -91,14 +93,14 @@
     CVPbkContactManager& aContactManager,
     CPhCntContactStoreUris& aContactStoreUris,
     MVPbkContactFindObserver& aObserver,
-    CVPbkPhoneNumberMatchStrategy::TVPbkPhoneNumberMatchFlags aMatchFlag )
+    TUint32 aMatchFlags )
     {
     CPhCntContactMatchStrategy* self = 
         new( ELeave ) CPhCntContactMatchStrategy( 
             aContactManager,
             aContactStoreUris, 
             aObserver,
-            aMatchFlag );
+            aMatchFlags );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -242,10 +244,10 @@
 TInt CPhCntContactMatchStrategy::DoCreateMatchStrategy()
     {
     CVPbkPhoneNumberMatchStrategy::TConfig config( 
-            iNumberOfDigits,
+            KBestMatchingPhoneNumbers,
             *iUriArray,
             CVPbkPhoneNumberMatchStrategy::EVPbkSequentialMatch, 
-            iMatchFlag
+            iMatchFlags
             );
     TRAPD( err, iMatchStrategy = CVPbkPhoneNumberMatchStrategy::NewL( 
                     config,