ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp
changeset 20 ecc8def7944a
parent 18 578830873419
child 23 2dc6caa42ec3
--- a/ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp	Fri Apr 16 14:51:52 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgimap4plugin.cpp	Mon May 03 12:23:15 2010 +0300
@@ -15,12 +15,10 @@
 *
 */
 
-
-
 #include "emailtrace.h"
 #include "ipsplgheaders.h"
 
-const TInt KConnectOpPriority = CActive::EPriorityStandard;
+// <qmail> priority const has been removed
 
 // ---------------------------------------------------------------------------
 // CIpsPlgImap4Plugin::CIpsPlgImap4Plugin()
@@ -33,7 +31,6 @@
     // none
     }
 
-
 // ---------------------------------------------------------------------------
 // CIpsPlgImap4Plugin::ConstructL()
 // ---------------------------------------------------------------------------
@@ -44,7 +41,6 @@
     BaseConstructL();
     }
 
-
 // ---------------------------------------------------------------------------
 // CIpsPlgImap4Plugin::NewL()
 // ---------------------------------------------------------------------------
@@ -57,7 +53,6 @@
     return self;
     }
 
-
 // ---------------------------------------------------------------------------
 // CIpsPlgImap4Plugin::NewLC()
 // ---------------------------------------------------------------------------
@@ -151,14 +146,14 @@
     CIpsPlgSingleOpWatcher* watcher = CIpsPlgSingleOpWatcher::NewL( *this );
     CleanupStack::PushL( watcher );
     
+    // <qmail> priority parameter has been removed
     CIpsPlgBaseOperation* op = CIpsPlgImap4ConnectOp::NewL(
     		*iSession,
-    		KConnectOpPriority, 
     		watcher->iStatus, 
     		service,
     		ActivityTimerL( aMailBoxId ),
           	aMailBoxId, 
-          	aOperationObserver,
+          	&aOperationObserver,
           	aRequestId,
           	iEventHandler );
     
@@ -297,16 +292,16 @@
     info.iAttachmentSizeLimit = 0;
     info.iDestinationFolder = aFolderId.Id();
     
+    // <qmail> priority parameter has been removed
     CIpsPlgBaseOperation* op = CIpsPlgImap4PopulateOp::NewL( 
         *iSession, 
         watcher->iStatus,
-        CActive::EPriorityStandard,
         aMailBoxId.Id(),
         ActivityTimerL( aMailBoxId ),
         info,
         *sel,
         aMailBoxId, 
-        aObserver,
+        &aObserver,
         aRequestId,
         iEventHandler, 
         EFalse ); // do not filter mail selection
@@ -354,35 +349,24 @@
             sel->AppendL( aMessageIds[i].Id() );
             }
     	
-    	TPckgBuf<TImImap4GetMailInfo> optionsBuf;
-        TImImap4GetMailInfo& options = optionsBuf();
-        options.iMaxEmailSize = KMaxTInt32;
-        options.iGetMailBodyParts = EGetImap4EmailBodyTextAndAttachments;
-        options.iDestinationFolder = aDestinationFolderId.Id();
-
-        MFSMailRequestObserver* observer = NULL;
         // Synchronous operation
+        // <qmail> following constructor's parameters have changed
     	CIpsPlgBaseOperation* op = CIpsPlgImap4MoveRemoteOp::NewL(
             *iSession, 
             watcher->iStatus,
-            KIMAP4MTMMoveMailSelectionWhenAlreadyConnected,
             service,
             ActivityTimerL( aMailBoxId ),
-            options,
+            aDestinationFolderId.Id(),
             *sel,
             aMailBoxId,
-            *observer, // async not supported
-            0 ); // async not supported
+            NULL, // no observer, async not supported
+            0 ); // no reqId, async not supported
             
         watcher->SetOperation( op );
         CleanupStack::PopAndDestroy( sel );
         iOperations.AppendL( watcher );
         CleanupStack::Pop( watcher );
         }
-     else
-        {
-        //do nothing
-        }
 	} 	
 
 // ---------------------------------------------------------------------------
@@ -448,21 +432,20 @@
             }
         
         }
-    
-    TPckgBuf<TImImap4GetMailInfo> optionsBuf;
-    TImImap4GetMailInfo& options = optionsBuf();
-    options.iMaxEmailSize = KMaxTInt32;
-    options.iGetMailBodyParts = EGetImap4EmailAttachments;
-    options.iDestinationFolder = 0; // not used
-    
+        
     CIpsPlgBaseOperation* op = CIpsPlgImap4FetchAttachmentOp::NewL( 
-        *iSession, watcher->iStatus, KIMAP4MTMPopulate, aMailBoxId.Id(),
-        ActivityTimerL( aMailBoxId ), options, *sel, aMailBoxId,
-        aOperationObserver, aRequestId );
+        *iSession, 
+        watcher->iStatus,
+        aMailBoxId.Id(),
+        ActivityTimerL( aMailBoxId ), 
+        sel, // ownership is transferred
+        aMailBoxId,
+        &aOperationObserver,
+        aRequestId );
     
     watcher->SetOperation( op );
-    CleanupStack::PopAndDestroy( sel );
     iOperations.AppendL( watcher );
+    CleanupStack::Pop( sel );
     CleanupStack::Pop( watcher );
     }
 
@@ -519,17 +502,17 @@
     sel->AppendL( aMailboxId.Id() );
     sel->AppendL( aNewId );
     
+    // <qmail> priority parameter has been removed
     CIpsPlgBaseOperation* op = CIpsPlgImap4PopulateOp::NewL( 
         *iSession, 
         watcher->iStatus,
-        KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected,
         aMailboxId.Id(),
         ActivityTimerL( aMailboxId ),
         info,
         *sel,
         aMailboxId, 
-        *this,
-        KErrNotFound,
+        NULL, // no operation observer
+        0,    // no use for requestId
         iEventHandler,
         EFalse ); // do not block entry changed and created events