harvester/monitorplugins/mmcplugin/inc/mmcscannerao.h
branchRCL_3
changeset 7 3cebc1a84278
parent 3 6752808b2036
equal deleted inserted replaced
6:646a02f170b9 7:3cebc1a84278
    26 #include "harvestereventmanager.h"
    26 #include "harvestereventmanager.h"
    27 
    27 
    28 // FORWARD DECLARATION
    28 // FORWARD DECLARATION
    29 class MMonitorPluginObserver;
    29 class MMonitorPluginObserver;
    30 
    30 
    31 class CMmcScannerAO : public CTimer 
    31 class CMmcScannerAO : public CActive 
    32 	{
    32 	{
    33 public:
    33 public:
    34 	// Cancel and destroy
    34 	// Cancel and destroy
    35 	~CMmcScannerAO();
    35 	~CMmcScannerAO();
    36 
    36 
    37 	// Two-phased constructor.
    37 	// Two-phased constructor.
    38 	static CMmcScannerAO* NewL( TUint32 aMediaId, CMdEHarvesterSession* aMdEClient,
    38 	static CMmcScannerAO* NewL( TUint32 aMediaId, CMdEHarvesterSession* aMdEClient,
    39 			MMonitorPluginObserver* aObserver, CHarvesterPluginFactory* aHarvesterPluginFactory,
    39 			MMonitorPluginObserver* aObserver, CHarvesterPluginFactory* aHarvesterPluginFactory,
    40 			const TInt aPriority, TBool aAlreadyWaited );
    40 			const TInt aPriority );
    41 
    41 
    42 public:
    42 public:
    43 
    43 
    44 private:
    44 private:
    45 	// C++ constructor
    45 	// C++ constructor
    46 	CMmcScannerAO( TUint32 aMediaId, CMdEHarvesterSession* aMdEClient, 
    46 	CMmcScannerAO( TUint32 aMediaId, CMdEHarvesterSession* aMdEClient, 
    47 			MMonitorPluginObserver* aObserver, CHarvesterPluginFactory* aHarvesterPluginFactory,
    47 			MMonitorPluginObserver* aObserver, CHarvesterPluginFactory* aHarvesterPluginFactory,
    48 			const TInt aPriority );
    48 			const TInt aPriority );
    49 
    49 
    50 	// Second-phase constructor
    50 	// Second-phase constructor
    51 	void ConstructL( TBool aAlreadyWaited );
    51 	void ConstructL();
    52 
    52 
    53 private:
    53 private:
    54 	enum TCMmcScannerAOState
    54 	enum TCMmcScannerAOState
    55 		{
    55 		{
    56 		EUninitialized, // Uninitialized
    56 		EUninitialized, // Uninitialized
    73 	
    73 	
    74 	void HandleReharvestL();
    74 	void HandleReharvestL();
    75 	
    75 	
    76 	void SetState( TCMmcScannerAOState aState );		
    76 	void SetState( TCMmcScannerAOState aState );		
    77 
    77 
       
    78     /**
       
    79     * From CActive
       
    80     */
       
    81     void DoCancel();
       
    82 	
    78 private:
    83 private:
    79 	TInt iState; // State of the active object
    84 	TInt iState; // State of the active object
    80 	
    85 	
    81 	TUint32 iMediaId;
    86 	TUint32 iMediaId;
    82 	
    87 	
    99 	MMonitorPluginObserver* iObserver;
   104 	MMonitorPluginObserver* iObserver;
   100 	
   105 	
   101 	RPointerArray<CHarvesterData> iHdArray;
   106 	RPointerArray<CHarvesterData> iHdArray;
   102 	
   107 	
   103     CHarvesterEventManager* iHEM;
   108     CHarvesterEventManager* iHEM;
       
   109     
       
   110     RTimer iTimer;
   104 	};
   111 	};
   105 
   112 
   106 #endif // CMMCSCANNERAO_H
   113 #endif // CMMCSCANNERAO_H
   107 
   114