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


C++ CMsvEntrySelection类代码示例

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


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

示例1: NM_COMMENT

// ----------------------------------------------------------------------------
// CIpsPlgPop3ConnectOp::DoPopulateL()
// ----------------------------------------------------------------------------
//
void CIpsPlgPop3ConnectOp::DoPopulateL()
    {
    FUNC_LOG;
    NM_COMMENT("CIpsPlgPop3ConnectOp: populating");
    // <qmail> unnecessary: iStatus = KRequestPending;

    // Prepare parameters and include filtering
    TImPop3PopulateOptions pop3GetMailInfo;
    pop3GetMailInfo.SetMaxEmailSize( KMaxTInt32 );
// <qmail>
    pop3GetMailInfo.SetPopulationLimit( GetPopulateLimitFromSettingsL() );
    TPckgBuf<TImPop3PopulateOptions> params( pop3GetMailInfo );

    // <qmail> selection is no longer a member variable
    CMsvEntrySelection* selection = new(ELeave) CMsvEntrySelection;
    CleanupStack::PushL( selection );
    selection->InsertL( 0, iService );
    iBaseMtm->SwitchCurrentEntryL( iService );
    // Start the fetch operation
    InvokeClientMtmAsyncFunctionL( KPOP3MTMPopulateAll, *selection, params ); // <qmail> 1 param removed
    SetActive();
    CleanupStack::PopAndDestroy( selection );
// <qmail> iEventHandler->SetNewPropertyEvent call removed from here
// </qmail>
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:29,代码来源:ipsplgpop3connectop.cpp

示例2: new

// methods from CSendAsEditUtils
void CSendAsTestEditUtils::LaunchEditorL(TMsvId /*aId*/, TRequestStatus& aStatus)
	{

	CDummyObserver* ob1 = new(ELeave) CDummyObserver;
	CleanupStack::PushL(ob1);

	CMsvSession* session = CMsvSession::OpenSyncL(*ob1);
	CleanupStack::PushL(session);

	CMsvEntry* cEntry = CMsvEntry::NewL(*session, KMsvDraftEntryId, 
		TMsvSelectionOrdering(KMsvNoGrouping,EMsvSortByNone,ETrue));
	CleanupStack::PushL(cEntry);

	CMsvEntrySelection* selection = cEntry->ChildrenL();
	CleanupStack::PushL(selection);

	CMsvEntry* cEntry2 = session->GetEntryL(selection->At(0));
	CleanupStack::PushL(cEntry2);

	TMsvEntry entry = cEntry2->Entry();
	entry.SetMtmData3(234567890); // Show we've been called by touching the TMsvEntry.
	cEntry2->ChangeL(entry);
	
	CleanupStack::PopAndDestroy(5, ob1); // cEntry2, selection, cEntry, session, ob1

	iUserStatus = &aStatus;
	aStatus = KRequestPending;
	// wait a few seconds before completing
	iEditTimer->After(KSendAsTestEditWaitTime);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:31,代码来源:csendastesteditutils.cpp

示例3: INFO_PRINTF1

void CT_CMsvSession::TestIncPcSyncCountL()
	{
	TInt error = KErrGeneral;
	INFO_PRINTF1(_L("Testing: Increment PC Sync Count -- started"));
	TRAP(error, iSession = CMsvSession::OpenSyncL(*this));
	TEST(error == KErrNone);

	CMsvOperationWait* active = CMsvOperationWait::NewLC();
	
	CMsvEntry* cEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, TMsvSelectionOrdering());
	CleanupStack::PushL(cEntry);
	
	CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
	CleanupStack::PushL(selection);

	TInt ret = iSession->InstallMtmGroup(KDataComponentFilename);
	TEST(ret==KErrNone|| ret==KErrAlreadyExists);

	cEntry->SetEntryL(KMsvRootIndexEntryId);
	TMsvEntry service;
	service.iType=KUidMsvServiceEntry;
	service.iMtm = KUidTestServerMtmType;
	cEntry->CreateL(service);

	selection->AppendL(service.Id());
	
	TBuf8<256> progress;
	TBuf8<32> param;
	TRAP(error, iSession->IncPcSyncCountL(*selection);)
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:29,代码来源:t_cmsvsession.cpp

示例4: new

EXPORT_C void CMsvTestUtils::DeleteServiceL(TUid aMtm)
	{
	CMsvEntrySelection* sel = new (ELeave) CMsvEntrySelection();
	CleanupStack::PushL(sel);
	TMsvId firstId = 0;
	TRAPD(err, ServiceIdL(aMtm, firstId, sel));
	
	if (!err)
		{
		TInt count = sel->Count();

		while (count--)
			{
			TMsvId del = sel->At(count);
			TRAP(err, SetEntryL(del));

			if (!err)
				{
				TRAP(err, SetEntryL(Entry().Parent()));

				if (!err)
					{
					TRAP(err, DeleteEntryL(del));
					}
				}

			if (err)
				{
				Printf(_L("Error deleting service entry\n"));
				}
			}
		}

	CleanupStack::PopAndDestroy(); //sel
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:35,代码来源:msvtestutils.cpp

示例5:

void CImImap4Compound::GenericCopyL(TRequestStatus& aStatus, const CMsvEntrySelection& aSourceSel, const TMsvId aDestination, TInt* aSequence)
	{
	DBG((iSession->LogText(_L8("CImImap4Compound::GenericCopyL()"))));
 	Queue(aStatus);

	// Save parameters
	iSource=aSourceSel[0];
	delete iSourceSel;
	iSourceSel = NULL;
	iSourceSel=aSourceSel.CopyL();
	iDestinationFolder=aDestination;
	iMessageSelection=iSelectionStillToCopy=iSelectionStillToDelete=aSourceSel.Count();

	// Check that selection elements are contiguous. Just call Copy on contiguous selections.
	
	iSourceFolder=FindFolderL((*iSourceSel)[iSelectionStillToCopy-1]);

	// Find the offending source folder
	if (iSourceFolder == NULL &&
		aSequence != SeqMoveFromLocal && aSequence != SeqCopyFromLocal)
		{
		Complete(KErrNotFound);
		return;
		}

	// Select it
	iStep=0;
	iSequence=aSequence;
	DoRunL();
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:30,代码来源:IMAPCOMP.CPP

示例6: LoadSettingsL

// ----------------------------------------------------------------------------
// ---------------------------------------------------------------------------- 
void CIpsSosAOImapAgent::StartSyncL()
    {
    FUNC_LOG;
    if ( iOngoingOp )
        {
        User::Leave( KErrNotReady );
        }
    LoadSettingsL( );
    if ( !IsConnected() )
        {
        NM_COMMENT("CIpsSosAOImapAgent: starting sync");
        TPckg<MMsvImapConnectionObserver*> parameter(this);
        // connect and synchronise starts background sync or idle
        CMsvEntrySelection* sel = new ( ELeave ) CMsvEntrySelection();
        CleanupStack::PushL( sel );
        sel->AppendL( iServiceId );
        iImapClientMtm->SwitchCurrentEntryL( iServiceId );
        iOngoingOp = iImapClientMtm->InvokeAsyncFunctionL(
                KIMAP4MTMConnectAndSyncCompleteAfterFullSync, 
                *sel, parameter, iStatus);
        CleanupStack::PopAndDestroy( sel );
        SetActive();
        iState = EStateConnectAndSync;
        }
    else
        {
        NM_COMMENT("CIpsSosAOImapAgent: already connected do not sync");
        // do not do anything if we are connected, especially do never
        // try to sync if sync is is already started (ex. from ips plugin)
        // that cause problems with imap flags etc.
        iError = KErrCancel;
        iState = EStateCompleted;
        SetActiveAndCompleteThis();
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:37,代码来源:IpsSosAOImapAgent.cpp

示例7: found

// -----------------------------------------------------------------------------
// CMmsAdapterMsvApi::FindUserFolderL
// -----------------------------------------------------------------------------
//    
TBool CMmsAdapterMsvApi::FindUserFolderL( TMsvId aFolder, TPtrC& aName, TTime& aDate )
    {
    TBool found( EFalse );
    
    CMsvEntry* entry = iSession.GetEntryL( KMsvMyFoldersEntryIdValue );
    CleanupStack::PushL( entry );
     
    CMsvEntrySelection* selection = entry->ChildrenL();
    CleanupStack::PushL( selection );
    
    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 && entryT.Id() == aFolder )
            {
            found = ETrue;
            aDate = entryT.iDate;
            aName.Set( entryT.iDetails );
            break;
            }
        }
    
    CleanupStack::PopAndDestroy( selection );
    CleanupStack::PopAndDestroy( entry ); 
    
    return found;        
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:mmsadaptermsvapi.cpp

示例8: new

EXPORT_C void CMsvServerEntry::CopyEntryL(TMsvId aId, TMsvId aDestination, TRequestStatus& aObserverStatus)
//
// Recursively copies a child of the context to another entry that belongs to a different service.
//
/** Copies a child of the context to another entry. All descendants will be copied
as well.

The copy is carried out asynchronously. The caller should supply in aObserverStatus
the status word of an active object that it owns. The function will signal
this to be completed when the copy is complete.

If the function leaves, no changes are made.

@param aId The ID of the entry to copy
@param aDestination The ID of new parent
@param aObserverStatus The request status to be completed when the operation
has finished
@leave KErrArgument The destination is a child of an aSelection entry
@leave KErrInUse The store or a file associated with an entry is open
@leave KErrNoMemory A memory allocation failed
@leave KErrNotFound An aSelection entry is not a child of the context
@leave KErrPathNotFound The destination does not exist */
	{
	CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
	CleanupStack::PushL(selection);
	selection->AppendL(aId);
	iCompletedSelection = NULL;
	iCompletedEntryId = NULL;

	DoCopyEntriesL(*selection, aDestination, aObserverStatus);

	CleanupStack::PopAndDestroy(); // selection
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:33,代码来源:MSVENTRY.CPP

示例9: __ASSERT_DEBUG

void CMsvServerEntry::DoMoveEntriesL(CMsvEntrySelection& aSelection, TMsvId aDestination, CMsvEntrySelection*& aMoved)
	{
	__ASSERT_DEBUG(!aMoved, PanicServer(EMsvMoveSelectionNotNull));
	__ASSERT_DEBUG(aSelection.Count() > 0, PanicServer(EMsvMovingEmptySelection));

	aMoved = new(ELeave)CMsvEntrySelection;
	aMoved->SetReserveL(aSelection.Count());

	CMsvMove* move = CMsvMove::NewL(iServer);
	CleanupStack::PushL(move);

	TInt error = KErrNone;

	TInt count = aSelection.Count();
	while(count--)
		{
		TMsvId id = aSelection.At(count);
		if (!IsAChild(id))
			error = KErrNotFound;
		else
			{
			move->StartL(id, aDestination);
			aSelection.Delete(count);
			aMoved->AppendL(id);
			}
		}
	User::LeaveIfError(error);
	CleanupStack::PopAndDestroy(); // move
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:29,代码来源:MSVENTRY.CPP

示例10: CancelMoveEntry

EXPORT_C void CMsvServerEntry::MoveEntryL(TMsvId aId, TMsvId aDestination, TRequestStatus& aObserverStatus)
//
//
//
/** Moves a child of the context to another entry that belongs to a different service.
All descendants will be moved as well.

The move is carried out asynchronously. The caller should supply in aObserverStatus
the status word of an active object that it owns. The function will signal
this to be completed when the move is complete.

If the function leaves, no changes are made.

In pre-Unicode versions an asynchronous move can be cancelled through CancelMoveEntry();
in other releases, use Cancel().

@param aId The ID of the entry to move
@param aDestination The ID of new parent
@param aObserverStatus The request status to be completed when the operation
has finished
@leave KErrArgument The destination is a child of aId
@leave KErrInUse The store or a file associated with the entry is open
@leave KErrNoMemory A memory allocation failed
@leave KErrNotFound aId is not a child of the context
@leave KErrPathNotFound The destination does not exist */
	{
	CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
	CleanupStack::PushL(selection);
	selection->AppendL(aId);

	MoveEntriesL(*selection, aDestination, aObserverStatus);

	CleanupStack::PopAndDestroy(); // selection
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:34,代码来源:MSVENTRY.CPP

示例11: new

TMsvId CTestImapSyncManager::FindFolderL(const TDesC& aName, TBool aCaseSensitive)
	{
	TMsvId remoteId = KErrNotFound;
	iEntry->SetEntry(iServiceId);
	CMsvEntrySelection* msvEntrySelection = new (ELeave) CMsvEntrySelection;
	iEntry->GetChildren(*msvEntrySelection);
	TPtrC iEntryName = aName;
	TInt count = msvEntrySelection->Count();
	for (TInt i=0; i<count; i++) 
		{	
		iEntry->SetEntry((*msvEntrySelection)[i]);
		
		if (aCaseSensitive)
			{
			if (iEntryName.Compare(iEntry->Entry().iDetails ) == 0)
				{
				remoteId = (*msvEntrySelection)[i];
				break;
				}
			}
		else if ((iEntryName.CompareF(iEntry->Entry().iDetails) == 0))
			{
			remoteId = (*msvEntrySelection)[i];
			break;
			}
		}
		delete msvEntrySelection;
	return remoteId;	
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:29,代码来源:ctestimapsyncmanager.cpp

示例12: 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

示例13: new

void CBulkCommitServerMtm::ConstructL()
	{	
	// Get the entry id for the bulkcommit service entry.
	User::LeaveIfError(iServerEntry->SetEntry(KMsvRootIndexEntryId));
	CMsvEntrySelection* sel = new (ELeave) CMsvEntrySelection();
	CleanupStack::PushL(sel);
	User::LeaveIfError(iServerEntry->GetChildrenWithMtm(KUidBulkCommitTestMtm, *sel));
	TInt count = sel->Count();
	if( count > 1 )	// should only be one service entry
		{
		User::Leave(KErrCorrupt);
		}
	if( count == 0 )
		{
		// Create the settings
		TMsvEntry serviceEntry;
		serviceEntry.iType= KUidMsvServiceEntry;
		serviceEntry.iMtm = KUidBulkCommitTestMtm;

		User::LeaveIfError(iServerEntry->CreateEntry(serviceEntry));
		iServiceId = serviceEntry.Id();		
		}
	else
		{
		iServiceId = sel->At(0);
		}
	CleanupStack::PopAndDestroy(sel);	
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:28,代码来源:cbulkcommitservermtm.cpp

示例14: GetEntryCountL

TInt CPartialDownloadStep::GetEntryCountL()
	{
	
	TImapAccount imapAccount=iImapClient->GetImapAccount();
	
	TMsvSelectionOrdering ordering;	

	//open the imap service entry
	CMsvEntry* imapService = CMsvEntry::NewL(*iSession,imapAccount.iImapService,ordering);
	CleanupStack::PushL(imapService);
	//get its children
	CMsvEntrySelection* msvEntrySelection;
	msvEntrySelection=imapService->ChildrenL();
	//open its child inbox entry
	CMsvEntry* inboxEntry = CMsvEntry::NewL(*iSession, (*msvEntrySelection)[0],ordering);
    CleanupStack::PushL(inboxEntry);
    
    //get the childeren of the inbox
    delete msvEntrySelection;
    msvEntrySelection=NULL;
    msvEntrySelection=inboxEntry->ChildrenL();
    //the count should be 2
    TInt count=msvEntrySelection->Count();
    
    delete msvEntrySelection;
    msvEntrySelection=NULL;	
	CleanupStack::PopAndDestroy(2,imapService);
	
	return count;
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:30,代码来源:T_PartialDownloadStep.cpp

示例15: BaseConstructL

// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
void CIpsPlgImap4PopulateOp::ConstructL( 
        const CMsvEntrySelection& aSel,
        TBool aDoFilterSelection )
    {
    FUNC_LOG;
    BaseConstructL( KUidMsgTypeIMAP4 );
    
    // <qmail> instantiation moved here
    iSelection = new ( ELeave ) CMsvEntrySelection();
    iTempSelection = new ( ELeave ) CMsvEntrySelection();

    if ( aDoFilterSelection )
        {
        FilterSelectionL( aSel );
        }
    else // no filtering; populate all
        {
        // first entry in selection is serviceId
        for ( TInt i = 1; i < aSel.Count(); i++ )
            {
            if ( aSel[i] != iService )
                {
                iSelection->AppendL( aSel.At(i) );
                }
            }
        }
    DoConnectL();
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:30,代码来源:ipsplgimap4populateop.cpp


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