phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactStoreDomain.cpp
branchRCL_3
changeset 18 d4f567ce2e7c
parent 0 e686773b3f54
--- a/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactStoreDomain.cpp	Thu Jul 15 18:22:55 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactStoreDomain.cpp	Thu Aug 19 09:41:07 2010 +0300
@@ -36,6 +36,7 @@
 
 #include <barsc.h>
 #include <barsread.h>
+#include <featmgr.h>
 
 namespace VPbkSimStore {
 
@@ -80,10 +81,20 @@
     
     VPbkEngUtils::RLocalizedResourceFile resFile;
     resFile.OpenLC( iFs, KVPbkRomFileDrive, KDC_RESOURCE_FILES_DIR, KResFile );
-    
+    FeatureManager::InitializeLibL();
     TResourceReader resReader;
-    resReader.SetBuffer( resFile.AllocReadLC( 
-        R_VPBK_VERSIT_FIELD_TYPE_MAPPINGS ) );
+    
+    if ( !FeatureManager::FeatureSupported(
+            KFeatureIdFfTdClmcontactreplicationfromphonebooktousimcard ) )
+        {
+        resReader.SetBuffer( resFile.AllocReadLC(
+                R_VPBK_VERSIT_FIELD_TYPE_MAPPINGS ) );
+        }
+    else
+        {
+        resReader.SetBuffer( resFile.AllocReadLC(
+                R_VPBK_USIM_VERSIT_FIELD_TYPE_MAPPINGS ) );
+        }
     // Read versit types
     iFieldTypeMappings->InitVersitMappingsL( resReader );
     resReader.SetBuffer( resFile.AllocReadLC( 
@@ -153,6 +164,7 @@
     delete iContactStoreList;
     delete iTextStore;
     iFs.Close();
+    FeatureManager::UnInitializeLib();
     }
 
 // -----------------------------------------------------------------------------