本文整理汇总了C++中CMsvEntrySelection::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvEntrySelection::Reset方法的具体用法?C++ CMsvEntrySelection::Reset怎么用?C++ CMsvEntrySelection::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvEntrySelection
的用法示例。
在下文中一共展示了CMsvEntrySelection::Reset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Start
void CMultipleSessionObserver::Start(TMsvSessionEvent aType, TInt aParameter, TInt aParameter2)
{
iActive=ETrue;
iEvents=0;
iType=aType;
iSelection.Reset();
iParameter=aParameter;
iParameter2=aParameter2;
}
示例2: SetSubscriptionL
void CTestImapSyncManager::SetSubscriptionL(const TDesC& aName)
{
TBuf8<128> parameter;
TMsvId id = FindFolderL(aName);
CMsvEntrySelection* msvEntrySelection = new (ELeave) CMsvEntrySelection;
msvEntrySelection->Reset();
msvEntrySelection->AppendL(id);
iImapServerMtm->StartCommandL(*msvEntrySelection, KIMAP4MTMLocalSubscribe, parameter, iActiveWaiter->iStatus);
iActiveWaiter->WaitActive();
TBool sub = ((TMsvEmailEntry)iEntry->Entry()).LocalSubscription();
delete msvEntrySelection;
}
示例3: DoGetChildrenL
void CMsvServerEntry::DoGetChildrenL(TMsvId aServiceId, TUid aMtm, TUid aType, CMsvEntrySelection& aSelection)
{
__ASSERT_DEBUG(iEntry.Id()!=KMsvNullIndexEntryId, PanicServer(EMsvEntryWithNoContext8));
CMsvEntryFilter* filter = CMsvEntryFilter::NewLC();
filter->SetService(aServiceId);
filter->SetMtm(aMtm);
filter->SetType(aType);
filter->SetOrder(iOrdering);
filter->SetSortMtm(iMtm);
aSelection.Reset();
User::LeaveIfError(iServer.IndexAdapter().GetChildrenId(iEntry.Id(), *filter, aSelection));
CleanupStack::PopAndDestroy(); // filter
}
示例4: DoHandleSessionEventL
void CSessionObserver::DoHandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)
{
CMsvEntrySelection* selection=NULL;
iSelection.Reset();
iParameter=0;
iType = aEvent;
switch (iType)
{
case EMsvEntriesCreated:
selection= (CMsvEntrySelection*)aArg1;
#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
iParameter = UnmaskTMsvId(*(TMsvId*)aArg2);
#else
iParameter = *(TMsvId*)aArg2;
#endif
break;
case EMsvEntriesChanged:
selection= (CMsvEntrySelection*)aArg1;
break;
case EMsvEntriesDeleted:
selection= (CMsvEntrySelection*)aArg1;
#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
iParameter = UnmaskTMsvId(*(TMsvId*)aArg2);
#else
iParameter = *(TMsvId*)aArg2;
#endif
break;
case EMsvEntriesMoved:
selection = (CMsvEntrySelection*)aArg1;
#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
iParameter = UnmaskTMsvId(*(TMsvId*)aArg2);
iParameter2 = UnmaskTMsvId(*(TMsvId*)aArg3);
#else
iParameter = *(TMsvId*)aArg2;
iParameter2 = *(TMsvId*)aArg3;
#endif
break;
default:
break;
}
if (selection)
{
for (TInt count=0; count<selection->Count(); count++)
iSelection.AppendL(selection->At(count));
}
}
示例5: DoParseAgainL
void CTestNbssMtm::DoParseAgainL()
{
TBuf8<1>dummy;
iState = ENbssTestParse;
// add service entry and msg entry to selection passed to MTM
iSelection->Reset();
iSelection->AppendL((*iMsvSelection)[iFilesProcessed]);
#if defined _HEAP_FAILURE_TEST_
TBool finished=EFalse;
#ifdef _DEBUG
TInt failCount=0;
#endif
while (!finished)
{
__UHEAP_FAILNEXT(failCount++);
TRAPD(error,iNbssServerMtm->StartCommandL(*iSelection, KBiosMtmParse, dummy, iStatus));
if (error==KErrNone)
{
finished=ETrue;
__UHEAP_RESET;
}
else
{
test(error==KErrNoMemory);
__UHEAP_RESET;
}
}
#else
iNbssServerMtm->StartCommandL(*iSelection, KBiosMtmParse, dummy, iStatus);
#endif
iState = ENbssTestParse;
}
示例6: DoDeleteEntriesL
void CMsvServerEntry::DoDeleteEntriesL(CMsvEntrySelection& aSelection, CMsvEntrySelection*& aDeleted, CMsvEntrySelection*& aMoved)
//
//
//
{
__ASSERT_DEBUG(!aDeleted && !aMoved, PanicServer(EMsvDeleteAndMoveSelectionsNotNull));
__ASSERT_DEBUG(aSelection.Count() > 0, PanicServer(EMsvDeletingEmptySelection));
// Total entries deleted and moved
aDeleted = new(ELeave)CMsvEntrySelection;
aMoved = new(ELeave)CMsvEntrySelection;
// Entries deleted when a single item is deleted
CMsvEntrySelection* deleted = new(ELeave)CMsvEntrySelection;
CleanupStack::PushL(deleted);
// Entries moved when a single item is deleted
CMsvEntrySelection* moved = new(ELeave)CMsvEntrySelection;
CleanupStack::PushL(moved);
CMsvEntrySelection* selection = new(ELeave)CMsvEntrySelection;
CleanupStack::PushL(selection);
CMsvDelete* del = CMsvDelete::NewL(iServer);
CleanupStack::PushL(del);
TInt firstError = KErrNone;
TInt count = aSelection.Count();
while(count--)
{
TMsvId id = aSelection.At(count);
TInt error = KErrNone;
// Only delete children
if (!IsAChild(id))
error = KErrNotFound;
else
{
// Need to know maximum number of entries that might be deleted
selection->AppendL(id);
error = iServer.IndexAdapter().ExpandSelectionRecursively(*selection);
if (error == KErrNone)
{
// Reserve space in lists
aDeleted->SetReserveL(aDeleted->Count() + selection->Count());
aMoved->SetReserveL(aMoved->Count() + selection->Count());
del->StartL(id, *deleted, *moved);
aSelection.Delete(count);
if (deleted->Count() > 0)
aDeleted->AppendL(deleted->Back(0), deleted->Count());
if (moved->Count() > 0)
aMoved->AppendL(moved->Back(0), moved->Count());
}
deleted->Reset();
moved->Reset();
selection->Reset();
}
// Remember error
if (error != KErrNone && firstError == KErrNone)
firstError = error;
}
User::LeaveIfError(firstError);
CleanupStack::PopAndDestroy(4); // del, selection, moved, deleted
}