这篇教程C++ GetIntFromConfig函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetIntFromConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ GetIntFromConfig函数的具体用法?C++ GetIntFromConfig怎么用?C++ GetIntFromConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetIntFromConfig函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,
示例2: StartClientLvoid 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,
示例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,
示例4: SetConnPrefsTInt 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,
示例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,
示例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,
示例7: allocatorTVerdict 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,
示例8: GetRectFromConfigTBool 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,
示例9: GetWsGraphicIdFromConfigLTBool 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,
示例10: functionality/**Tests the count functionality( finds the count of all matched uris of specific servicetype/list-typeand 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,
示例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,
示例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,
示例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,
示例14: INFO_PRINTF1void 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,
示例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,
示例16: GetIntFromConfigTInt CTestSendsignal::TestSigKillwithTmpfile() { int ret = KErrGeneral, pid, pid1, Signum, status; ret = GetIntFromConfig(ConfigSection(),_L("Signum"), Signum); FILE* ff; if(ret == 0) { ERR_PRINTF1(_L("Failed to read the signal number/n")) ; goto close; } ff = tmpfile(); if(ff == 0) { ERR_PRINTF2(_L("Unable to create temporary file, errno=%d/n"), errno); } else { fclose(ff); } //Run a second instance of the current test process ret = posix_spawn(&pid, "z://sys//bin//tsendsignal.exe", NULL, NULL, NULL, NULL); if(ret == -1) { ERR_PRINTF2(_L("posix_spawn() has failed with error=%d/n"), errno); goto close; } pid1 = waitpid(pid, &status, WUNTRACED); if (pid1 != pid) { ERR_PRINTF1(_L("waitpid failed.../n")); goto close; } else { //Send a SIGKILL signall ret = kill(pid, Signum); if(ret < 0) { ERR_PRINTF2(_L("kill() has failed with error=%d/n"), errno); goto close; } INFO_PRINTF1(_L("Kill() on self successfull/n")); } INFO_PRINTF1(_L("Test Case successfull/n")); close: return ret; }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:47,
示例17: GetIntFromConfig/**@SYMTestCaseID PIM-CIT-CallnterimAPI-1098AP-13 @SYMTestType CIT@SYMTestPriority Medium@SYMPREQ 1098@SYMFssID 3.2.13, 001, 002, 003, 005, @SYMTestCaseDesc Fetch entries@SYMTestActions Create a CCalIter, and move through the entries@SYMTestExpectedResults The iteration should be move through the entries successfully*/void CTestCalInterimApiIterator::IterateEntriesL() { TInt expectedCount=0; GetIntFromConfig(ConfigSection(), KExpectedCount, expectedCount); INFO_PRINTF2(KInfoExpectedCount, expectedCount); const TFileName& fileName=GetCalenderFileName(); INFO_PRINTF2(KInfoFileName, &fileName); TInt count=0; CCalIter* iter=CCalIter::NewL(GetSession()); CleanupStack::PushL(iter); TPtrC8 uid(iter->FirstL()); while (KNullDesC8()!=uid) { ++count; TBuf<MAX_TEXT_MESSAGE> iterateUid; iterateUid.Copy(uid); INFO_PRINTF2(KInfoIterateCalFileUid, &iterateUid); uid.Set(iter->NextL()); } //make sure we have iterated through all entries if ( expectedCount!=count ) { ERR_PRINTF4(KErrIterateCalFileInvalidEntries, &fileName, expectedCount, count); SetTestStepResult(EFail); } if( TestStepResult() == EPass ) { TRAPD(err, uid.Set(iter->NextL())); TInt expectedErr=KErrNone; if ( count==0 ) { expectedErr=KErrCorrupt; } if ( err!=expectedErr ) { ERR_PRINTF2(KErrIterateEmptyFileNoEntries, err); SetTestStepResult(EFail); } } CleanupStack::PopAndDestroy(iter); }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:56,
示例18: while/** ReadFlags - read in bitwise measeure text input flags @internalComponent @param aSection - main entry in .ini file @param aFlags - bitwise flags output @return ETrue if data is valid in the ini file @pre None @post 2nd stage construction complete*/TBool CT_DataMeasureTextInput::ReadFlags(const TDesC& aSection, TUint16& aFlags) { TBuf<KMaxTestExecuteCommandLength> tempStore; TInt index=0; TBool moreData=ETrue; TPtrC flagString; TBool ret=ETrue; aFlags=0; while ( moreData && ret ) { tempStore.Format(KFlag(), &aSection, ++index); if ( GetStringFromConfig(aSection, tempStore, flagString) ) { TInt flag=0; if ( flagString==KEFVisualOrder ) { flag=CFont::TMeasureTextInput::EFVisualOrder; } else if ( flagString==KEFVisualOrderRightToLeft ) { flag=CFont::TMeasureTextInput::EFVisualOrderRightToLeft; } else if ( flagString==KEFIncludePenPositionInBoundsCheck ) { flag=CFont::TMeasureTextInput::EFIncludePenPositionInBoundsCheck; } else { ret=GetIntFromConfig(aSection, tempStore, flag); } if ( ret ) { aFlags |= flag; } } else { moreData=EFalse; } } return ret; }
开发者ID:fedor4ever,项目名称:default,代码行数:55,
示例19: GetFlowCtrl/**Test GetFlowCtrl()*/void CT_RfcommRemotePortParamsData::DoCmdGetFlowCtrl(const TDesC& aSection) { TBool expected = EFalse; TBool param = EFalse; TInt flowCtrlValue = 0; TUint8 exp = 0; TUint8 flowCtrl = 0; INFO_PRINTF1(_L("TRfcommRemotePortParams GetFlowCtrl Call")); TBool result = iData->GetFlowCtrl(flowCtrl); INFO_PRINTF3(_L("Return result (%d) and flow control on return (%d)"), result, flowCtrl); if(GetBoolFromConfig(aSection, KExpected(), expected) ) { param = ETrue; if ( result != expected ) { ERR_PRINTF3(_L("Result (%d) is not as expected (%d)"), result, expected); SetBlockResult(EFail); } else { if ( result ) { INFO_PRINTF1(_L("Verify that aFlowCtrl has been set with the expected value")); if(GetIntFromConfig(aSection, KFlowCtrl(), flowCtrlValue) ) { param = ETrue; exp = flowCtrlValue; if ( flowCtrl != exp ) { ERR_PRINTF3(_L("aFlowCtrl (%d) is not as expected (%d)"), flowCtrl, exp); SetBlockResult(EFail); } } } } } if ( !param ) { ERR_PRINTF3(KLogMissingParameters, &KExpected(), &KFlowCtrl()); SetBlockResult(EFail); } }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:49,
示例20: GetBoolFromConfig/** Purpose: To test that an wrapped object exists in the dictionary. And optionally to check the object's value. @internalComponent @param aSection Current ini file command section */void CTEFLoggerTestWrapper::DoCmdGetDataObject(const TDesC& aSection) { // check if null is expected TBool nullExpected = EFalse; GetBoolFromConfig(aSection, KNullExpected(), nullExpected); // call GetDataObject() and check that the wrapped object is found TInt* wrappedObject= NULL; TRAPD(err, wrappedObject = static_cast<TInt*>(GetDataObjectL(aSection))); if (err != KErrNone) { ERR_PRINTF2(_L("GetDataObjectL() error: %d"), err); SetBlockResult(EFail); SetError(err); } // check if is null if is expetced to be null and vice versa if (wrappedObject == NULL && !nullExpected) { ERR_PRINTF1(_L("Wrapped object is not expected to be null!")); SetBlockResult(EFail); } else if (wrappedObject != NULL) { if (nullExpected) { ERR_PRINTF1(_L("Wrapped object is expected to be null!")); SetBlockResult(EFail); } else { // check expected value TInt objectValue = 0; if (GetIntFromConfig(aSection, KObjectValue(), objectValue)) { if (*wrappedObject != objectValue) { ERR_PRINTF3(_L("Wrapped object's value is not as expected. expected=%d, actual=%d"), objectValue, *wrappedObject); SetBlockResult(EFail); } } } } }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:52,
示例21: GetXOnChar/**Test GetXOnChar()*/void CT_RfcommRemotePortParamsData::DoCmdGetXOnChar(const TDesC& aSection) { TBool expected = EFalse; TBool param = EFalse; TInt xOnCharValue = 0; TUint8 exp = 0; TUint8 xOnChar = 0; INFO_PRINTF1(_L("TRfcommRemotePortParams GetXOnChar Call")); TBool result = iData->GetXOnChar(xOnChar); INFO_PRINTF3(_L("Return result (%d) and XON char on return (%d)"), result, xOnChar); if(GetBoolFromConfig(aSection, KExpected(), expected) ) { param = ETrue; if ( result != expected ) { ERR_PRINTF3(_L("Result (%d) is not as expected (%d)"), result, expected); SetBlockResult(EFail); } else { if ( result ) { INFO_PRINTF1(_L("Verify that aXON has been set with the expected value")); if(GetIntFromConfig(aSection, KXonChar(), xOnCharValue) ) { param = ETrue; exp = xOnCharValue; if ( xOnChar != exp ) { ERR_PRINTF3(_L("aXON (%d) is not as expected (%d)"), xOnChar, exp); SetBlockResult(EFail); } } } } } if ( !param ) { ERR_PRINTF3(KLogMissingParameters, &KExpected(), &KXonChar()); SetBlockResult(EFail); } }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:48,
示例22: INFO_PRINTF1/** Function : doTestStepL Description : Reads the Imap account name from the ini file. Reads the event type from the ini file. And requests what msgs have been affected by that event, within the folder that this observer is watching. @return : TVerdict - Test step result*/TVerdict CT_MsgObserverCkEventNCount::doTestStepL() { INFO_PRINTF1(_L(" Test Step : Checking event type and total number of msgs effected form observer")); TPtrC imapAccountName,event; TInt expectedNum; //retrieve account name from ini if(!GetStringFromConfig( ConfigSection(), KAccountName, imapAccountName)) { ERR_PRINTF1(_L("Imap Account Name is not specified")); SetTestStepResult(EFail); } if( TestStepResult() != EFail ) { //retrieve event expected from ini if(!GetStringFromConfig( ConfigSection(), KEventName, event)) { ERR_PRINTF1(_L("Event type not specified")); SetTestStepResult(EFail); } //ask observer how many entries have been affected by that event TInt actualNum=iSharedDataIMAP.iObserver->CheckEventAndCountL((TDesC&)event); INFO_PRINTF2(_L(" Total number of msgs effected are: %d"),actualNum); if(!GetIntFromConfig( ConfigSection(), KNumExpected, expectedNum)) { ERR_PRINTF1(_L("Expected count not specified!")); } if (actualNum!=expectedNum) { ERR_PRINTF1(_L("Actual number of msgs effected by event does not equal to number expected! ")); SetTestStepResult(EFail); } } return TestStepResult(); }//end function doTestStepL
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:53,
示例23: doTestStepPreambleL/**Overrides test step preamble.*/enum TVerdict CT_WServGenericpluginStepLoad::doTestStepPreambleL() { TVerdict ret = CTestStep::doTestStepPreambleL(); if ( !GetIntFromConfig( ConfigSection(), KTWServGenericPluginStepTestId, iTestId )) { User::Leave(KErrNotFound); } else { iDisplayMode = EColor64K; User::LeaveIfError(iWsSession.Connect()); // Screen # 0 iScreen = new (ELeave) CWsScreenDevice(iWsSession); User::LeaveIfError(iScreen->Construct()); iWinGroup = RWindowGroup(iWsSession); User::LeaveIfError(iWinGroup.Construct(KNullWsHandle, iScreen)); iWinGroup.AutoForeground(ETrue); iGc = new (ELeave) CWindowGc(iScreen); User::LeaveIfError(iGc->Construct()); // Screen # 1 if( iWsSession.NumberOfScreens() > 1 ) { iScreen1 = new (ELeave) CWsScreenDevice(iWsSession); User::LeaveIfError(iScreen1->Construct(1)); INFO_PRINTF1(_L("WSERV configuration supports two screens.")); iWinGroup1 = RWindowGroup(iWsSession); User::LeaveIfError(iWinGroup1.Construct(KNullWsHandle, iScreen1) ); iWinGroup1.AutoForeground(ETrue); } else { INFO_PRINTF1(_L("WSERV configuration doesn't support two screens.")); INFO_PRINTF1(_L("Tests that used second screen may failed!!!")); } iDefaultPluginBmp = new(ELeave) CFbsBitmap; User::LeaveIfError(iDefaultPluginBmp->Load(KDefaultPluginBmp)); iTestPluginBmp = new(ELeave) CFbsBitmap; User::LeaveIfError(iTestPluginBmp->Load(KTestPluginBmpScreen0)); iWsSession.Flush(); } return ret; }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:48,
示例24: DoCmdDeleteDrive/**Purpose: Delete a logical drive@internalComponent@param aSection Current ini file command section*/void CT_SetSubstTestWrapper::DoCmdDeleteDrive(const TDesC& aSection) { TInt drive = 0; if (!GetIntFromConfig(aSection, KDrive(), drive)) { ERR_PRINTF2(_L("<font color=FF0000>No parameter %S</font>"), &KDrive()); SetBlockResult(EFail); } iFs.SetSubst(_L(""), drive); TBuf<20> driveDir; driveDir.Format(KDrivePath, drive); iFs.RmDir(driveDir); SetBlockResult( EPass ); }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:24,
示例25: definedTInt CTe_UTraceSuiteStepBase::GetConfigs() { TInt pf1 = 0; TInt pf2 = 0; TInt sf1 = 0;#if defined (__UTRACE_INCLUDE_DEBUG__) || (__UTRACE_INCLUDE_RELEASE__) iTraceEnabled = ETrue;#else iTraceEnabled = EFalse;#endif INFO_PRINTF2(_L("Trace enabled %i"),iTraceEnabled); if(!GetIntFromConfig(ConfigSection(),KTe_UTraceSuitePrimary1, pf1) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuitePrimary2, pf2) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteSecondary1, sf1) || !GetBoolFromConfig(ConfigSection(),KTe_UTraceSuiteLoggingEnabled,iLoggingEnabled)|| !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteA1,(TInt&) iA1) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteA2, (TInt&) iA2) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteA3, (TInt&) iA3) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteUid, (TInt&) iUid) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteTid, (TInt&) iTid) || !GetIntFromConfig(ConfigSection(),KTe_UTraceSuiteUidReal, (TInt&) iUidReal) ) { // Leave if there's any error. return KErrNotFound; } else { iPF1 = pf1; iPF2 = pf2; iSF1 = sf1; INFO_PRINTF5(_L("Primary %i, primary2 %i, secondary %i, enabled %i"),iPF1, iPF2, iSF1, iLoggingEnabled); } return KErrNone; }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:37,
示例26: INFO_PRINTF1/** Does the main functionality test. Here, reads values from INI file and calls NormaliseAndCompareUriL @internalTechnology @param None @return EPass or EFail indicating the success or failure of the test step*/TVerdict CTestNormaliseUriStep::doTestStepL() { __UHEAP_MARK; INFO_PRINTF1(_L("/n")); // Get necessary information from INI file TPtrC uri; TPtrC expUri; TInt RetCode; if(!GetStringFromConfig(ConfigSection(), KIniUri, uri) || !GetStringFromConfig(ConfigSection(), KIniExpectedUri, expUri) || !GetIntFromConfig(ConfigSection(), KRetCode, RetCode) ) { ERR_PRINTF3(_L("Problem in reading values from ini. / /nExpected fields are: /n%S/n%S/n"),&KIniUri, &KIniExpectedUri); SetTestStepResult(EFail); }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:25,
示例27: INFO_PRINTF1TInt CBindRSocketStep::ConfigureFromIni() { // Read in appropriate fields if((GetStringFromConfig(iSection, KTe_SocketName, iParams.iSocketName) != 1) || (iParams.iSocketName.Length() == 0)) { INFO_PRINTF1(_L("Couldn't find appropriate field in config file")); return KErrNotFound; } TInt protocolInt = 0; if (GetIntFromConfig(iSection, KTe_Protocol, protocolInt)!=1) { TPtrC protocolStr; if (GetStringFromConfig(iSection, KTe_Protocol,protocolStr)!=1 ) { INFO_PRINTF2(_L("%S: Protocol missing."),&iParams.iSocketName); return KErrNotFound; } if (protocolStr.Compare(KTe_TCPName)==0) { protocolInt = KProtocolInetTcp; } else if (protocolStr.Compare(KTe_UDPName)==0) { protocolInt = KProtocolInetUdp; } else if (protocolStr.Compare(KTe_DummyNetworkProtocolName)==0) { protocolInt = KDummyNetworkProtocol; } else if (protocolStr.Compare(KTe_DummyProtocolName)==0) { protocolInt = KDummyProtocol; } else { INFO_PRINTF3(_L("%S: Protocol (%S) not recognised."),&iParams.iSocketName,&protocolStr); return KErrNotFound; } } iParams.iProtocol = protocolInt; // IP Address Local if (GetIpAddressFromConfig(iSection,KTe_SourceAddressName,iParams.iLocalIP)!=1) { INFO_PRINTF2(_L("%S: Local address missing."),&iParams.iSocketName); } // All ok if we got this far return KErrNone; }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:44,
示例28: TESTLenum TVerdict CEsockTest19_2::easyTestStepL() { TInetAddr addrCompat, addrIpv4; TInt port; TBuf<39> ipv4Buf; TBuf<39> ipv4compatBuf; // setting an IPv4 compatible address // get ip addresses from script (IPv4 format) TESTL(GetIpAddressFromConfig(_L("Test_19.2"), _L("ipAddress"), addrIpv4)); // get port number from script TESTL(GetIntFromConfig(_L("Test_19.2"), _L("port"), port)); // set port number addrIpv4.SetPort(port); // get address into a TUint32 TUint32 longAddr = addrIpv4.Address(); // set an IPv4 compatible address addrCompat.SetV4CompatAddress(longAddr); // get string representations of the addresses addrIpv4.OutputWithScope(ipv4Buf); // original IPv4 address addrCompat.OutputWithScope(ipv4compatBuf); // IPv4 compat. address // check IPv4 compatible address set correctly // looks like original with :: prefix ipv4Buf.Insert(0, _L("::")); TESTL(ipv4Buf==ipv4compatBuf); // check the port initialised to 0 TESTL(addrCompat.Port() == 0); // repeat for unspecified address addrCompat.SetV4CompatAddress(INET_ADDR(0, 0, 0, 0)); addrCompat.OutputWithScope(ipv4compatBuf); TESTL(ipv4compatBuf==_L("::")); TESTL(addrCompat.Port() == 0); return EPass; }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:44,
示例29: INFO_PRINTF1TVerdict CSampleStep1::doTestStepL()/** * @return - TVerdict code * Override of base class pure virtual * Demonstrates reading configuration parameters fom an ini file section */ { INFO_PRINTF1(_L("In Test Step")); TDriveName scriptDrive(ScriptDriveName()); INFO_PRINTF2(_L("The Drive where script file is executed from is %S"), &scriptDrive); TInt theInt; TPtrC val; _LIT(tem,"NewData"); val.Set(tem); TBool theBool; TBuf<40> buf; TPtrC theString; TInt changeInt(83); TInt changeHex(183); TBool changeBool(ETrue); _LIT(sectName,"Section3"); GetHexFromConfig(sectName,_L("TheHex"),changeInt); GetIntFromConfig(ConfigSection(),_L("TheInt"),theInt); GetBoolFromConfig(ConfigSection(),_L("TheBool"),theBool); GetStringFromConfig(ConfigSection(),_L("TheString"),theString); buf.Copy(theString); WriteBoolToConfig(sectName,_L("TheBool"),changeBool); WriteIntToConfig(ConfigSection(),_L("TheInt"),changeInt); WriteHexToConfig(sectName,_L("TheHex"),changeHex); // Demonstrate panic if(buf == _L("PanicMe")) { const TInt KSampleServerPanic = 1; User::Panic(_L("SampleServer"),KSampleServerPanic); } SetTestStepResult(EPass); return TestStepResult(); }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:44,
注:本文中的GetIntFromConfig函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetIntParam函数代码示例 C++ GetInt32Value函数代码示例 |