serviceproviders/sapi_contacts_vpbk/tsrc/testing/tcontact_getlist/src/tcontact_getlistblocks.cpp
branchRCL_3
changeset 41 50d20108beab
parent 38 ea43c23d28d2
child 44 0b68a1b0c15e
equal deleted inserted replaced
39:1aa6688bfd6b 41:50d20108beab
   617   
   617   
   618  CActiveScheduler::Start(); 
   618  CActiveScheduler::Start(); 
   619         
   619         
   620     CContactIter* iter = CContactIter::NewL();
   620     CContactIter* iter = CContactIter::NewL();
   621     icontactservice->GetListL(*iter);
   621     icontactservice->GetListL(*iter);
   622     delete iter;
       
   623 	    delete icallback;
       
   624     delete icontactservice;
       
   625   __UHEAP_MARKEND;
       
   626     TPtrC buf(_L(""));
   622     TPtrC buf(_L(""));
   627      
   623      
   628      iter->NextL(buf);
   624      iter->NextL(buf);
   629      TInt count=0;
   625      TInt count=0;
   630    while(buf.Compare(KNullDesC)!=0)
   626    while(buf.Compare(KNullDesC)!=0)
   631       {	  count++;
   627       {	  count++;
   632           iter->NextL(buf);
   628           iter->NextL(buf);
   633   	  } 
   629   	  } 
   634 	if(count==2)
   630    delete iter;
   635 	{
   631    delete icallback;
   636 
   632    delete icontactservice;
       
   633    __UHEAP_MARKEND;  
       
   634 
       
   635    if(count==2)
   637     return KErrNone ;   
   636     return KErrNone ;   
   638 	}
   637    else 
   639 delete iter;
   638     return KErrGeneral;
   640 	    delete icallback;
       
   641     delete icontactservice;
       
   642   //__UHEAP_MARKEND;	
       
   643 	return KErrGeneral;
       
   644 }
   639 }
   645 
   640 
   646 /* get all contacts from the phonebook ie contacts.cdb,manual*/
   641 /* get all contacts from the phonebook ie contacts.cdb,manual*/
   647 TInt Ctmanualcontacts::GetList_Test11L( CStifItemParser& aItem )
   642 TInt Ctmanualcontacts::GetList_Test11L( CStifItemParser& aItem )
   648 {
   643 {