emailservices/emailstore/base_plugin/inc/baseplugindelayedops.h
changeset 18 578830873419
parent 0 8466d47a6819
child 20 ecc8def7944a
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
    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 #include "baseplugindef.h"
    27 
    28 
    28 
    29 
    29 class CBasePlugin;
    30 class CBasePlugin;
    30 class CDelayedOp;
    31 class CDelayedOp;
    31 
    32 
    66 
    67 
    67 /**
    68 /**
    68  * The base class for the delayed operations. All of the delayed operations must
    69  * The base class for the delayed operations. All of the delayed operations must
    69  * derive from it.
    70  * derive from it.
    70  */
    71  */
    71 class CDelayedOp : public CAsyncOneShot
    72 class BASEPLUGIN_EXPORT CDelayedOp : public CAsyncOneShot
    72     {
    73     {
    73 
    74 
    74 public:
    75 public:
    75     
    76     
    76     IMPORT_C virtual ~CDelayedOp();
    77      virtual ~CDelayedOp();
    77     
    78     
    78     IMPORT_C void SetContext(
    79      void SetContext(
    79         CBasePlugin& aPlugin,
    80         CBasePlugin& aPlugin,
    80         MDelayedOpsManager& aManager );
    81         MDelayedOpsManager& aManager );
    81     
    82     
    82     /**
    83     /**
    83      * Derived classes must implement their asynchronous processing in this
    84      * Derived classes must implement their asynchronous processing in this
    85      */
    86      */
    86     virtual void ExecuteOpL() = 0;
    87     virtual void ExecuteOpL() = 0;
    87 
    88 
    88 protected:
    89 protected:
    89     
    90     
    90     IMPORT_C CDelayedOp();
    91      CDelayedOp();
    91     
    92     
    92     /**
    93     /**
    93      * Returns the plugin instance associated with this operation. Available
    94      * Returns the plugin instance associated with this operation. Available
    94      * only from within the ExecuteOpL method.
    95      * only from within the ExecuteOpL method.
    95      */
    96      */
    96     IMPORT_C CBasePlugin& GetPlugin();
    97      CBasePlugin& GetPlugin();
    97     
    98     
    98     
    99     
    99 private:
   100 private:
   100     
   101     
   101     IMPORT_C virtual void RunL();
   102      virtual void RunL();
   102     IMPORT_C virtual void DoCancel();
   103      virtual void DoCancel();
   103 
   104 
   104 private:
   105 private:
   105     MDelayedOpsManager* iManager;   //not owned
   106     MDelayedOpsManager* iManager;   //not owned
   106     CBasePlugin* iPlugin;           //not owned
   107     CBasePlugin* iPlugin;           //not owned
   107     
   108