本文整理汇总了C++中CEmailAccounts::CreateImapAccountL方法的典型用法代码示例。如果您正苦于以下问题:C++ CEmailAccounts::CreateImapAccountL方法的具体用法?C++ CEmailAccounts::CreateImapAccountL怎么用?C++ CEmailAccounts::CreateImapAccountL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEmailAccounts
的用法示例。
在下文中一共展示了CEmailAccounts::CreateImapAccountL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupL
void CTestImapSyncManager::SetupL()
{
TInt err;
err=User::LoadPhysicalDevice(PDD_NAME);
if (err!=KErrNone && err!=KErrAlreadyExists)
User::Leave(err);
err=User::LoadLogicalDevice(LDD_NAME);
if (err!=KErrNone && err!=KErrAlreadyExists)
User::Leave(err);
iTestUtils = CEmailTestUtils::NewL(test);
iTestUtils->ClearEmailAccountsL( );
iTestUtils->CreateAllTestDirectories( );
iTestUtils->FileSession( ).SetSessionPath( _L( "C:\\" ) );
iActiveWaiter = new(ELeave)CActiveWaiter();
iTestUtils->GoServerSideL();
iTestUtils->DeleteImapServiceL();
iTestUtils->GoClientSideL();
CEmailAccounts* account = CEmailAccounts::NewLC();
iImapSettings1 = new(ELeave) CImImap4Settings();
CImIAPPreferences* imapIAP = CImIAPPreferences::NewLC();
account->PopulateDefaultImapSettingsL(*iImapSettings1, *imapIAP);
iImapSettings1->SetServerAddressL(KImapServer);
iImapSettings1->SetLoginNameL(iTestUtils->MachineName());
iImapSettings1->SetPasswordL(iTestUtils->MachineName());
iImapSettings1->SetPort(143);
iImapSettings1->SetImapIdle(ETrue);
iImapSettings1->SetSubscribe(EUpdateRemote);
iImapSettings1->SetSynchronise(EUseRemote);
iImapSettings1->SetInboxSynchronisationLimit(KSyncLimit);
iImapSettings1->SetMailboxSynchronisationLimit(KSyncLimit);
_LIT(KTxtAccountName, "testAccount");
iImapAccount = account->CreateImapAccountL(KTxtAccountName, *iImapSettings1, *imapIAP, EFalse);
CleanupStack::PopAndDestroy(2, account); // imapIAP, account
iTestUtils->GoServerSideL();
iEntry = iTestUtils->iServerEntry;
iServiceId = iImapAccount.iImapService;
iTestUtils->InstantiateImapServerMtmL();
iImapServerMtm=(CImap4ServerMtm*)iTestUtils->iImapServerMtm;
iEntry = iTestUtils->iServerEntry;
iImapSettings = CImapSettings::NewL(*iEntry);
iImapSettings->LoadSettingsL(iServiceId);
iSel = new (ELeave) CMsvEntrySelection;
}