当前位置: 首页>>代码示例>>C++>>正文


C++ TDesC::Compare方法代码示例

本文整理汇总了C++中TDesC::Compare方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC::Compare方法的具体用法?C++ TDesC::Compare怎么用?C++ TDesC::Compare使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDesC的用法示例。


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

示例1: MediaObjAttribute

// ---------------------------------------------------------
// TDdParser::MediaObjAttribute() // for OMA v2
// ---------------------------------------------------------
//
TDdParser::TDdAttr TDdParser::MediaObjAttribute( const TDesC& aAttrName ) const
    {
    TDdAttr attr = EDdUnknownAttr;

	if ( !aAttrName.Compare( KDdUrl ) )
        {
        attr = EDdUrl;
        }
    else if ( !aAttrName.Compare( KDdSize ) )
        {
        attr = EDdSize;
        }
    else if ( !aAttrName.Compare( KDdType ) )
        {
        attr = EDdType;
        }
    else if ( !aAttrName.CompareF( KDdProgressiveDl ) )
        {
        attr = EDdProgressiveDl;
        }
    else if ( !aAttrName.CompareF( KDdSuppressUserConfirmation ) )
        {
        attr = EDdSuppressUserConfirmation;
        }
    else if ( !aAttrName.Compare( KDdMeta ) )
        {
        attr = EDdMeta;
        }

    return attr;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:35,代码来源:DdParser.cpp

示例2: ExportvCardL

/** Exports a vCard with version 2.1 or 3.0
@param	adBase The database to export from
@param	aStandard The PBAP version to export
@param aIdArray The contact item ID array to export from database
@param aWriteStream The write stream to write to
@param aContactFilter Filter
*/
void CContactsPBAPExportUtilityClass::ExportvCardL(CContactDatabase* adBase, const TDesC& aStandard, CContactIdArray* aIdArray, RWriteStream& aWriteStream, TInt64 aContactFilter)
{
    TVCardVersion version(EVCardUDEF);

    TBool enableTel = EFalse;
    BaseTestStepReference().GetBoolFromConfig(BaseTestStepReference().ConfigSection(), KTelProp, enableTel);

    if(aStandard.Compare(KVersion21) == 0)
    {
        version = EPBAPVCard21;
    }
    if(aStandard.Compare(KVersion30) == 0)
    {
        version = EPBAPVCard30;
    }
    else
    {
        if(aStandard.Compare(KVersionStd21) == 0)
        {
            version = EVCard21;
            adBase->ExportSelectedContactsL(TUid::Uid(KUidVCardConvDefaultImpl), *aIdArray, aWriteStream, 0, aContactFilter, this, version ,enableTel);
            return;
        }
    }
    adBase->ExportSelectedContactsL(TUid::Uid(KUidPBAPVCardConvImpl), *aIdArray, aWriteStream, 0, aContactFilter, this, version ,enableTel);
}
开发者ID:zccrs,项目名称:qt-mobility,代码行数:33,代码来源:contactspbapexportutilityclass.cpp

示例3: ConstructL

/**
ConstructL()
Reads the machine name from the Machine config file("c:\\msgtest\\MachineName.txt")
and constructs the data members.

@param aPtrEmailAdd
*/
EXPORT_C void CT_MsgUtilsConfigFileMachineName::ConstructL(const TDesC& aPtrEmailAdd)
{
    RFs fs;
    User::LeaveIfError(fs.Connect());
    CleanupClosePushL(fs);
    RFile file;
    User::LeaveIfError(file.Open(fs, KFileName, EFileRead));

    CleanupClosePushL(file);
    TInt  fileSize;
    User::LeaveIfError(file.Size(fileSize));
    iMachineName = HBufC8::NewL(fileSize);
    TPtr8 bufferPtr = iMachineName->Des();
    User::LeaveIfError(file.Read(bufferPtr));

    if (aPtrEmailAdd.Compare(_L("NONE"))==0)
        iMachineNameEmail = HBufC::NewL(iMachineName->Length() + KAtEmailAddress.iTypeLength);
    else
        iMachineNameEmail = HBufC::NewL(iMachineName->Length() + aPtrEmailAdd.Length() + 1);

    iMachineNameEmail->Des().Copy(*iMachineName);

    if (aPtrEmailAdd.Compare(_L("NONE"))==0)
        iMachineNameEmail->Des().Append(KAtEmailAddress);
    else
    {
        iMachineNameEmail->Des().Append(_L("@"));
        iMachineNameEmail->Des().Append(aPtrEmailAdd);
    }


    CleanupStack::PopAndDestroy(2,&fs);
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:40,代码来源:T_UtilsConfigFileMachineName.cpp

示例4:

void CT_LbsConflictStep_X3PTimerPush::NotifyRegisterLcsMoLr(const TDesC& aData)
	{
	// Determine and record the sequence event. A blank aData indicates a self locate
	// un-expected MOLR, otherwise we have a X3P MOLR.
	if (aData != KNullDesC)
		{
		// Process X3P Timer register.
		if (iState == EReqX3PTimer)
			{
			INFO_PRINTF1(_L("Got - X3P(TIMER1) MOLR - NetSim Notify Register Lcs MoLr - Event."));
			SetCurrentSeqEvent(EX3P_TIMER_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);

			// Verify telephone number.
			if (aData.Compare(KTransmitTimerDestination))
				{
				INFO_PRINTF1(_L("Failed test, bad X3P Timer register data."));
				SetTestStepResult(EFail);
				}

			// Start X3P Push (second X3P).
			StartX3PL(KLbsConflictX3PPushId);
			}

		// Process X3P Push register.			
		else
		if (iState == EReqX3PTimer2)
			{
			INFO_PRINTF1(_L("Got - X3P(TIMER2) MOLR - NetSim Notify Register Lcs MoLr - Event."));
			SetCurrentSeqEvent(EX3P_TIMER_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);
			if (aData.Compare(KTransmitTimerDestination))
				{
				INFO_PRINTF1(_L("Failed test, bad X3P Timer register data."));
				SetTestStepResult(EFail);
				}
			}
		else
			{
			INFO_PRINTF1(_L("Got - X3P(PUSH) MOLR - NetSim Notify Register Lcs MoLr - Event."));
			SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);

			// Verify telephone number.
			if (aData.Compare(KTransmitPushDestination))
				{
				INFO_PRINTF1(_L("Failed test, bad X3P Push register data."));
				SetTestStepResult(EFail);
				}
			
			// Indicate we have really started the second X3P.
//			iState = EReqX3PPush;			
			}		
		}

	else
		{
		INFO_PRINTF1(_L("Got unexpected - Self MOLR - NetSim Notify Register Lcs MoLr - Event."));
		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:58,代码来源:ctlbsconflictstepx3ptimerpush.cpp

示例5: OidToIdL

TAlgorithmId CSignatureVerifier::OidToIdL(const TDesC& aSchemeOid)
	{
	if ( (aSchemeOid.Compare(KSHA1WithRSA) != 0) &&
		(aSchemeOid.Compare(KDSAWithSHA1) != 0) )
		{
		User::Leave(KErrDigestNotSupported);
		}
	return ESHA1;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:9,代码来源:signatureverifier.cpp

示例6: ProductAttribute

// ---------------------------------------------------------
// TDdParser::ProductAttribute() // for OMA v2
// ---------------------------------------------------------
//
TDdParser::TDdAttr TDdParser::ProductAttribute( const TDesC& aAttrName ) const
    {
    TDdAttr attr = EDdUnknownAttr;
    if ( !aAttrName.Compare( KDdMeta ) )
        {
        attr = EDdMeta;
        }
    if ( !aAttrName.Compare( KDdMediaObject ) )
        {
        attr = EDdMediaObject;
        }
    return attr;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:17,代码来源:DdParser.cpp

示例7: GetSmsSettingsCommDbAction

CSmsSettings::TSmsSettingsCommDbAction CSmsScriptUtils::GetSmsSettingsCommDbAction (TDesC& value)
	{

	CSmsSettings::TSmsSettingsCommDbAction options;
	
	_LIT(KNone, "CSmsSettings::TSmsSettingsCommDbAction::ENone");
	_LIT(KStoreToCommDb, "CSmsSettings::TSmsSettingsCommDbAction::EStoreToCommDb");
	
	if(value.Compare(KNone) == 0)
		options = CSmsSettings::ENone;
	if(value.Compare(KStoreToCommDb) == 0)
		options = CSmsSettings::EStoreToCommDb;

	return options;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:15,代码来源:CSmsScriptUtils.cpp

示例8: mapOnScreenKeyboardToOmjValue

void CMIDletSuiteCustomAttributes::mapOnScreenKeyboardToOmjValue(const TDesC& aLegacyValue, std::wstring& aOmjValue)
{
    if (aLegacyValue.Compare(KValueNo) == 0)
    {
        aOmjValue += L"0";
    }
    else if (aLegacyValue.Compare(KValueGameactions) == 0)
    {
        aOmjValue += L"1";
    }
    else if (aLegacyValue.Compare(KValueNavigationkeys) == 0)
    {
        aOmjValue += L"2";
    }
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:15,代码来源:MIDP2UserPreferences.cpp

示例9: RegisterScript

//
// Registers a script/executable. Runtimes should specify the trust information
// of the script to be registered. 
// 
// Operation Code  : ERegisterScript
// IPC Argument[0] : Policy Identifier
// IPC Argument[1] : Script Identifier (as inOut Parameter)
// IPC Argument[2] : Hash value of script
// IPC Argument[3] : none
// 
TExecutableID RSecMgrSession::RegisterScript(TPolicyID aPolicyID,
		const TDesC& aHashMarker, const CTrustInfo& /*aTrustInfo*/)
	{
	__UHEAP_MARK;

	if(!(aHashMarker.Compare(KNullDesC)))
		return ErrInvalidParameters;
	CRTSecMgrRegisterScriptMsg* scriptMsg = CRTSecMgrRegisterScriptMsg::NewL (
			aPolicyID, aHashMarker);
 
	HBufC8* dataDes(NULL);
	TRAPD(ret, dataDes = scriptMsg->PackMsgL());
	if ( dataDes)
		{
		TExecutableID scriptID(KAnonymousScript);
		TPckgBuf<TInt> scriptIDBuf(scriptID);
		TIpcArgs args(dataDes, &scriptIDBuf);
		
		ret = SendReceive (ERegisterScriptWithHash, args);
		delete dataDes;
		
		if(KErrNone==ret)
			ret = scriptIDBuf();
		}

	delete scriptMsg;

	__UHEAP_MARKEND;

	return ret;
	}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:41,代码来源:rtsecmgrclient.cpp

示例10: FindUserFolderL

// -----------------------------------------------------------------------------
// CMmsAdapterMsvApi::FindUserFolderL
// -----------------------------------------------------------------------------
//    
TBool CMmsAdapterMsvApi::FindUserFolderL( const TDesC& aName, TMsvId& aFolder )
    {
    CMsvEntry* entry = iSession.GetEntryL( KMsvMyFoldersEntryIdValue );
    CleanupStack::PushL( entry );
     
    CMsvEntrySelection* selection = entry->ChildrenL();
    CleanupStack::PushL( selection );
    
    TBool found( EFalse );
    TMsvId serviceId;
    TMsvEntry entryT;

    for ( TInt i = 0; i < selection->Count(); i++ )
        {
        User::LeaveIfError( iSession.GetEntry( selection->At( i ), serviceId, entryT ) );
        
        if ( !entryT.Deleted() && entryT.iType == KUidMsvFolderEntry && 
            aName.Compare(entryT.iDescription) == 0 )
            {
            found = ETrue;
            aFolder = entryT.Id();
            break;
            }
        }
    
    CleanupStack::PopAndDestroy( selection );
    CleanupStack::PopAndDestroy( entry );
    
    return found;           
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:34,代码来源:mmsadaptermsvapi.cpp

示例11: GetSmsPIDConversion

TSmsPIDConversion CSmsScriptUtils::GetSmsPIDConversion(TDesC& value)
	{

	TSmsPIDConversion options;
	
	_LIT(KSmsConvPIDNone, "TSmsPIDConversion::ESmsConvPIDNone");
	_LIT(KSmsConvFax, "TSmsPIDConversion::ESmsConvFax");
	_LIT(KSmsConvX400, "TSmsPIDConversion::ESmsConvX400");
	_LIT(KSmsConvPaging, "TSmsPIDConversion::ESmsConvPaging");
	_LIT(KSmsConvMail, "TSmsPIDConversion::ESmsConvMail");
	_LIT(KSmsConvErmes, "TSmsPIDConversion::ESmsConvErmes");
	_LIT(KSmsConvSpeech, "TSmsPIDConversion::ESmsConvSpeech");
	
	if(value.Compare(KSmsConvPIDNone) == 0)
		options = ESmsConvPIDNone;
	if(value.Compare(KSmsConvFax) == 0)
		options = ESmsConvFax;
	if(value.Compare(KSmsConvX400) == 0)
		options = ESmsConvX400;
	if(value.Compare(KSmsConvPaging) == 0)
		options = ESmsConvPaging;
	if(value.Compare(KSmsConvMail) == 0)
		options = ESmsConvMail;
	if(value.Compare(KSmsConvErmes) == 0)
		options = ESmsConvErmes;
	if(value.Compare(KSmsConvSpeech) == 0)
		options = ESmsConvSpeech;
	
	return options;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:30,代码来源:CSmsScriptUtils.cpp

示例12: DesToValueType

// -----------------------------------------------------------------------------
// CSensorDataCompensatorItem::DesToValueType
// -----------------------------------------------------------------------------
//
TInt CSensorDataCompensatorItem::DesToValueType( const TDesC& aValueType )
    {
    FUNC_LOG;

    TInt ret( KErrNotFound );
    if ( !aValueType.Compare( KAxisDataX ) )
        {
        ret = EAxisDataX;
        }
    else if ( !aValueType.Compare( KAxisDataY ) )
        {
        ret = EAxisDataY;
        }
    else if ( !aValueType.Compare( KAxisDataZ ) )
        {
        ret = EAxisDataZ;
        }
    else if ( !aValueType.Compare( KTappingAxisX ) )
        {
        ret = ETappingAxisX;
        }
    else if ( !aValueType.Compare( KTappingAxisY ) )
        {
        ret = ETappingAxisY;
        }
    else if ( !aValueType.Compare( KTappingAxisZ ) )
        {
        ret = ETappingAxisZ;
        }
    else if ( !aValueType.Compare( KMagneticNorthAngle ) )
        {
        ret = EMagneticNorthAngle;
        }
    return ret;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:39,代码来源:sensordatacompensatoritem.cpp

示例13: GetBioMsgIdType

TBioMsgIdType CSmsScriptUtils::GetBioMsgIdType(TDesC& value)
	{
	
	TBioMsgIdType options;

	_LIT(KBioMsgIdUnknown, "TBioMsgIdType::EBioMsgIdUnknown");
	_LIT(KBioMsgIdIana, "TBioMsgIdType::EBioMsgIdIana");
	_LIT(KBioMsgIdNbs, "TBioMsgIdType::EBioMsgIdNbs");
	_LIT(KBioMsgIdWap, "TBioMsgIdType::EBioMsgIdWap");
	_LIT(KBioMsgIdWapSecure, "TBioMsgIdType::EBioMsgIdWapSecure");
	_LIT(KBioMsgIdWsp, "TBioMsgIdType::EBioMsgIdWsp");
	_LIT(KBioMsgIdWspSecure, "TBioMsgIdType::EBioMsgIdWspSecure");

	if(value.Compare(KBioMsgIdUnknown) == 0)
		options = EBioMsgIdUnknown;
	if(value.Compare(KBioMsgIdIana) == 0)
		options = EBioMsgIdIana;
	if(value.Compare(KBioMsgIdNbs) == 0)
		options = EBioMsgIdNbs;
	if(value.Compare(KBioMsgIdWap) == 0)
		options = EBioMsgIdWap;
	if(value.Compare(KBioMsgIdWapSecure) == 0)
		options = EBioMsgIdWapSecure;
	if(value.Compare(KBioMsgIdWsp) == 0)
		options = EBioMsgIdWsp;
	if(value.Compare(KBioMsgIdWspSecure) == 0)
		options = EBioMsgIdWspSecure;

	return options;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:30,代码来源:CSmsScriptUtils.cpp

示例14: GetSmsReportHandling

CSmsSettings::TSmsReportHandling CSmsScriptUtils::GetSmsReportHandling(TDesC& value)
	{

	CSmsSettings::TSmsReportHandling options;
	
	_LIT(KMoveReportToInboxInvisible, "CSmsSettings::TSmsReportHandling::EMoveReportToInboxInvisible");
	_LIT(KMoveReportToInboxVisible, "CSmsSettings::TSmsReportHandling::EMoveReportToInboxVisible");
	_LIT(KDiscardReport, "CSmsSettings::TSmsReportHandling::EDiscardReport");
	_LIT(KDoNotWatchForReport, "CSmsSettings::TSmsReportHandling::EDoNotWatchForReport");
	_LIT(KMoveReportToInboxInvisibleAndMatch, "CSmsSettings::TSmsReportHandling::EMoveReportToInboxInvisibleAndMatch");
	_LIT(KMoveReportToInboxVisibleAndMatch, "CSmsSettings::TSmsReportHandling::EMoveReportToInboxVisibleAndMatch");
	_LIT(KDiscardReportAndMatch, "CSmsSettings::TSmsReportHandling::EDiscardReportAndMatch");
	
	if(value.Compare(KMoveReportToInboxInvisible) == 0)
		options = CSmsSettings::EMoveReportToInboxInvisible;
	if(value.Compare(KMoveReportToInboxVisible) == 0)
		options = CSmsSettings::EMoveReportToInboxVisible;
	if(value.Compare(KDiscardReport) == 0)
		options = CSmsSettings::EDiscardReport;
	if(value.Compare(KDoNotWatchForReport) == 0)
		options = CSmsSettings::EDoNotWatchForReport;
	if(value.Compare(KMoveReportToInboxInvisibleAndMatch) == 0)
		options = CSmsSettings::EMoveReportToInboxInvisibleAndMatch;
	if(value.Compare(KMoveReportToInboxVisibleAndMatch) == 0)
		options = CSmsSettings::EMoveReportToInboxVisibleAndMatch;
	if(value.Compare(KDiscardReportAndMatch) == 0)
		options = CSmsSettings::EDiscardReportAndMatch;

	return options;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:30,代码来源:CSmsScriptUtils.cpp

示例15: GetSmsDelivery

TSmsDelivery CSmsScriptUtils::GetSmsDelivery(TDesC& value)
	{

	TSmsDelivery options;

	_LIT(KSmsDeliveryImmediately, "TSmsDelivery::ESmsDeliveryImmediately");
	_LIT(KSmsDeliveryUponRequest, "TSmsDelivery::ESmsDeliveryUponRequest");
	_LIT(KSmsDeliveryScheduled, "TSmsDelivery::ESmsDeliveryScheduled");
	
	if(value.Compare(KSmsDeliveryImmediately) == 0)
		options = ESmsDeliveryImmediately;
	if(value.Compare(KSmsDeliveryUponRequest) == 0)
		options = ESmsDeliveryUponRequest;
	if(value.Compare(KSmsDeliveryScheduled) == 0)
		options = ESmsDeliveryScheduled;

	return options;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:18,代码来源:CSmsScriptUtils.cpp


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