ipsservices/ipssosplugin/inc/ipsplgonlineoperation.h
changeset 20 ecc8def7944a
parent 18 578830873419
child 23 2dc6caa42ec3
--- a/ipsservices/ipssosplugin/inc/ipsplgonlineoperation.h	Fri Apr 16 14:51:52 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgonlineoperation.h	Mon May 03 12:23:15 2010 +0300
@@ -18,7 +18,6 @@
 #ifndef IPSPLGONLINEOPERATION_H
 #define IPSPLGONLINEOPERATION_H
 
-
 #include "ipsplgbaseoperation.h"
 
 class CMsvEntrySelection;
@@ -27,157 +26,127 @@
 class CIpsPlgTimerOperation;
 class CClientMtmRegistry;
 
-
-class MIpsPlgConnectOpCallback
-    {
-public:
-    virtual void CredientialsSetL( TInt aEvent )=0;
-    };
+// <qmail> removing class MIpsPlgConnectOpCallback
 
 /**
 * class CIpsPlgOnlineOperation
-*
 * Common base class for email online operations.
 */
 NONSHARABLE_CLASS ( CIpsPlgOnlineOperation ) : public CIpsPlgBaseOperation
     {
-    public:
-           
-        /**
-        *
-        */
-        virtual ~CIpsPlgOnlineOperation();
+public:
+    virtual ~CIpsPlgOnlineOperation();
 
-        /**
-        *
-        */
-        virtual const TDesC8& ProgressL() = 0;
+    // <qmail> removing virtual const TDesC8& ProgressL() = 0; as unnecessary (already in baseclass)
+    // <qmail> removing virtual const TDesC8& GetErrorProgressL(TInt aError) = 0; as unnecessary (already in baseclass)
+    
+    /**
+     * return progress information about ongoing operation
+     */
+    virtual TFSProgress GetFSProgressL() const = 0;
+    
+    // <qmail> removing IpsOpType() from here because this is abstract base class
+    
+protected:
 
-        /**
-        * For reporting if DoRunL leaves
-        */
-        virtual const TDesC8& GetErrorProgressL(TInt aError) = 0;
-        
-        /**
-        * 
-        */
-        virtual TFSProgress GetFSProgressL() const = 0;
-        
-        /**
-        *
-        */
-        virtual TInt IpsOpType() const;
-        
-		
-    protected:
-        /**
-        * C++ constructor
-        */
-        // Construction.
-        CIpsPlgOnlineOperation(
-            CMsvSession& aMsvSession,
-            TInt aPriority,
-            TRequestStatus& aObserverRequestStatus,
-            CIpsPlgTimerOperation& aActivityTimer,
-            TFSMailMsgId aFSMailBoxId,
-            MFSMailRequestObserver& aFSOperationObserver,
-            TInt aFSRequestId,
-            TBool aSignallingAllowed=ETrue );
+    /**
+     * constructor
+     * @param aMsvSession reference to existing client-server session to MessageServer
+     * @param aObserverRequestStatus client status
+     * @param aActivityTimer reference to mailbox's online activity timer
+     * @param aFSMailBoxId mailbox id
+     * @param aFSOperationObserver callback interface to caller for reporting progress (completion) statuses
+     * @param aFSRequestId id of the request
+     */
+    // <qmail> priority parameter has been removed
+    CIpsPlgOnlineOperation(
+        CMsvSession& aMsvSession,
+        TRequestStatus& aObserverRequestStatus,
+        CIpsPlgTimerOperation& aActivityTimer,
+        TFSMailMsgId aFSMailBoxId,
+        MFSMailRequestObserver* aFSOperationObserver,
+        TInt aFSRequestId );
 
-        /**
-        * Base constructor
-        */
-        void BaseConstructL(TUid aMtmType);
+    /**
+    * Base constructor
+    */
+    void BaseConstructL( TUid aMtmType );
 
-        /**
-        * From CActive
-        */
-        virtual void DoCancel();
+protected: // From CActive
+    virtual void DoCancel();
+    virtual void RunL();
 
-        /**
-        * From CActive
-        */
-        virtual void RunL();
-
-        /**
-        * From CActive
-        */
-        virtual void DoRunL() = 0;
+    /**
+     * All concrete classes must implement this
+     * It is called by OnlineOperation's RunL()
+     */
+    virtual void DoRunL() = 0;
+    // <qmail> removing virtual TInt RunError( TInt aError ); Not needed because RunL uses TRAP harness and never leaves
 
-        /**
-        * From CActive
-        */
-        virtual TInt RunError( TInt aError );
+    /**
+    * Completes observer with status aStatus
+    * @param aStatus: Status of the operation.
+    * Override if needed to complete with other status than KErrNone.
+    */
+    void CompleteObserver( TInt aStatus = KErrNone );
 
-        /**
-        * Completes observer with status aStatus
-        * @param aStatus: Status of the operation.
-        * Override if needed to complete with other status than KErrNone.
-        */
-        void CompleteObserver( TInt aStatus = KErrNone );
-
-        /**
-        *
-        */
-        void CompleteThis();
-
+    /**
+    * Completes "ourselves" not observer; used for starting a new round in statemachine.
+    */
+    void CompleteThis();
 
-        // REVIEW: is there any good reason for next two methods
-        /**
-        *
-        */
-        void InvokeClientMtmAsyncFunctionL(
-            TInt aFunctionId,
-            TMsvId aEntryId,
-            TMsvId aContextId,
-            const TDesC8& aParams=KNullDesC8);
+    /**
+    * Sends a command to MessageServer
+    * @param aFunctionId specifies the command
+    * @param aEntryId specifies the entry on which the command should be executed
+    * (e.g. which message entry to send)
+    * @param aParams specifies other parameters needed by particular command
+    */
+    void InvokeClientMtmAsyncFunctionL(
+        TInt aFunctionId,
+        TMsvId aEntryId,
+        const TDesC8& aParams=KNullDesC8);
 
-        /**
-        *
-        */
-        void InvokeClientMtmAsyncFunctionL(
-            TInt aFunctionId,
-            const CMsvEntrySelection& aSel,
-            TMsvId aContextId,
-            const TDesC8& aParams=KNullDesC8);
+    /**
+    * Sends a command to MessageServer
+    * @param aFunctionId specifies the command
+    * @param aSel specifies a selection of entries on which the command should be executed
+    * (e.g. which messages to send)
+    * @param aParams specifies other parameters needed by particular command
+    */
+    void InvokeClientMtmAsyncFunctionL(
+        TInt aFunctionId,
+        const CMsvEntrySelection& aSel,
+        const TDesC8& aParams=KNullDesC8);
 
-        // <qmail>
-        /**
-         * Finds out the current connection state of the mailbox
-         * @return true/false
-         */
-        virtual TBool Connected() const;
-        // </qmail>
-        
+    // <qmail>
     /**
-    *
+     * Finds out the current connection state of the mailbox
+     * @return true/false
+     */
+    virtual TBool Connected() const;
+    // </qmail>
+    
+    /**
+    * Signals observer of the operation if such exists
+    * @param aStatus completion status of the operation
     */
     void SignalFSObserver( TInt aStatus );
         
 protected:
-				// REVIEW: should tell whether the attributes are owned or not
-				// REVIEW: CMsvOperation already has similar attribute, change the name
+        // mailbox specific activity timer
         CIpsPlgTimerOperation&  iActivityTimer;
-        CBaseMtm*       iBaseMtm;
-        CClientMtmRegistry* iMtmReg;
-        // The sub-operation.
-        CMsvOperation*  iOperation;
+        CBaseMtm*               iBaseMtm;
+        CClientMtmRegistry*     iMtmReg;
+        // sub-operation that this operation is using currently
+        CMsvOperation*          iSubOperation;
         // Status of current operation
-        TInt            iError;
-        // Return this if iOperation==NULL.
-        TBuf8<1>        iDummyProg;
-        
+        TInt                    iError;
+        // Return this if iSubOperation==NULL.
+        TBuf8<1>                iDummyProg;
         
-        //we need to be able to prevent completion signal
-        //to framework, because online operations
-        //may be nested ( fetch uses connect operation )
-        //and we don't want sub operation to signal completion.
-        TBool           iSignallingAllowed;
-        //not owned
-        MFSMailRequestObserver& iFSOperationObserver;
-        
-        
+        // <qmail> removed: TBool           iSignallingAllowed;
+        MFSMailRequestObserver* iFSOperationObserver; //not owned
     };
 
-
-#endif//IPSPLGONLINEOPERATION_H
+#endif //IPSPLGONLINEOPERATION_H