本文整理汇总了C++中SetBlockResult函数的典型用法代码示例。如果您正苦于以下问题:C++ SetBlockResult函数的具体用法?C++ SetBlockResult怎么用?C++ SetBlockResult使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetBlockResult函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Action
/**
Test Action()
*/
void CT_InquirySockAddrData::DoCmdAction(const TDesC& aSection)
{
INFO_PRINTF1(_L("TInquirySockAddr Action Call"));
TUint8 result = iData->Action();
TInt expected = 0;
if(GetIntFromConfig(aSection, KExpected(), expected) )
{
if ( result != (TUint8)expected )
{
ERR_PRINTF3(_L("Return value (%d) is not as expected (%d)"), result, expected);
SetBlockResult(EFail);
}
}
else
{
ERR_PRINTF2(KLogMissingParameter, &KExpected());
SetBlockResult(EFail);
}
}
示例2: KValue
/**
* Utility method that fetches a int value from parameters
*/
TBool CT_DataMeasureTextInput::GetValueFromConfig(const TDesC& aSection, TInt& aValue)
{
TBool ret=GetIntFromConfig(aSection, KValue(), aValue);
if ( !ret )
{
ERR_PRINTF2(_L("No %S"), &KValue());
SetBlockResult(EFail);
}
return ret;
}
示例3: INFO_PRINTF1
/** Sets TMeasureTextInputData::iFlags */
void CT_DataMeasureTextInput::DoCmdSetFlags(const TDesC& aSection)
{
INFO_PRINTF1(_L("Sets TMeasureTextInputData::iFlags"));
// get value from parameters
if ( !ReadFlags(aSection, iMeasureTextInput->iFlags) )
{
ERR_PRINTF2(_L("No %S"), &aSection);
SetBlockResult(EFail);
}
}
示例4: INFO_PRINTF1
/**
Test operator!=()
*/
void CT_SEIDData::DoCmdNegativeCompareL(const TDesC& aSection)
{
INFO_PRINTF1(_L("TSEID != Call."));
TSEID* seid=NULL;
TPtrC seidName;
if ( !GetStringFromConfig(aSection, KFldSeid, seidName) )
{
ERR_PRINTF2(KLogMissingParameter, &KFldSeid);
SetBlockResult(EFail);
}
else
{
seid = static_cast<TSEID*>(GetDataObjectL(seidName));
}
if(seid)
{
TBool actual = iData->operator !=(*seid);
INFO_PRINTF2(_L("execuete operator !=(TSEID) = %d"), actual);
TBool expected=EFalse;
if( !GetBoolFromConfig(aSection, KFldExpected(), expected) )
{
ERR_PRINTF2(KLogMissingParameter, &KFldExpected);
SetBlockResult(EFail);
}
else
{
if ( actual!=expected )
{
ERR_PRINTF1(KLogNotExpectedValue);
SetBlockResult(EFail);
}
}
}
else
{
ERR_PRINTF1(_L("seid is NULL"));
SetBlockResult(EFail);
}
}
示例5: INFO_PRINTF1
/** Calls CFbsFont::CharacterMetrics() */
void CT_DataFbsFont::DoCmdCharacterMetrics(const TDesC& aSection)
{
INFO_PRINTF1(_L("Calls CFbsFont::CharacterMetrics()"));
// get character code from parameters
TInt charCode = 0;
if(!GetIntFromConfig(aSection, KCharCode(), charCode))
{
ERR_PRINTF2(_L("No %S"), &KCharCode());
SetBlockResult(EFail);
}
else
{
// call CharacterMetrics()
const TUint8* bitmapPointer;
iFbsFont->CharacterMetrics(charCode, bitmapPointer);
// get if NULL bitmap pointer expected flag from parameters
TBool expectedNull = EFalse;
if(GetBoolFromConfig(aSection, KNullBitmapPointerExpected(), expectedNull))
{
// check that on retirn the bitmap pointer is not NULL
if ( expectedNull )
{
if ( bitmapPointer!=NULL )
{
ERR_PRINTF1(_L("Bitmap pointer is NOT null!"));
SetBlockResult(EFail);
}
}
else
{
if ( bitmapPointer==NULL )
{
ERR_PRINTF1(_L("Bitmap pointer is null!"));
SetBlockResult(EFail);
}
}
}
}
}
示例6: DoCancelGetDeviceAddress
/**
Virtual DoCancel - Request to cancel the asynchronous command
@publishedInternal
@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_InquirySockAddrData::DoCancel(CActive* aActive, TInt /*aIndex*/)
{
if ( aActive==iActive )
{
DoCancelGetDeviceAddress();
}
else
{
ERR_PRINTF1(_L("Stray signal"));
SetBlockResult(EFail);
}
}
示例7: RunGetDeviceAddress
/**
Virtual RunL - Called on completion of an a Synchronous command
@publishedInternal
@see MT_MMActiveCallback
@param aActive Active Object that RunL has been called on
@pre N/A
@post N/A
@leave system wide error code
*/
void CT_InquirySockAddrData::RunL(CActive* aActive, TInt aIndex)
{
if ( aActive==iActive )
{
RunGetDeviceAddress(aIndex);
}
else
{
ERR_PRINTF1(_L("Stray signal"));
SetBlockResult(EFail);
}
}
示例8: TRfcommRemotePortParams
/**
Test TRfcommRemotePortParams()
*/
void CT_RfcommRemotePortParamsData::DoCmdTRfcommRemotePortParams()
{
DestroyData();
INFO_PRINTF1(_L("TRfcommRemotePortParams Constructor Call"));
iData = new (ELeave) TRfcommRemotePortParams();
if ( iData == NULL )
{
ERR_PRINTF1(_L("TRfcommRemotePortParams is NULL"));
SetBlockResult(EFail);
}
}
示例9: SetFlowCtrl
/**
Test SetFlowCtrl()
*/
void CT_RfcommRemotePortParamsData::DoCmdSetFlowCtrl(const TDesC& aSection)
{
TInt flowCtrlValue = 0;
if(GetIntFromConfig(aSection, KFlowCtrl(), flowCtrlValue) )
{
TUint8 flowCtrl = flowCtrlValue;
INFO_PRINTF1(_L("TRfcommRemotePortParams SetFlowCtrl Call"));
TInt err = iData->SetFlowCtrl(flowCtrl);
if ( err != KErrNone )
{
ERR_PRINTF2(_L("SetFlowCtrl failed with value (%d)"), err);
SetBlockResult(EFail);
}
}
else
{
ERR_PRINTF2(KLogMissingParameter, &KFlowCtrl());
SetBlockResult(EFail);
}
}
示例10: IsLocal
/**
Test IsLocal()
*/
void CT_SEIDData::DoCmdIsLocal(const TDesC& aSection)
{
INFO_PRINTF1(_L("TSEID IsLocal() Call."));
TBool actual = iData->IsLocal();
INFO_PRINTF2(_L("IsLocal()=%d"), actual);
TBool expected = EFalse;
if( !GetBoolFromConfig(aSection, KFldExpected(), expected) )
{
ERR_PRINTF2(KLogMissingParameter, &KFldExpected);
SetBlockResult(EFail);
}
else
{
if ( actual!=expected )
{
ERR_PRINTF1(KLogNotExpectedValue);
SetBlockResult(EFail);
}
}
}
示例11: MediaType
/**
Test MediaType()
*/
void CT_AvdtpSEPInfoData::DoCmdMediaType(const TDesC& aSection)
{
INFO_PRINTF1(_L("TAvdtpSEPInfo MediaType() Call."));
SymbianBluetoothAV::TBluetoothMediaType actual = iData->MediaType();
INFO_PRINTF2(_L("Execute MediaType()=%d"), actual);
SymbianBluetoothAV::TBluetoothMediaType expected;
if( CT_BTUtil::ReadBluetoothMediaType(*this, aSection, KFldExpected(), expected) )
{
if ( actual!=expected )
{
ERR_PRINTF1(KLogNotExpectedValue);
SetBlockResult(EFail);
}
}
else
{
ERR_PRINTF2(KLogMissingParameter, KFldExpected);
SetBlockResult(EFail);
}
}
示例12: IsValid
/**
Test IsValid()
*/
void CT_RfcommRemotePortParamsData::DoCmdIsValid(const TDesC& aSection)
{
INFO_PRINTF1(_L("TRfcommRemotePortParams IsValid Call"));
TUint8 result = iData->IsValid();
INFO_PRINTF2(_L("IsValid result (%d)"), result);
TInt expected = 0;
if(GetIntFromConfig(aSection, KExpected(), expected) )
{
if ( result != expected )
{
ERR_PRINTF3(_L("Return value (%d) is not as expected (%d)"), result, expected);
SetBlockResult(EFail);
}
}
else
{
ERR_PRINTF2(KLogMissingParameter, &KExpected());
SetBlockResult(EFail);
}
}
示例13: Value
/**
Test Value()
*/
void CT_SEIDData::DoCmdValue(const TDesC& aSection)
{
INFO_PRINTF1(_L("TSEID Value() Call."));
TInt actual = iData->Value();
INFO_PRINTF2(_L("Value()=%d"), actual);
TInt expected=0;
if( !GetIntFromConfig(aSection, KFldExpected(), expected) )
{
ERR_PRINTF2(KLogMissingParameter, &KFldExpected);
SetBlockResult(EFail);
}
else
{
if ( actual!=expected )
{
ERR_PRINTF1(KLogNotExpectedValue);
SetBlockResult(EFail);
}
}
}
示例14: InUse
/**
Test InUse()
*/
void CT_AvdtpSEPInfoData::DoCmdInUse(const TDesC& aSection)
{
INFO_PRINTF1(_L("TAvdtpSEPInfo InUse() Call."));
TBool actual = iData->InUse();
INFO_PRINTF2(_L("Execute InUse()=%d"), actual);
TBool expected = EFalse;
if( !GetBoolFromConfig(aSection, KFldExpected(), expected) )
{
ERR_PRINTF2(KLogMissingParameter, &KFldExpected);
SetBlockResult(EFail);
}
else
{
if ( actual!=expected )
{
ERR_PRINTF1(KLogNotExpectedValue);
SetBlockResult(EFail);
}
}
}
示例15: RecoveryType
/**
Test RecoveryType()
*/
void CT_AvdtpRecoveryCapabilitiesData::DoCmdRecoveryType(const TDesC& aSection)
{
INFO_PRINTF1(_L("TAvdtpRecoveryCapabilities RecoveryType() Call"));
SymbianBluetoothAV::TAvdtpRecoveryType type = iAvdtpRecoveryCapabilities->RecoveryType();
INFO_PRINTF2(_L("TAvdtpServiceCapability RecoveryType result: actual = %d"), type);
SymbianBluetoothAV::TAvdtpRecoveryType expected;
if ( CT_BTUtil::ReadAvdtpRecoveryType(*this, aSection, KExpected(), expected) )
{
if ( type!=expected )
{
ERR_PRINTF3(_L("Result (%d) is not as expected (%d)"), type, expected);
SetBlockResult(EFail);
}
}
else
{
ERR_PRINTF2(KLogMissingExpected, &KExpected);
SetBlockResult(EFail);
}
}