364 CImumMboxData& aSettings ) |
364 CImumMboxData& aSettings ) |
365 { |
365 { |
366 IMUM_CONTEXT( CImumMboxManager::LoadAccountFillIapL, 0, KLogData ); |
366 IMUM_CONTEXT( CImumMboxManager::LoadAccountFillIapL, 0, KLogData ); |
367 IMUM_IN(); |
367 IMUM_IN(); |
368 |
368 |
369 //check IAP number |
369 //check Incoming IAP number |
370 if ( aSettings.iIncomingIapPref->NumberOfIAPs() > 0 ) |
370 if ( aSettings.iIncomingIapPref->NumberOfIAPs() > 0 ) |
371 { |
371 { |
372 // Set internet access point (incoming IAP) |
372 // Set internet access point (incoming IAP) |
373 TImIAPChoice incomingIapChoice = |
373 TImIAPChoice incomingIapChoice = |
374 aSettings.iIncomingIapPref->IAPPreference( 0 ); |
374 aSettings.iIncomingIapPref->IAPPreference( 0 ); |
375 aSettings.iIncomingIap = incomingIapChoice.iIAP; |
375 aSettings.iIncomingIap = incomingIapChoice.iIAP; |
376 |
376 } |
|
377 |
|
378 //check SNAP define |
|
379 else if( aSettings.iIncomingIapPref->SNAPDefined() ) |
|
380 { |
|
381 aSettings.iIncomingIap = aSettings.iIncomingIapPref->SNAPPreference(); |
|
382 } |
|
383 else |
|
384 { |
|
385 aSettings.iIncomingIap = 0; |
|
386 } |
|
387 |
|
388 //check Outgoing IAP number |
|
389 if ( aSettings.iOutgoingIapPref->NumberOfIAPs() > 0 ) |
|
390 { |
377 // Set internet access point (Outgoing IAP) |
391 // Set internet access point (Outgoing IAP) |
378 TImIAPChoice outgoingIapChoice = |
392 TImIAPChoice outgoingIapChoice = |
379 aSettings.iOutgoingIapPref->IAPPreference( 0 ); |
393 aSettings.iOutgoingIapPref->IAPPreference( 0 ); |
380 aSettings.iOutgoingIap = outgoingIapChoice.iIAP; |
394 aSettings.iOutgoingIap = outgoingIapChoice.iIAP; |
381 } |
395 } |
382 |
396 //check SNAP define |
383 //check SNAP define |
397 else if( aSettings.iOutgoingIapPref->SNAPDefined() ) |
384 else if( aSettings.iIncomingIapPref->SNAPDefined() ) |
398 { |
385 { |
399 aSettings.iOutgoingIap = aSettings.iOutgoingIapPref->SNAPPreference(); |
386 aSettings.iIncomingIap = aSettings.iIncomingIapPref->SNAPPreference(); |
400 } |
387 aSettings.iOutgoingIap = aSettings.iOutgoingIapPref->SNAPPreference(); |
401 else |
388 } |
402 { |
389 else |
403 aSettings.iOutgoingIap = 0; |
390 { |
404 } |
391 aSettings.iIncomingIap = 0; |
405 |
392 aSettings.iOutgoingIap = 0; |
|
393 } |
|
394 |
|
395 IMUM_OUT(); |
406 IMUM_OUT(); |
396 } |
407 } |
397 |
408 |
398 // ---------------------------------------------------------------------------- |
409 // ---------------------------------------------------------------------------- |
399 // CImumMboxManager::DetermineDefaultAccountL() |
410 // CImumMboxManager::DetermineDefaultAccountL() |
411 iMailboxApi.MsvSession(), KSenduiMtmSmtpUid, EFalse ); |
422 iMailboxApi.MsvSession(), KSenduiMtmSmtpUid, EFalse ); |
412 |
423 |
413 // Set the newly created one as a default account |
424 // Set the newly created one as a default account |
414 if ( aSettings.iDefaultAccountId == KMsvUnknownServiceIndexEntryId ) |
425 if ( aSettings.iDefaultAccountId == KMsvUnknownServiceIndexEntryId ) |
415 { |
426 { |
416 if( !FeatureManager::FeatureSupported( KFeatureIdSelectableEmail ) || |
427 if( !FeatureManager::FeatureSupported( KFeatureIdSelectableEmail ) || |
417 !MsvUiServiceUtilitiesInternal::OtherEmailMTMExistL( |
428 !MsvUiServiceUtilitiesInternal::OtherEmailMTMExistL( |
418 iMailboxApi.MsvSession(), aSettings.iMailboxId ) ) |
429 iMailboxApi.MsvSession(), aSettings.iMailboxId ) ) |
419 { |
430 { |
420 TSmtpAccount smtpAccountId; |
431 TSmtpAccount smtpAccountId; |
421 iAccounts->GetSmtpAccountL( aSettings.iMailboxId, smtpAccountId ); |
432 iAccounts->GetSmtpAccountL( aSettings.iMailboxId, smtpAccountId ); |