當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetIntFromConfig函數代碼示例

本文整理匯總了C++中GetIntFromConfig函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetIntFromConfig函數的具體用法?C++ GetIntFromConfig怎麽用?C++ GetIntFromConfig使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetIntFromConfig函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: INFO_PRINTF1

/**
  Function 		: doTestStepL
  Description 	: 
  @return 		: TVerdict - Test step result
*/
TVerdict CT_CopyMsgsToExternalDrive::doTestStepL()
	{	
	INFO_PRINTF1(_L("Test Step: CopyMsgsToExternalDrive"));
	
	TInt extDrive = EDriveD;
	GetIntFromConfig(ConfigSection(), KDrive, extDrive);

	CT_MsgActive&	active=Active();
	delete iOperation;
	iOperation = NULL;		
	iOperation = iSharedDataIMAP.iSession->CopyStoreL(extDrive, active.iStatus);
	active.Activate();
	CActiveScheduler::Start();
	return TestStepResult();
	}
開發者ID:cdaffara,項目名稱:symbiandump-mw2,代碼行數:20,代碼來源:T_CopyMsgsToExternalDrive.cpp

示例2: StartClientL

void CTestExplicitSessionStep::StartClientL()
	{
	TPtrC uri;
	TInt iap = 0;
	
    if (!GetStringFromConfig(ConfigSection(), KIniUri, uri) ||
    	!GetIntFromConfig(ConfigSection(), KIAP, iap)
    	)
		{
		ERR_PRINTF3(_L("Problem in reading values from ini.			\
						\nExpected fields are: \n%S\n%d"
					  ),&KIniUri, iap);
		SetTestStepResult(EFail);
		return;
		}
開發者ID:kuailexs,項目名稱:symbiandump-mw2,代碼行數:15,代碼來源:testexplicitsessionstep.cpp

示例3: GetIntFromConfig

/**
 * Third phase construction
 *
 * @internalComponent
 *
 * @return	N/A
 *
 * @pre		None
 * @post	None
 *
 * @leave	system wide error
 */
void CT_RMobileCallData::InitialiseL()
	{
	CDataWrapperBase::InitialiseL();
	GetIntFromConfig(KDefaultSection, KMaxPhoneCalls, iMaxPhoneCalls );

	RMobileCall* mobileCall=  NULL;
	for (TInt i = 0; i < iMaxPhoneCalls; ++i)
		{
		// RMobileCalls
		mobileCall = new (ELeave) RMobileCall(); // We need a bunch of RMobileCall handles
		CleanupStack::PushL (mobileCall);
		iMobileCalls.AppendL (mobileCall);
		CleanupStack::Pop (mobileCall);
		}
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:27,代碼來源:T_RMobileCallData.cpp

示例4: SetConnPrefs

TInt CTS_MultiHomingStep::SetConnPrefs(TCommDbConnPref& aPrefs, TDesC& aName)
/**
 * Fills up a CStoreableOverrideSettings* with script file configs
 * @param aPrefs A pointer to a CStoreableOverrideSettings object
 * @param aName Name of the connection to get prefs for
 * @return KErrNone if sucessful, otherwise system wide error codes
 * @exception Can leave
 */
	{

	TInt theIap = 0;
	TInt theNet = 0;
	// Get the IAP index and use it to complete the .ini file section name
	if(GetIntFromConfig(aName, KConnIap, theIap))
		{
		aPrefs.SetIapId(theIap);		
		}

	if(GetIntFromConfig(aName, KConnNet, theNet))
		{
		aPrefs.SetNetId(theNet);
		}
	return KErrNone;
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:24,代碼來源:TS_MultiHomingStep.cpp

示例5: SetMinWindowSize

/**
Test SetMinWindowSize()
*/
void CT_AvdtpRecoveryCapabilitiesData::DoCmdSetMinWindowSize(const TDesC& aSection)
	{
	INFO_PRINTF1(_L("TAvdtpRecoveryCapabilities SetMinWindowSize() Call"));
	
	TInt size = 0;
	if( GetIntFromConfig(aSection, KMinWindowSize, size) )
		{
		iAvdtpRecoveryCapabilities->SetMinWindowSize(size);
		}
	else
		{
		ERR_PRINTF2(KLogMissingParameter, &KMinWindowSize);
		SetBlockResult(EFail);		
		}
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:18,代碼來源:T_AvdtpRecoveryCapabilitiesData.cpp

示例6: GetIntFromConfig

/**
	Postamble for all CEtelMMLbsTestStepBase
*/
TVerdict CEtelMMLbsTestStepBase::doTestStepPostambleL()
	{
	TInt lbsCloseFlag ;
	TBool existsLbsCloseFlag = GetIntFromConfig(ConfigSection(), _L("LbsCloseFlag"), lbsCloseFlag);
	if(!existsLbsCloseFlag)
		{
		iLocationSvc.Close();
		INFO_PRINTF1(_L("Test- RMobileLocationServices::Close request"));
		}
	iPhone.Close();	
	
	//base class postamble
	CEtelMMTestStepBase::doTestStepPostambleL();
 	return TestStepResult() ;
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:18,代碼來源:TE_EtelMMLbsStepBase.cpp

示例7: 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,代碼來源:cupnpresponsecomposertest.cpp

示例8: GetRectFromConfig

TBool CDataWrapperBase::GetRectFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TRect& aResult)
	{
	TBuf<KMaxTestExecuteCommandLength>	tempStore;

	TInt	top;
	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRectTop);
	TBool	ret=GetIntFromConfig(aSectName, tempStore, top);

	TInt	left;
	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRectLeft);
	if ( !GetIntFromConfig(aSectName, tempStore, left) )
		{
		ret=EFalse;
		}

	TInt	bottom;
	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRectBottom);
	if ( !GetIntFromConfig(aSectName, tempStore, bottom) )
		{
		ret=EFalse;
		}

	TInt	right;
	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRectRight);
	if ( !GetIntFromConfig(aSectName, tempStore, right) )
		{
		ret=EFalse;
		}

	if ( ret )
		{
		aResult.SetRect(left, top, right, bottom);
		}

	return ret;
	}
