本文整理汇总了C++中CEmailAccounts::DeleteImapAccountL方法的典型用法代码示例。如果您正苦于以下问题:C++ CEmailAccounts::DeleteImapAccountL方法的具体用法?C++ CEmailAccounts::DeleteImapAccountL怎么用?C++ CEmailAccounts::DeleteImapAccountL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEmailAccounts
的用法示例。
在下文中一共展示了CEmailAccounts::DeleteImapAccountL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExecuteActionL
void CMtfTestActionDeleteImapAccounts::ExecuteActionL()
{
TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionDeleteImapAccounts);
TInt paramDefaultIndex = ObtainValueParameterL<TInt>( TestCase(),ActionParameters().Parameter(0) ,-1 );
CEmailAccounts* account = CEmailAccounts::NewLC();
RArray<TImapAccount> arrayImap4Accounts;
CleanupClosePushL(arrayImap4Accounts);
account->GetImapAccountsL(arrayImap4Accounts);
if ( paramDefaultIndex >= 0 )
{ // Delete the specified id.
account->DeleteImapAccountL(arrayImap4Accounts[paramDefaultIndex]);
// Just ensure that if we try to delete it again we hopefuly get an error
// or can see that it has been deleted.
arrayImap4Accounts.Remove(paramDefaultIndex);
}
else if (paramDefaultIndex == -1 )
{
// Assume delete all the indexs
TInt count=arrayImap4Accounts.Count();
TestCase().INFO_PRINTF2(_L("CMtfTestActionDeletePopAccounts deleting all accounts count = %d"), count );
for(TInt i=0; i<count; i++)
{
TImapAccount id = arrayImap4Accounts[i];
account->DeleteImapAccountL(id);
}
}
else
{ // Bad value.
TestCase().ERR_PRINTF1(_L("DeleteImapAccounts : Index value must be -1 or greater than 0\n"));
TestCase().SetTestStepResult(EFail);
}
CleanupStack::PopAndDestroy(2, account);
TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionDeleteImapAccounts);
TestCase().ActionCompletedL(*this);
}