TReal CBenchMarker::FindAsyncFromSmallFieldSetL(const TDesC& aTextToFind) { CContactItemFieldDef* def=new(ELeave) CContactItemFieldDef(); CleanupStack::PushL(def); def->AppendL(KUidContactFieldGivenName); def->AppendL(KUidContactFieldFamilyName); def->AppendL(KUidContactFieldCompanyName); TReal averageTime=DoFindAsyncL(aTextToFind,*def); CleanupStack::PopAndDestroy(); // def. return averageTime; }
void CFindTest::FindEmailAddressL(const TDesC& aTextToFind, const TInt aNumExpectedFinds,TBool aAsync) { iLog->LogLine(_L("Find %S in Email fields"),&aTextToFind); CContactItemFieldDef* def=new(ELeave) CContactItemFieldDef(); CleanupStack::PushL(def); def->AppendL(KUidContactFieldEMail); if(!aAsync) { DoFindL(aTextToFind,*def,aNumExpectedFinds); } else { DoFindAsyncL(aTextToFind,*def,aNumExpectedFinds); } CleanupStack::PopAndDestroy(); // def. }
void CFindTest::FindNameInLastNameFieldL(const TDesC& aTextToFind, const TInt aNumExpectedFinds,TBool aAsync) { iLog->LogLine(_L("Find %S in Family name field"),&aTextToFind); CContactItemFieldDef* def=new(ELeave) CContactItemFieldDef(); CleanupStack::PushL(def); def->AppendL(KUidContactFieldFamilyName); if(!aAsync) { DoFindL(aTextToFind,*def,aNumExpectedFinds); } else { DoFindAsyncL(aTextToFind,*def,aNumExpectedFinds); } CleanupStack::PopAndDestroy(); // def. }
TReal CBenchMarker::FindAsyncFromLargeFieldSetL(const TDesC& aTextToFind) { CContactItemFieldDef* def=new(ELeave) CContactItemFieldDef(); CleanupStack::PushL(def); def->AppendL(KUidContactFieldGivenName); def->AppendL(KUidContactFieldFamilyName); def->AppendL(KUidContactFieldCompanyName); def->AppendL(KUidContactFieldPhoneNumber); def->AppendL(KUidContactFieldFax); def->AppendL(KUidContactFieldEMail); def->AppendL(KUidContactFieldUrl); def->AppendL(KUidContactFieldAddress); def->AppendL(KUidContactFieldLocality); def->AppendL(KUidContactFieldRegion); def->AppendL(KUidContactFieldPostcode); def->AppendL(KUidContactFieldCountry); def->AppendL(KUidContactFieldNote); TReal averageTime=DoFindAsyncL(aTextToFind,*def); CleanupStack::PopAndDestroy(); // def. return averageTime; }