phonebookengines/contactsmodel/cntsrv/src/CViewSubSessions.cpp
branchRCL_3
changeset 45 34879f5cfc63
parent 26 0d28c1c5b6dd
child 64 c1e8ba0c2b16
equal deleted inserted replaced
39:a6539d1e8e43 45:34879f5cfc63
   388 	const CViewContact& contact=iView->ContactAtL(index);
   388 	const CViewContact& contact=iView->ContactAtL(index);
   389 
   389 
   390 	delete iContact;
   390 	delete iContact;
   391 	iContact=NULL;
   391 	iContact=NULL;
   392 	iContact = CViewContact::NewL(contact);
   392 	iContact = CViewContact::NewL(contact);
   393 
       
   394 	//Always keep server side local view in memory saving mode, so we
       
   395 	//change the view contact object stored in iView into lightweight object
       
   396 	const_cast<CViewContact&>(contact).ChangeToLightweightObject();
       
   397 	
   393 	
   398 	const TInt externalizedSize=iContact->ExternalizedSize();
   394 	const TInt externalizedSize=iContact->ExternalizedSize();
   399 	TPckgBuf<TInt> pckg(externalizedSize);
   395 	TPckgBuf<TInt> pckg(externalizedSize);
   400 	aMessage.WriteL(1,pckg);
   396 	aMessage.WriteL(1,pckg);
   401 
   397 
   666 			{
   662 			{
   667 			idMap.iId=contact.Id();
   663 			idMap.iId=contact.Id();
   668 			idMap.iMapping=i;
   664 			idMap.iMapping=i;
   669 			User::LeaveIfError(array.Append(idMap));
   665 			User::LeaveIfError(array.Append(idMap));
   670 			}
   666 			}
   671 			
       
   672         //Always keep server side local view in memory saving mode, so we
       
   673         //change the view contact object stored in iView into lightweight object
       
   674 		const_cast<CViewContact&>( contact ).ChangeToLightweightObject();
       
   675 		}
   667 		}
   676 
   668 
   677 	// Externalize array to client.
   669 	// Externalize array to client.
   678 	const TInt count(array.Count());
   670 	const TInt count(array.Count());
   679 	const TInt maxBufSize = (1+(array.Count()*2))*sizeof(TInt);
   671 	const TInt maxBufSize = (1+(array.Count()*2))*sizeof(TInt);