creator/engine/src/creator_mailbox.cpp
changeset 52 36d60d12b4af
parent 27 271e901a9423
equal deleted inserted replaced
51:b048e15729d6 52:36d60d12b4af
   309     // Get SMTP settings:
   309     // Get SMTP settings:
   310     PopulateSmtpSettingsL(*account, *smtpSet, *outgoingIAPSet, *parameters);
   310     PopulateSmtpSettingsL(*account, *smtpSet, *outgoingIAPSet, *parameters);
   311   
   311   
   312     // appending mailbox type to array to be able to use
   312     // appending mailbox type to array to be able to use
   313     // correct type when deleting mailboxes
   313     // correct type when deleting mailboxes
   314     iEntryIds.Append( parameters->iMailboxType );
   314     iEntryIds.AppendL( parameters->iMailboxType );
   315     
   315     
   316     if (parameters->iMailboxType == EMailboxIMAP4)
   316     if (parameters->iMailboxType == EMailboxIMAP4)
   317         {
   317         {
   318         // Get IMAP settings:
   318         // Get IMAP settings:
   319         PopulateImapSettingsL(*account, *imap4Set, *incomingIAPSet, *parameters);
   319         PopulateImapSettingsL(*account, *imap4Set, *incomingIAPSet, *parameters);
   320         TImapAccount imapAccountId = account->CreateImapAccountL(parameters->iMailboxName->Des(), *imap4Set, *incomingIAPSet, EFalse);
   320         TImapAccount imapAccountId = account->CreateImapAccountL(parameters->iMailboxName->Des(), *imap4Set, *incomingIAPSet, EFalse);
   321         TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(imapAccountId, *smtpSet, *outgoingIAPSet, EFalse);
   321         TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(imapAccountId, *smtpSet, *outgoingIAPSet, EFalse);
   322         account->SetDefaultSmtpAccountL(smtpAccountId);
   322         account->SetDefaultSmtpAccountL(smtpAccountId);
   323 
   323 
   324         iEntryIds.Append( imapAccountId.iImapAccountId );
   324         iEntryIds.AppendL( imapAccountId.iImapAccountId );
   325         iEntryIds.Append( imapAccountId.iImapService );
   325         iEntryIds.AppendL( imapAccountId.iImapService );
   326         iEntryIds.Append( imapAccountId.iSmtpService );      
   326         iEntryIds.AppendL( imapAccountId.iSmtpService );      
   327         iEntryIds.Append( smtpAccountId.iSmtpAccountId );
   327         iEntryIds.AppendL( smtpAccountId.iSmtpAccountId );
   328         iEntryIds.Append( smtpAccountId.iSmtpService );
   328         iEntryIds.AppendL( smtpAccountId.iSmtpService );
   329         iEntryIds.Append( smtpAccountId.iRelatedService );
   329         iEntryIds.AppendL( smtpAccountId.iRelatedService );
   330         
   330         
   331         StoreIMEIToEntryL( imapAccountId.iImapService );
   331         StoreIMEIToEntryL( imapAccountId.iImapService );
   332         StoreIMEIToEntryL( smtpAccountId.iSmtpService );
   332         StoreIMEIToEntryL( smtpAccountId.iSmtpService );
   333         }
   333         }
   334     else
   334     else
   337         PopulatePopSettingsL(*account, *pop3Set, *incomingIAPSet, *parameters);
   337         PopulatePopSettingsL(*account, *pop3Set, *incomingIAPSet, *parameters);
   338         TPopAccount popAccountId = account->CreatePopAccountL(parameters->iMailboxName->Des(), *pop3Set, *incomingIAPSet, EFalse);
   338         TPopAccount popAccountId = account->CreatePopAccountL(parameters->iMailboxName->Des(), *pop3Set, *incomingIAPSet, EFalse);
   339         TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(popAccountId, *smtpSet, *outgoingIAPSet, EFalse);     
   339         TSmtpAccount smtpAccountId = account->CreateSmtpAccountL(popAccountId, *smtpSet, *outgoingIAPSet, EFalse);     
   340         account->SetDefaultSmtpAccountL(smtpAccountId);
   340         account->SetDefaultSmtpAccountL(smtpAccountId);
   341         
   341         
   342         iEntryIds.Append( popAccountId.iPopAccountId );
   342         iEntryIds.AppendL( popAccountId.iPopAccountId );
   343         iEntryIds.Append( popAccountId.iPopService );
   343         iEntryIds.AppendL( popAccountId.iPopService );
   344         iEntryIds.Append( popAccountId.iSmtpService );
   344         iEntryIds.AppendL( popAccountId.iSmtpService );
   345         iEntryIds.Append( smtpAccountId.iSmtpAccountId );
   345         iEntryIds.AppendL( smtpAccountId.iSmtpAccountId );
   346         iEntryIds.Append( smtpAccountId.iSmtpService );
   346         iEntryIds.AppendL( smtpAccountId.iSmtpService );
   347         iEntryIds.Append( smtpAccountId.iRelatedService );
   347         iEntryIds.AppendL( smtpAccountId.iRelatedService );
   348 
   348 
   349         StoreIMEIToEntryL( popAccountId.iPopService );
   349         StoreIMEIToEntryL( popAccountId.iPopService );
   350         StoreIMEIToEntryL( smtpAccountId.iSmtpService );
   350         StoreIMEIToEntryL( smtpAccountId.iSmtpService );
   351         }  
   351         }  
   352     CleanupStack::PopAndDestroy(6); //imap4Set, pop3Set, smtpSet, outgoingIAPSet, incomingIAPSet, account 
   352     CleanupStack::PopAndDestroy(6); //imap4Set, pop3Set, smtpSet, outgoingIAPSet, incomingIAPSet, account