emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h
branchRCL_3
changeset 64 3533d4323edc
parent 63 d189ee25cf9d
equal deleted inserted replaced
63:d189ee25cf9d 64:3533d4323edc
    19 #ifndef __BASEPLUGINDELAYEDOPS_H__
    19 #ifndef __BASEPLUGINDELAYEDOPS_H__
    20 #define __BASEPLUGINDELAYEDOPS_H__
    20 #define __BASEPLUGINDELAYEDOPS_H__
    21 
    21 
    22 
    22 
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include "CFSMailCommon.h"
    24 #include "cfsmailcommon.h"
    25 #include "BasePlugin.h"
    25 #include "baseplugin.h"
    26 #include "DebugLogMacros.h"
    26 #include "debuglogmacros.h"
    27 
    27 
    28 //<qmail>
       
    29 #include "baseplugindef.h"
       
    30 //</qmail>
       
    31 
    28 
    32 class CBasePlugin;
    29 class CBasePlugin;
    33 class CDelayedOp;
    30 class CDelayedOp;
    34 
    31 
    35 
    32 
    69 
    66 
    70 /**
    67 /**
    71  * The base class for the delayed operations. All of the delayed operations must
    68  * The base class for the delayed operations. All of the delayed operations must
    72  * derive from it.
    69  * derive from it.
    73  */
    70  */
    74 class BASEPLUGIN_EXPORT CDelayedOp : public CActive
    71 class CDelayedOp : public CActive
    75     {
    72     {
    76 
    73 
    77 public:
    74 public:
       
    75 
       
    76     IMPORT_C virtual ~CDelayedOp();
    78     
    77     
    79      virtual ~CDelayedOp();
    78     IMPORT_C void SetContext(
    80     
       
    81      void SetContext(
       
    82         CBasePlugin& aPlugin,
    79         CBasePlugin& aPlugin,
    83         MDelayedOpsManager& aManager );
    80         MDelayedOpsManager& aManager );
    84     
    81 
    85 	 void StartOp();
    82     IMPORT_C void StartOp();
       
    83 
    86     /**
    84     /**
    87      * Derived classes must implement their asynchronous processing in this
    85      * Derived classes must implement their asynchronous processing in this
    88      * method. The GetPlugin method can only be used from within this method.
    86      * method. The GetPlugin method can only be used from within this method.
       
    87      * Returns boolean: ETrue if op is yielding and needs to be called again, or EFalse if op is done.
    89      */
    88      */
    90     virtual TBool ExecuteOpL() = 0;
    89     virtual TBool ExecuteOpL() = 0;
    91 
    90 
    92 protected:
    91 protected:
    93     
    92     
    94      CDelayedOp();
    93     IMPORT_C CDelayedOp();
    95     
    94     
    96     /**
    95     /**
    97      * Returns the plugin instance associated with this operation. Available
    96      * Returns the plugin instance associated with this operation. Available
    98      * only from within the ExecuteOpL method.
    97      * only from within the ExecuteOpL method.
    99      */
    98      */
   100      CBasePlugin& GetPlugin();
    99     IMPORT_C CBasePlugin& GetPlugin();
   101     
   100     
   102     
   101     
   103 private:
   102 private:
   104     
   103     
   105      virtual void RunL();
   104     IMPORT_C virtual void RunL();
   106      virtual void DoCancel();
   105     IMPORT_C virtual void DoCancel();
   107 
   106 
   108 private:
   107 private:
   109     MDelayedOpsManager* iManager;   //not owned
   108     MDelayedOpsManager* iManager;   //not owned
   110     CBasePlugin* iPlugin;           //not owned
   109     CBasePlugin* iPlugin;           //not owned
   111     
   110     
   112 public:
       
   113     TInt iRequestId;
       
   114     MFSMailRequestObserver* iOperationObserver;
       
   115     
       
   116     __LOG_DECLARATION
   111     __LOG_DECLARATION
   117     };
   112     };
   118 
   113 
   119 #endif // __BASEPLUGINDELAYEDOPS_H__
   114 #endif // __BASEPLUGINDELAYEDOPS_H__