您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetStringFromConfig函数代码示例

51自学网 2021-06-01 21:15:31
  C++
这篇教程C++ GetStringFromConfig函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetStringFromConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ GetStringFromConfig函数的具体用法?C++ GetStringFromConfig怎么用?C++ GetStringFromConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetStringFromConfig函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _LIT

/**  @return - ETrue if enum was resolved to integral value, else EFalse  @param - aSectName Enum file section to be read  @param - aKeyName  Key/Enum to be read  @param - aResult   Updated enum's integral value  */TBool CAppfwkDscStoreTestStepBase::GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)	{	_LIT(KEnumFileNotSet, "EnumFile");	__ASSERT_ALWAYS(iEnumData, User::Panic(KEnumFileNotSet, KErrNotFound));		TBool readResult = EFalse;	TPtrC enumString;		readResult = GetStringFromConfig(aSectName, aKeyName, enumString);		if (readResult)		{		readResult = iEnumData->FindVar(KEnums, enumString, aResult);		}	else		{		_LIT(KEnumKeyNotfound, "EnumKey %S not found");		WARN_PRINTF2(KEnumKeyNotfound, &aKeyName);		}		return readResult;	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:28,


示例2: while

void CDataWrapperBase::InitialiseL()	{	CDataWrapper::InitialiseL();	TBuf<KMaxTestExecuteCommandLength>	tempStore;	TPtrC		fileName;	TBool		moreData=ETrue;	TBool		index=0;	while ( moreData )		{		tempStore.Format(KFile(), ++index);		moreData=GetStringFromConfig(KIncludeSection, tempStore, fileName);				if (moreData)			{			CIniData*	iniData=CIniData::NewL(fileName);			CleanupStack::PushL(iniData);			iInclude.Append(iniData);			CleanupStack::Pop(iniData);			}		}	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:22,


示例3: INFO_PRINTF1

/** * * Test step Preamble. * * @xxxx *  */enum TVerdict CTestStepPlayerAllocFailOpenDesc::DoTestStepPreambleL(void)	{	 enum TVerdict verdict;	 // this installs the scheduler	 verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();	// Printing to the console and log file	INFO_PRINTF1(_L("MM-MMF-ACLNT-U-0105-CP"));	INFO_PRINTF1(_L("this is Alloc failure test of CMdaAudioPlayerUtility::OpenDesL"));	iError = KErrNone; //KErrTimedOut;	if(!GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName7"), iFileName))		{		//INFO_PRINTF2(_L("file name %s not found..."), fileptr);		return EInconclusive;		}	// load the contents of an audio file to a Descriptor	TInt fSize;	iFs.Connect();	if ( iFile.Open(iFs, iFileName, EFileRead) != KErrNone )		return EInconclusive;	iFile.Size(fSize);	// load the sound from the file to a Descriptor	iBuf = HBufC8::NewL( fSize );	TPtr8 buf = iBuf->Des();	iFile.Read(buf);	iFile.Close();	iFs.Close();	// create a CMdaAudioPlayerUtility	if ( (iPlayer = CMMFMdaAudioPlayerUtility::NewL(*this)) == NULL )		verdict = EInconclusive;	return verdict;	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:46,


示例4: DoTestStepPreambleL

/** * * Test step Preamble. * * @xxxx *  */enum TVerdict CTestStepRecorderSendCustomCommandAsync::DoTestStepPreambleL(void)	{	enum TVerdict verdict;	// this installs the scheduler	verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();	if (verdict != EPass)		return verdict;	if(!GetStringFromConfig(_L("SectionOne"), _L("AudioFNameTestController"), iFileName))		{		 //INFO_PRINTF2(_L("file name %s not found..."), fileptr);		 return EInconclusive;		}			iAsyncObserver = new (ELeave) CAsyncObserver;	// Printing to the console and log file	INFO_PRINTF1(iTestStepName);	INFO_PRINTF1(_L("this test is a test of CMMFMdaAudioRecorderUtility::CustomCommandAsync()"));	return verdict;	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:29,


示例5: _LIT

/*   This function performs operations based on sequence specified in the ini file   @param  None   @return None*/void CTestRControlChannel::SequenceOperationsL()	{	_LIT(KInfoLogFile, "CTestRControlChannel::SequenceOperationsL().... /n");	INFO_PRINTF1(KInfoLogFile);	RArray<TPtrC> sequenceList;	CleanupClosePushL(sequenceList);	TPtrC listOfSequences;	_LIT(KListOfSequences, "listofsequences");	GetStringFromConfig(ConfigSection(), KListOfSequences, listOfSequences);	TokenizeStringL(listOfSequences, sequenceList);	TInt numOperations = sequenceList.Count();	for(TInt i(0); i < numOperations; i++)		{//		SetCurrentSection(sequenceList[i]);		PerformDesiredOperationsL(sequenceList[i]);		}	CleanupStack::PopAndDestroy(); 	_LIT(KInfoLogFile1, "CTestRControlChannel::SequenceOperationsL() End.... /n");	INFO_PRINTF1(KInfoLogFile1);	}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:27,


示例6: GetStringFromConfig

TInt CEsockTest29::OpenSockets()// Func to open the sockets	{	iSockServ.Connect();	GetStringFromConfig(KSection29, KTestSocketType, iProtocol);	TInt err = OpenDummySocket();	if(err != KErrNone)			{		return err;		}	if( iProtocol.Compare(KUdp) == 0 )		{		err = OpenTestUdpSocket();		INFO_PRINTF1( _L("UDP Test Socket Opened") );		}	else		{		err = OpenTestTcpSocket();			INFO_PRINTF1( _L("TCP Test Socket Opened") );			}	return err;	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:22,


示例7: GetStringFromConfig

/** Compare the various character sets@test*/		void CTestHtmlToCrtConverterBufferStep::ComparisonForVariousCharsetsL()	{	// Get different character sets from the ini file	TPtrC	sourceData;	GetStringFromConfig(ConfigSection(), KSourceText, sourceData);		HBufC8*	tempSource = HBufC8::NewLC(sourceData.Length());	tempSource->Des().Copy(sourceData);	TPtr8	source(tempSource->Des());		// Compare the source text with the text converted by the characterset converter	if ( DoComparisonL(source) == 0 )		{		INFO_PRINTF1(KInfoComparisionSuccessful);		}	else		{		ERR_PRINTF1(KErrInComparison);		SetTestStepResult(EFail);		}	CleanupStack::PopAndDestroy(tempSource);	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:25,


示例8: INFO_PRINTF1

/** * * Test step Preamble. * * @xxxx *  */enum TVerdict CTestStepRecorderPlayEOF::DoTestStepPreambleL(void)	{	 enum TVerdict verdict;	 // this installs the scheduler	 verdict = CTestStepUnitMMFAudClient::DoTestStepPreambleL();	// Printing to the console and log file	INFO_PRINTF1(iTestStepName);	INFO_PRINTF1(_L("this is a test of CMdaAudioRecorderUtility..."));	INFO_PRINTF1(_L("Play a clip from the middle to EOF, then set the position to the clip's"));	INFO_PRINTF1(_L("duration, call play and then immediately read the position and check it's"));	INFO_PRINTF1(_L("not longer than the file's duration"));	if(!GetStringFromConfig(_L("SectionOne"), _L("AudioPlayFName2"), iFileName))		{		INFO_PRINTF2(_L("file name %S not found..."), &iFileName);		return EInconclusive;		}	// create the Recorder utility	if ( (iRecorder = CMMFMdaAudioRecorderUtility::NewL(*this)) == NULL )		return EInconclusive;	iRecorder->OpenFileL( iFileName );	CActiveScheduler::Start(); 	if (iRecorder == NULL ||		iError != KErrNone ||		iRecorder->State() != CMdaAudioRecorderUtility::EOpen)		return EInconclusive;		// initialize a callback timer	TRAPD(err, iTimer = CCallbackTimer::NewL(*this));	if (err != KErrNone)		return EInconclusive;	CActiveScheduler::Add(iTimer);	return verdict;	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:46,


示例9: SetAction

/**Test SetAction()*/void CT_InquirySockAddrData::DoCmdSetAction(const TDesC& aSection)	{	TBool	foundParameter=EFalse;	TPtrC	flagName;	TInt	flagValue=0;	if (GetStringFromConfig(aSection, KFlag(), flagName) )		{		foundParameter=ETrue;		if (CT_BTUtil::GetIntValue(flagName, flagValue))			{			INFO_PRINTF3(_L("The flag to set: %S , its value: %d" ), &flagName, flagValue);						INFO_PRINTF1(_L("TInquirySockAddr SetAction Call"));			iData->SetAction(KHostResInquiry | KHostResName);			}		}		if ( !foundParameter )		{		ERR_PRINTF2(KLogMissingParameter, &KFlag());		SetBlockResult(EFail);				}	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:26,


示例10: DestroyData

/** Creates an instance of CT_DataLinkedTypefaceSpecification class */void CT_DataLinkedTypefaceSpecification::DoCmdNewL(const TDesC& aSection)	{	// cleanup if any	DestroyData();	// call new operator	TPtrC name;	if (!GetStringFromConfig(aSection, KFldTypefaceName, name))		{		ERR_PRINTF2(KLogMissingParameter, &KFldTypefaceName);		SetBlockResult(EFail);		}	else		{		INFO_PRINTF1(_L("execute CLinkedTypefaceSpecification::NewLC"));		TRAPD(err, iSpec = CLinkedTypefaceSpecification::NewLC(name); CleanupStack::Pop(iSpec));		if (err != KErrNone)			{			ERR_PRINTF2(KLogError, err);			SetError(err);			}		}	}
开发者ID:fedor4ever,项目名称:default,代码行数:24,


示例11: GetFontSpecFromConfig

TBool CDataWrapperBase::GetFontSpecFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TFontSpec& aResult)	{	TBuf<KMaxTestExecuteCommandLength>	tempStore;	TPtrC	name;	tempStore.Format(KFormatEntryField, &aKeyName, &KTagFontSpecName);	TBool	ret=GetStringFromConfig(aSectName, tempStore, name);	TInt	height;	tempStore.Format(KFormatEntryField, &aKeyName, &KTagFontSpecHeight);	if ( !GetIntFromConfig(aSectName, tempStore, height) )		{		ret=EFalse;		}	if ( ret )		{		aResult=TFontSpec(name, height);		}	return ret;	}
开发者ID:fedor4ever,项目名称:default,代码行数:23,


示例12: _LIT

TVerdict CTimeZoneOffsetCheck::doTestStepPreambleL()	{		_LIT(KLocationTag,"City");	_LIT(KOldOffsetTag, "OldOffset");	_LIT(KNewOffsetTag, "NewOffset");		TPtrC ptr;		// read the time zone by name 	GetStringFromConfig(ConfigSection(), KLocationTag, ptr);	iLocation.Copy(ptr);		// read the expected offsets 	TInt offsetInMins;	GetIntFromConfig(ConfigSection(), KOldOffsetTag, offsetInMins);	iOldOffset = offsetInMins;		offsetInMins = 0;	GetIntFromConfig(ConfigSection(), KNewOffsetTag, offsetInMins);	iNewOffset = offsetInMins;		return TestStepResult();	}	
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:23,


示例13: DestroyData

void CT_DataSdpAgent::DoCmdNewL(const TDesC& aSection)	{	DestroyData();	TPtrC	tBTDevAddrName;	TBool	foundParameter=EFalse;		INFO_PRINTF1(_L("CSdpAgent NewL call"));	if( GetStringFromConfig(aSection, KTBTDevAddr(), tBTDevAddrName))		{		foundParameter=ETrue;					CT_BTDevAddrData* tBTDevAddrData=static_cast<CT_BTDevAddrData*>(GetDataWrapperL(tBTDevAddrName));		const TBTDevAddr* btDevAddr = tBTDevAddrData->GetAddress();		TRAPD(err, iSdpAgent = CSdpAgent::NewL(*this, *btDevAddr));		if(err != KErrNone)			{			ERR_PRINTF2(_L("CSdpAgent NewL failed with error %d"), err);			SetError(err);			}   		}   	TInt	intBtDevAddr=0;		if( GetIntFromConfig(aSection, KIntDevAddr(), intBtDevAddr))		{		foundParameter=ETrue;					const TBTDevAddr btDevAddr(intBtDevAddr);		TRAPD(err, iSdpAgent = CSdpAgent::NewL(*this, btDevAddr));		if(err != KErrNone)			{			ERR_PRINTF2(_L("CSdpAgent NewL failed with error %d"), err);			SetError(err);			}   		}  	   			if( !foundParameter )		{		ERR_PRINTF2(_L("Missing parameter %S"), &KIntDevAddr());		SetBlockResult(EFail);		}	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:37,


示例14: _LIT

/** * Updates the specified number of contact items from the database */void CTestContactViewCRUDOperationsStep::UpdateContactEntriesL()	{	_LIT(KNumOfContactsToBeUpdated, "NumOfContactsToBeUpdated");	TInt numOfContactToBeUpdated;	GetIntFromConfig(ConfigSection(), KNumOfContactsToBeUpdated, numOfContactToBeUpdated);	TPtrC deleteContactInGroups;	_LIT(KDeleteContactInGroups, "grouplist");	GetStringFromConfig(ConfigSection(), KDeleteContactInGroups, deleteContactInGroups);	if(deleteContactInGroups != KNullDesC)		{		UpdateContactsInGroupL(numOfContactToBeUpdated, deleteContactInGroups);		}	else		{		CCntFilter* filter = CCntFilter::NewL();		CleanupStack::PushL(filter);		filter->SetContactFilterTypeCard(ETrue);		DatabaseReference().FilterDatabaseL(*filter);		for(TInt i = 0; i < numOfContactToBeUpdated; ++i)			{			TContactItemId contactItemId = (*filter->iIds)[i];			CContactItem* contactItem = DatabaseReference().ReadContactL(contactItemId);			CleanupStack::PushL(contactItem);			UpdateFieldsL(*contactItem);			CContactItem* updatedContactItem = DatabaseReference().UpdateContactLC(contactItemId, contactItem);			CleanupStack::PopAndDestroy(updatedContactItem);			CleanupStack::PopAndDestroy(contactItem);			}		CleanupStack::PopAndDestroy(filter);		}	}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:39,


示例15: GetStringFromConfig

void CTestCalIndexFileAddEntryStep::GetEntryInfoFromConfigL(RPointerArray<CConfigTestEntryInfo>& aEntriesInfo, TInt& aNumEntries, TBool aPerformCrudOps)	{	// first get the default entries from the file	CTestCalIndexFileStepBase::GetEntryInfoFromConfigL(aEntriesInfo, aNumEntries, aPerformCrudOps);		if (aPerformCrudOps)		{		// now add the new entry info to the list		TPtrC entryString;		TBool readRes = EFalse;		readRes = GetStringFromConfig(ConfigSection(), KAddEntry, entryString);		if (!readRes)			{			INFO_PRINTF1(_L("Error in CTestCalIndexFileAddEntryStep::GetEntryInfoFromConfigL - entrytoadd not found in config file"));			User::Leave(KErrNotFound);			}		CConfigTestEntryInfo* inf = new(ELeave)CConfigTestEntryInfo();		CleanupStack::PushL(inf);		ParseEntryStringL(*inf, entryString);		aEntriesInfo.Append(inf);		CleanupStack::Pop(inf); // now held in array		aNumEntries++;		}	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:24,


示例16: allocator

TVerdict CUpnpResponseComposerTest::doTestStepL()	{	TBool responseBodyPresence;	TInt responseStatusCode;	TPtrC responseStatusText;	TInt noOfHdrValPairs;	TInt noOfHdrParamValPairs;	RMemoryAllocator allocator ( iMBufMgr );		if( !GetIntFromConfig(ConfigSection(), KResponseStatusCode, responseStatusCode) ||		!GetStringFromConfig(ConfigSection(), KResponseStatusText, responseStatusText) ||		!GetBoolFromConfig(ConfigSection(), KResponseBodyPresence, responseBodyPresence) ||		!GetIntFromConfig(ConfigSection(), KNoOfHdrValPairs, noOfHdrValPairs) ||		!GetIntFromConfig(ConfigSection(), KNoOfHdrParamValPairs, noOfHdrParamValPairs)			)		{		ERR_PRINTF6(_L("===> Problem in reading values from ini.			/				/nExpected fields are: /n%S/n%S/n%S/n%S/n%S <==="			  ), &KResponseStatusCode, &KResponseStatusText, &KResponseBodyPresence,			  &KNoOfHdrValPairs, &KNoOfHdrParamValPairs);				SetTestStepResult(EFail);		return TestStepResult();		}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:24,


示例17: DoCmdFindFamily

void CT_DataRSubConParameterBundle::DoCmdFindFamily( const TDesC& aSection )/**Test code for RSubConParameterBundle FindFamilyIni file options:	subconparameterfamily	- a CSubConParameterFamily dictionary entry@internalComponent*/	{	TPtrC		subConParameterFamilyName;	if( !GetStringFromConfig(aSection, KSubConParameterFamily(), subConParameterFamilyName) )		{		MissingParamError( KSubConParameterFamily() );		}	else		{		CSubConParameterFamily*	subConParameterFamily = static_cast<CSubConParameterFamily*>(GetDataObjectL(subConParameterFamilyName));		if (subConParameterFamily == NULL)			{			ERR_PRINTF1(_L("CSubConParameterBundle DoCmdFindFamily - CSubConParameterFamily is NULL"));			SetBlockResult(EFail);			}		INFO_PRINTF1(_L("Calling RSubConParameterBundle FindFamily"));		TRAPD (err, subConParameterFamily = iSubConParameterBundle->FindFamily(KSubConQoSFamily));		if( err != KErrNone )			{			ERR_PRINTF2(_L("FindFamily() failed with error %d"), err);			SetError(err);			}		}	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:36,


示例18: GetWsGraphicIdFromConfigL

TBool CDataWrapperBase::GetWsGraphicIdFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, TWsGraphicId& aResult)	{	TBuf<KMaxTestExecuteCommandLength>	tempStore;	TInt	id;	tempStore.Format(KFormatEntryField, &aKeyName, &KTagWsGraphicIdUid);	TBool	ret=GetIntFromConfig(aSectName, tempStore, id);	if ( ret )		{		TUid	uid=TUid::Uid(id);		aResult.Set(uid);		}	else		{		tempStore.Format(KFormatEntryField, &aKeyName, &KTagWsGraphicIdId);		ret=GetIntFromConfig(aSectName, tempStore, id);		if ( ret )			{			aResult.Set(id);			}		else			{			tempStore.Format(KFormatEntryField, &aKeyName, &KTagWsGraphicIdName);			TPtrC	name;			ret=GetStringFromConfig(aSectName, tempStore, name);			if ( ret )				{				CDataWrapperBase*	wrapper=static_cast<CDataWrapperBase*>(GetDataWrapperL(name));				aResult=wrapper->GetId();				}			}		}	return ret;	}
开发者ID:fedor4ever,项目名称:default,代码行数:36,


示例19: _LIT

TInt CTestIfioctls::TestIfNameToIndex(  )	{	TInt ret = KErrNone;	char IfName[30];	TPtrC String;	_LIT( KString, "String" );    TBool res = GetStringFromConfig(ConfigSection(), KString, String );    if(!res)  		{     	_LIT(Kerr , "Failed to read interface name from ini file.") ;     	INFO_PRINTF1(Kerr) ;     	return KErrGeneral ;		}	TBuf8<256> asciiBuffer;	asciiBuffer.Copy(String);	TInt len = asciiBuffer.Length();	Mem::Copy(IfName, asciiBuffer.Ptr(), len);	IfName[len] = 0;		StripStar(IfName);	if_nametoindex(IfName);		return ret;	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:24,


示例20: GetStringFromConfig

void CTestBlockController::CommandL(TTEFBlockItem& aCommand, const TInt aAsyncErrorIndex)	{	// Retrieve the object name from the ini file	TPtrC	name;	if( 0 != aCommand.iCommand.iObject.Compare(KTEFNull) &&		GetStringFromConfig(aCommand.iCommand.iObject, KName, name) )		{		CDataWrapper*	data = iDataDictionary.GetDataL(name);		if( data!=NULL )			{			TBool cmdExists = EFalse;			TRAPD(err, cmdExists = data->DoCommandL(aCommand.iCommand.iFunction, aCommand.iSection, aAsyncErrorIndex));			if (KErrNone != err)				{				ERR_PRINTF4(_L("Command /"%S/" of the object /"%S/" leaves with error code %d"), &aCommand.iCommand.iFunction, &aCommand.iCommand.iObject, err);				aCommand.iError = err;				SetBlockResult(EFail);				}			else if( !cmdExists )				{				ERR_PRINTF1(KErrNoFunction);				aCommand.iError = KErrNotFound;				}			}		else			{			ERR_PRINTF1(KErrNotExist);			aCommand.iError = KErrNotFound;			}		}	else		{		ERR_PRINTF1(KErrNoName);		aCommand.iError = KErrNotFound;		}	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:36,


示例21: INFO_PRINTF1

/** Dial out to given phone number using previously opened RMobileCall @param aSection @param KCallName @param KPhoneNumber @param KCallTimeout @return error - Symbian error code. KErrNone if successful */void CT_RMobileCallData::DoCmdDial(const TTEFFunction& aSection, const TInt aAsyncErrorIndex)	{	INFO_PRINTF1(_L("*START*CT_RMobileCallData::DoCmdDial"));	TBool dataOk = ETrue;	if ( !GetStringFromConfig( aSection, KPhoneNumber, iPhoneNumber ))		{		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KPhoneNumber);		SetBlockResult(EFail);		dataOk = EFalse;		}	TInt callNameParameter;	if ( !GetIntFromConfig(aSection, KCallName, callNameParameter ))		{		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KCallName);		SetBlockResult(EFail);		dataOk = EFalse;		}	if ( dataOk )		{		INFO_PRINTF1(_L("Getting mobile call"));		TRAPD( error, iMobileCall = GetMobileCallL(callNameParameter) );		if(error != KErrNone)			{			ERR_PRINTF2(_L("GetMobileCallL left when trying to obtain the MobileCall with error %d"), error);			SetBlockResult(EFail);			}		else			{			INFO_PRINTF2(_L("Dialing /"%S/""), &iPhoneNumber);			iMobileCall->Dial (iActiveCallback->iStatus, iPhoneNumber);			iActiveCallback->Activate(aAsyncErrorIndex);			IncOutstanding ();			}		}	INFO_PRINTF1(_L("*END*CT_RMobileCallData::DoCmdDial"));	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:44,


示例22: INFO_PRINTF1

TVerdict CT_LbsHybridCombinedStep_Tracking02::doTestStepL()	{ 	INFO_PRINTF1(_L("CT_LbsHybridCombinedStep_Tracking02::doTestStepL()"));		// Stop the test if the preable failed	TESTL(TestStepResult() == EPass);	const TInt KTimeOut = 80*1000*1000;	// data declarations common to MOLR & MTLR    TBool emergency = EFalse;    TInt reason = KErrNone;    MLbsNetworkProtocolObserver::TLbsNetProtocolService service = MLbsNetworkProtocolObserver::EServiceSelfLocation;    TLbsNetPosRequestQuality quality = ArgUtils::Quality();    TLbsNetPosRequestMethod method   = ArgUtils::RequestHybridMethod();    TPositionSatelliteInfo* getPositionInfo = NULL;    MLbsNetworkProtocolObserver::TLbsNetProtocolServiceMask serviceMask1 = MLbsNetworkProtocolObserver::EServiceSelfLocation;    MLbsNetworkProtocolObserver::TLbsNetProtocolServiceMask serviceMask2 = MLbsNetworkProtocolObserver::EServiceNone;    TLbsNetPosRequestPrivacy privacy    = ArgUtils::Privacy();    TLbsExternalRequestInfo requestInfo = ArgUtils::RequestInfo();    TNetProtocolResponseType mType;        // Protocol Module receives the cababilities message as LBS starts up...    TESTL(iProxy->WaitForResponse(KTimeOut) == ENetMsgGetCurrentCapabilitiesResponse);		CLbsNetworkProtocolBase::TLbsSystemStatus status;	TInt cleanupCnt;	cleanupCnt = iProxy->GetArgsLC(ENetMsgGetCurrentCapabilitiesResponse, &status);	TESTL(status == CLbsNetworkProtocolBase::ESystemStatusNone);	CleanupStack::PopAndDestroy(cleanupCnt);    INFO_PRINTF1(_L("ENetMsgGetCurrentCapabilitiesResponse got"));	// Create Client Objects...	RPositionServer server;	TInt connectError = server.Connect();	TESTL(KErrNone == connectError);	CleanupClosePushL(server);		RPositioner pos;	TESTL(KErrNone == pos.Open(server));	CleanupClosePushL(pos);	CPosServerWatcher *pWatch = CPosServerWatcher::NewLC(pos, *this);		// set client update options	TBool trackingEnabled = ETrue;	if (trackingEnabled)	{		T_LbsUtils utils;	    TPtrC configFileName;	    _LIT(KUpdateOptionsFile, "agps_module_update_file");	    GetStringFromConfig(ConfigSection(), KUpdateOptionsFile, configFileName);	    utils.GetConfigured_ModuleUpdateOptionsL(configFileName, ConfigSection(), iUpdateOpts);	    pos.SetUpdateOptions(iUpdateOpts);	}		// Client Send - self locate request... TB mode selected in Admin...	pWatch->IssueNotifyPositionUpdate();    INFO_PRINTF1(_L("NotifyPositionUpdate sent"));    // Get current time.    iClientInitialRequestTime.UniversalTime();		// LBS->PM :: RequestSelfLocation()	TESTL(iProxy->WaitForResponse(KTimeOut) == ENetMsgRequestSelfLocation);    INFO_PRINTF1(_L("RequestSelfLocation got"));	// check the Client AGPS Usage Flag is as expected at the NPE Hybrid GPS module...	        // Process the response.        TLbsNetSessionId* 					sessionId = NULL;        TLbsNetPosRequestOptionsAssistance*	opts = NULL;        cleanupCnt = iProxy->GetArgsLC(ENetMsgRequestSelfLocation, &sessionId, &opts);        TBool qualitycheck = 	ArgUtils::CompareQuality(	opts,                                                             ETrue,                                                             KMinHorizontalAcc,                                                             KMinVerticalAcc,                                                             KTestMaxFixTime,                                                            0, 														EAssistanceDataReferenceTime, 														(TPositionModuleInfo::ETechnologyTerminal 														| TPositionModuleInfo::ETechnologyAssisted)													);		        TESTL(qualitycheck);                iSessionId.SetSessionNum(sessionId->SessionNum());        iSessionId.SetSessionOwner(sessionId->SessionOwner());        CleanupStack::PopAndDestroy(cleanupCnt);        sessionId = NULL;        opts = NULL;    // PM->LBS ProcessStatusUpdate(EServiceSelfLocation)    serviceMask1 = MLbsNetworkProtocolObserver::EServiceSelfLocation;    iProxy->CallL(ENetMsgProcessStatusUpdate, &serviceMask1);    INFO_PRINTF1(_L("ProcessStatusUpdate sent"));    // PM->LBS ProcessLocationUpdate(SessionId, RefPosition)    TPositionInfo refPosInfo = ArgUtils::MolrReferencePositionInfo();    iProxy->CallL(ENetMsgProcessLocationUpdate, &iSessionId, &refPosInfo);    INFO_PRINTF1(_L("ProcessLocationUpdate sent"));    // LBS->CLIENT OnNotifyPositionUpdate()    CheckForObserverEventTestsL(KTimeOut, *this);    TEST(iClientPosUpdateCount==1);        // second request... the interval is 5 seconds..    // CLIENT->LBS IssueNotifyPositionUpdate();//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:101,


示例23: GetStringFromConfig

TVerdict CTestMacrosTestStep::doTestStepL()/** * @return - TVerdict code * Override of base class pure virtual * Our implementation only gets called if the base class doTestStepPreambleL() did * not leave. That being the case, the current test result value will be EPass. */	{	TPtrC macro;	GetStringFromConfig(ConfigSection(), KMacro, macro);	if (macro == KTest)		{		TBool parameter;		TInt parameter2;		TInt expectedResult;		GetBoolFromConfig(ConfigSection(), KParameter, parameter);		GetIntFromConfig(ConfigSection(), KParameter2, parameter2);		GetIntFromConfig(ConfigSection(), KExpectedResult, expectedResult);		_LIT(KStartInfo, "Start to run %S test of macros TEST(E) & TEST(E)L");		INFO_PRINTF2(KStartInfo, POS_NEG_SEL);		TEST(parameter);		TESTE(parameter, parameter2);		if (expectedResult != TestStepResult())			{			ERR_PRINTF2(_L("The %S test of macro TEST(E) test is failed!"), POS_NEG_SEL);			SetTestStepResult(EFail);			}		else			{			SetTestStepResult(EPass);			INFO_PRINTF3(_L("The %S test of macro TEST(E) is passed. Start to run %S test of macro TEST(E)L"), POS_NEG_SEL, POS_NEG_SEL);						TRAPD(err, TESTL(parameter));			TRAPD(err1, TESTEL(parameter, parameter2));			if ((expectedResult==EPass && KErrNone!=err) || (expectedResult==EFail && TEST_ERROR_CODE!=err && parameter2!=err1))				{				ERR_PRINTF2(_L("The %S test of macro TEST(E)L test is failed!"), POS_NEG_SEL);				SetTestStepResult(EFail);				}			else				{				INFO_PRINTF2(_L("The %S test of macro TEST(E)L is passed."), POS_NEG_SEL);				SetTestStepResult(EPass);				}			}		}	else if (macro == KTest1)		{		TBool parameter;		TBool parameter2;		TInt parameter3;		TInt initState;		TInt expectedResult;		GetBoolFromConfig(ConfigSection(), KParameter, parameter);		GetBoolFromConfig(ConfigSection(), KParameter2, parameter2);		GetIntFromConfig(ConfigSection(), KParameter3, parameter3);		GetIntFromConfig(ConfigSection(), KInitState, initState);		GetIntFromConfig(ConfigSection(), KExpectedResult, expectedResult);		SetTestStepResult((TVerdict)initState);		_LIT(KStartInfo, "Start to run %S test of macros TEST(E)1 & TEST(E)1L");		INFO_PRINTF2(KStartInfo, POS_NEG_SEL);		TEST1(parameter, parameter2);		TESTE1(parameter, parameter3, parameter2);		if (expectedResult != TestStepResult())			{			ERR_PRINTF1(_L("Macro TEST(E)1 test failed!"));			SetTestStepResult(EFail);			}		else			{			SetTestStepResult(EPass);			INFO_PRINTF3(_L("The %S test of macro TEST(E)1 has passed. Start to run %S test of macro TEST(E)1L"), POS_NEG_SEL, POS_NEG_SEL);						TRAPD(err, TEST1L(parameter, parameter2));			TRAP_IGNORE(TESTE1L(parameter, parameter3, parameter2));			if ((expectedResult==EPass && KErrNone!=err) || ((expectedResult==EFail) && (parameter && ((TEST_ERROR_CODE==err)||(parameter3==err))) || (!parameter && TEST_ERROR_CODE!=err && parameter3!=err)))				{				ERR_PRINTF1(_L("Macro TEST(E)1L test failed!"));				SetTestStepResult(EFail);				}			else				{				INFO_PRINTF2(_L("The %S test of macro TEST(E)1L has passed."), POS_NEG_SEL);				SetTestStepResult(EPass);				}			}		}	else if (macro == KTestCheckL)		{		TInt parameter;		TInt parameter1;		TPtrC parameter2;		TInt expectedResult;		GetIntFromConfig(ConfigSection(), KParameter, parameter1);		GetStringFromConfig(ConfigSection(), KParameter2, parameter2);		GetIntFromConfig(ConfigSection(), KExpectedResult, expectedResult);				parameter = (parameter1==expectedResult);		INFO_PRINTF3(_L("Start %S test of macro %S"), POS_NEG_SEL, &KTestCheckL());//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:101,


示例24: SetTestStepResult

TVerdict CIPEventNotifier1Step_ReceiveMFlag::doTestStepL()	{    SetTestStepResult(EFail);	                  _LIT(KReadingConfig,"CIPEventNotifier1Step_ReceiveMFlag::doTestStepL() reading config..");	INFO_PRINTF1(KReadingConfig);	if(!GetBoolFromConfig(ConfigSection(),KTe_IPENMFlagExpectedResultBool,iExpectedMFlagValue) ||	   !GetStringFromConfig(ConfigSection(),KTe_IPENNetworkInterfacePrefixToMonitor, iNetworkInterfacePrefixToMonitor))	    {		User::Leave(KErrNotFound);		}			_LIT(KShowSettings,"The expected M flag is %d, on 1st interface starting with %S");	INFO_PRINTF3(KShowSettings,iExpectedMFlagValue,&iNetworkInterfacePrefixToMonitor);							_LIT(KGetIfName,"Getting full interface name..");	INFO_PRINTF1(KGetIfName);	TName fullName = GetFullInterfaceNameL(iNetworkInterfacePrefixToMonitor);	_LIT(KDeclEv,"OK. declaring event..");	INFO_PRINTF1(KDeclEv);	NetSubscribe::TEvent event( this, SignalHandler );	_LIT(KSubscribing,"OK. Subscribing..");	INFO_PRINTF1(KSubscribing);	CDhcpSignal::SubscribeL( fullName, IPEvent::EMFlagReceived, event );	_LIT(KOkWaiting,"OK. Waiting for M flag..");	INFO_PRINTF1(KOkWaiting);	CTimeout *timeout = CTimeout::NewLC(this);	// a Router Advertisement is set to go out every 3 seconds on the test network	//	timeout->After(KFiveSecondDelayToCatchRouterAdvertisementEveryThreeSeconds);	TRAPD(res,CActiveScheduler::Start())	if(res != KErrNone)		{		if(res == KErrTimedOut)			{			_LIT(KTimedOut,"Timed out! Subscriber isn't working or network isn't publishing Router Advertisements");			INFO_PRINTF1(KTimedOut);			}		else			{			_LIT(KUnexpectedErrCode,"Received unexpected error code: %d");			INFO_PRINTF2(KUnexpectedErrCode,res);			}		SetTestStepResult(EFail);		}		_LIT(KOkTidyingUp,"OK. Tidying up..");	INFO_PRINTF1(KOkTidyingUp);	timeout->Cancel();	CleanupStack::PopAndDestroy(timeout);	if (iQuery && iQuery->iHandle)		{		CDhcpSignal::UnsubscribeL( event );		}	_LIT(KOkDone,"OK. Done.");	INFO_PRINTF1(KOkDone);	return TestStepResult();	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:66,


示例25: LoadParametersL

/**LoadParametersL()Loads the test parameters @leave KErrNotReady@returnETrue if parameters loaded, Efalse on failure.*/TBool CT_MsgComparePopEmailMsgs::LoadParametersL()	{	TPtrC sentFolder;	_LIT(KSentFolder, "SentFolder");	if(!GetStringFromConfig(ConfigSection(), KSentFolder, sentFolder))		{		ERR_PRINTF1(_L("No Input for Sent Folder"));		User::Leave(KErrNotReady);		}				iSentSelectionList = CT_MsgUtils ::CreateChildrenSelectionL(iSharedDataPOP.iSession, CT_MsgUtilsEnumConverter::FindFolderIdByName(sentFolder));	if(! iSentSelectionList)		{		ERR_PRINTF1(_L("Invalid sentSelectionList"));		SetTestStepResult(EFail);		return EFalse;		}		TPtrC inboxFolder;	_LIT(KInboxFolder, "InboxFolder");	if(!GetStringFromConfig(ConfigSection(), KInboxFolder, inboxFolder))		{		ERR_PRINTF1(_L("No Input for Inbox Folder"));		User::Leave(KErrNotReady);		}			TPtrC popAccountName;	if(!GetStringFromConfig(ConfigSection(), KPopAccountName, popAccountName))		{		ERR_PRINTF1(_L("Account name not specified"));		SetTestStepResult(EFail);		}	if (CT_MsgUtilsEnumConverter::FindFolderIdByName(inboxFolder) == KMsvLocalServiceIndexEntryId)		{		// We are expecting to get a selection of remote Folder(which is the serviceId)		TMsvId popServiceId = CT_MsgUtilsCentralRepository::GetPopServiceIdL((TDes&)popAccountName);				CMsvEntry* entry = iSharedDataPOP.iSession->GetEntryL(popServiceId);		CleanupStack::PushL(entry);				entry->SetEntryL(popServiceId); // Setting the context to remote folder.				iInboxSelectionList = CT_MsgUtils ::CreateChildrenSelectionL(iSharedDataPOP.iSession, popServiceId);				CleanupStack::PopAndDestroy(entry);		}	else		{		iInboxSelectionList = CT_MsgUtils ::CreateChildrenSelectionL(iSharedDataPOP.iSession, CT_MsgUtilsEnumConverter::FindFolderIdByName(inboxFolder));		}	if(! iInboxSelectionList)		{		ERR_PRINTF1(_L("Invalid inboxSelectionList"));		SetTestStepResult(EFail);		return EFalse;		}	//Starting the comparision	if(iInboxSelectionList->Count() != iSentSelectionList->Count())		{		ERR_PRINTF3(_L("iInboxSelectionList->Count(%d) != iSentSelectionList->Count(%d)"),								 iInboxSelectionList->Count(), iSentSelectionList->Count());		SetTestStepResult(EFail);		return EFalse;		}	TInt comInt = -1;	_LIT(KNumTest, "NumTest");	if (!GetIntFromConfig(ConfigSection(), KNumTest, comInt))		{		ERR_PRINTF1(_L("No Input for NumTests"));		User::Leave(KErrNotReady);		}	TInt numTests = comInt;	if(numTests != iInboxSelectionList->Count())		{		ERR_PRINTF1(_L("iNumTests != iInboxSelectionList"));		SetTestStepResult(EFail);		return EFalse;		}			iExpResults.Reset();	for(TInt i = 0;i < numTests; i++) 		{				CExpPop3MailInfo* pExp = GetExpPop3MailInfoLC(i);		if(! pExp)			{			ERR_PRINTF1(_L("Invalid expected mail Info"));			SetTestStepResult(EFail);			return EFalse;//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:101,


示例26: GetExpPop3MailInfoLC

/**GetExpPop3MailInfoLC()Sets the CExpPop3MailInfo attributes reading from the INI file@param  aIndxIndex in the selection list.@leave KErrNotReady@returnA pointer to an object of type CExpPop3MailInfo*/CExpPop3MailInfo* CT_MsgComparePopEmailMsgs::GetExpPop3MailInfoLC(TInt aIndx)	{	CExpPop3MailInfo* expMailInfo  = new (ELeave) CExpPop3MailInfo;	CleanupStack::PushL(expMailInfo);		TInt comInt = -1;	_LIT(KNumOfLines,"NumOfLines%d");	TBuf<256> param;	param.Format(KNumOfLines,aIndx);		if (!GetIntFromConfig(ConfigSection(), param, comInt))		{		ERR_PRINTF1(_L("No Input for NumOfLines"));		User::Leave(KErrNotReady);		}		expMailInfo->SetNumLinesBodyText(comInt);	comInt = -1;		_LIT(KFooterExpected, "FooterExpected%d");	param.Format(KFooterExpected,aIndx);	if (!GetIntFromConfig(ConfigSection(), param, comInt))		{		ERR_PRINTF1(_L("No Input for Footer Expected"));		User::Leave(KErrNotReady);		}	expMailInfo->SetFooterExpected(comInt);		comInt = -1;	_LIT(KNumOfLinesHtml, "NumOfLinesHtml%d");	param.Format(KNumOfLinesHtml, aIndx);	if (!GetIntFromConfig(ConfigSection(), param, comInt))		{		ERR_PRINTF1(_L("No Input For NumOfLinesHtml"));		User::Leave(KErrNotReady);		}	expMailInfo->SetNumLinesHtml(comInt);		TPtrC ptrDes;	_LIT(KDescription, "Description%d");	param.Format(KDescription, aIndx);	if(!GetStringFromConfig(ConfigSection(), param, ptrDes))		{		ERR_PRINTF1(_L("No Input for Description"));		User::Leave(KErrNotReady);		}	expMailInfo->SetDescription(ptrDes);			_LIT(KNumOfAttachments, "NumOfAttachments%d");	param.Format(KNumOfAttachments, aIndx);	if (!GetIntFromConfig(ConfigSection(), param, comInt))		{		ERR_PRINTF1(_L("No Input for NumOfAttachments"));		User::Leave(KErrNotReady);		}	expMailInfo->SetNumAttachments(comInt);		comInt = -1;	if(expMailInfo->GetFooterExpected())		{		_LIT(KFooterSize, "FooterSize%d");		param.Format(KFooterSize, aIndx);		if (!GetIntFromConfig(ConfigSection(), param, comInt))			{			ERR_PRINTF1(_L("No Input for FooterSize"));			User::Leave(KErrNotReady);			}		expMailInfo->SetFooterSize(comInt);		}	else		{		expMailInfo->SetFooterSize(0);		}		return expMailInfo;	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:88,


示例27: SetTestStepResult

/** Get the calculation to be performed from the ini file and carry out thatparticular calculation1. 	If SetGreater is specified in the ini file then the function SetToGreater 	is called the set the cluster count to a value greater than it actually is2. 	If ComputeFatSize is specified in the ini file then the function 	ComputeFatSize is called to computer the size of each FAT3. 	If ClusterCount is specified in the ini file, then the function 	ClusterCount is called to return the clutser count of the volume@return EPass if test passes and EFail if test fails*/ TVerdict CBaseTestFat32Calculate::doTestStepL()	{	SetTestStepResult(EFail);	_LIT(KCalculation,"Calculation");	TBufC<6> calculationType;	TPtrC16 calculation = calculationType;		TBool alright = GetStringFromConfig(ConfigSection(), KCalculation, calculation);	if(alright)		{		if (calculation == _L("SetGreater"))			{			TInt r = SetToGreater(iClusterCount, 1000);			if (r != KErrNone)				{				_LIT(KFailClusterCount, "Failed to Set to a greater cluster count - r=%d");				INFO_PRINTF2(KFailClusterCount, r);				return TestStepResult();				}				}		if (calculation == _L("ComputeFatSize"))			{			TInt r = ComputeFatSize();			if (r != KErrNone)				{				_LIT(KFailComputeFatSz, "Failed to compute FatSz - r=%d");				INFO_PRINTF2(KFailComputeFatSz, r);				return TestStepResult();				}				}		if (calculation == _L("ClusterCount"))			{			TInt r = CheckClusterCount(iClusterCount);			if (r != KErrNone)				{				_LIT(KFailComputeClusCnt, "Failed to compute ClusterCount - r=%d");				INFO_PRINTF2(KFailComputeClusCnt, r);				return TestStepResult();				}				}		if (calculation == _L("CheckFSInfo"))			{			TInt r = CheckFSInfo(0x3E8);			if (r != KErrNone)				{				_LIT(KFailCheckFSInfo, "Failed FSInfo check - r=%d");				INFO_PRINTF2(KFailCheckFSInfo, r);				return TestStepResult();				}				}		}	else		{		_LIT(KIniFileError, "Failed to read calculation type from ini file");		INFO_PRINTF1(KIniFileError);		return TestStepResult();		}		SetTestStepResult(EPass);	_LIT(KWritePass, "Calculation Pass");	INFO_PRINTF1(KWritePass);	return TestStepResult();	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:74,


示例28: INFO_PRINTF1

/** * Load and initialise an audio file. */TVerdict CTestMmfVclntOpenFile0522::DoTestStepL()	{	TVerdict ret = EFail;	INFO_PRINTF1(_L("Test : Video Recorder - OpenFileL(RFile&)"));	RFs		fs;	RFile	file;	User::LeaveIfError(fs.Connect());	CleanupClosePushL(fs);	User::LeaveIfError(fs.ShareProtected());	iError = KErrTimedOut;	TPtrC filename;	if(!GetStringFromConfig(iSectName,iKeyName,filename))		{		return EInconclusive;		}	User::LeaveIfError(file.Open(fs,filename,EFileWrite));	CleanupClosePushL(file);	CVideoRecorderUtility* rec = CVideoRecorderUtility::NewL(*this);	CleanupStack::PushL(rec);	const TUid KVidTstControllerUid = {KMmfVideoTestControllerUid};	TRAP(iError,rec->OpenFileL(file, NULL, KVidTstControllerUid, KUidMdaBmpClipFormat));	if(iError == KErrNone)		{		INFO_PRINTF1(_L("CVideoRecorderUtility: Open file"));		// Wait for initialisation callback		CActiveScheduler::Start();		}	if(iError == KErrNotSupported)		{		ret = EPass;		}	// Check for errors.	if ((iError == KErrNone) && (rec != NULL))		{		rec->Prepare();		CActiveScheduler::Start();		if(iError != KErrNone)			{			INFO_PRINTF2(_L("Prepare callback : error %d"), iError);			return EInconclusive;			}		if(iRec)			{			iError = KErrTimedOut;			rec->Record();			INFO_PRINTF1(_L("CVideoRecorderUtility: Record"));			// Wait for init callback			CActiveScheduler::Start();			if(iError == KErrNone)				{				ret = EPass;				}			User::After(1000000);			rec->Stop();			}		else			{			ret = EPass;			}		}	rec->Close();		INFO_PRINTF1(_L("CVideoRecorderUtility: Destroy"));	CleanupStack::PopAndDestroy(rec);	User::After(KOneSecond); // wait for deletion to shut down devsound	if(iError != KErrNone)		{		ERR_PRINTF2( _L("CVideoRecorderUtility failed with error %d"),iError );		}	CleanupStack::PopAndDestroy(2,&fs);		return	ret;	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:89,


示例29: part

/** Function : doTestStepL Description : Verify if message part(s) of the message entries returned by sort mechanism are			   in the intended order. @return : TVerdict - Test step result */TVerdict CT_MsgVerifySortResult::doTestStepL()	{	INFO_PRINTF1(_L("Test Step : VerifySortResult"));	TPtrC fieldName;	TBuf<1> buf;	TBool sortedByTo = ETrue;	TBool sortedByFrom = ETrue;	TBool sortedByCc = ETrue;	TBool sortedByBcc = ETrue;	TBool sortedBySubject = ETrue;	TBool sortedByUnRead = ETrue;	TBool sortedByDetails = ETrue;	TBool sortedByDescription = ETrue;	TBool sortedByDate = ETrue;	TBool sortedBySize = ETrue;	TBool sortedByAttachment = ETrue;	TBool sortedByPriority = ETrue;	TBool sortedById = ETrue;	TBool sortedByNewFlag = ETrue;	TInt expectedSearchResultCount = 0;	GetIntFromConfig(ConfigSection(), KExpectedResultCount, expectedSearchResultCount); // Read search result count	TInt resultCount = 0;	GetIntFromConfig(ConfigSection(), KCountOfResult, resultCount); // Read search result count	if(expectedSearchResultCount > 0 && resultCount == 0)		{		ERR_PRINTF2(_L("Expected SORT Result Count > 0 and Actual SORT result count = %d"), resultCount);				SetTestStepResult(EFail);		}	else if(expectedSearchResultCount == 0 && resultCount == 0)		{		SetTestStepResult(EPass);		}	else		{		RArray<TMsvEntry> messageEntries = iSharedDataCommon.iSearchSortResultArray;		INFO_PRINTF2(_L("Number of entries to be verified = %d"), messageEntries.Count());		DisplayMsgEntryList(messageEntries); // Log the message entry details		if ( !GetStringFromConfig( ConfigSection(), KSortMsgPart, fieldName))			{			ERR_PRINTF1(_L("Message part to be verified for is not specified"));			SetTestStepResult (EFail);			}		TMsvMessagePart msgPartValue = CT_MsgUtilsEnumConverter::ConvertDesToMessagePart(fieldName);				TPtrC sortOrder;		GetStringFromConfig(ConfigSection(), KSortOrder, sortOrder);		TMsvSortOrder sortOption = CT_MsgUtilsEnumConverter::ConvertDesToSortOrder(sortOrder);		CMsvEntry *entry = CMsvEntry::NewL(*iSharedDataCommon.iSession, KMsvRootIndexEntryId, TMsvSelectionOrdering());		CleanupStack::PushL(entry);		switch(msgPartValue)			{		case EMsvTo:			switch(sortOption)				{			case EMsvSortAscending:				for(TInt j = 0; j < messageEntries.Count() - 1 && sortedByTo; ++j)					{					entry->SetEntryL(messageEntries[j].Id());					CMsvStore* store1 = entry->ReadStoreL();					CleanupStack::PushL(store1);					CImHeader* header1 = CImHeader::NewLC(); 					header1->RestoreL(*store1); // Retrieves the email message header										HBufC* address1=HBufC::NewL(50); 					if(header1->ToRecipients().Count())						{						address1 = (header1->ToRecipients()[0]).AllocL();											}						CleanupStack::PopAndDestroy(2,store1);										entry->SetEntryL(messageEntries[j+1].Id());					CMsvStore* store2 = entry->ReadStoreL();					CleanupStack::PushL(store2);					CImHeader* header2 = CImHeader::NewLC(); 					header2->RestoreL(*store2); // Retrieves the email message header										HBufC* address2=HBufC::NewL(50); 					//  FIx when no fields are there					if(header2->ToRecipients().Count())						{						 address2 = (header2->ToRecipients()[0]).AllocL();						}					CleanupStack::PopAndDestroy(2,store2);						if(address1->CompareF(*address2) > 0)// Checks if any messages is not in Ascending order   w.r.t to TO field						{						ERR_PRINTF1(_L("Sorting by TO: Not in Ascending order"));						sortedByTo = EFalse;//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:101,



注:本文中的GetStringFromConfig函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetStringParam函数代码示例
C++ GetString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。