28 #include <CVPbkContactStoreUriArray.h> |
28 #include <CVPbkContactStoreUriArray.h> |
29 #include <MVPbkContactStore.h> |
29 #include <MVPbkContactStore.h> |
30 #include <RLocalizedResourceFile.h> |
30 #include <RLocalizedResourceFile.h> |
31 #include <TVPbkContactStoreUriPtr.h> |
31 #include <TVPbkContactStoreUriPtr.h> |
32 #include <VPbkDataCaging.hrh> |
32 #include <VPbkDataCaging.hrh> |
33 #include <vpbksimstoreres.rsg> |
33 #include <VPbkSimStoreRes.rsg> |
34 #include <VPbkStoreUriLiterals.h> |
34 #include <VPbkStoreUriLiterals.h> |
35 #include <VPbkUtil.h> |
35 #include <VPbkUtil.h> |
36 |
36 |
37 #include <barsc.h> |
37 #include <barsc.h> |
38 #include <barsread.h> |
38 #include <barsread.h> |
39 #include <featmgr.h> |
|
40 |
39 |
41 namespace VPbkSimStore { |
40 namespace VPbkSimStore { |
42 |
41 |
43 // CONSTANTS |
42 // CONSTANTS |
44 _LIT(KResFile, "VPbkSimStoreRes.rsc"); |
43 _LIT(KResFile, "VPbkSimStoreRes.rsc"); |
79 iFieldTypeMappings = CFieldTypeMappings::NewL( iMasterFieldTypeList, * |
78 iFieldTypeMappings = CFieldTypeMappings::NewL( iMasterFieldTypeList, * |
80 iTextStore ); |
79 iTextStore ); |
81 |
80 |
82 VPbkEngUtils::RLocalizedResourceFile resFile; |
81 VPbkEngUtils::RLocalizedResourceFile resFile; |
83 resFile.OpenLC( iFs, KVPbkRomFileDrive, KDC_RESOURCE_FILES_DIR, KResFile ); |
82 resFile.OpenLC( iFs, KVPbkRomFileDrive, KDC_RESOURCE_FILES_DIR, KResFile ); |
84 FeatureManager::InitializeLibL(); |
83 |
85 TResourceReader resReader; |
84 TResourceReader resReader; |
86 |
85 resReader.SetBuffer( resFile.AllocReadLC( |
87 if ( !FeatureManager::FeatureSupported( |
86 R_VPBK_VERSIT_FIELD_TYPE_MAPPINGS ) ); |
88 KFeatureIdFfTdClmcontactreplicationfromphonebooktousimcard ) ) |
|
89 { |
|
90 resReader.SetBuffer( resFile.AllocReadLC( |
|
91 R_VPBK_VERSIT_FIELD_TYPE_MAPPINGS ) ); |
|
92 } |
|
93 else |
|
94 { |
|
95 resReader.SetBuffer( resFile.AllocReadLC( |
|
96 R_VPBK_USIM_VERSIT_FIELD_TYPE_MAPPINGS ) ); |
|
97 } |
|
98 // Read versit types |
87 // Read versit types |
99 iFieldTypeMappings->InitVersitMappingsL( resReader ); |
88 iFieldTypeMappings->InitVersitMappingsL( resReader ); |
100 resReader.SetBuffer( resFile.AllocReadLC( |
89 resReader.SetBuffer( resFile.AllocReadLC( |
101 R_VPBK_NONVERSIT_FIELD_TYPE_MAPPINGS ) ); |
90 R_VPBK_NONVERSIT_FIELD_TYPE_MAPPINGS ) ); |
102 // Read non versit types |
91 // Read non versit types |
162 delete iFieldTypeMappings; |
151 delete iFieldTypeMappings; |
163 delete iOperationFactory; |
152 delete iOperationFactory; |
164 delete iContactStoreList; |
153 delete iContactStoreList; |
165 delete iTextStore; |
154 delete iTextStore; |
166 iFs.Close(); |
155 iFs.Close(); |
167 FeatureManager::UnInitializeLib(); |
|
168 } |
156 } |
169 |
157 |
170 // ----------------------------------------------------------------------------- |
158 // ----------------------------------------------------------------------------- |
171 // CContactStoreDomain::UriDomain |
159 // CContactStoreDomain::UriDomain |
172 // ----------------------------------------------------------------------------- |
160 // ----------------------------------------------------------------------------- |