• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ERR_PRINTF2函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ERR_PRINTF1

void CTe_locsrvSuiteStepBase::CheckExpectedResult(TInt aResult, TInt aExpectedResult, const TDesC& aLabel)
    {
    if (aResult!=aExpectedResult)
        {
        ERR_PRINTF1(aLabel);
        ERR_PRINTF2(KValueReturned, aResult);
        ERR_PRINTF2(KValueExpected, aExpectedResult);
        SetTestStepResult(EFail);
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:10,代码来源:te_locsrvsuitestepbase.cpp


示例2: SetTestPath

TVerdict CSysUtilsGetLangSWVersionNoNewLinesStep::doTestStepL()
	{
	TInt err = SetTestPath(ETrue);
	if( err != KErrNone )
		{
		ERR_PRINTF2(_L("Could not turn test path on. Error = %d"), err);
		SetTestStepResult(EAbort);
		return TestStepResult();
		}
	INFO_PRINTF1(_L("Test path turned on."));
	
	err = DeletePSProperties();
	if( err != KErrNone )
		{
		ERR_PRINTF2(_L("Could not delete P&S properties. Error = %d"), err);
		SetTestStepResult(EAbort);
		return TestStepResult();
		}
	INFO_PRINTF1(_L("Deleted P&S properties successfully."));

	_LIT16(KDummy,"xxxxx");

	TBuf16<KSysUtilVersionTextLength> version;
	version.Insert(0,KDummy);

	err = SysUtil::GetLangSWVersion( version );
	
	if ( err == KErrNone)
		{
		_LIT(KLangSw, "LangSW");
		TPtrC16 line;
		TESTL( GetStringFromConfig(ConfigSection(), KLangSw, line) );
		TBuf16<KSysUtilVersionTextLength> testBuf(line);
		if (version.Compare(testBuf)==0)
			{
			INFO_PRINTF1(_L("Got version "));
			INFO_PRINTF1(version);
			}
		else
			{
			ERR_PRINTF1(_L("Version not correct"));
			INFO_PRINTF1(version);
			SetTestStepResult(EFail);
			}

		}
	else 
		{
		ERR_PRINTF2(_L("Error code = %d"), err);
		SetTestStepResult(EFail);
		}

	return TestStepResult();
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:54,代码来源:te_sysutilsgetversionnonewlines.cpp


示例3: INFO_PRINTF1

/**
 *
 * DoTestStepL
 * @result TVerdict
 *
 */
TVerdict CTestStepSDevSoundPlayDTMFTones::DoTestStepL()
	{
	INFO_PRINTF1(_L("Testing DTMF Playback"));
	TPtrC dtmfString = (_L("0123456789,abcdef,*#"));

	//Initialize
	TVerdict initializeOK = InitializeDevSound(EMMFStateTonePlaying);
	if (initializeOK != EPass)
		{
		return EInconclusive;
		}
	
	iMMFDevSound->SetVolume(iMMFDevSound->MaxVolume());
	iExpectedValue = KErrUnderflow;
		
	iCallbackError = KErrNone;
	iCallbackArray.Reset();
	
	// Set request active
	iAL->InitialiseActiveListener();
	INFO_PRINTF1(_L("Playing DTMF String"));
	TRAPD(err, iMMFDevSound->PlayDTMFStringL(dtmfString));
	// Start the active scheduler and catch the callback
 	CActiveScheduler::Start();
	if (err)
		{
		WARN_PRINTF2 (_L("DevSound PlayDTMFStringL left with error = %d"), err);
		return EInconclusive;
		}
	else
		{
		if (iCallbackError != iExpectedValue)
			{
			ERR_PRINTF3 (_L("DevSound ToneFinished returned %d, expected %d"), iCallbackError, iExpectedValue);
			return EFail;
			}
		if (iCallbackArray[EToneFinished] != 1)
			{
			ERR_PRINTF2 (_L("DevSound ToneFinished was called %d times, expected 1"), iCallbackArray[EToneFinished]);
			return EFail;
			}
		TInt total = 0;
		for (TInt i = EInitComplete; i < EDeviceMsg; i++)
			{
			total += iCallbackArray[i];
			}
		if (total > 1)
			{
			ERR_PRINTF2 (_L("DevSound called %d callbacks, expected 1"), total);
			return EFail;
			}
		}
	return EPass;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:60,代码来源:TSI_MMF_SDEVSOUND_STEP.cpp


示例4: __UHEAP_SETFAIL

TVerdict COomTestStep::ImplOomTestL()
/**
    Runs the test step under OOM Conditions checking that each heap allocation is fail safe.
   
 */
	{	
	// Pre and Post test heap cell allocation counts
 	TInt cellCountAfter = 0;
	TInt cellCountBefore = 0;
	
	// The loop tests each heap allocation under out of memory conditions to determine whether
	// the test framework cleans up correctly without leaking memory.
	// 
	// The 'for' loop terminates as soon as any of the following events occur:
	// a) The pre and post heap cell counts mismatch signalling a memory leakage
	// b) Any leave with an error code other than 'KErrNoMemory'
	// c) All heap allocations have been tested and the test returns 'KErrNone'
	
	for (TInt testCount = 0; ; ++testCount)
 		{
 		__UHEAP_MARK;
 		__UHEAP_SETFAIL(RHeap::EDeterministic, testCount+1);
 		cellCountBefore = User::CountAllocCells();
 		TRAPD(err, ImplTestStepL());
 		cellCountAfter = User::CountAllocCells();
 		__UHEAP_MARKEND;
 		
 		INFO_PRINTF3(_L("OOM Test %d: Status = %d"),testCount,err);
 		
 		if (err == KErrNone)
 			{
			INFO_PRINTF1(_L("OOM Test Finished"));
 			break;
 			}
 		else if(err == KErrNoMemory)
 			{
 			if (cellCountBefore != cellCountAfter)
 				{
 				ERR_PRINTF2(_L("OOM Test Result: Failed - Memory leakage on iteration %d"), testCount);
 				ERR_PRINTF2(_L("Pre-Test Heap Cell Count: %d"), cellCountBefore);
 				ERR_PRINTF2(_L("Post-Test Heap Cell Count: %d"), cellCountAfter);
 				SetTestStepResult(EFail);
 				break;
 				}
 			}
 		else
 			{
 			User::Leave(err);
 			break;
 			}
		}
	
	return TestStepResult();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:54,代码来源:oomteststep.cpp


示例5: InitializeDevSound

/**
 *
 * DigitalPlayback
 * @param aNumSamples
 * @param aFilename
 * @param aDataType
 * @result TVerdict
 *	
 */	
TVerdict CTestStepSDevSoundPlayEOFPCM16::DigitalPlayback(TInt aNumSamples, TDesC& aFilename, TFourCC& aDataType)
	{
	TVerdict initializeOK = InitializeDevSound(aDataType, EMMFStatePlaying);
	if (initializeOK != EPass)
		{
		return EInconclusive;
		}
	SetVolume(iMMFDevSound->MaxVolume());
	
	//Get a buffer to fill
	initializeOK = PlayInit();
	if (initializeOK != EPass)
		{
		return EInconclusive;
		}

	TInt error = iFs.Connect();
	if (error != KErrNone)
		{
		ERR_PRINTF2 (_L("Could not connect to Filesystem. Error is %d"), error);
		return EInconclusive;
		}	
	
	
	TInt err = iFile.Open(iFs, aFilename, EFileRead);
	if (err != KErrNone)
		{
		ERR_PRINTF2 (_L("Could not open input file. Error is %d"), err);
		return EInconclusive;
		}		
		
	TInt bufferCount = 0;
	if (aNumSamples < 0)
		{// Play to EOF
		while (initializeOK == KErrNone && iCallbackError == KErrNone)
			{
			//read sizeof buffer from file
			CMMFDataBuffer*  buffer = STATIC_CAST (CMMFDataBuffer*, iBuffer);
			iFile.Read(buffer->Data());
			if (buffer->Data().Length()!= buffer->RequestSize())
				{
				INFO_PRINTF3(_L("Data length copied from file = %d. Expected %d. Must be EOF"), buffer->Data().Length(), buffer->RequestSize());
				iBuffer->SetLastBuffer(ETrue);
				}

			//DevSound Play
			initializeOK = PlayData();
			bufferCount ++;
			}
		}
	else
		{
		while (bufferCount < aNumSamples && initializeOK  == KErrNone && iCallbackError == KErrNone)
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:62,代码来源:TSI_MMF_SDEVSOUND_STEP.cpp


示例6: ERR_PRINTF2

// Perform some random value checks
//
//
TVerdict CGpsUtcModelFinalCheckAndCleanupStep::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.
 */
	{
    // Check that all the fieds exists and their values are correct
    TUEPositioningGpsUtcModel::TFieldId* fieldIdPtr;
    TUint value;
    
    // From EA1 to EDeltaLSF there are 8 field ids
    // 
    for (TUint ii = 0; ii < 8; ii++)
    	{
    	fieldIdPtr = reinterpret_cast<TUEPositioningGpsUtcModel::TFieldId*>(&ii);
    	
    	if(!iGpsUtcModelReader.FieldExists(*fieldIdPtr))
    		{
    		ERR_PRINTF2(_L("Missing field number %D ."),ii);
			SetTestStepResult(EFail);
    		}
    	else
    		{
    		iGpsUtcModelReader.GetField(*fieldIdPtr,value);
    		if(value != (ii+1))
    			{
    			ERR_PRINTF2(_L("Wrong value in field number %D ."),ii);
				SetTestStepResult(EFail);
    			}
    		else
    			{
    			//Clear this field from the builder and get the data
    			// again back in the reader.
    			//
    			iGpsUtcModelBuilder.ClearField(*fieldIdPtr);
				iGpsUtcModelReader.DataBuffer() = iGpsUtcModelBuilder.DataBuffer();
				
				// Check that this field no longer exists
				//
 			   	if(iGpsUtcModelReader.FieldExists(*fieldIdPtr))
    				{
    				ERR_PRINTF2(_L("Field number %D was cleared but still exists."),ii);
					SetTestStepResult(EFail);
    				}				
    			}
    		}
    	
    	}
    	
	return TestStepResult();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:56,代码来源:GpsUtcModelFinalCheckAndCleanupStep.cpp


示例7: INFO_PRINTF1

/**
 * Verifies that the downloaded file is not corrupted by using a previously calculated checksum.
 * @param aSection - The section in config file to look for the Data Verify Type, the file to verify and the checksum.
 * @return error - Error code. KErrNone if checksum is equal.
 */
void CT_DataVerify::DoCmdVerifyData(const TTEFSectionName& aSection)
    {
    INFO_PRINTF1(_L("*START* CT_TransferData::DoCmdVerifyData"));
    
    TBool dataOk =ETrue;
    TPtrC type;
    if(!GetStringFromConfig(aSection, KDataVerifyType, type ))
    	{
    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KDataVerifyType);
    	SetBlockResult(EFail);
    	dataOk = EFalse;
    	}
    
    TPtrC filename;
    if(!GetStringFromConfig(aSection, KDataVerifyFile, filename ))
    	{
    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KDataVerifyFile);
    	SetBlockResult(EFail);
    	dataOk = EFalse;
    	}
    
    TPtrC checksumParameter;
    if(!GetStringFromConfig(aSection, KChecksum, checksumParameter ))
    	{
    	ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KChecksum);
    	SetBlockResult(EFail);
    	dataOk = EFalse;
    	}
    if(dataOk)
    	{
    	TBuf8<DataVerify::KMD5Size> checksum;
    	checksum.Append(checksumParameter);

        if (type == KMD5Type)
            {
            INFO_PRINTF1(_L("MD5 selected"));
            TRAPD(error, VerifyChecksumL(checksum, filename));
            if (error == KErrNone)
                {
                INFO_PRINTF1(_L("Data verify succeeded"));
                }
            else
            	{
                ERR_PRINTF2(_L("VerifyData failed [%d]"), error);
                SetError(error);
            	}
            }
    	}

    
    INFO_PRINTF1(_L("*END* CT_TransferData::DoCmdVerifyData"));
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:57,代码来源:T_DataVerify.cpp


示例8: INFO_PRINTF1

//== Mobile Line functions
void CT_RMobilePhoneData::DoCmdOpen(const TDesC& aSection)
	{
	INFO_PRINTF1(_L("*START*CT_RMobilePhoneData::DoCmdOpen"));
	// Check that first phone is available and log phone name.
	RTelServer::TPhoneInfo info;
	// Reading phone info for the first available phone
	TInt error(0);
	TBool dataOk = ETrue;
	TInt parPhone = 0;
	if ( !GetIntFromConfig(aSection, KPhone(), parPhone) )
		{
		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KPhone);
		SetBlockResult(EFail);
		dataOk = EFalse;
		}
	TPtrC telServerName;
	if ( !GetStringFromConfig(aSection, KTelServerKey(), telServerName) )
		{
		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KTelServerKey);
		SetBlockResult(EFail);
		dataOk = EFalse;
		}
	if ( dataOk )
		{
		RTelServer* telServerObject = static_cast<RTelServer*>(GetDataObjectL(telServerName));
		INFO_PRINTF1(_L("Check if phone info was found."));
		error = telServerObject->GetPhoneInfo(parPhone, info);
		if (error != KErrNone)
			{
			ERR_PRINTF2(_L("Failed to read phone info for phone KFirstPhone with error %d"), error);
			SetError(error);
			}
		else
			{
			// Connect to RMobilePhone interface.
			INFO_PRINTF1(_L("Opening connection to phone"));
			error = iMobilePhone->Open(*telServerObject, info.iName);
			if (error != KErrNone)
				{
				ERR_PRINTF2(_L("Connection to phone failed with error %d"), error);
				SetError(error);
				}
			else
				{
				INFO_PRINTF1(_L("Opening connection to phone sucessfull"));
				}
			}
		}
	INFO_PRINTF1(_L("*END*CT_RMobilePhoneData::DoCmdOpen"));
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:51,代码来源:T_RMobilePhoneData.cpp


示例9: ERR_PRINTF2

void CCmdLineTestStep::GetCmdLineL()
	{
	TPtrC data;
	if (!GetStringFromConfig(ConfigSection(), KConversionCmd, data))
		{
		ERR_PRINTF2(KMissingKey, &KConversionCmd);
		SetTestStepResult(EFail);
		User::Leave(KErrCorrupt);
		}

	iCmdLine.Set(data);

	TLex lex(data);

	TBool pass = ETrue;
	// Skip "-o"
	_LIT(KMinusOh, "-o");
	if (lex.NextToken().Compare(KMinusOh) != 0)
		{
		pass = EFalse;
		}
	else
		{
		iOutFileName.Set(lex.NextToken());
		iInFileName.Set(lex.NextToken());
		if (iInFileName.Length() == 0)
			{
			pass = EFalse;
			}
		}

	if (!pass)
		{
		ERR_PRINTF3(KCorruptEntry, &KConversionCmd, &data);
		SetTestStepResult(EFail);
		User::Leave(KErrCorrupt);
		}

	if (!GetStringFromConfig(ConfigSection(), KExpectedResult, data))
		{
		ERR_PRINTF2(KMissingKey, &KExpectedResult);
		SetTestStepResult(EFail);
		User::Leave(KErrCorrupt);
		}
	else
		{
		iExpectPass = (data == Kpass);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:49,代码来源:CmdLineStep.cpp


示例10: ERR_PRINTF1

/**
RHostResolver::Open()
*/
void CT_InquirySockAddrData::DoCmdOpenHostResolver(const TDesC& aSection)
	{
	RSocketServ	sockServ;
	TPtrC		bluetoothSocketName;
	if(GetStringFromConfig(aSection, KBTSocket(), bluetoothSocketName))
		{
		CT_BluetoothSocketNotifier*	bluetoothSocketData=static_cast<CT_BluetoothSocketNotifier*>(GetDataObjectL(bluetoothSocketName));
		if ( bluetoothSocketData!=NULL )
			{
			sockServ = bluetoothSocketData->iSocketServer;
			}
		else
			{
			ERR_PRINTF1(_L("CT_CBluetoothSocketDataPersistentObject is NULL"));
			SetBlockResult(EFail);
			}
		}
	
	
	//	Find protocol from socket
	TProtocolDesc	protocolDesc;
	TInt			err=sockServ.FindProtocol(_L("BTLinkManager"), protocolDesc);
	if ( err!=KErrNone )
		{
		ERR_PRINTF2(_L("iSockServ.FindProtocol(aProtocolName, protocolDesc) = %d"), err);
        SetBlockResult(EFail);
		}
	if ( protocolDesc.iAddrFamily != KBTAddrFamily )
		{
		ERR_PRINTF1(_L("Wrong iAddrFamily"));
        SetBlockResult(EFail);
		}
		
	INFO_PRINTF1(_L("Close a RHostResolver first..."));
	iHostResolver.Close();
	//	Open host resolver
	INFO_PRINTF1(_L("Create and initialise an RHostResolver"));
	err=iHostResolver.Open(sockServ, protocolDesc.iAddrFamily, protocolDesc.iProtocol);
	if ( err!=KErrNone )
		{
		ERR_PRINTF2(_L("iHostResolver.Open(iSockServ, protocolDesc.iAddrFamily, protocolDesc.iProtocol) = %d"), err);
        SetError(err);
		}
	else
		{
		iHostResolverOpen = ETrue;
		INFO_PRINTF1(_L("Create and initialise an RHostResolver Completed..."));
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:52,代码来源:T_InquirySockAddrData.cpp


示例11: INFO_PRINTF1

void RA3FDevSoundTestBase::ToneFinished(TInt aError)
	{
	INFO_PRINTF1(_L("========== DevSound ToneFinished() callback =========="));
	if (aError == KErrUnderflow)
		{
		INFO_PRINTF2(_L("DevSound called CMMFDevSound::ToneFinished with error = %d as expected"), aError);
		StopTest(aError,EPass);
		}
	else
		{
		ERR_PRINTF2(_L("DevSound called CMMFDevSound::ToneFinished with error = %d"), aError);
		ERR_PRINTF2(_L("Expected error = %d"), KErrUnderflow);
		StopTest(aError);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:15,代码来源:char_a3f_devsound_testbase.cpp


示例12: INFO_PRINTF2

void CT_DataSdpAgent::AttributeRequestComplete(TSdpServRecordHandle aHandle, TInt aError)
	{
	INFO_PRINTF2(_L("MSdpAttributeValueVisitor::AttributeRequestComplete Call: aHandle = %d"),aHandle);
	DecOutstanding();
	if ( aHandle!=iSSRHandle)
		{
		ERR_PRINTF2(_L("Service record handle not as expected: expected = %d"), iSSRHandle);
		SetAsyncError(iAttrReqIndex, KErrGeneral);
		}			
	if ( aError!=KErrNone) 
		{
		ERR_PRINTF2(_L("AttributeRequestComplete Call failed: aError = %d"),aError);
		SetAsyncError(iAttrReqIndex, aError);
		}	
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:15,代码来源:T_DataSdpAgent.cpp


示例13: tkey

/**
 * @return - nothing
 * Check repository settings as defined in the config file. For example,
 * we might expect 37 strings in the repository. Their keys will be
 * 'StringKey0' through 'StringKey36'. We'll expect to see hex values for
 * all of these names (or we will LEAVE). Those keys will be expected
 * to exist in the repository and have values 'StringVal0' through 'StringVal36'
 * (or whatever).
 */
void CRepositoryCheckStep::CheckRepositoryStringSettings(CRepository *arepository, TInt ancheck)
    {
    // Careful if the prefix here changes, we don't want to
    // blow this buffer. Also note the 'Delete' at the end of the loop.
    TBuf<REPCHECKCREATE_KEYBUFLEN> tkey(KStringKeyPrefix);
    TBuf<REPCHECKCREATE_VALBUFLEN> tval(KStringValPrefix);
    TInt keyslen = tkey.Length();
    TInt valslen = tval.Length();
    for( TInt count=0 ; count < ancheck ; count++ )
        {
        tkey.AppendNum(count);            // e.g "StringKey21"
        tval.AppendNum(count);            // e.g "StringVal47"
        TInt r=0;
        TInt key;
        TInt bRet = GetHexFromConfig(ConfigSection(), tkey, key );
        if(bRet != 1)
            {
            ERR_PRINTF2(_L("Failed to get key%d"), count );
            SetTestStepResult(EFail);
            }
        TBuf<REPCHECKCREATE_MAXSTRINGLEN> expectedbuf;
        TPtrC expected(expectedbuf);

        bRet = GetStringFromConfig(ConfigSection(), tval, expected );
        TBuf<REPCHECKCREATE_MAXSTRINGLEN> sval;
        r = arepository->Get( key, sval );
        if(r!=KErrNone)
            {
            INFO_PRINTF1(HTML_RED);
            ERR_PRINTF2(_L("Repository doesn't have StringKey 0x%x"), key );
            INFO_PRINTF1(HTML_RED_OFF);
            SetTestStepResult(EFail);
            }
        else if(sval!=expected)
            {
            INFO_PRINTF1(HTML_RED);
            ERR_PRINTF4(_L("String match failure, key 0x%x, got %S, expected %S"), key, &sval, &expected);
            INFO_PRINTF1(HTML_RED_OFF);
            SetTestStepResult(EFail);
            }

        // Restore the key and value names (i.e strip the digits from the end)
        tkey.Delete(keyslen, REPCHECKCREATE_KEYBUFLEN);
        tval.Delete(valslen, REPCHECKCREATE_VALBUFLEN);
        }
    // Should we return something?
    return;
    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:57,代码来源:repositorycheck.cpp


示例14: INFO_PRINTF1

void CT_DataWindowGc::DoCmdBitBltL(const TDesC& aCommand, const TDesC& aSection, const TInt aAsyncErrorIndex)
	{
	TBool	dataOk=ETrue;

	CWsBitmap*	wsBitmap=NULL;
	if ( !CT_GraphicsUtil::GetWsBitmapL(*this, aSection, KFldWsBitmap, wsBitmap) )
		{
		CT_DataBitmapContext::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
		}
	else
		{
		TPoint		point;
		if ( GetPointFromConfig(aSection, KFldPoint, point) )
			{
			if ( dataOk )
				{
				// Execute command and log parameters
				INFO_PRINTF1(_L("execute BitBlt(TPoint, CWsBitmap*)"));
				iWindowGc->BitBlt(point, wsBitmap);
				}
			}
		else
			{
			TPoint	destination;
			if ( !GetPointFromConfig(aSection, KFldDestination, destination) )
				{
				dataOk=EFalse;
				ERR_PRINTF2(KLogMissingParameter, &KFldDestination());
				SetBlockResult(EFail);
				}
    	
			TRect	source;
			if ( !GetRectFromConfig(aSection, KFldSource, source) )
				{
				dataOk=EFalse;
				ERR_PRINTF2(KLogMissingParameter, &KFldSource());
				SetBlockResult(EFail);
				}
    	
			if ( dataOk )
				{
				// Execute command and log parameters
				INFO_PRINTF1(_L("execute BitBlt(TRect, CWsBitmap*, TRect)"));
				iWindowGc->BitBlt(destination, wsBitmap, source);
				}
			}
		}
	}
开发者ID:fedor4ever,项目名称:default,代码行数:48,代码来源:T_DataWindowGc.cpp


示例15: 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


示例16: INFO_PRINTF1

/**
  Virtual DoCancel - Request to cancel the asynchronous command
  @internalComponent
  @see - MTPActiveCallback
  @param aActive Active Object that DoCancel has been called on
  @pre - N/A
  @post - N/A
  @leave system wide error code
 */
 void CT_DataRSocketServ::DoCancel(CActive* aActive, TInt aAsyncErrorIndex)
 	{
	TBool	straySignal = EFalse;

	if( aActive==iActiveStartProtocol )
		{
		INFO_PRINTF1(_L("DoCancel StartProtocol called"));
		}
 	else if( aActive==iActiveStopProtocol )
 		{
		INFO_PRINTF1(_L("DoCancel StopProtocol called"));
 		}
 	else if( aActive==iActiveSetExclusiveMode )
 		{
		INFO_PRINTF1(_L("DoCancel SetExclusiveMode called"));
 		}
 	else
 		{
 		ERR_PRINTF1(_L("Stray DoCancel signal"));
 		SetBlockResult(EFail);
 		straySignal = ETrue;
 		}
 	
 	if( !straySignal )
 		{
		TInt	err = aActive->iStatus.Int();
		if ( err != KErrNone )
			{
			ERR_PRINTF2(_L("DoCancel Error %d"), err);
			SetAsyncError(aAsyncErrorIndex, err);
			}
		DecOutstanding();
 		}
 	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:43,代码来源:T_DataRSocketServ.cpp


示例17: CreateDataL

void CTestBlockController::CreateObjectL(TTEFBlockItem& aCommand)
	{
	// Retrieve the object name from the ini file
	TPtrC	name;
	if( GetStringFromConfig(aCommand.iSection, KName, name) &&
		0 != aCommand.iSection.Compare(KTEFNull) )
		{
		// Create the wrapper
		CDataWrapper*	data = CreateDataL(aCommand.iObjectType);
		if( NULL != data)
			{
			CleanupStack::PushL(data);
			data->SetTestBlockController(this);
			data->SetDataDictionary(&iDataDictionary);
			data->InitialiseL();
			// Add it to the dictionary with the lookup name provided
			iDataDictionary.AddDataL(name, data);
			CleanupStack::Pop(data);
			}
		else
			{
			aCommand.iError = KErrNotFound;
			ERR_PRINTF2( KErrWrapperCreate, &name );
			}
		}
	else
		{
		ERR_PRINTF1(KErrNoName);
		aCommand.iError = KErrNotFound;
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:31,代码来源:testblockcontroller.cpp


示例18: DestroyData

void CT_DataAnimDll::DoCmdnewL(const TDesC& aSection)
	{
	DestroyData();

	// Get test data for command input parameter(s)
	TPtrC		wsName;
	RWsSession*	ws = NULL;
	if ( GetStringFromConfig(aSection, KFldWs, wsName) )
		{
		ws = static_cast<RWsSession*>(GetDataObjectL(wsName));
		}

	TInt err = KErrNone;
	if ( ws!= NULL )
		{
		// Execute command and log parameters
		INFO_PRINTF1(KLogInfoCmdnewL1);
		TRAP( err, iAnimDll = new (ELeave) RAnimDll(*ws) );
		}
	else
		{
		// Execute command and log parameters
		INFO_PRINTF1(KLogInfoCmdnewL2);
		TRAP(err, iAnimDll = new (ELeave) RAnimDll());
		}
	
	// Check the command return code
	if ( err!=KErrNone )
		{
		ERR_PRINTF2(KLogErrNum, err);
		SetError(err);
		}
	}
开发者ID:fedor4ever,项目名称:default,代码行数:33,代码来源:T_DataAnimDll.cpp


示例19: pcm16

/**
 *
 * TestInitialize
 * @param aDataType
 * @param aMode
 * @result TVerdict
 *
 */
TVerdict CTestStepSDevSoundPlayDataCap::TestInitialize(TMMFState aMode)
{
    TFourCC pcm16(KMMFFourCCCodePCM16); //default to pcm16 data type

    iCallbackError = KErrNone;
    iExpectedValue = KErrNone;

    ResetCallbacks();
    iAL->InitialiseActiveListener();

    INFO_PRINTF1(_L("Initializing DevSound"));
    // Initialize
    TRAPD(err, iMMFDevSound->InitializeL(*this, pcm16, aMode));
    if (err)
    {
        WARN_PRINTF2 (_L("DevSound InitializeL left with error = %d"), err);
        return EInconclusive;
    }
    else
    {
        CActiveScheduler::Start();
        if (iCallbackError != iExpectedValue)
        {
            ERR_PRINTF3 (_L("DevSound InitializeComplete returned %d, expected %d"), iCallbackError, iExpectedValue);
            return EFail;
        }
        if (iCallbackArray[EInitComplete] != 1)
        {
            ERR_PRINTF2 (_L("DevSound InitializeComplete was called %d times, expected 1"), iCallbackArray[EInitComplete]);
            return EFail;
        }
    }
    return EPass;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:42,代码来源:TSI_MMF_SDEVSOUND_0008_STEP.cpp


示例20: INFO_PRINTF1

void CT_DataSdpAttrValue::DoCmdDes(const TDesC& aSection)
	{
	TPtrC8	actual=GetSdpAttrValue()->Des();
	HBufC*	buffer=HBufC::NewLC(actual.Length());
	TPtr	bufferPtr=buffer->Des();
	bufferPtr.Copy(actual);
	INFO_PRINTF1(_L("CSdpAttrValue::Des result:"));
	INFO_PRINTF1(bufferPtr);

	TPtrC	expected;
	if ( GetStringFromConfig(aSection, KExpected(), expected) )
		{
		if ( bufferPtr!=expected )
			{
			ERR_PRINTF1(_L("Des is not as expected!"));
			SetBlockResult(EFail);
			}
		}
	else
		{
  		ERR_PRINTF2(_L("Missing expected value %S"), &KExpected());
  		SetBlockResult(EFail);		
		}
	CleanupStack::PopAndDestroy(buffer);
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:25,代码来源:T_DataSdpAttrValue.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ERR_PRINTF3函数代码示例发布时间:2022-05-30
下一篇:
C++ ERR_PRINTF1函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap