ipsservices/ipssosplugin/src/ipsplgimap4moveremoteop.cpp
changeset 1 12c456ceeff2
parent 0 8466d47a6819
child 13 0396474f30f5
child 18 578830873419
--- a/ipsservices/ipssosplugin/src/ipsplgimap4moveremoteop.cpp	Thu Dec 17 08:39:21 2009 +0200
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4moveremoteop.cpp	Thu Jan 07 12:38:38 2010 +0200
@@ -87,7 +87,6 @@
 CIpsPlgImap4MoveRemoteOp::~CIpsPlgImap4MoveRemoteOp()
     {
     FUNC_LOG;
-    delete iLocalSel;
     delete iRemoteSel;
     }
 
@@ -209,7 +208,7 @@
                 CompleteObserver( KErrCouldNotConnect );
                 return;
                 }
-            DoMoveLocalL();
+            DoMoveRemoteL();
             }
             break;
         case ELocalMsgs:
@@ -253,7 +252,6 @@
         User::Leave( KErrNotSupported );
         }
     // Sort messages into complete and incomplete selections.
-    iLocalSel = new(ELeave) CMsvEntrySelection;
     iRemoteSel = new(ELeave) CMsvEntrySelection;
 
     TInt err;
@@ -267,17 +265,6 @@
         err = iMsvSession.GetEntry( id, service, tEntry );
         if( KErrNone == err )
             {
-            // local move is not needed, if the message is not fetched
-            if( tEntry.Complete() )
-                {
-                if ( 0 < count )
-                    {
-                    // service id is not added to local, 
-                    // service is already
-                    // added in MoveMessagesL
-                    iLocalSel->AppendL( id );
-                    }
-                }
                 iRemoteSel->AppendL( id );
                 }
             }
@@ -291,38 +278,6 @@
     TRequestStatus* observer = &iObserverRequestStatus;
     User::RequestComplete( observer, KErrNone );
     }
-    
-// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
-void CIpsPlgImap4MoveRemoteOp::DoMoveLocalL()
-    {
-    FUNC_LOG;
-    iState = ELocalMsgs;
-    iStatus = KRequestPending;
-    if( iLocalSel->Count() )
-        {
-        // this gets the first msg to be moved
-        CMsvEntry* cEntry = iMsvSession.GetEntryL( (*iLocalSel)[0] );
-        CleanupStack::PushL( cEntry );
-        // find the parent of the moved message...
-        TMsvId parent = cEntry->Entry().Parent();
-        // and use it as a context
-        cEntry->SetEntryL( parent );
-
-        delete iOperation;
-        iOperation = NULL;
-        iOperation = cEntry->MoveL( *iLocalSel, 
-                                    iGetMailInfo.iDestinationFolder, 
-                                    iStatus );
-        CleanupStack::PopAndDestroy( cEntry ); 
-        SetActive();
-        }
-    else
-        {
-        SetActive();
-        CompleteThis();
-        }
-    }
 
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------