本文整理汇总了C++中CMsvSession::GetAndClearIndexCorruptFlagL方法的典型用法代码示例。如果您正苦于以下问题:C++ CMsvSession::GetAndClearIndexCorruptFlagL方法的具体用法?C++ CMsvSession::GetAndClearIndexCorruptFlagL怎么用?C++ CMsvSession::GetAndClearIndexCorruptFlagL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMsvSession
的用法示例。
在下文中一共展示了CMsvSession::GetAndClearIndexCorruptFlagL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestRemovingAllFilesL
//.........这里部分代码省略.........
{
active->StartL();
opert = cEntry1->DeleteL(*selection, active->iStatus);
CActiveScheduler::Start(); // operation complete
delete opert;
}
delete selection;
// delete everything under the local service
cEntry1->SetEntryL(KMsvLocalServiceIndexEntryId);
selection = cEntry1->ChildrenL();
count=selection->Count();
while (count--)
{
TMsvId id = selection->At(count);
#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
id = UnmaskTMsvId(id);
#endif
if (id==KMsvGlobalOutBoxIndexEntryId ||
id==KMsvGlobalInBoxIndexEntryId ||
id==KMsvDraftEntryId ||
id==KMsvSentEntryId ||
id==KMsvDeletedEntryFolderEntryId)
selection->Delete(count);
}
if (selection->Count())
{
active->StartL();
opert = cEntry1->DeleteL(*selection, active->iStatus);
CActiveScheduler::Start(); // operation complete
delete opert;
}
delete selection;
// test
cEntry1->SetEntryL(KMsvRootIndexEntryId);
cEntry1->SetEntryL(KMsvLocalServiceIndexEntryId);
selection = cEntry1->ChildrenL();
test(selection->Count()==5);
delete selection;
RFs file;
file.Connect();
CleanupClosePushL(file);
TPtrC driveName = TDriveUnit(MessageServer::CurrentDriveL(file)).Name();
CleanupStack::PopAndDestroy();
file.Close();
filename = driveName;
filename.Append(KMsvDefaultFolder2);
MsvUtils::ConstructEntryName(KMsvLocalServiceIndexEntryId, KMsvLocalServiceIndexEntryId, filename, MsvUtils::EPath);
REPORT_IF_ERROR(theUtils->FileSession().GetDir(filename, KEntryAttMaskSupported, ESortNone, dir));
test(dir->Count()==0);
delete dir;
// everything under the root
cEntry1->SetEntryL(KMsvRootIndexEntryId);
selection = cEntry1->ChildrenL();
count=selection->Count();
while (count--)
{
TMsvId id = selection->At(count);
#if (defined SYMBIAN_MSGS_ENHANCED_REMOVABLE_MEDIA_SUPPORT)
id = UnmaskTMsvId(id);
#endif
if (id==KMsvLocalServiceIndexEntryId)
selection->Delete(count);
}
if (selection->Count())
{
active->StartL();
opert = cEntry1->DeleteL(*selection, active->iStatus);
CActiveScheduler::Start(); // operation complete
delete opert;
}
delete selection;
#if (!defined SYMBIAN_MESSAGESTORE_USING_SQLDB)
// check corrupt index flag was set when index file was corrupted
TBool corrupt=session->GetAndClearIndexCorruptFlagL();
test(corrupt!=EFalse);
#endif
// test
cEntry1->SetEntryL(KMsvLocalServiceIndexEntryId);
cEntry1->SetEntryL(KMsvRootIndexEntryId);
selection = cEntry1->ChildrenL();
test(selection->Count()==1);
delete selection;
filename = driveName;
filename.Append(KMsvDefaultFolder2);
REPORT_IF_ERROR(theUtils->FileSession().GetDir(filename, KEntryAttMaskSupported, ESortNone, dir));
test(dir->Count()==1); //no Index file under Mail2 folder after PREQ1189.
delete dir;
CleanupStack::PopAndDestroy(3);
}