本文整理汇总了C++中Store::HasFinishedLoading方法的典型用法代码示例。如果您正苦于以下问题:C++ Store::HasFinishedLoading方法的具体用法?C++ Store::HasFinishedLoading怎么用?C++ Store::HasFinishedLoading使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Store
的用法示例。
在下文中一共展示了Store::HasFinishedLoading方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GhostBuster
/***********************************************************************************
**
** MailRecovery::GhostBuster
***********************************************************************************/
OP_STATUS MailRecovery::GhostBuster()
{
Store* store = g_m2_engine->GetStore();
// we can only run this if we have loaded all messages!
if (!store->HasFinishedLoading())
return OpStatus::OK;
OpString8 indexes_with_ghosts;
OpStringC8 log_heading("Ghostbuster");
OpStatus::Ignore(DesktopFileLogger::Log(m_recovery_log,log_heading,"Started"));
INT32 num_ghosts = 0;
Index* current;
// go through all indexes
for (INT32 it = -1; (current = g_m2_engine->GetIndexer()->GetRange(0, IndexTypes::LAST, it)) != NULL; )
{
OpINT32Vector message_ids;
if (OpStatus::IsError(current->PreFetch()) || OpStatus::IsError(current->GetAllMessages(message_ids)))
continue;
// go through all messages in all indexes
for (UINT32 nb = 0; nb < message_ids.GetCount(); nb++)
{
INT32 message_id = message_ids.Get(nb);
// check if the message really exists in store
if (!store->MessageAvailable(message_id))
{
// we have a ghost, a message that doesn't exist in store, but exists in an index
current->RemoveMessage(message_id);
num_ghosts++;
indexes_with_ghosts.AppendFormat(" %d",current->GetId());
}
}
}
OpStatus::Ignore(store->CommitData());
OpString8 log_text;
OpStatus::Ignore(log_text.AppendFormat("Finished: Deleted %d ghosts from the following indexes:%s", num_ghosts, indexes_with_ghosts.CStr()));
OpStatus::Ignore(DesktopFileLogger::Log(m_recovery_log,log_heading,log_text));
return OpStatus::OK;
}