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


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

本文整理汇总了C++中CEmailAccounts::CreateSmtpAccountL方法的典型用法代码示例。如果您正苦于以下问题:C++ CEmailAccounts::CreateSmtpAccountL方法的具体用法?C++ CEmailAccounts::CreateSmtpAccountL怎么用?C++ CEmailAccounts::CreateSmtpAccountL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CEmailAccounts的用法示例。


在下文中一共展示了CEmailAccounts::CreateSmtpAccountL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CreateServiceAndAccountL

void CTestUTCSort::CreateServiceAndAccountL()
	{	
	CEmailAccounts* accounts = CEmailAccounts::NewL();
	CleanupStack::PushL(accounts);
	CImSmtpSettings* settings=new(ELeave) CImSmtpSettings();
	CleanupStack::PushL(settings);
	CImIAPPreferences* smtpIAP = CImIAPPreferences::NewLC();
	TSmtpAccount smtpAccountId=accounts->CreateSmtpAccountL(_L("SMTP"),*settings, *smtpIAP, EFalse);	
	CleanupStack::PopAndDestroy(smtpIAP);
	CleanupStack::PopAndDestroy(settings);
	CleanupStack::PopAndDestroy(accounts);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:12,代码来源:T_SORT_UTCStep.cpp

示例2: TestCase

void CMtfTestActionCreatePop3Service::ExecuteActionL()
	{
	TestCase().INFO_PRINTF2(_L("Test Action %S start..."), &KTestActionCreatePop3Service);
	// need to create an account in the central repository and make it the default account
	HBufC* paramAccountName = ObtainParameterReferenceL<HBufC>( TestCase(),ActionParameters().Parameter(6) );
	HBufC* settingsFile = ObtainParameterReferenceL<HBufC>( TestCase(),ActionParameters().Parameter(7) );

	CEmailAccounts *emailAccounts = CEmailAccounts::NewLC();	
	CImIAPPreferences *smtpPrefs = CImIAPPreferences::NewLC();
	CImSmtpSettings *smtpSettings = new (ELeave) CImSmtpSettings;
	CleanupStack::PushL(smtpSettings);
	
	CImIAPPreferences *popPrefs = CImIAPPreferences::NewLC();
	CImPop3Settings *popSettings = new (ELeave) CImPop3Settings;
	CleanupStack::PushL(popSettings);

	emailAccounts->PopulateDefaultPopSettingsL(*popSettings, *popPrefs);
	emailAccounts->PopulateDefaultSmtpSettingsL(*smtpSettings, *smtpPrefs );
		
	if( settingsFile->Compare( _L("none") ) != 0 )
		{
		CMtfTestActionUtilsPopScripts::ReadPopSettingsFromConfigurationFileL(
			TestCase(), settingsFile->Des(), *popSettings, *popPrefs, *smtpSettings, *smtpPrefs);
		}
	
	TPopAccount popAccount = emailAccounts->CreatePopAccountL(paramAccountName->Des(), *popSettings, *popPrefs, EFalse);
	TSmtpAccount smtpAccount = emailAccounts->CreateSmtpAccountL(popAccount, *smtpSettings, *smtpPrefs, EFalse);
	emailAccounts->SetDefaultSmtpAccountL(smtpAccount);
	
	// need to obtain the service id from the account details and save this as the service id
	TMsvId paramServiceId = popAccount.iPopService;
	CleanupStack::PopAndDestroy(5, emailAccounts); // popSettings, popPrefs, smtpSettings, smtpPrefs, emailAccounts
	
	StoreParameterL<TMsvId>( TestCase(),paramServiceId, ActionParameters().Parameter(8) );
	
	TestCase().INFO_PRINTF2(_L("Test Action %S completed."), &KTestActionCreatePop3Service);
	TestCase().ActionCompletedL(*this);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:38,代码来源:CMtfTestActionCreatePop3Service.cpp


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