当前位置: 首页>>代码示例>>C++>>正文


C++ CEmailAccounts::DeleteImapAccountL方法代码示例

本文整理汇总了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);	
		
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:43,代码来源:CMtfTestActionDeleteImapAccounts.cpp


注:本文中的CEmailAccounts::DeleteImapAccountL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。