harvester/harvesterserver/inc/cindexingmanager.h
changeset 24 65456528cac2
parent 23 d4d56f5e7c55
equal deleted inserted replaced
23:d4d56f5e7c55 24:65456528cac2
    20 
    20 
    21 #include <CIndexingPlugin.h>
    21 #include <CIndexingPlugin.h>
    22 #include <MIndexingPluginObserver.h>
    22 #include <MIndexingPluginObserver.h>
    23 #include <RSearchServerSession.h>
    23 #include <RSearchServerSession.h>
    24 #include <cactivitymanager.h>
    24 #include <cactivitymanager.h>
       
    25 #include <cpixstateobserver.h>
    25 #include "cgaurdtimer.h"
    26 #include "cgaurdtimer.h"
    26 
    27 
    27 const TInt KFilePluginBaseAppClassMaxLen = 64;
    28 const TInt KFilePluginBaseAppClassMaxLen = 64;
    28 //Forward Declaration
    29 //Forward Declaration
    29 class CBlacklistMgr;
    30 class CBlacklistMgr;
    30 class ContentInfoDbUpdate;
    31 class ContentInfoDbUpdate;
    31 
    32 
    32 class CIndexingManager : public CActive,
    33 class CIndexingManager : public CActive,
    33                          public MIndexingService,
    34                          public MIndexingService,
    34                          public MActivityManagerObserver,
    35                          public MActivityManagerObserver,
       
    36                          public MCPiXStateObserver,
    35                          public MGaurdTimerHandler
    37                          public MGaurdTimerHandler
    36 	{
    38 	{
    37 public:	
    39 public:	
    38 	static CIndexingManager* NewL();
    40 	static CIndexingManager* NewL();
    39 	virtual ~CIndexingManager();
    41 	virtual ~CIndexingManager();
    88 
    90 
    89 	/**
    91 	/**
    90 	 * StartPlugins starts all loaded plugins 
    92 	 * StartPlugins starts all loaded plugins 
    91 	 */
    93 	 */
    92 	void StartPlugins();
    94 	void StartPlugins();
    93 
    95 	/**
       
    96      * PausePluginsL call pause on all loaded plugins 
       
    97      */
       
    98 	void PausePluginsL();
       
    99 	/**
       
   100      * ResumePlugins pauses all loaded plugins 
       
   101      */
       
   102 	void ResumePluginsL();
    94 	/**
   103 	/**
    95 	 * Loading the state of the Plugins
   104 	 * Loading the state of the Plugins
    96 	 */
   105 	 */
    97 	TInt Internalize();
   106 	TInt Internalize();
    98 	/**
   107 	/**
   128      * Loads the Harvesterplugin with given plugin uid
   137      * Loads the Harvesterplugin with given plugin uid
   129      */
   138      */
   130 	void LoadHarvesterpluginL (TUid aPluginUid, TInt aVersion, const TDesC& aPluginName);
   139 	void LoadHarvesterpluginL (TUid aPluginUid, TInt aVersion, const TDesC& aPluginName);
   131 	
   140 	
   132 	//From MActivityManagerObserver
   141 	//From MActivityManagerObserver
   133 	void ActivityChanged(const TBool aActive);
   142 	void ActivityChangedL( const TBool aActive );
       
   143 	
       
   144 	//From MCPiXStateObserver
       
   145 	void HandleStateObserverChangeL( const TBool aActive );
   134 	
   146 	
   135 private:
   147 private:
   136 	CIndexingManager();
   148 	CIndexingManager();
   137 	void ConstructL();
   149 	void ConstructL();
   138 
   150 
   234 	CBlacklistMgr* iBlacklistMgr;
   246 	CBlacklistMgr* iBlacklistMgr;
   235 	/* Database to maintain the content info all the plugins.owned*/
   247 	/* Database to maintain the content info all the plugins.owned*/
   236 	ContentInfoDbUpdate* iContentInfodb;
   248 	ContentInfoDbUpdate* iContentInfodb;
   237 	//monitors device activity
   249 	//monitors device activity
   238 	CActivityManager* iActivityManager;
   250 	CActivityManager* iActivityManager;
   239 	
   251 	CPiXStateObserver *iStateObserver;
   240 	CGaurdTimer *iGaurdTimer;
   252 	CGaurdTimer *iGaurdTimer;
       
   253 	TBool iHarvestState;
   241 	};
   254 	};
   242 
   255 
   243 #endif // CINDEXINGMANAGER_H
   256 #endif // CINDEXINGMANAGER_H