harvester/harvesterserver/inc/cindexingmanager.h
changeset 23 d4d56f5e7c55
parent 8 6547bf8ca13a
child 24 65456528cac2
equal deleted inserted replaced
20:556534771396 23:d4d56f5e7c55
    19 #define CINDEXINGMANAGER_H
    19 #define CINDEXINGMANAGER_H
    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>
       
    25 #include "cgaurdtimer.h"
    24 
    26 
    25 const TInt KFilePluginBaseAppClassMaxLen = 64;
    27 const TInt KFilePluginBaseAppClassMaxLen = 64;
    26 //Forward Declaration
    28 //Forward Declaration
    27 class CBlacklistMgr;
    29 class CBlacklistMgr;
    28 class CContentInfoMgr;
    30 class ContentInfoDbUpdate;
    29 class CContentInfo;
    31 
    30 
    32 class CIndexingManager : public CActive,
    31 class CIndexingManager : public CActive, public MIndexingService
    33                          public MIndexingService,
       
    34                          public MActivityManagerObserver,
       
    35                          public MGaurdTimerHandler
    32 	{
    36 	{
    33 public:	
    37 public:	
    34 	static CIndexingManager* NewL();
    38 	static CIndexingManager* NewL();
    35 	virtual ~CIndexingManager();
    39 	virtual ~CIndexingManager();
    36 
    40 
    70 	 * @param aPlugin the plugin object that calls this function 
    74 	 * @param aPlugin the plugin object that calls this function 
    71      * @param aQualifiedBaseAppClass database to harvest
    75      * @param aQualifiedBaseAppClass database to harvest
    72 	 * @param aError KErrNone if harvesting completed successfully otherwise systemwide errorcodes
    76 	 * @param aError KErrNone if harvesting completed successfully otherwise systemwide errorcodes
    73 	 */
    77 	 */
    74 	void HarvestingCompleted(CIndexingPlugin* aPlugin, const TDesC& aQualifiedBaseAppClass, TInt aError);
    78 	void HarvestingCompleted(CIndexingPlugin* aPlugin, const TDesC& aQualifiedBaseAppClass, TInt aError);
    75 						
    79 	
       
    80 	// from MGaurdTimerHandler
       
    81     void HandleGaurdTimerL();				
    76 private:
    82 private:
    77 
    83 
    78 	/**
    84 	/**
    79 	 * LoadPluginsL loads all plugins
    85 	 * LoadPluginsL loads all plugins
    80 	 */
    86 	 */
   100 	/**
   106 	/**
   101      * saving the state of the Plugins
   107      * saving the state of the Plugins
   102      */
   108      */
   103 	void SaveL();
   109 	void SaveL();
   104 	/**
   110 	/**
   105      * Add an entry to the content info Db with the plugin details.If an entry with the given 
   111      * Add an entry to the content info Db with the plugin details.
   106      * plugin name is already available in contentinfo db then the blacklist status of the plugin
   112      */
   107      * is updated with KEnable.
   113 	void UpdateContentInfoDbL( const TDesC& aXmlPath );
   108      */
       
   109 	void UpdateContentInfoDbL( const TDesC& aPluginName, CContentInfo* aContentinfo);
       
   110 	/**
   114 	/**
   111      * Update the dontload list in a separate table in blacklist database.
   115      * Update the dontload list in a separate table in blacklist database.
   112      * If any error occurs in reading Uid values from centrep, then the dontload list
   116      * If any error occurs in reading Uid values from centrep, then the dontload list
   113      * is ignored.
   117      * is ignored.
   114      */
   118      */
   122 	
   126 	
   123 	/**
   127 	/**
   124      * Loads the Harvesterplugin with given plugin uid
   128      * Loads the Harvesterplugin with given plugin uid
   125      */
   129      */
   126 	void LoadHarvesterpluginL (TUid aPluginUid, TInt aVersion, const TDesC& aPluginName);
   130 	void LoadHarvesterpluginL (TUid aPluginUid, TInt aVersion, const TDesC& aPluginName);
       
   131 	
       
   132 	//From MActivityManagerObserver
       
   133 	void ActivityChanged(const TBool aActive);
   127 	
   134 	
   128 private:
   135 private:
   129 	CIndexingManager();
   136 	CIndexingManager();
   130 	void ConstructL();
   137 	void ConstructL();
   131 
   138 
   224 	/* Time of previous RunL call */
   231 	/* Time of previous RunL call */
   225 	TTime iPreviousRun;
   232 	TTime iPreviousRun;
   226 	/* Database to maintain blacklisted plugins.Owned */
   233 	/* Database to maintain blacklisted plugins.Owned */
   227 	CBlacklistMgr* iBlacklistMgr;
   234 	CBlacklistMgr* iBlacklistMgr;
   228 	/* Database to maintain the content info all the plugins.owned*/
   235 	/* Database to maintain the content info all the plugins.owned*/
   229 	CContentInfoMgr* iContentInfoMgr;
   236 	ContentInfoDbUpdate* iContentInfodb;
       
   237 	//monitors device activity
       
   238 	CActivityManager* iActivityManager;
       
   239 	
       
   240 	CGaurdTimer *iGaurdTimer;
   230 	};
   241 	};
   231 
   242 
   232 #endif // CINDEXINGMANAGER_H
   243 #endif // CINDEXINGMANAGER_H