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


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

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


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

示例1: LandmarkStoresL

// ---------------------------------------------------------------------------
// CLAPILandmarkStoreManager::LandmarkStoresL
// ---------------------------------------------------------------------------
//
CDesCArray* CLAPILandmarkStoreManager::LandmarkStoresL()
{
    JELOG2(EJavaLocation);
    // List landmark databases but remove the default store from the array
    CDesCArray* stores = iLmDbManager->ListDatabasesLC();
    HBufC* defaultDbName = iLmDbManager->DefaultDatabaseUriLC();

    // Remove the default database from the store names array. External stores
    // are also removed because this API does not support other than stores
    // which are located in the file system of the device
    TInt count = stores->Count();
    for (TInt i = 0; i < count; i++)
    {
        TPtrC storeUri = stores->MdcaPoint(i);
        if (defaultDbName->CompareF(storeUri) == 0 || storeUri.FindF(
                    KLAPIDefaultProtocol) == KErrNotFound)
        {
            stores->Delete(i);
            break;
        }
    }

    CleanupStack::PopAndDestroy(defaultDbName);
    CleanupStack::Pop(stores);
    return stores;
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:30,代码来源:clapilandmarkstoremanager.cpp

示例2: ParseDataLineL

TInt TPkgParser::ParseDataLineL(class CFileObjectHolder* &aFileList,  
                                char* line)
{
   char*  localName    = NULL;
   char*  url          = NULL;
   uint32 fileSize     = 0;
   char*  checksum     = NULL;
   uint32 action       = 0;
   char*  version      = NULL;
   char*  versionFile  = NULL;
   char*  versionCheck = NULL;
   char*  isoLang      = NULL;

   TBool ok = ETrue;
   ok = ok && ParseString(localName,    line);
   ok = ok && ParseString(url,          line);
   ok = ok && ParseUint32(fileSize,     line);
   ok = ok && ParseString(checksum,     line);
   ok = ok && ParseUint32(action,       line);
   ok = ok && ParseString(version,      line); //last mandatory field
   TBool lineCorrect = ok;
   ok = ok && ParseString(versionFile,  line); //may return EFalse if
                                               //there is no ending ';'
   ok = ok && ParseString(versionCheck, line); 
   ok = ok && ParseString(isoLang,      line);
   if(!lineCorrect){
      return 0;
   }

   //ignore lines that are language tagged but doesn't match the
   //selected language.
   if(isoLang && strlen(isoLang) > 0 && iSelectedLang != KNullDesC){
      HBufC* lang = WFTextUtil::AllocL(isoLang);
      if(0 != lang->CompareF(iSelectedLang)){
         action = 3; //Delete file.
      }
      delete lang;
   }


   class CFileObject *a = CFileObject::NewLC(localName, url, fileSize, 
                                             checksum, action, version,
                                             versionFile, versionCheck, 
                                             isoLang);

   if (!aFileList) {
      aFileList = new (ELeave) CFileObjectHolder();
   }
   CleanupStack::Pop(a);
   aFileList->unshift(a);
   return 1;
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:52,代码来源:PkgParser.cpp

示例3: ElementHandlerLinkL

// -----------------------------------------------------------------------------
// CAtomFeedParser::ElementHandlerLinkL
//
// A ElementHandler function that handles the link element.
// -----------------------------------------------------------------------------
//
void CAtomFeedParser::ElementHandlerLinkL(const CFeedParser& /*aParser*/, CXmlUtils& aXmlUtils, 
        TXmlEngElement aNode, TInt aValueId, MFeedParserObserver& aObserver)
    {
    HBufC*  rel = NULL;
    HBufC*  href = NULL;
    
    // Get the link's relationship.
    rel = aXmlUtils.AttributeL(aNode, KRel);
    CleanupStack::PushL(rel);
        
    // Get the link's url.
    // TODO: Resolve the href using the base element or feed url.
    href = aXmlUtils.AttributeL(aNode, KHref);
    CleanupStack::PushL(href);

    if ((href == NULL) || (href->Length() == 0))
        {
        CleanupStack::PopAndDestroy(href);
        CleanupStack::PopAndDestroy(rel);
        
        return;
        }

    // The link points to an item's full story or feed's main web page.
    if ((rel == NULL) || (rel->CompareF(KAlternate) == 0))
        {
        aObserver.AddAttributeL(aValueId, *href);
        }
                
    // The link points to an enclsoure.
    else if (rel->CompareF(KEnclosure) == 0)
        {
        HBufC*  type = NULL;
        HBufC*  title = NULL;
        HBufC*  length = NULL;
            
        type = aXmlUtils.AttributeL(aNode, KType);
        CleanupStack::PushL(type);
        title = aXmlUtils.AttributeL(aNode, KTitle);
        CleanupStack::PushL(title);
        length = aXmlUtils.AttributeL(aNode, KLength);
        CleanupStack::PushL(length);

        aObserver.EnclosureBeginsL();

        if (type != NULL)
            {                    
            aObserver.AddAttributeL(EEnclosureAttributeContentType, *type);
            }
        if (length != NULL)
            {                    
            aObserver.AddAttributeL(EEnclosureAttributeSize, *length);
            }
        if (href != NULL)
            {                    
            aObserver.AddAttributeL(EEnclosureAttributeLink, *href);
            }
        if (title != NULL)
            {                    
            aObserver.AddAttributeL(EEnclosureAttributeTitle, *title);
            }

        aObserver.EnclosureEndsL();

        CleanupStack::PopAndDestroy(length);
        CleanupStack::PopAndDestroy(title);
        CleanupStack::PopAndDestroy(type);
        }
    
    CleanupStack::PopAndDestroy(href);
    CleanupStack::PopAndDestroy(rel);
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:78,代码来源:AtomFeedParser.cpp

示例4: FileNamesEqual

// ---------------------------------------------------------------------------
// FileNamesEqual()
// ---------------------------------------------------------------------------
//
TBool FileNamesEqual( const HBufC& aFile1, const HBufC& aFile2 )
    {
    return ( aFile1.CompareF( aFile2 ) == 0 );
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:8,代码来源:mt_startuplistupdaterblocks.cpp

示例5: OkToExitL

TBool CConfigureCDSDialog::OkToExitL(TInt aButtonId)
	{
	LOG_MSG( "-> CConfigureCDSDialog::OkToExitL" );
	TBool ret = ETrue;
	TInt err;

	RPointerArray<CEikEdwin> edwins;
	CEikEdwin *edwin = static_cast<CEikEdwin*>(Control(EEdwin1));
	edwins.Append(edwin);
	edwin = static_cast<CEikEdwin*>(Control(EEdwin2));
	edwins.Append(edwin);
	edwin = static_cast<CEikEdwin*>(Control(EEdwin3));
	edwins.Append(edwin);
	edwin = static_cast<CEikEdwin*>(Control(EEdwin4));
	edwins.Append(edwin);
	edwin = static_cast<CEikEdwin*>(Control(EEdwin5));
	edwins.Append(edwin);
	edwin = static_cast<CEikEdwin*>(Control(EEdwin6));
	edwins.Append(edwin);
	edwin = static_cast<CEikEdwin*>(Control(EEdwin7));
	edwins.Append(edwin);

	switch (aButtonId)
		{
		case EEikBidCancel:
			{
			//RDebug::Print(_L("CConfigureCDSDialog::OkToExitL: Cancel pressed"));
			}
			break;
		case EBidCDSConfigure:
			{
			//RDebug::Print(_L("CConfigureCDSDialog::OkToExitL: iConfs.Count() == %d"), iConfs.Count());
			for (TInt i = 0; ( i < iConfs.Count() ) && ret; i++)
				{
				err = KErrNone;

				HBufC *input = NULL;
				if (edwins[i]->TextLength() > 0)
					{
					input = edwins[i]->GetTextInHBufL();
					}
				if ( ! input )
					{
					LOG_MSG2( "  NULL input for param %d" , i );
					continue;
					}

				//RDebug::Print(_L("CConfigureCDSDialog::OkToExitL: iConfs[i]->Type() == %d"), iConfs[i]->Type());

				switch (iConfs[i]->Type())
					{
					case COptionConfig::ETInt:
					case COptionConfig::ETUInt:
						{
						TLex opts(*input);
						TInt32 conf;
						err = opts.Val(conf);
						if ( err )
							{
							LOG_MSG("  error from opts.Val(conf) -> CConfigureCDSDialog::CEikonEnv::Static()->InfoMsg;" );
							CEikonEnv::Static()->InfoMsg(_L("Value must be an integer"));
							break;
							}

						//RDebug::Print(_L("CConfigureCDSDialog::OkToExitL: conf == %d"), conf);
						iConfs[i]->Value(conf);
						TRAP( err, iCoreDumpSession.SetConfigParameterL( *iConfs[i]) );
						}
						break;

					case COptionConfig::ETFileName:
					case COptionConfig::ETString:
					case COptionConfig::ETSingleEntryEnum:
					case COptionConfig::ETMultiEntryEnum:
						{						
						TRAP( err, iConfs[i]->ValueL(*input) );
						if ( KErrNone == err )
							{
							TRAP( err, iCoreDumpSession.SetConfigParameterL( *iConfs[i]) );
							}
						}
						break;

					case COptionConfig::ETBool:
						if (input->CompareF(_L("True"))== 0)
							{
							iConfs[i]->Value(ETrue);
							iConfs[i]->ValueL(_L("True"));
							}
						else if (input->CompareF(_L("False"))== 0)
							{
							iConfs[i]->Value(EFalse);
							iConfs[i]->ValueL(_L("False"));
							}
						else
							{
							err = KErrCorrupt;
							}

						if ( KErrNone == err )
//.........这里部分代码省略.........
开发者ID:fedor4ever,项目名称:devicedbgsrvs,代码行数:101,代码来源:coredumpcdsdialog.cpp


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