開發者ID:fedor4ever,項目名稱:default,代碼行數:36,代碼來源:DataWrapperBase.cpp

示例9: 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,代碼來源:DataWrapperBase.cpp

示例10: functionality

/**
Tests the count functionality( finds the count of all matched uris of specific servicetype/list-type
and check that returned count is correct if it is positive and non-capability test.
It reads values from INI file and gets the count of matching URIs of specific service/list type from database
@internalTechnology
@test
@param		None
@return		EPass or EFail indicating the success or failure of the test step
*/
TVerdict CTestUriCountStep::doTestStepL()
{
    __UHEAP_MARK;
    INFO_PRINTF1(_L("\n"));
    // Get necessary information from INI file

    TInt listType;
    TInt serviceType;
    TInt expCountOrErrCode;
    TInt actCountOrErrCode;
    TBool isCapabilityTest;

    if(!GetIntFromConfig(ConfigSection(), 	KIniListType, listType) ||
            !GetIntFromConfig(ConfigSection(), 	KIniServiceType, serviceType) ||
            !GetIntFromConfig(ConfigSection(), KIniExpCountOrErrCode, expCountOrErrCode) ||
            !GetBoolFromConfig(ConfigSection(), KIniIsCapabilityTest, isCapabilityTest)
      )
    {
        ERR_PRINTF5(_L("Problem in reading values from ini.			\
						\nExpected fields are: \n%S\n%S\n%S\n%S\n"
                      ),&KIniListType, &KIniServiceType, &KIniExpCountOrErrCode, isCapabilityTest
                   );
        SetTestStepResult(EFail);
    }
開發者ID:kuailexs,項目名稱:symbiandump-mw2,代碼行數:33,代碼來源:testuricountstep.cpp

示例11: SetIAC

/**
Test SetIAC()
*/
void CT_InquirySockAddrData::DoCmdSetIAC(const TDesC& aSection)
	{
	TInt theIAC = 0;
	
	if (GetIntFromConfig(aSection, KIAC(), theIAC) )
		{
		INFO_PRINTF1(_L("TInquirySockAddr SetIAC Call"));
		iData->SetIAC((TUint)theIAC);
		}
	else
		{
		ERR_PRINTF2(KLogMissingParameter, &KIAC());
		SetBlockResult(EFail);
		}	
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:18,代碼來源:T_InquirySockAddrData.cpp

示例12: SetMinorClassOfDevice

/**
Test SetMinorClassOfDevice()
*/
void CT_InquirySockAddrData::DoCmdSetMinorClassOfDevice(const TDesC& aSection)
	{
	TInt classValue = 0;
	
	if (GetIntFromConfig(aSection, KClass(), classValue) )
		{
		INFO_PRINTF1(_L("TInquirySockAddr SetMinorClassOfDevice Call"));
		iData->SetMinorClassOfDevice((TUint8)classValue);
		}
	else
		{
		ERR_PRINTF2(KLogMissingParameter, &KClass());
		SetBlockResult(EFail);
		}	
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:18,代碼來源:T_InquirySockAddrData.cpp

示例13: INFO_PRINTF1

/** Calls TAlgSAtyle::SetWidthFactor() */
void CT_DataAlgStyle::DoCmdSetHeightFactor(const TDesC& aSection)
	{
	INFO_PRINTF1(_L("Calls TAlgSAtyle::SetHeightFactor()"));

	// get factor from parameters
	TInt	factor;
	if (!GetIntFromConfig(aSection, KFactor(), factor) )
		{
		ERR_PRINTF2(_L("No %S"), &KFactor());
		SetBlockResult(EFail);
		}

	// call SetHeightFactor()		
	iAlgStyle->SetHeightFactor(factor);
	}
開發者ID:fedor4ever,項目名稱:default,代碼行數:16,代碼來源:T_DataAlgStyle.cpp

示例14: INFO_PRINTF1

void CT_RMobileCallData::DoCmdAnswerIncomingCallPost(const TTEFFunction& aSection, const TInt aAsyncErrorIndex)
	{
	INFO_PRINTF1(_L("*START*CT_RMobileCallData::DoCmdAnswerIncomingCallPost"));

	TInt callNameParameter;
	if ( !GetIntFromConfig(aSection, KCallName, callNameParameter))
		{
		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KCallName);
		SetBlockResult(EFail);
		}
	else
		{
		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_PRINTF1(_L("Read call status to check if the other party hanged up."));
			RCall::TStatus callStatus;
			error = iMobileCall->GetStatus(callStatus);
			if ( error != KErrNone)
				{
				ERR_PRINTF2(_L("Failed to read mobile call's status [%d]"), error);
				SetError(error);
				}
			else
				{
				// Normal status of the connection is EStatusConnected.
				if ( callStatus == RCall::EStatusConnected)
					{
					INFO_PRINTF1(_L("Mobile call is connected."));
					}
				else
					{
					INFO_PRINTF1(_L("Mobile call was disconnected, hanging up."));
					iMobileCall->HangUp (iActiveCallback->iStatus);
					iActiveCallback->Activate (aAsyncErrorIndex);
					IncOutstanding ();
					}
				}
			}
		}
	INFO_PRINTF1(_L("*END*CT_RMobileCallData::DoCmdAnswerIncomingCallPost"));
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:48,代碼來源:T_RMobileCallData.cpp

示例15: TEST

/**
	Preamble for all CEtelMMLbsTestStepBase
*/
TVerdict CEtelMMLbsTestStepBase::doTestStepPreambleL()
	{
	//base class preamble
	CEtelMMTestStepBase::doTestStepPreambleL();
	TInt ret=iPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
	TEST(ret==KErrNone);
	TInt lbsOpenFlag ;
	TBool existsLbsOpenFlag = GetIntFromConfig(ConfigSection(), _L("LbsOpenFlag"), lbsOpenFlag);
	if(!existsLbsOpenFlag)
		{
		ret=iLocationSvc.Open(iPhone);
		TEST(ret == KErrNone);	
		INFO_PRINTF2(_L("Test %d - RMobileLocationServices::Open request"), ret);
		}
	return TestStepResult() ;
	}
開發者ID:cdaffara,項目名稱:symbiandump-os1,代碼行數:19,代碼來源:TE_EtelMMLbsStepBase.cpp


注:本文中的GetIntFromConfig函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。