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


C++ TDesC8::CompareF方法代码示例

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


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

示例1: DoTestStepL

TVerdict RTestStepResolverUtils::DoTestStepL()
	{
	INFO_PRINTF1(_L("Tests the video resolver utility "));
	_LIT8(KText, "<s>");
	TBufC8<50> data(KText);
	TPtr8 ptrData = data.Des();
	
	CCodecApiOpaqueData* codecApiOpaqueData = CCodecApiOpaqueData::NewLC(ptrData);
	const TDesC8 inputData = codecApiOpaqueData->InputDataType();
	if (inputData.CompareF(KNullDesC8) != 0)
		{
		INFO_PRINTF1(_L("Incorrect manufacturer"));		
		CleanupStack::PopAndDestroy(codecApiOpaqueData);
		return EFail;
		}
		
	const TDesC8 outputData = codecApiOpaqueData->OutputDataType();
	if (outputData.CompareF(KNullDesC8) != 0)
		{
		INFO_PRINTF1(_L("Incorrect manufacturer"));		
		CleanupStack::PopAndDestroy(codecApiOpaqueData);
		return EFail;
		}	
	
	CleanupStack::PopAndDestroy(codecApiOpaqueData);
	return EPass;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:27,代码来源:tsu_mdf_audiocodecs_resolver.cpp

示例2: SettingAttribute

// ---------------------------------------------------------
// CCookieTimer::SettingAttribute
// ---------------------------------------------------------
//
void CCookieManagerServer::SettingAttribute(TDesC8& attrName, TDesC8& attrData,TUint32& aGroupId
        , RArray<TUint32>& aSharedAppUidArray, TBool& aCookieSharableFlag  )
    {
    CLOG( ( EServer, 0, _L( "-> CCookieManagerServer::SettingAttribute" ) ) );
    TBuf8<100> groupname(KNullDesC8);
    TBuf8<100> bufGroupId(KNullDesC8);
    TBuf8<100> bufSharedAppUidName(KNullDesC8);
    TUint32 sharedAppUid = 0;
    if ( ! attrName.CompareF(KGroupName))
         {
          groupname.Copy(attrData);
         } else if ( ! attrName.CompareF(KGroupId)) 
              {
              bufGroupId.Copy(attrData);
              TInt err = ChangeToDecimal(bufGroupId, aGroupId);
              
              }else if ( ! attrName.CompareF(KUid3))
                 {
                 bufSharedAppUidName.Copy(attrData);
                 TInt err = ChangeToDecimal(bufSharedAppUidName, sharedAppUid);
                 if (err == KErrNone)
                     aSharedAppUidArray.AppendL(sharedAppUid);
                 
                 } else if (! attrName.CompareF(KCookieSharable))
                     {
                      if ( !attrData.CompareF(KOff) )
                          aCookieSharableFlag = EFalse;
                      else
                          aCookieSharableFlag = ETrue;
                     }
    CLOG( ( EServer, 0, _L( "<- CCookieManagerServer::SettingAttribute" ) ) );
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:36,代码来源:CookieManagerServer.cpp

示例3: IsValidParamSegment

/**
	Checks whether ParamSegment contains valid characters in 
	Parameter name and Parameter value as specified in RFC 3261.
							
	@param		aName	The descriptor for parameter name to be checked as per RFC 3261.
	@param		aValue	The descriptor for value to be checked as per RFC 3261.
	@return		A boolean value of ETrue if uri contains valid parameters and values,
				EFalse if it does not.
*/
TBool TValidatorSip::IsValidParamSegment(const TDesC8& aName, const TDesC8& aValue) const
	{
	if (!aName.Length() || !IsValidParam(aName) ) 
		{
		return EFalse;	
		}
	
	/**************************************************************************************************************
	* As per RFC 3261 if the uri-parameter contains name as Tranport or User or Method then its Value must be     *
	* the characters as specified in Token. else if the name is Ttl then its value must lie in between 0 - 255.   *
	* else if the name is Maddr then its value must be a host, else if the name is lr then it must not conatin    *
	* any value, else it must be a other-parameter whose value must conatin the characters specified in paramchar.*
	* As per INC 115503 and due to IOP issue Validation of lr paramater is not performed.						  *
	***************************************************************************************************************/
	if ( ( (aName.CompareF(KTransport()) == 0 || aName.CompareF(KUser()) == 0 || aName.CompareF(KMethod()) == 0 ) 	
	   	   	  && !IsValidParamToken(aValue) )
		|| ( aName.CompareF(KTtl()) == 0 && !IsValidParamTtl(aValue) )
		|| ( aName.CompareF(KMaddr()) == 0  && !IsValidParamMaddr(aValue) )
		|| ( aName.CompareF(KTransport()) != 0 && aName.CompareF(KUser()) != 0 && aName.CompareF(KMethod()) != 0 && aName.CompareF(KTtl()) != 0 
			&& aName.CompareF(KMaddr()) != 0 && aName.CompareF(KLr()) != 0 && !IsValidParam(aValue))
		)
		{
		return EFalse;	
		}

	return ETrue;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:36,代码来源:TValidator.cpp

示例4: NewTransactionL

// -----------------------------------------------------------------------------
//  CUpnpHttpServerTransactionHandler::NewTransactionL
//
// -----------------------------------------------------------------------------
//
void CUpnpHttpServerTransactionHandler::NewTransactionL( 
    const TDesC8& aMethod, const TDesC8& aUri, 
    const TInetAddr& aSender, CUpnpHttpServerTransaction*& aResultTrans )
    {
    _LIT8( KGet, "GET" );
    _LIT8( KHead, "HEAD" );
    if ( (aMethod.CompareF(KGet)==0) || (aMethod.CompareF(KHead)==0) )
        {
        aResultTrans = CUpnpHttpServerTransactionDescription::NewL( *this, aSender, aUri );
        }
    else
        {
        User::Leave( KErrGeneral );//bad request
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:20,代码来源:upnphttpservertransactionhandler.cpp

示例5: RemoveFormatL

// ---------------------------------------------------------------------------
// CSdpMediaField::RemoveFormatL
// ---------------------------------------------------------------------------
//
EXPORT_C void CSdpMediaField::RemoveFormatL(const TDesC8& aFormat)
{
    if ( !iFormatList || iFormatList->Des().Length() == 0 )
    {
        User::Leave( KErrSdpCodecMediaField );
    }
    TLex8 lexer( *iFormatList );
    TBool tokenRemoved( EFalse );
    while ( !tokenRemoved && !lexer.Eos() )
    {
        lexer.SkipSpaceAndMark();
        lexer.SkipCharacters();
        if ( lexer.TokenLength() > 0 )
        {
            if ( aFormat.CompareF(lexer.MarkedToken()) == 0)
            {
                RArray<TInt> removedObjs;
                CleanupClosePushL( removedObjs );
                for ( TInt i( 0 ); i < iFmtAttrFields->Count(); i++ )
                {
                    if (aFormat.CompareF((*iFmtAttrFields)[i]->Format()) == 0)
                    {
                        User::LeaveIfError( removedObjs.Append(i) );
                    }
                }
                // Remove all format attributes of type format
                TInt removedCount( 0 );
                while ( removedObjs.Count() > 0 )
                {
                    CSdpFmtAttributeField* obj =
                        (*iFmtAttrFields)[removedObjs[0] - removedCount];
                    delete obj;
                    obj = 0;
                    iFmtAttrFields->Remove( removedObjs[0] - removedCount);
                    removedObjs.Remove(0);
                    removedCount++;
                }
                CleanupStack::PopAndDestroy();  // removedObjs

                // Remove format from format list
                iFormatList->Des().Delete( lexer.MarkedOffset(),
                                           lexer.Offset() - lexer.MarkedOffset());
                iFormatList->Des().TrimAll();
                tokenRemoved = ETrue;
            }
        }
    }
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:52,代码来源:SdpMediaField.cpp

示例6: CheckVariantValue

TBool CHttpClientTestParams::CheckVariantValue(const THttpHeaderValueVariant& aVariant, const TDesC8& aValueToMatch)
    {
    TBool ret = EFalse;
    switch(aVariant.Type())
        {
        case THttpHeaderValueVariant::EIntType:
            {
            _LIT8(KIntType, "%d");
            TBuf8<16>  buf;
            buf.Format(KIntType(), aVariant.Int());
            ret = (buf.CompareF(aValueToMatch) == 0);                    
            }
        break;
        
        case THttpHeaderValueVariant::EStrType:
            {
            ret = (aVariant.Str().CompareF(aValueToMatch) == 0);
            }
        break;
        
        case THttpHeaderValueVariant::EDateTimeType:
            {
            TInternetDate internetDate(aVariant.DateTime());
            HBufC8* dateTimeStr = internetDate.InternetDateTimeL(TInternetDate::ERfc1123Format);
            ret = aValueToMatch.CompareF(*dateTimeStr) == 0;
            delete dateTimeStr;
            }
        break;
        
        default:
        User::Invariant();
        }    
    return ret;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:34,代码来源:chttpclienttestparams.cpp

示例7: SchemeType

/**
	@internalComponent

	Returns the type of the URIs scheme
	
	@param			aScheme	The descriptor with the scheme.
	@return			The scheme type
 */
TUriSchemeType SchemeType(const TDesC8& aScheme)
	{
	// Compares the scheme with both sip and sips
	if (aScheme.CompareF(KSipScheme8()) == 0 || aScheme.CompareF(KSipsScheme8()) == 0)
		{
		// there's a match so this is a sip scheme
		return ESchemeTypeSip;
		}
	//Compares the scheme with tel 
	else if (aScheme.CompareF(KTelScheme8()) == 0) 
		{
		return ESchemeTypeTel;
		} 

	return ESchemeTypeUnknown;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:24,代码来源:UriUtils.cpp

示例8: IsDuplicated

/**
	Checks whether any duplicate parameter names exist in the 
	whole path of the tel-uri, and also checks whether the both ISDN and EXTN 
	parameters exist in tel-uri.
							
	@param		aParamName	The descriptor to be checked.
	@param		aParamList	the path part of uri, which conatians all parameters and values.
	@return		A boolean value of ETrue if uri contains duplicate parameters or 
				both isdn and extn parameters exist, EFalse if it does not.
 */
TBool TValidatorTel::IsDuplicated(const TDesC8& aParamName, const TDelimitedParserBase8 aParamList) const
	{
	// roll back to the start of the lhs segment parser
	while(aParamList.Dec() != KErrNotFound) 
		{
		//do nothing
		}
	aParamList.Inc(); //To exclude phone number from the list.
	
	TPtrC8 name;
	TPtrC8 value;
	TPtrC8 segment;
	TInt count = 0;
	while( aParamList.GetNext(segment) == KErrNone )
		{
		GetNameValuePair(segment, name, value);
		if (aParamName.CompareF(name) == 0)
			{
			count++;	
			}
		if (count > 1)
			{
			// The parameter name appears more than once in the paramter list
			return ETrue;
			}
		if( ( KIsdnSubAddress().CompareF(aParamName) == 0 && KExtension().CompareF(name) == 0 ) || 
			( KExtension().CompareF(aParamName) == 0 && KIsdnSubAddress().CompareF(name) == 0 ) )
			{
			//Both ISDN and EXTN should not exist in Uri
			return ETrue;	
			}
		}

	return EFalse;	
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:45,代码来源:TValidator.cpp

示例9:

// -----------------------------------------------------------------------------
//  CUpnpHttpServerTransactionHandler::MatchType
//
// -----------------------------------------------------------------------------
//
CUpnpHttpServerTransactionHandler::TDescriptionType 
              CUpnpHttpServerTransactionHandler::MatchType( const TDesC8& aUri )
    {
    if ( aUri.CompareF( iDevice.DescriptionUrl() ) == 0 )
        {
        return EDevice;
        }

    //1st check if url is service url
    RPointerArray<CUpnpService> servList =
                 iDevice.ServiceList();
    TInt count = servList.Count();
    for( TInt index = 0; index < count; index++ )
        {
        if( servList[ index ]->ServiceDescriptionUrl().CompareF( aUri ) == 0 )
            {
            return EService;
            }
        }
    //next check icon list
    RPointerArray<CUpnpIcon> iconList =
                 iDevice.Icons();
    count = iconList.Count();
    for( TInt index2 = 0; index2 < count; index2++ )
        {
        if( iconList[ index2 ]->Url().CompareF( aUri ) == 0 )
            {
            return EIcon;
            }
        }
    return ENotFound;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:37,代码来源:upnphttpservertransactionhandler.cpp

示例10: InitializeL

// ---------------------------------------------------------------------------
// CWmDrmDlaUiNotifierImpl::InitializeL
// ---------------------------------------------------------------------------
//
void CWmDrmDlaUiNotifierImpl::InitializeL( 
    TDesC8& aOpaqueData )
    {
    TInt err( KErrNotFound );
    
    LOGFNR( "CWmDrmDlaUiNotifierImpl::InitializeL", err );
    LOGHEX( aOpaqueData.Ptr(), aOpaqueData.Length() );
        
    delete iUiPlugin;
    iUiPlugin = NULL;
    RImplInfoPtrArray implArray;
    CleanupStack::PushL( TCleanupItem( DoResetDestroyAndClose, &implArray ) );
    REComSession::ListImplementationsL( KWmDrmDlaUiPluginIfUid, implArray );
    
    for ( TInt i( 0 ); i < implArray.Count() && err == KErrNotFound; ++i )
        {
        if ( aOpaqueData.CompareF( implArray[i]->OpaqueData() ) == 0 &&
             implArray[i]->VendorId() == VID_DEFAULT  )
            {
            err = KErrNone;
            iUiPlugin = 
                CWmDrmDlaUiPluginIf::NewL( implArray[i]->ImplementationUid() );
            }
        }
    if ( err == KErrNotFound )
        {
        err = KErrNone;
        iUiPlugin = CWmDrmDlaUiPluginIf::NewL( KWmDrmDlaDefaultUiPluginUid );
        }
    CleanupStack::PopAndDestroy( &implArray );
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:35,代码来源:wmdrmdlauinotifierimpl.cpp

示例11: ValidateXmlL

// ----------------------------------------------------------
// CSimpleFilter::ValidateXmlL
// ----------------------------------------------------------
//
void CSimpleFilter::ValidateXmlL( const TDesC8& aName )
    {
    if ( aName.CompareF( KFilterLocalName ) )
        {
        User::Leave( KErrCorrupt );
        }        
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:11,代码来源:simplefilter.cpp

示例12: internetDate

void CConvertToRfc1123FormTest::ConvertSingleTestL(TDateTime aDateTime, const TDesC8& aExpectedResult)
{
    TInternetDate internetDate(aDateTime);
    HBufC8* textDate = internetDate.InternetDateTimeL(TInternetDate::ERfc1123Format);
    CleanupStack::PushL(textDate);
    if (aExpectedResult.CompareF(*textDate) != 0)
        User::Leave(KErrCorrupt);

    CleanupStack::PopAndDestroy(textDate);
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:10,代码来源:cconverttorfc1123formtest.cpp

示例13: IsSupported

// -----------------------------------------------------------------------------
// CMceSdpCodec::IsSupported
// -----------------------------------------------------------------------------
TBool CMceSdpCodec::IsSupported( const TDesC8& aCapability ) const
    {
    TBool isSupported = EFalse;
    TInt index = 0;
    
    while( !isSupported && index < iCapabilities->Count() )
        {
        isSupported = !aCapability.CompareF( iCapabilities->MdcaPoint( index ++ ) );
        }
    
    return isSupported;
    
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:16,代码来源:mcesdpcodec.cpp

示例14: ProvisionBearerConfigL

void CLANLinkCommon::ProvisionBearerConfigL(const TDesC8& aName)
	{
	TInt index = -1;
	CLanxBearer* bearer = FindBearerByProtocolName(aName, index);
	if (bearer)
		{
        if (aName.CompareF(KDescIp) == 0)
		    {
		    if (iLanIp4Provision)
		        {
		        bearer->SetProvisionL(iLanIp4Provision); // CLanIp4Bearer
		        }
		    }
		else if (aName.CompareF(KDescIp6) == 0)
		    {
		    if (iLanIp6Provision)
		        {
		        bearer->SetProvisionL(iLanIp6Provision); // CLanIp6Bearer
		        }
		    }
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:22,代码来源:Ethbase.cpp

示例15: SetSdpName

// -----------------------------------------------------------------------------
// CMccCodecRed::SetSdpName
// Sets the SDP name
// -----------------------------------------------------------------------------
TInt CMccCodecRed::SetSdpName( const TDesC8& aSdpName )
    {
    if ( !aSdpName.CompareF( KRedSdpName ) )
        {
        iSdpName.Copy( aSdpName );
        }
    else 
        {
        return KErrNotSupported;
        }
    
    return KErrNone;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:17,代码来源:MmccCodecRed.cpp


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