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


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

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


在下文中一共展示了TDesC::CompareF方法的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: SetFolderL

void CAknFileSettingPage::SetFolderL(const TDesC& aFolder)
{
    TParse parse;
    TFileName file;
    TDesC* pos=NULL;
    parse.SetNoWild(iFileValue,NULL,NULL);
    if(aFolder.CompareF(KFolderUp)==0)
    {
        if(iFileValue.Length())
        {
            if(parse.PopDir()==KErrNone)
            {
                TParse parse2;
                parse2.SetNoWild(iFileValue,NULL,NULL);
                TPtrC ptr=parse2.DriveAndPath();
                file=ptr.Left(ptr.Length()-1);
                parse2.SetNoWild(file,NULL,NULL);
                file=parse2.NameAndExt();
                pos=&file;
                iFileValue=parse.DriveAndPath();
            }
            else
                iFileValue.Zero();
        }
    }
    else
    {
        iFileValue=parse.DriveAndPath();
        iFileValue.Append(aFolder);
        iFileValue.Append('\\');
    }
    ReadFilesL(pos);
}
开发者ID:flaithbheartaigh,项目名称:almalert,代码行数:33,代码来源:aknfilesettingpage.cpp

示例3: ExternalizeL

// -----------------------------------------------------------------------------
// CHttpCacheEntry::Externalize
//
// -----------------------------------------------------------------------------
//
void CHttpCacheEntry::ExternalizeL( RWriteStream& aWriteStream, const TDesC& aDirectory )
    {
    // check directory matches filename
    ASSERT(aDirectory.CompareF(iFileName->Left(aDirectory.Length())) == 0);

    // url length
    aWriteStream.WriteInt32L( iUrl->Length() );
    // url
    aWriteStream.WriteL( iUrl->Des() );
    // filename
    // know that filenames are 8 chars and no extension. Can reconstruct on
    // import from directory and last char. See HttpCacheUtil::GenerateNameLC.
    aWriteStream.WriteL( iFileName->Des().Right( KFilenameLength ) );
    // la
    aWriteStream.WriteReal64L( iLastAccessed );
    // ref
    aWriteStream.WriteUint32L( iRef );
    // size
    aWriteStream.WriteUint32L( iBodySize );
    // size
    aWriteStream.WriteUint32L( iHeaderSize );
    // protected
    aWriteStream.WriteInt32L( iProtected );
    // header data length
    aWriteStream.WriteInt32L( iHeaderBuffer->Length() );
    // header data
    aWriteStream.WriteL( iHeaderBuffer->Des() );
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:33,代码来源:HttpCacheEntry.cpp

示例4: GetPropertyId

// ============================================================================
// Get the property descriptiont by finding entry for name.
//
// @param aPropName The name of the prop: <prop>propName</prop>
// @since 5.0
// @return prop type.
// ============================================================================
//
TInt CWidgetBackupRegistryXml::GetPropertyId(
    const TDesC& aPropName )
    {
    TInt i = 0;
    for (; i < iProperties.Count(); ++i )
        {
        // use case insensitive match for property names
        if ( 0 == aPropName.CompareF( iProperties[i].name ) )
            {
            return iProperties[i].id;
            }
        }
    TUint16* name = NULL;
    name = new TUint16 [aPropName.Length()];
    if (name)
        {
        TPtr namePtr(name, aPropName.Length());
        namePtr.Copy(aPropName);
        TWidgetProperty property;
        property.id = iProperties.Count();
        property.name.Set( namePtr );
        property.type = EWidgetPropTypeUnknown;
        TInt err = iProperties.Append(property);
        if (err == KErrNone)
            {
            return iProperties.Count() - 1;
            }
        delete name;
        }
    return EWidgetPropertyIdInvalid;
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:39,代码来源:WidgetBackupRegistryXml.cpp

示例5: AddParsedFieldL

void CEmailNotificationParser::AddParsedFieldL(const TDesC& aFieldName,
                                              const TDesC& aFieldValue,
                                              TBool aMandatory)
    {
    // This method is responsible for adding field values found
    // by the parser to the array of parsed fields. It also
    // enforces the "each field once only" rule (see Nokia Smart
    // Messaging spec, 2.0.0pre, 3-34).
    for (TInt i = 0; i < iParsedFieldArray->Count(); i++)
        {
        // Use CompareF() to perform case-insensitive match
        if (aFieldName.CompareF(iParsedFieldArray->At(i)->FieldName()) == 0)
            {
            // Field name exists, so insert a value
            iParsedFieldArray->At(i)->SetFieldValueL(aFieldValue);
            iParsedFieldArray->At(i)->SetMandatoryField(aMandatory);
            iExtendedNotification = ETrue;
			return;
            }
        }

	// This has been added to fix defect INC38950
	// If we have got here, then we have a new field, not specified by one of the fields in iParseFieldArray
    CParsedField* parsedField = new (ELeave) CParsedField;
	CleanupStack::PushL(parsedField);
    parsedField->SetFieldNameL(aFieldName);
    parsedField->SetFieldValueL(aFieldValue);
    parsedField->SetMandatoryField(EFalse);
    iParsedFieldArray->AppendL(parsedField);
    CleanupStack::Pop(parsedField);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:31,代码来源:ENP.CPP

示例6: ReleaseFileL

/*
  Releases the file if it is being held open by this object.
  
@param Filename of Agenda file
*/
void CAgnPermanentData::ReleaseFileL(const TDesC& aFilename)
	{
	if (iFile && (aFilename.CompareF(iFile->FileName()) == 0))
		{
		Close();
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:12,代码来源:agspermanentdata.cpp

示例7: GetPropertyId

// ============================================================================
// Get the key type out of the keyname
//
// @param aKeyName The name of the key: <key>KeyName</key>
// @since 3.1
// @return Key type.
// ============================================================================
//
TWidgetPropertyId CWidgetUIConfigHandler::GetPropertyId(
    const TDesC& aKeyName,
    DtdType aDtdType,
    TWidgetPropertyDescriptionId& aPropertyDescriptionId )
    {
    aPropertyDescriptionId = EPropertyDescriptionIdInvalid;
    TInt i = 0;
    for (; i < EPropertyDescriptionIdCount; ++i )
        {
        if ( (EDtdTypeApple == aDtdType)
             && ( iProperties[i].flags & ENokia ) )
            {
            continue;
            }
        if ( (EDtdTypeNokia == aDtdType)
             && ( iProperties[i].flags & EApple ) )
            {
            continue;
            }
        // we use case insensitive match for property names
        if ( 0 == aKeyName.CompareF( iProperties[i].name ) )
            {
            aPropertyDescriptionId = static_cast<TWidgetPropertyDescriptionId>(i);
            if ( iProperties[i].flags & ESpecial )
                {
                return EWidgetPropertyIdInvalid;
                }
            return iProperties[i].id;
            }
        }
    return EWidgetPropertyIdInvalid;
    }
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:40,代码来源:WidgetUIConfigHandler.cpp

示例8: SupportsSupplier

EXPORT_C TBool CMMFPluginImplementationInformation::SupportsSupplier(const TDesC& aSupplier) const
	{
	if (iSupplier)
		{
		if (aSupplier.CompareF(*iSupplier) == KErrNone)
			return ETrue;
		}
	return EFalse;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:9,代码来源:mmfcontrollerpluginresolver.cpp

示例9: ConvertStringToBool

/**
Converts a descriptor containing TRUE or FALSE to its respective TBool
@param aString String which contains true or false.
*/
TBool CTestCalInterimApiSuiteStepBase::ConvertStringToBool(const TDesC& aString)
	{
	_LIT(KTrue, "TRUE");

	if(aString.CompareF(KTrue) == KErrNone)
		{
		return ETrue;
		}
	return EFalse;
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:14,代码来源:TestCalInterimApiSuiteStepBase.cpp

示例10: ComparePasswords

/**
 * Compares the given passwords.
 * Supports folding matching.
 */
EXPORT_C TInt CAknAlphaPasswordSettingPage::ComparePasswords( const TDesC& aRefPassword, const TDesC& aCandidatePassword, enum CAknPasswordSettingPage::TAknPasswordMatchingMode aMode) const
	{
	TBool retVal(EFalse);

    if ( aMode == ECaseSensitive )
        retVal = aRefPassword.Compare( aCandidatePassword );
    else
        retVal = aRefPassword.CompareF( aCandidatePassword );
        
    return retVal;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:15,代码来源:AknPasswordSettingPage.cpp

示例11: FindExistingFileManager

/**
Return the index of the CCntDbManager instance which has a Contacts database
filename equal to aCntFile.  If no CCntDbManager instance has this filename then
KErrNotFound is returned.

@param aCntFile Contacts database filename.

@return Index of CCntDbManager instance which has a Contacts database filename
equal to aCntFile or KErrNotFound if no match.
*/
TInt CCntDbManagerController::FindExistingFileManager(const TDesC& aCntFile) const
	{
	for(TInt i=iManagers.Count()-1; i>=0; --i)
		{
		if(aCntFile.CompareF(iManagers[i]->CntFile()) == 0)
			{
			return i;
			}
		}
	return KErrNotFound;
	}
开发者ID:bavanisp,项目名称:qtmobility-1.1.0,代码行数:21,代码来源:ccntdbmanagercontroller.cpp

示例12: IsOnlyClientOfFile

/*
  Checks whether this object is the only one that is currently using
  aFilename.
  
@return ETrue if this is the only object referencing aFilename, EFalse otherwise.
*/
TBool CAgnPermanentData::IsOnlyClientOfFile(const TDesC& aFilename)
	{
	if (iFile)
		{
		if ((aFilename.CompareF(iFile->FileName()) == 0) && iFile->ReferenceCount() == 1)
			{
			return ETrue;
			}
		}
	return EFalse;
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:17,代码来源:agspermanentdata.cpp

示例13: setCloseStateL

//---------------------------------------------------------------
// SmilXmlReader::setCloseStateL
// @see header
//---------------------------------------------------------------
void SmilXmlReader::setCloseStateL( const TDesC& tagname )
    {
    if ( tagname.CompareF( KSmilTag ) == 0 )
        {
        iState = ESmilFinished;
        }
    else if ( tagname.CompareF( KHeadTag ) == 0 )
        {
        iState = EHeadFinished;
        }
    else if ( tagname.CompareF( KLayoutTag ) == 0 )
        {
        iState = ELayoutFinished;
        }
    else if ( tagname.CompareF( KBodyTag ) == 0 )
        {
        iState = EBodyFinished;
        }

    return;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:25,代码来源:smilxmlreader.cpp

示例14: result

// -----------------------------------------------------------------------------
TPtrC CPresenceCacheBuddyInfo::DoGet16BitValue(const TDesC& aKey )
    {
    HBufC8* val = NULL;        
    TInt* pos = iHashMap.Find( STRCNST( aKey ) );
    TPtrC result( KNullDesC() );
    
    if ( pos )
        {       
        val = iValues[*pos];
        if ( val )
            {
            HBufC* temp = NULL;
            // Convert  Utf-8 to Unicode
            TRAPD( errx,  temp = CnvUtfConverter::ConvertToUnicodeFromUtf8L( *val ) );
            if ( !errx && temp )
                { 
                // Avalibility text handled here
                if ( !aKey.CompareF( NPresenceCacheFieldName::KAvailability ) )
                	{
                    delete iAvailabilityTextBuf;
                    iAvailabilityTextBuf = NULL;                 	
                    iAvailabilityTextBuf = temp; 
                    result.Set( iAvailabilityTextBuf->Des() );
                	}
                // Status message handled here
                else if( !aKey.CompareF( NPresenceCacheFieldName::KStatusMessage ) )
                	{
                    delete iStatusTextBuf;
                    iStatusTextBuf = NULL;                 	
                    iStatusTextBuf = temp;  
                    result.Set( iStatusTextBuf->Des() );
                	}
                }
            }
        }
    return result;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:38,代码来源:presencecachebuddyinfo.cpp

示例15: FindOpenSession

TBool CUpsClientStep::FindOpenSession(const TDesC& aServerName,TInt &position)
	{
	TBool sessionFound = EFalse;
	TInt sessionsCount = iArraySessionsInUse.Count();
	for(TInt index = 0;index < sessionsCount; ++index)
		{
		if(!aServerName.CompareF(iArraySessionsInUse[index]->iServerName))
			{
			position = index;
			sessionFound = ETrue;
			break;
			}
		} 
	return sessionFound;
	} // End of function
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:15,代码来源:tupsclientstep.cpp


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