equal
deleted
inserted
replaced
202 iSession->GetEntry( aMailBoxId.Id(), service, tEntry ); |
202 iSession->GetEntry( aMailBoxId.Id(), service, tEntry ); |
203 |
203 |
204 if ( tEntry.Connected() ) |
204 if ( tEntry.Connected() ) |
205 { |
205 { |
206 status = EFSMailBoxOnline; |
206 status = EFSMailBoxOnline; |
207 } |
207 } |
208 else if ( ConnOpRunning( aMailBoxId ) ) |
208 else |
209 { |
|
210 status = EFSMailBoxOnline; |
|
211 } |
|
212 else |
|
213 { |
209 { |
214 status = EFSMailBoxOffline; |
210 status = EFSMailBoxOffline; |
215 } |
211 } |
216 } |
212 } |
217 else |
213 else |
390 FUNC_LOG; |
386 FUNC_LOG; |
391 if( !iSessionOk ) |
387 if( !iSessionOk ) |
392 { |
388 { |
393 User::Leave( KErrNotReady ); |
389 User::Leave( KErrNotReady ); |
394 } |
390 } |
395 CMsvEntry* mboxEntry = iSession->GetEntryL( aMailBoxId.Id() ); |
391 |
396 CleanupStack::PushL( mboxEntry ); |
392 TMsvEntry tEntry; |
397 |
393 TMsvId serviceId; |
398 TDesC& address = iSettingsApi->GetServerAddressL( *mboxEntry ); |
394 TInt status = iSession->GetEntry( aMailBoxId.Id(), serviceId, tEntry ); |
399 delete iBrandingId; |
395 |
400 iBrandingId = NULL; |
396 if ( status == KErrNone ) |
401 iBrandingId = address.AllocL(); |
397 { |
402 CleanupStack::PopAndDestroy( mboxEntry ); |
398 HBufC* address( NULL ); |
403 |
399 iSettingsApi->GetMailboxAddressL( tEntry, address ); |
|
400 CleanupStack::PushL( address ); |
|
401 TPtrC ptr = address->Des(); |
|
402 TInt index = ptr.Locate('@') + 1; |
|
403 if( index > 0 && ptr.Length() > 0 ) |
|
404 { |
|
405 if( iBrandingId ) |
|
406 { |
|
407 delete iBrandingId; |
|
408 iBrandingId = NULL; |
|
409 } |
|
410 ptr.Set( ptr.Right( ptr.Length() - index ) ); |
|
411 iBrandingId = HBufC::NewL( ptr.Length() ); |
|
412 iBrandingId->Des().Copy( ptr ); |
|
413 } |
|
414 CleanupStack::PopAndDestroy( address ); |
|
415 } |
|
416 |
404 return *iBrandingId; |
417 return *iBrandingId; |
405 } |
418 } |
406 |
419 |
407 // ---------------------------------------------------------------------------- |
420 // ---------------------------------------------------------------------------- |
408 // Pop3 has no implementation for this virtual |
421 // Pop3 has no implementation for this virtual |