phonebookengines/contactsmodel/cntplsql/src/cntpplviewsession.cpp
changeset 25 76a2435edfd4
parent 24 0ba2181d7c28
--- a/phonebookengines/contactsmodel/cntplsql/src/cntpplviewsession.cpp	Fri Mar 19 09:27:18 2010 +0200
+++ b/phonebookengines/contactsmodel/cntplsql/src/cntpplviewsession.cpp	Fri Apr 16 14:53:18 2010 +0300
@@ -31,9 +31,9 @@
 /**
 Object factory method.
 */
-CCntPplViewSession* CCntPplViewSession::NewL(CPplContactsFile& aContactsFile, const CContactTemplate& aSystemTemplate, CCntSqlStatement& aSelectAllFields, TInt aViewId, const CContactTextDef& aTextDef, const TContactViewPreferences aViewPrefs)
+CCntPplViewSession* CCntPplViewSession::NewL(CPplContactsFile& aContactsFile, const CLplContactProperties& aContactProperties, CCntSqlStatement& aSelectAllFields, TInt aViewId, const CContactTextDef& aTextDef, const TContactViewPreferences aViewPrefs)
 	{
-	CCntPplViewSession* viewSession = new (ELeave) CCntPplViewSession(aContactsFile, aSystemTemplate, aSelectAllFields, aViewId, aViewPrefs);
+	CCntPplViewSession* viewSession = new (ELeave) CCntPplViewSession(aContactsFile, aContactProperties, aSelectAllFields, aViewId, aViewPrefs);
 	CleanupStack::PushL(viewSession);
 	viewSession->ConstructL(aTextDef);
 	CleanupStack::Pop(viewSession);
@@ -44,10 +44,10 @@
 /**
 CCntPplViewSession first phase constructor.
 */
-CCntPplViewSession::CCntPplViewSession(CPplContactsFile& aContactsFile, const CContactTemplate& aSystemTemplate, CCntSqlStatement& aSelectAllFields, TInt aViewId, TContactViewPreferences aViewPrefs)
+CCntPplViewSession::CCntPplViewSession(CPplContactsFile& aContactsFile, const CLplContactProperties& aContactProperties, CCntSqlStatement& aSelectAllFields, TInt aViewId, TContactViewPreferences aViewPrefs)
 :  	CTimer(CActive::EPriorityIdle),
     iViewId(aViewId),
-	iSystemTemplate(aSystemTemplate),
+	iContactProperties(aContactProperties),
     iContactsFile(aContactsFile),
 	iSqlSmtSelectAllFieldsById(aSelectAllFields),
 	iViewPrefs(aViewPrefs)
@@ -349,7 +349,7 @@
 		
 		/* set first field with possible content for group or unsorted contact */	
 		CContactDatabase::TTextFieldMinimal buf;
-		TextFieldL(contactSqlStmt, iSqlSmtSelectAllFieldsById, iSystemTemplate, typeUid, buf);
+		TextFieldL(contactSqlStmt, iSqlSmtSelectAllFieldsById, iContactProperties.SystemTemplateL(), typeUid, buf);
 		viewContact->SetFirstFieldForBlankContactL(buf);
 		CleanupStack::PopAndDestroy(&contactSqlStmt);
 		} //if(typeUid != 0)
@@ -402,7 +402,7 @@
 		TPtrC textFieldPtrC = aSqlStmt.ColumnTextL(iCntSqlStatement->ParameterIndex(KContactTextFields()));
 		HBufC* textFieldsBuf = textFieldPtrC.AllocLC();
 			
-		TCntPersistenceUtility::ReadTextBlobL(textHeaderStoreStream, textFieldsBuf, *iTextDef, iSystemTemplate, fields, searchFastAccessFields);
+		TCntPersistenceUtility::ReadTextBlobL(textHeaderStoreStream, textFieldsBuf, *iTextDef, iContactProperties.SystemTemplateL(), fields, searchFastAccessFields);
 		CleanupStack::PopAndDestroy(4, &textHeaderStream); //textHeaderStore, textHeaderStream, textHeaderStoreStream, textFieldsBuf
 		
 		// Loop through fields, checking for fields from fast access fields, and add