ipsservices/ipssosplugin/src/ipsplgmailstoreroperation.cpp
changeset 20 ecc8def7944a
parent 18 578830873419
--- a/ipsservices/ipssosplugin/src/ipsplgmailstoreroperation.cpp	Fri Apr 16 14:51:52 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgmailstoreroperation.cpp	Mon May 03 12:23:15 2010 +0300
@@ -15,10 +15,8 @@
 *
 */
 
-#include "ipsplgmailstoreroperation.h"
-#include "CFSMailPlugin.h"
 #include "emailtrace.h"
-
+#include "ipsplgheaders.h"
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -80,6 +78,21 @@
 // ---------------------------------------------------------------------------
 void CIpsPlgMailStorerOperation::DoCancel()
     {
+    // <qmail>
+    TRequestStatus* status = &iObserverRequestStatus;
+    if ( status && status->Int() == KRequestPending )
+        {
+        if (&iFSOperationObserver)
+            {
+            iFSProgress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled;
+            iFSProgress.iError = KErrCancel;
+            iFSProgress.iParam = NULL;
+
+            TRAP_IGNORE( iFSOperationObserver.RequestResponseL( iFSProgress, iFSRequestId ) );
+            }
+        User::RequestComplete( status, iStatus.Int() );
+        }
+    // </qmail>
     FUNC_LOG;
     }
 
@@ -90,6 +103,36 @@
     return KNullDesC8;
     }
 
+// <qmail>
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//   
+const TDesC8& CIpsPlgMailStorerOperation::GetErrorProgressL( TInt /*aError*/ )
+    {
+    FUNC_LOG;
+    
+    return KNullDesC8; // error progress info not supported
+    }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//   
+TFSProgress CIpsPlgMailStorerOperation::GetFSProgressL() const
+    {
+    FUNC_LOG;
+    
+    return iFSProgress;
+    }
+
+// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------    
+TIpsOpType CIpsPlgMailStorerOperation::IpsOpType() const
+    {
+    FUNC_LOG;
+    return EIpsOpTypeMailStorerOp;
+    }
+// </qmail>
+
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 CIpsPlgMailStorerOperation::CIpsPlgMailStorerOperation(
@@ -99,11 +142,12 @@
     RPointerArray<CFSMailMessage> &aMessages,
     MFSMailRequestObserver& aFSOperationObserver,
     const TInt aRequestId):
-    CMsvOperation(aMsvSession, CActive::EPriorityStandard, aObserverRequestStatus),
+// <qmail>
+    CIpsPlgBaseOperation(aMsvSession, aObserverRequestStatus, aRequestId, TFSMailMsgId()), 
     iPlugin(aPlugin),
     iMessages(aMessages),
-    iFSOperationObserver(aFSOperationObserver),
-    iRequestId(aRequestId)
+    iFSOperationObserver(aFSOperationObserver)
+// </qmail>
     {
     FUNC_LOG;
     }
@@ -158,12 +202,13 @@
         {
         if( &iFSOperationObserver )
             {
-            TFSProgress prog = { TFSProgress::EFSStatus_RequestComplete, 0, 0, 0 };
+            // <qmail>
+            iFSProgress.iProgressStatus = TFSProgress::EFSStatus_RequestComplete;
+            iFSProgress.iError = KErrNone;
+            iFSProgress.iParam = NULL;
 
-            TRAP_IGNORE(
-                    iFSOperationObserver.RequestResponseL(
-                            prog,
-                            iRequestId ) );
+            TRAP_IGNORE( iFSOperationObserver.RequestResponseL( iFSProgress, iFSRequestId ) );
+            // </qmail>
             }
 
         TRequestStatus* status = &iObserverRequestStatus;