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


C++ CMsvEntrySelection::CopyL方法代码示例

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


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

示例1:

// Delete
void CImImap4Compound::DeleteL(TRequestStatus& aStatus, const CMsvEntrySelection& aSourceSel)
	{
	LOG_COMMANDS( (iSession->LogText(_L8("COMPOUND Delete selection"))));

	Queue(aStatus);

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

	// Find the offending source folder
	if ((iSourceFolder=FindFolderL(iSource))==NULL)
		{
		Complete(KErrNotFound);
		return;
		}

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

示例2: RemoveFromSelectionL

/**
Provides the sync class with an array of messages that are not to be fetched according
to the download rules. This function is called by the background sync controller if a
fetch command is received by the server MTM is performing a background synchronise, and
allows the sync operation to prevent attempts to simultaneously fetch the same message
via multiple imap sessions.

If message content fetch is already underway, then the array is passed to the 
CImapCompoundCopyToLocal object for immediate checking. The array is then stored
within this class and each subsequent copy to local operation is checked for matching
message id's.

Note that it is possible for a message ID to be remove from the passed entry selection
in the case that that message is currently being fetched at the time of calling this
function.

@param aSelection - the selection of messages that should not be autofetched
*/
void CImapCompoundSyncService::RemoveFromSelectionL(CMsvEntrySelection& aDeleteSel)
	{
	if (iCurrentStep == ESyncFolderAutoFetch ||
	    iCurrentStep == ESyncInboxAutoFetch  ||
	    iCurrentStep == ESyncFolderAutoFetchCheck)
		{
		((CImapCompoundCopyToLocal*)iImapCompound)->RemoveFromSelection(aDeleteSel);
		}

	// keep a copy of this selection to prevent future fetch clashes.
	delete iDoNotFetchSel;
	iDoNotFetchSel = aDeleteSel.CopyL();
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:31,代码来源:cimapcompoundsyncservice.cpp

示例3: DoStartL

void CSchSendTestWaitForState::DoStartL(const CMsvEntrySelection& aSelection, TTimeIntervalMicroSeconds32 aAfter, TBool aWaitForever)
	{
	iTest(iSendingStates.Count() != 0);

	iAfter = aAfter;
	iWaitForever = aWaitForever;

	delete iSelection;
	iSelection = NULL;
	iSelection = aSelection.CopyL();

	iTimer.After(iStatus, iAfter);
	SetActive();

	CActiveScheduler::Start();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:16,代码来源:t_schsendutils.cpp

示例4: ChangeAttributes

EXPORT_C TInt CMsvServerEntry::ChangeAttributes(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes)
//
//
//
/** Provides a quick way to set or clear multiple fields in a selection of entries.

Fields to change are specified using a bitmask of TMsvAttribute values. Possible
fields that can be changed using this function are:

1. PC synchronisation

2. Visibility flag

3. Read flag

4. In-preparation flag

5. Connected flag

6. New flag

@param aSelection The entries to change
@param aSetAttributes A bitmask of the fields to set
@param aClearAttributes A bitmask of the fields to clear
@return KErrNone if successful, otherwise one of the system-wide error codes.
KErrNotFound if a specified entry does not exist.
@see TMsvAttribute */
	{
	__ASSERT_DEBUG(iEntry.Id()!=KMsvNullIndexEntryId, PanicServer(EMsvEntryWithNoContext11));

	// only change children
	if (!AreChildren(aSelection))
		return KErrNotFound;

	// get a copy of the selection
	CMsvEntrySelection* changedEntries=NULL;
	TRAPD(error, changedEntries = aSelection.CopyL());
	if (error)
		return error;

	// lock all the selection
	TInt count1=aSelection.Count();
	while (count1--)
		{
		error = iServer.IndexAdapter().LockEntry(aSelection.At(count1));
		if (error)
			break;
		}

	// change the attributes if all were locked
	if (error==KErrNone)
		{
		error = iServer.IndexAdapter().ChangeAttributes(*changedEntries, aSetAttributes, aClearAttributes);
		}

	// release all that were locked
	TInt count2=aSelection.Count();
	while (--count2>count1)
		{
		iServer.IndexAdapter().ReleaseEntry(aSelection.At(count2));
		}


	// notify server if any have been changed
	if (error==KErrNone && changedEntries->Count())
		iServer.NotifyChanged(EMsvEntriesChanged, *changedEntries, iEntry.Id());

	delete changedEntries;

	return error;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:71,代码来源:MSVENTRY.CPP


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