本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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;
}