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


C++ CDesCArray::MdcaCount方法代码示例

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


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

示例1: AddIdentitiesInManyExceptL

// ---------------------------------------------------------------------------
// TPresCondIdentityMany::AddIdentitiesInManyExceptL()
// ---------------------------------------------------------------------------
//
EXPORT_C TInt TPresCondIdentityMany::AddIdentitiesInManyExceptL(const TDesC& aRuleID,
        const CDesCArray& aIds, const TDesC& aDomain)
{
    OPENG_DP(D_OPENG_LIT( "TPresCondIdentityMany::AddIdentitiesInManyExceptL()" ) );
    OPENG_DP(D_OPENG_LIT( "     aRuleID:%S,aDomain:%S"),
             &aRuleID, &aDomain);

    TInt ret(KErrNotFound);

    RPointerArray<CXdmDocumentNode> nodes;
    CXdmDocumentNode* exceptNode(NULL);
    CXdmNodeAttribute* idattr(NULL);

    CXdmDocumentNode* manyNode = GetManyNodeL(aRuleID, EFalse, aDomain);
    TInt entitiesCount = aIds.MdcaCount();
    if(manyNode!=NULL)
    {
        for (TInt i = 0; i<entitiesCount; i++)
        {
            // if id doesnt exists in except
            if (!(IsIdentityExistsInManyExceptL(aRuleID, aIds.MdcaPoint(i), aDomain)))
            {
                exceptNode = manyNode->CreateChileNodeL(KXdmExcept);
                idattr = exceptNode->CreateAttributeL(KXdmId);
                idattr->SetAttributeValueL(aIds.MdcaPoint(i));
                ret = KErrNone;
            }
        }
        ret = KErrNone;
    }

    OPENG_DP(D_OPENG_LIT( "     return: %d"),ret);
    nodes.Close();
    return ret;
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:39,代码来源:prescondidentitymany.cpp

示例2: CreateAndExecuteSettingPageL

// --------------------------------------------------------------------------
// UPnPAppSettingPageHomeIAP::CreateAndExecuteSettingPageL ()
// --------------------------------------------------------------------------
//
void UPnPAppSettingItemHomeIAP::CreateAndExecuteSettingPageL()
    {
    __LOG8_1( "%s begin.", __PRETTY_FUNCTION__ );
    // if sharing is on, only information note is displayed
    UPnPAVControllerFactory::TAVControllerServerStatus status;
    UPnPAVControllerFactory::Status( status );
    if ( iSharingState || status == UPnPAVControllerFactory::EStatusActive )
        {
        CAknInformationNote* note = new (ELeave) CAknInformationNote;
        CleanupStack::PushL(note);
        HBufC* noteText = iCoeEnv->AllocReadResourceLC(
            R_QTN_IUPNP_IAP_TURN_SHARING_OFF);
        note->ExecuteLD(*noteText);
        CleanupStack::PopAndDestroy(noteText);
        CleanupStack::Pop(note);
        return;
        }

    // Resets the member array for iap ids.
    // Creates new array for iap names.
    iIAPIdArray.Reset();
    CDesCArray* array = new (ELeave) CDesCArrayFlat(5);
    CleanupStack::PushL(array);

    // adds static setting page items from resource
    // and stores the number of static items.
    AddStaticItemsL(array);
    TInt staticItemCount = array->Count();
    
    // adds wlan access points, array GETS the ownership
    CUPnPSettingsEngine::GetWLANAccessPointsL( array, iIAPIdArray );
    
    MAknQueryValue* qValue = QueryValue();
    User::LeaveIfNull(qValue);
    LoadL();
    StoreL();

    TInt idx = GetIAPIndex( staticItemCount );
    if ( idx >= array->MdcaCount() )
        {
        idx = array->MdcaCount() - 1;
        }
    // setting page is launched
    CAknSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage(
        SettingPageResourceId(),
        idx,
        array);

    if (dlg->ExecuteLD())
        {
        switch (idx)
            {
            case EUPnPSettingsEngineIAPItemNone:
                {
                DisplayInfoL(R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT,
                             R_IBU_GALLERY_UPDATE_NOTAVAIL_NOTE_TEXT,
                             R_HOMECONNECT_INFO_QUERY);
                qValue->SetCurrentValueIndex(EUPnPSettingsEngineIAPItemNone);
                iIAPId = EUPnPSettingsEngineIAPIdNone;
                iIAPSetting = EUPnPSettingsEngineIAPItemNone;
                break;
                }
            case EUPnPSettingsEngineIAPItemAlwaysAsk:
                {
                qValue->SetCurrentValueIndex(EUPnPSettingsEngineIAPItemAlwaysAsk);
                iIAPId = EUPnPSettingsEngineIAPIdAlwaysAsk;
                iIAPSetting = EUPnPSettingsEngineIAPItemAlwaysAsk;
                DisplayInfoL(R_IBU_GALLERY_UPDATE_NOTE_TITLE_TEXT,
                             R_IBU_GALLERY_UPDATE_NOTE_TEXT,
                             R_HOMECONNECT_INFO_QUERY);
                break;
                }
            case EUPnPSettingsEngineIAPItemUserDefined: // Create new
                {
                // new iap wlan iap creation is started here
                
                TInt old_iap = iIAPId;
                
                CUPnPSettingsEngine::CreateAccessPointL();
                
                //We have to re-get all the wlan iaps again since
                //user may modify the iap list   
                RArray<TInt64> newArray;
                CleanupClosePushL( newArray );
                
                //We only are interested in the iap ids
                CUPnPSettingsEngine::GetWLANAccessPointsL(
                                                    NULL, 
                                                    newArray );
                
                if( newArray.Count() <= 0 ) //if no iap exisits
                    {
                    //if previous iap is not "None" or "Always ask"
                    if( old_iap > EUPnPSettingsEngineIAPIdAlwaysAsk )
                        {
                        DisplayInfoL(
//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:101,代码来源:upnpappsettingitemhomeiap.cpp

示例3: CompareLogsL

LOCAL_C TBool CompareLogsL()
	{
	TBool errorOccured = EFalse;

	CDesCArray* correctFile = new (ELeave) CDesCArrayFlat(1);
	CPtrCArray* resultFile = new (ELeave) CPtrCArray(1);

	TParse parsedFileName;
	TParse parsedResultFileName;
	TFileName name;
	name.Append(KOkFileNameEntryStructure);
	testUtils->ResolveFile(KComponent, name, parsedFileName);
	correctFile->AppendL(parsedFileName.FullName());
	name.Zero();
	name.Copy(KFileNameEntryStructure);
	testUtils->ResolveLogFile(name, parsedResultFileName);
	resultFile->AppendL(parsedResultFileName.FullName());

	RFileReadStream file1;
	RFileReadStream file2;
	HBufC8* line1Buffer = HBufC8::NewLC(1024);
	TPtr8 line1 = line1Buffer->Des();
	TBuf8<1> aChar1;

	HBufC8* line2Buffer = HBufC8::NewLC(1024);
	TPtr8 line2 = line2Buffer->Des();
	TBuf8<1> aChar2;

	for(TInt i=0; i<correctFile->MdcaCount(); i++)
		{
		TFileName file1Name = correctFile->MdcaPoint(i);

		TFileName file2Name = resultFile->MdcaPoint(i);

		TInt error1=KErrNone;
		TInt error2=KErrNone;
		
		test.Printf(_L("\n%s"), file2Name.PtrZ());

		error1=file1.Open(testUtils->FileSession(), file1Name, EFileShareAny);
		if(error1!=KErrNone)
			{
			errorOccured = ETrue;
			}
		else
			{
			error2=file2.Open(testUtils->FileSession(), file2Name, EFileShareAny);
			if(error2!=KErrNone)
				{
				errorOccured = ETrue;
				}
			}
		
		if((error1==KErrNone)&&(error2==KErrNone))
			{
			// read the file into the conversion object
			TBool finished = EFalse;
	
			do	{
				line1.FillZ();
				line1.SetLength(0);
				// compile the lines one char at a time
				do	{
					TRAPD( error, file1.ReadL(aChar1, 1) ); 
					if (error!=KErrEof)
						line1.Append(aChar1);
					else
						{
						finished = ETrue;
						break;
						}
					// stop at the end of line or no more data
					}
				while((aChar1[0]!=0x0A)&&(line1.Length()<1024));

				line2.FillZ();
				line2.SetLength(0);
				do	{
					TRAPD( error, file2.ReadL(aChar2, 1) ); 
					if (error!=KErrEof)
						line2.Append(aChar2);
					else
						{
						finished = ETrue;
						break;
						}
					// stop at the end of line or no more data
					}
				while((aChar2[0]!=0x0A)&&(line2.Length()<1024));
				
				// get rid of white space
				line1.TrimRight();
				line2.TrimRight();

   				if(line1.Compare(line2) != 0)
					{
					// error so no point in continuing to compare!!
					errorOccured = ETrue;
					file1.Close();
					file2.Close();
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:101,代码来源:T_imcm02d2.cpp

示例4: switch


//.........这里部分代码省略.........
                if (aExtension && aExtension->Critical())
                    {
                    GetAltNamePartL( *altNameExt, EX509DirectoryName, 
                                     aNameArray );                                   
                    }
                break;
                }
            case ECritAltIPAddress:
                {
                if (aExtension && aExtension->Critical())
                    {
                    GetAltNamePartL( *altNameExt, EX509IPAddress, 
                                     aNameArray );                                   
                    }
                break;
                } 
            case EAltRFC822Name:
                {
                if (aExtension)
                    {
                    GetAltNamePartL( *altNameExt, EX509RFC822Name, 
                                      aNameArray );
                    }
                break;
                }
            case EAltURI:
                {
                if ( aExtension )
                    {
                    GetAltNamePartL( *altNameExt, EX509URI, aNameArray );
                    }
                break;
                }
            case EAltDNSName:
                {
                if ( aExtension )
                    {
                    GetAltNamePartL( *altNameExt, EX509DNSName, aNameArray );
                    }  
                break;
                }
            case EDNCountryName:
                {
                GetDNPartL( aDN, KX520CountryName, aNameArray );
                break;
                }
            case EDNStateOrProvinceName:
                {
                GetDNPartL( aDN, KX520StateOrProvinceName, aNameArray );
                break;
                }
            case EDNLocalityName:
                {
                GetDNPartL( aDN, KX520LocalityName, aNameArray );
                break;
                }
            case EAltDirectoryName:
                {
                if ( aExtension )
                    {
                    GetAltNamePartL( *altNameExt, EX509DirectoryName, 
                                     aNameArray );
                    }
                break;
                }
            case EAltIPAddress:
                {
                if ( aExtension )
                    {
                    GetAltNamePartL( *altNameExt, EX509IPAddress, 
                                     aNameArray );                                   
                    }
                break;
                }    
            default:
                {
                // All the names are gone through.
                notFound = EFalse;
                break;
                }
            } // switch

        if ( notFound ) 
            {
            // If caller is PrimaryAndSecondaryNameL and PrimaryName and
            // SecondaryName have found then end loop.
            if ( aNameType == EX509CNPPrimAndSecond &&  
               ( aNameArray.MdcaCount() >= KX509CNPPrimAndSecondNameLengh ) )
                {
                notFound = EFalse;    
                } // if
            } // if 
        } // for
    
    if ( aExtension )
        {
        CleanupStack::PopAndDestroy(); // altNameExt
        }
    return KErrNone;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:101,代码来源:X509CertNameParser.cpp

示例5: GetFolder

void CPhotoListView::GetFolder()
{
	TInt PopValue;	
	//TBuf<150> msg;
	TInt count=0;	
	
	CDesCArray* items = iPhotosAppUi->GetFolderList();	
    CDesCArray* foldernames = iPhotosAppUi->ReturnText();

	if (items == NULL)
	{
		Count = 0;
		items = new (ELeave) CDesCArrayFlat(1);
		items->AppendL(foldernames->MdcaPoint(0));
	}
	else
	{
		Count = items->MdcaCount();	
		items->AppendL(foldernames->MdcaPoint(0));
	}
	foldernames->Reset();

	CEikTextListBox* list = new( ELeave ) CAknSinglePopupMenuStyleListBox;
    CleanupStack::PushL( list );

    CAknPopupList* popupList = CAknPopupList::NewL(
       list,
       R_AVKON_SOFTKEYS_SELECT_CANCEL,
       AknPopupLayouts::EMenuWindow);

    CleanupStack::PushL( popupList );
    
    popupList->SetMaximumHeight(2);

    list->ConstructL( popupList, CEikListBox::ELeftDownInViewRect );
    list->CreateScrollBarFrameL( ETrue );
    list->ScrollBarFrame()->SetScrollBarVisibilityL(
		   CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );

    CTextListBoxModel* model = list->Model();
    model->SetItemTextArray( items );
    model->SetOwnershipType( ELbmOwnsItemArray );
	
	count = GetPhotoCount();

//	TInt price;
//	TLex lex(iPhotosAppUi->iCharge);
//	lex.Val(price);
//	count = count * price;

//	TBuf<30> temp;
//	temp.AppendNum(count);	

//	msg.Copy(_L("Charge "));
//	msg.Append(temp);
//	msg.Append(_L(" pesos"));

	//msg.Copy(_L("Select Album:"));
	//msg.Copy(*(iEikonEnv->AllocReadResourceL(R_IMAGES_SELECT_ALBUM)));
	
	/*count = count / 3;
	temp.Copy(_L(""));
	temp.AppendNum(count);

	path = iPhotosAppUi->ImageFolderPath();
	if(path == 0 || path == 1)			
		msg.Append(_L(" Photos)"));
	else if(path == 2 || path == 3)
		msg.Append(_L(" Videos)"));*/

	popupList->SetTitleL(*(iEikonEnv->AllocReadResourceL(R_IMAGES_SELECT_ALBUM)));

	PopValue = popupList->ExecuteLD();		
	
	if(PopValue==0)
	{
		iFolderStatus=-1;
	}
	else if(PopValue==1)
	{
		PopValue=list->CurrentItemIndex();		
		iFolderStatus=PopValue;		
		TPtrC ptr1(items->MdcaPoint(PopValue));
		comment.Copy(ptr1);		
	}
	
	items->Reset();
	CleanupStack::Pop(); // popupList
    CleanupStack::PopAndDestroy(); // list	

}
开发者ID:deepakprabhakara,项目名称:ripplevault,代码行数:91,代码来源:photolistview.cpp


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