--- a/harvesterplugins/applications/inc/applicationsplugin.h Tue Sep 28 11:50:55 2010 +0530
+++ b/harvesterplugins/applications/inc/applicationsplugin.h Tue Oct 05 13:32:14 2010 +0530
@@ -25,9 +25,16 @@
#include <apgnotif.h> //Notification
//#include <WidgetRegistryClient.h>
#include "delayedcallback.h"
+#if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 )
+#include <widgetregistryclient.h>
+#else
+#include <usif/scr/scr.h>
+#endif
+#include <javaregistryincludes.h>
class CCPixIndexer;
class CRepository;
+class TAppRegInfo;
/**
* Applications plugin class. Harvests applictions(exes), widgets and java apps.
*
@@ -36,14 +43,23 @@
*/
class CApplicationsPlugin : public CIndexingPlugin, public MDelayedCallbackObserver, public MApaAppListServObserver
{
-public: // Constructors and destructor
- static CApplicationsPlugin* NewL();
- static CApplicationsPlugin* NewLC();
- virtual ~CApplicationsPlugin();
+public:
+ enum THarvesterState
+ {
+ EHarvesterIdleState,
+ EHarvesterStartHarvest
+ };
+
+ // Constructors and destructor
+ static CApplicationsPlugin* NewL();
+ static CApplicationsPlugin* NewLC();
+ virtual ~CApplicationsPlugin();
public: // From CIndexingPlugin
virtual void StartPluginL();
virtual void StartHarvestingL(const TDesC& aQualifiedBaseAppClass);
+ void PausePluginL();
+ void ResumePluginL();
public: // From MDelayedCallbackObserver
void DelayedCallbackL(TInt aCode);
@@ -58,13 +74,13 @@
/*
* @description Add, update or delete application document with info in TApaAppInfo based on aActionType.
- * @param aAppInfo: got via RApaLsSession::GetNextApp().
+ * @param aAppInfo: got via GetNextApp().
* @param aActionType: add, update or delete.
* @return void
* Leaves in case of error.
*/
- void CreateApplicationsIndexItemL( TApaAppInfo& aAppInfo, TCPixActionType aActionType );
-
+ void CreateApplicationsIndexItemL(RPointerArray<Usif::TAppRegInfo>& aAppInfo, TCPixActionType aActionType);
+
/*
* @description Adds necessary document fields to aDocument for widget with Uid aUid.
* @param aDocument search document. Not owned.
@@ -84,10 +100,14 @@
private:
CDelayedCallback* iAsynchronizer; //Owned.
CCPixIndexer* iIndexer; // CPix database. Owned.
- RApaLsSession iApplicationServerSession; //to get application info.
+ //RApaLsSession iApplicationServerSession; //to get application info.
+ Usif::RSoftwareComponentRegistry iScrSession;
+ Usif::RApplicationInfoView iScrView;
CApaAppListNotifier* iNotifier; //Owned.
- //RWidgetRegistryClientSession iWidgetRegistry; //to get widget info.
- CRepository* iHiddenApplicationsRepository;
+ //State of harvester either to pause/resume
+ TBool iIndexState;
+ //harvesting state
+ THarvesterState iHarvestState;
#ifdef __PERFORMANCE_DATA
TTime iStartTime;