--- a/ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp Tue Aug 31 15:04:17 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgpop3plugin.cpp Wed Sep 01 12:28:57 2010 +0100
@@ -19,7 +19,6 @@
#include "emailtrace.h"
#include "ipsplgheaders.h"
-//<qmail> removed
// ---------------------------------------------------------------------------
// CIpsPlgPop3Plugin::CIpsPlgPop3Plugin
@@ -139,8 +138,7 @@
void CIpsPlgPop3Plugin::RefreshNowL(
const TFSMailMsgId& aMailBoxId,
MFSMailRequestObserver& aOperationObserver,
- TInt aRequestId,
- const TBool /*aSilentConnection*/ )
+ TInt aRequestId )
{
FUNC_LOG;
TMsvId service = aMailBoxId.Id();
@@ -165,12 +163,10 @@
TInt populationLimit( settings->PopulationLimit() );
CleanupStack::PopAndDestroy( 2, settings ); // >>> settings, accounts
TBool forcePopulate( EFalse );
-// <qmail> back to use
if( populationLimit != KIpsSetDataHeadersOnly )
{
forcePopulate = ETrue;
}
-// </qmail>
CIpsPlgBaseOperation* op = CIpsPlgPop3ConnectOp::NewL(
*iSession,
@@ -179,7 +175,7 @@
forcePopulate,
ActivityTimerL( aMailBoxId ),
aMailBoxId,
- &aOperationObserver,
+ aOperationObserver,
aRequestId,
iEventHandler );
@@ -188,8 +184,8 @@
iOperations.AppendL( watcher );
CleanupStack::Pop( watcher ); // >> watcher
-
- // send part of refresh
+
+ // send part
EmptyOutboxL( aMailBoxId );
}
@@ -199,14 +195,17 @@
//
void CIpsPlgPop3Plugin::ListFoldersL(
const TFSMailMsgId& aMailBoxId,
- const TFSMailMsgId& /*aFolderId*/,
+ const TFSMailMsgId& aFolderId,
RPointerArray<CFSMailFolder>& aFolderList)
- {
+ {
FUNC_LOG;
- // Pop3 returns always the root level, so ignore folder id even
- // it is given.
- ListFoldersL( aMailBoxId, aFolderList );
- }
+ // Pop3 can return only folders on the root level, so folders are not
+ // listed when the given folder ID is not null ID.
+ if ( aFolderId.IsNullId() )
+ {
+ ListFoldersL( aMailBoxId, aFolderList );
+ }
+ }
// ---------------------------------------------------------------------------
// CIpsPlgPop3Plugin::ListFoldersL
@@ -272,13 +271,14 @@
if( aFolderType==EFSInbox )
{
- //<qmail> removed CMsvEntry conversion
-
- // In case of pop3, mailbox id == service id == inbox id,
- // so no need to create CMsvEntry from mailbox id to
- // dig if any children exists.
- result.SetId( aMailBoxId.Id() );
- //</qmail>
+ //in case of pop3, mailbox id == service id == inbox id
+ CMsvEntry* cEntry = iSession->GetEntryL( aMailBoxId.Id() );
+ CleanupStack::PushL( cEntry );
+ if ( cEntry->Count() != 0 )
+ {
+ result.SetId( aMailBoxId.Id() );
+ }
+ CleanupStack::PopAndDestroy( cEntry );
}
else if( aFolderType==EFSOutbox )
{
@@ -336,22 +336,22 @@
TImPop3GetMailInfo info;
info.iMaxEmailSize = KMaxTInt32;
info.iDestinationFolder = aMailBoxId.Id();
- // <qmail> ownership of selection is moved to the operation
+
CIpsPlgBaseOperation* op = CIpsPlgPop3FetchOperation::NewL(
*iSession,
watcher->iStatus,
+ KPOP3MTMCopyMailSelectionWhenAlreadyConnected,
aMailBoxId.Id(),
ActivityTimerL( aMailBoxId ),
info,
- sel,
+ *sel,
aMailBoxId,
- &aObserver,
+ aObserver,
aRequestId,
iEventHandler );
watcher->SetOperation( op );
- // <qmail> change PopAndDestroy to Pop
- CleanupStack::Pop( sel );
+ CleanupStack::PopAndDestroy( sel );
CleanupStack::Pop( watcher );
iOperations.AppendL( watcher );