39 #include <MPbk2ApplicationServices.h> |
39 #include <MPbk2ApplicationServices.h> |
40 #include <MPbk2ApplicationServices2.h> |
40 #include <MPbk2ApplicationServices2.h> |
41 #include <CPbk2StoreConfiguration.h> |
41 #include <CPbk2StoreConfiguration.h> |
42 #include <TVPbkContactStoreUriPtr.h> |
42 #include <TVPbkContactStoreUriPtr.h> |
43 #include <CPbk2ApplicationServices.h> |
43 #include <CPbk2ApplicationServices.h> |
|
44 #include <Phonebook2PrivateCRKeys.h> |
44 |
45 |
45 #include <MPbk2ContactUiControl.h> |
46 #include <MPbk2ContactUiControl.h> |
46 #include <MPbk2ViewExplorer.h> |
47 #include <MPbk2ViewExplorer.h> |
47 #include <CPbk2ViewState.h> |
48 #include <CPbk2ViewState.h> |
48 |
49 |
153 KMPbk2ApplicationServicesExtension2Uid ); |
155 KMPbk2ApplicationServicesExtension2Uid ); |
154 if( !ext ) |
156 if( !ext ) |
155 { |
157 { |
156 User::Leave( KErrNotReady ); |
158 User::Leave( KErrNotReady ); |
157 } |
159 } |
|
160 // Check status message variation |
|
161 TInt showStatusInNamesList = 0; |
|
162 CRepository* cenrep = |
|
163 CRepository::NewLC( TUid::Uid( KCRUidPhonebook ) ); |
|
164 User::LeaveIfError( |
|
165 cenrep->Get( KPhonebookStatusMessageVisibility, |
|
166 showStatusInNamesList ) ); |
|
167 CleanupStack::PopAndDestroy( cenrep ); |
|
168 |
|
169 // By default status is not shown in names list |
|
170 TInt32 spbContentFlags = CSpbContentProvider::EPhoneNumber; |
|
171 |
|
172 if( showStatusInNamesList ) |
|
173 { |
|
174 spbContentFlags = (CSpbContentProvider::EStatusMessage | |
|
175 CSpbContentProvider::EPhoneNumber); |
|
176 } |
|
177 |
158 CPbk2StoreManager& storeManager = |
178 CPbk2StoreManager& storeManager = |
159 static_cast<MPbk2ApplicationServices2*>(ext)->StoreManager(); |
179 static_cast<MPbk2ApplicationServices2*>(ext)->StoreManager(); |
160 iContentProvider = CSpbContentProvider::NewL( iAppServices->ContactManager(), storeManager, |
180 iContentProvider = CSpbContentProvider::NewL( |
161 CSpbContentProvider::EStatusMessage | CSpbContentProvider::EPhoneNumber ); |
181 iAppServices->ContactManager(), storeManager, spbContentFlags ); |
162 } |
182 } |
163 return *iContentProvider; |
183 return *iContentProvider; |
164 } |
184 } |
165 |
185 |
166 |
186 |