Revision: 201031
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 18 Aug 2010 09:49:49 +0300
changeset 17 7d8c8d8f5eab
parent 12 993ab30e92fc
child 20 68cdadcf169e
Revision: 201031 Kit: 201033
harvesterplugins/applications/group/applicationsplugin.mmp
harvesterplugins/applications/inc/applicationsplugin.h
harvesterplugins/applications/src/applicationsplugin.cpp
harvesterplugins/calendar/group/calendarplugin.mmp
harvesterplugins/calendar/inc/ccalendarplugin.h
harvesterplugins/calendar/src/ccalendarplugin.cpp
harvesterplugins/calendar/traces/ccalendarpluginTraces.h
harvesterplugins/calendar/traces/fixed_id.definitions
harvesterplugins/contacts/group/contactsplugin.mmp
harvesterplugins/contacts/src/ccontactsplugin.cpp
harvesterplugins/file/inc/cfileplugin.h
harvesterplugins/file/src/cfileplugin.cpp
harvesterplugins/file/src/cmmcmonitor.cpp
harvesterplugins/media/audio/group/audioplugin.mmp
harvesterplugins/media/audio/inc/mediaplugin.h
harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp
harvesterplugins/media/audio/src/mediaplugin.cpp
harvesterplugins/media/image/group/imageplugin.mmp
harvesterplugins/media/image/inc/imageplugin.h
harvesterplugins/media/image/src/cpixmediaimagedoc.cpp
harvesterplugins/media/image/src/imageplugin.cpp
harvesterplugins/media/mediautils/inc/cpixdocfetcher.h
harvesterplugins/media/mediautils/inc/cpixindexerutils.h
harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp
harvesterplugins/media/mediautils/src/cpixindexerutils.cpp
harvesterplugins/media/video/group/videoplugin.mmp
harvesterplugins/media/video/inc/videoplugin.h
harvesterplugins/media/video/src/cpixmediavideodoc.cpp
harvesterplugins/media/video/src/videoplugin.cpp
harvesterplugins/messaging/email/inc/cemailplugin.h
harvesterplugins/messaging/smsmms/group/messageplugin.mmp
harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp
harvesterplugins/notes/group/notesplugin.mmp
harvesterplugins/notes/inc/notesplugin.h
harvesterplugins/notes/src/notesplugin.cpp
harvesterplugins/notes/traces/fixed_id.definitions
harvesterplugins/notes/traces/notespluginTraces.h
harvesterplugins/tsrc/harvesterplugintester/Bwins/harvesterplugintesteru.def
harvesterplugins/tsrc/harvesterplugintester/conf/eagle_landed.mp3
harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg
harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/3GPP-70kB.3gpp
harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/audio1.mp3
harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/kodak-dc210.jpg
harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/nokia_logo.png
harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/song.wma
harvesterplugins/tsrc/harvesterplugintester/group/bld.inf
harvesterplugins/tsrc/harvesterplugintester/group/harvesterplugintester.mmp
harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h
harvesterplugins/tsrc/harvesterplugintester/src/ccalanderobserver.cpp
harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp
onlinesearchproviders/data/providerdatabase.sq
onlinesearchproviders/onlinesearchproviders.pro
rom/cpix_app.iby
searchui/Searchapplication/Searchapplication.pro
searchui/Searchapplication/src/main.cpp
searchui/bwins/searchindevicehandleru.def
searchui/eabi/searchindevicehandleru.def
searchui/inc/Search_global.h
searchui/indevicehandler/inc/indevicehandler.h
searchui/indevicehandler/indevicehandler.pro
searchui/indevicehandler/src/indevicehandler.cpp
searchui/indevicehandler/tsrc/t_indevicehandler/src/t_indevicehandler.cpp
searchui/onlinehandler/tsrc/t_baiduplugin/src/t_baiduplugin.cpp
searchui/onlinehandler/tsrc/t_bingplugin/src/t_bingplugin.cpp
searchui/onlinehandler/tsrc/t_googleplugin/src/t_googleplugin.cpp
searchui/onlinehandler/tsrc/t_onlinehandler/src/t_onlinehandler.cpp
searchui/rom/searchresources.iby
searchui/runtimeproviders/searchruntimeprovider/inc/searchruntime.h
searchui/runtimeproviders/searchruntimeprovider/src/searchruntime.cpp
searchui/stateproviders/searchstateprovider/inc/searchonlinestate.h
searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h
searchui/stateproviders/searchstateprovider/inc/searchuiloader.h
searchui/stateproviders/searchstateprovider/inc/settingswidget.h
searchui/stateproviders/searchstateprovider/resources/resources.qrc
searchui/stateproviders/searchstateprovider/searchstateprovider.pro
searchui/stateproviders/searchstateprovider/src/searchonlinestate.cpp
searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp
searchui/stateproviders/searchstateprovider/src/searchuiloader.cpp
searchui/stateproviders/searchstateprovider/src/settingswidget.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/inc/t_searchactivity.h
searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/src/main.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/src/t_searchactivity.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/t_searchactivity.pri
searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/t_searchactivity.pro
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/inc/t_searchstateprovider.h
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchonlinestate.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchsettingsstate.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchstateprovider.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_settingswidget.cpp
searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro
searchui/stateproviders/searchstateprovider/tsrc/tsrc.pro
--- a/harvesterplugins/applications/group/applicationsplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/applications/group/applicationsplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -46,10 +46,13 @@
 LIBRARY       cpixsearchclient.lib
 LIBRARY       apgrfx.lib //for RApaLsSession
 LIBRARY       apparc.lib //for TApaAppInfo 
-LIBRARY       widgetregistryclient.lib
+//LIBRARY       widgetregistryclient.lib
 LIBRARY       centralrepository.lib    //for CRepository
 
 // For logging
 LIBRARY 	  flogger.lib 
 
+// For enabling Highlighter
+//MACRO USE_HIGHLIGHTER
+
 EXPORTUNFROZEN
\ No newline at end of file
--- a/harvesterplugins/applications/inc/applicationsplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/applications/inc/applicationsplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <apgcli.h> //RApaLsSession
 #include <apgnotif.h> //Notification
-#include <WidgetRegistryClient.h>
+//#include <WidgetRegistryClient.h>
 #include "delayedcallback.h"
 
 class CCPixIndexer;
@@ -72,7 +72,7 @@
      * @return void
      * Leaves in case of error.
      */
-	void AddWidgetInfoL( CSearchDocument* aDocument, TUid aUid );
+	//void AddWidgetInfoL( CSearchDocument* aDocument, TUid aUid );
 
 	/*
 	 * @description Returns true if applicaiton with uid aUid hidden, false otherwise
@@ -86,7 +86,7 @@
     CCPixIndexer* iIndexer; // CPix database. Owned.
     RApaLsSession iApplicationServerSession; //to get application info.
     CApaAppListNotifier* iNotifier; //Owned.
-    RWidgetRegistryClientSession iWidgetRegistry; //to get widget info.
+    //RWidgetRegistryClientSession iWidgetRegistry; //to get widget info.
     CRepository* iHiddenApplicationsRepository;
 
 #ifdef __PERFORMANCE_DATA
--- a/harvesterplugins/applications/src/applicationsplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/applications/src/applicationsplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -23,7 +23,7 @@
 #include <csearchdocument.h>
 #include <e32base.h>
 //#include <menu2internalcrkeys.h> //for KCRUidMenu
-#include <WidgetPropertyValue.h> // EBundleDisplayName 
+//#include <WidgetPropertyValue.h> // EBundleDisplayName 
 #include <centralrepository.h>
 #include <opensystemtrace.h> 
 #include "OstTraceDefinitions.h"
@@ -81,7 +81,7 @@
     if (iAsynchronizer)
         iAsynchronizer->CancelCallback();
     iApplicationServerSession.Close();
-    iWidgetRegistry.Close();
+    //iWidgetRegistry.Close();
     //delete iHiddenApplicationsRepository;
 	delete iAsynchronizer;
 	delete iNotifier;
@@ -94,7 +94,7 @@
     iAsynchronizer = CDelayedCallback::NewL( CActive::EPriorityIdle );
     iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityHigh );
     //iHiddenApplicationsRepository = CRepository::NewL( KHiddenAppRepositoryUid );
-    User::LeaveIfError( iWidgetRegistry.Connect() );
+    //User::LeaveIfError( iWidgetRegistry.Connect() );
     }
 
 // -----------------------------------------------------------------------------
@@ -124,7 +124,8 @@
    	iAsynchronizer->Start( 0, this, KHarvestingDelay );
     }
 
-// -----------------------------------------------------------------------------
+//Removing Widget Registry support
+/* -----------------------------------------------------------------------------
 void CApplicationsPlugin::AddWidgetInfoL( CSearchDocument* aDocument, TUid aUid )
     {
     TBuf<KMaxFileName> temp;//we can reuse this.
@@ -145,7 +146,7 @@
     
     OstTraceExt1( TRACE_NORMAL, DUP1_CAPPLICATIONSPLUGIN_ADDWIDGETINFOL, "CApplicationsPlugin::AddWidgetInfoL;DisplayName=%S", &temp );
     CPIXLOGSTRING2("AddApplicationInfo(): DisplayName = %S ", &temp );
-    }
+    }*/
 
 // -----------------------------------------------------------------------------
 //This need not be a member function.
@@ -240,11 +241,19 @@
     //That way, if a client is interested in the UID field, he can choose to query it explicitly.
     document->AddFieldL(KMimeTypeField, KMimeTypeApplication, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized );
     document->AddFieldL(KApplicationFieldUid, docidString, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EAggregateNo );
-
-    if( iWidgetRegistry.IsWidget( aAppInfo.iUid  ) )
+#ifdef USE_HIGHLIGHTER    
+    TInt excerptLength = docidString.Length();
+    HBufC* excerpt = HBufC::NewL(excerptLength);
+    TPtr excerptPtr = excerpt->Des();
+    CleanupStack::PushL(excerpt);
+    document->AddExcerptL(excerptPtr);
+    CleanupStack::PopAndDestroy(excerpt);
+#endif
+    
+    /*if( iWidgetRegistry.IsWidget( aAppInfo.iUid  ) ) //Widget support
         AddWidgetInfoL( document, aAppInfo.iUid );
-    else
-        AddApplicationInfoL( document, aAppInfo );
+    else*/
+     AddApplicationInfoL( document, aAppInfo );
 
     TRAPD( error, iIndexer->AddL( *document ) );
     if( KErrNone == error )
--- a/harvesterplugins/calendar/group/calendarplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/calendar/group/calendarplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -47,6 +47,8 @@
 LIBRARY       cpixharvesterplugininterface.lib
 LIBRARY       cpixsearchclient.lib
 
+// For Enabling highlighter
+//MACRO USE_HIGHLIGHTER
 
 // For logging
 LIBRARY 	  flogger.lib 
--- a/harvesterplugins/calendar/inc/ccalendarplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/calendar/inc/ccalendarplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -123,7 +123,12 @@
 	TBool iFirstEntry;
 	
 	// Start harvesting
-	TBool iStartHarvesting;    
+	TBool iStartHarvesting;
+	
+	//for unit testing.
+    #ifdef HARVESTERPLUGINTESTER_FRIEND
+        friend class CHarvesterPluginTester;
+    #endif
 
 #ifdef __PERFORMANCE_DATA
     TTime iStartTime;
--- a/harvesterplugins/calendar/src/ccalendarplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/calendar/src/ccalendarplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -385,64 +385,72 @@
 		// Add fields
 		index_item->AddFieldL(KCalendarSummaryField, entry->SummaryL());
 		index_item->AddFieldL(KCalendarDescriptionField, entry->DescriptionL());
-		index_item->AddFieldL(KCalendarLocationField, entry->LocationL());
-		
-		TUint priority = entry->PriorityL();
-		
-		switch(priority)
-		    {
-		    case 1:
-		        index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityHigh);
-		        break;
-		    case 2:
-		        index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityMedium);
-                break;
-		    case 3:
-		        index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityLow);
-                break;
-		    default:
-	            index_item->AddFieldL(KCalendarPriorityField, KNullDesC);
-	            break;
-		    }
+		index_item->AddFieldL(KCalendarLocationField, entry->LocationL());		
 
 		TBuf<30> dateString;
-		TDateTime datetime = entry->StartTimeL().TimeUtcL().DateTime();       
+		TDateTime datetime = entry->StartTimeL().TimeLocalL().DateTime();       
 		dateString.Format( KCalendarTimeFormat, datetime.Year(),
 		                                     TInt(datetime.Month()+ 1),
 		                                     datetime.Day() + 1,
-		                                     datetime.Hour()+ 1,
+		                                     datetime.Hour(),
 		                                     datetime.Minute());
 		index_item->AddFieldL(KCalendarStartTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
 
-		TDateTime endTime = entry->EndTimeL().TimeUtcL().DateTime();		
+		TDateTime endTime = entry->EndTimeL().TimeLocalL().DateTime();		
 		dateString.Format( KCalendarTimeFormat, endTime.Year(),
                                                 TInt(endTime.Month()+ 1),
                                                 endTime.Day() + 1,
-                                                endTime.Hour()+ 1,
+                                                endTime.Hour(),
                                                 endTime.Minute());
 		index_item->AddFieldL(KCalendarEndTimeField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
 		
-		TTime completedTime = entry->CompletedTimeL().TimeUtcL();
-		if( completedTime != Time::NullTTime() && CCalEntry::ETodo == entry->EntryTypeL())
+		
+		if( CCalEntry::ETodo == entry->EntryTypeL())
 		    {
-            TDateTime compTime = completedTime.DateTime();
-            dateString.Format( KCalendarTimeFormat, compTime.Year(),
-                                                TInt(compTime.Month()+ 1),
-                                                compTime.Day() + 1,
-                                                compTime.Hour()+ 1,
-                                                compTime.Minute());
-            index_item->AddFieldL(KCalenderCompletedField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+            TUint priority = entry->PriorityL();        
+            switch(priority)
+                {
+                case 1:
+                    index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityHigh);
+                    break;
+                case 2:
+                    index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityMedium);
+                    break;
+                case 3:
+                    index_item->AddFieldL(KCalendarPriorityField, KCalendarPriorityLow);
+                    break;
+                default:
+                    index_item->AddFieldL(KCalendarPriorityField, KNullDesC);
+                    break;
+                }
+            TTime completedTime = entry->CompletedTimeL().TimeLocalL();
+            if( completedTime != Time::NullTTime())
+                {
+                TDateTime compTime = completedTime.DateTime();
+                dateString.Format( KCalendarTimeFormat, compTime.Year(),
+                                                    TInt(compTime.Month()+ 1),
+                                                    compTime.Day() + 1,
+                                                    compTime.Hour(),
+                                                    compTime.Minute());
+                index_item->AddFieldL(KCalenderCompletedField, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+                }
 		    }
 		index_item->AddFieldL(KMimeTypeField, KMimeTypeCalendar, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-
+#ifdef USE_HIGHLIGHTER		
+    	TInt excerptLength = 1 /*single 1-character delimiters*/ + entry->DescriptionL().Length() + entry->LocationL().Length() + 1 + entry->SummaryL().Length();
+#else    	
     	TInt excerptLength = 1 /*single 1-character delimiters*/ + entry->DescriptionL().Length() + entry->LocationL().Length();
+#endif    	
 		HBufC* excerpt = HBufC::NewLC(excerptLength);
 		TPtr excerptDes = excerpt->Des();
 		excerptDes.Append(entry->DescriptionL());
 		excerptDes.Append(KExcerptDelimiter);
 		excerptDes.Append(entry->LocationL());
-
-        index_item->AddExcerptL(*excerpt);
+#ifdef USE_HIGHLIGHTER		
+	    excerptDes.Append(KExcerptDelimiter);
+	    excerptDes.Append(entry->SummaryL());
+#endif	    
+	    index_item->AddExcerptL(*excerpt);
         CleanupStack::PopAndDestroy(excerpt);
         CleanupStack::PopAndDestroy(entry);
 
@@ -461,46 +469,19 @@
 		if (aActionType == ECPixAddAction)
 			{
 			TRAPD(err, iIndexer->AddL(*index_item));
-			if (err == KErrNone)
-				{
-				OstTrace0( TRACE_NORMAL, DUP2_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL(): Added." );
-				CPIXLOGSTRING("CCalendarPlugin::CreateEntryL(): Added.");
-				}
-			else
-				{
-				OstTrace1( TRACE_NORMAL, DUP3_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL();Error %d in adding", err );
-				CPIXLOGSTRING2("CCalendarPlugin::CreateEntryL(): Error %d in adding.", err);
-				}			
+			OstTrace1( TRACE_NORMAL, DUP8_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL: Indexer->AddL;err=%d", err );			
 			}
-		else if (aActionType == ECPixUpdateAction)
+		else
 			{
 			TRAPD(err, iIndexer->UpdateL(*index_item));
-			if (err == KErrNone)
-				{
-				OstTrace0( TRACE_NORMAL, DUP4_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL(): Updated." );
-				CPIXLOGSTRING("CCalendarPlugin::CreateEntryL(): Updated.");
-				}
-			else
-				{
-				OstTrace1( TRACE_NORMAL, DUP5_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL();Error %d in updating", err );
-				CPIXLOGSTRING2("CCalendarPlugin::CreateEntryL(): Error %d in updating.", err);
-				}			
+			OstTrace1( TRACE_NORMAL, DUP9_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL: iIndexer->UpdateL;err=%d", err );	
 			}
 		CleanupStack::PopAndDestroy(index_item);
 		}
 	else if (aActionType == ECPixRemoveAction)
 		{
 		TRAPD(err, iIndexer->DeleteL(docid_str));
-		if (err == KErrNone)
-			{
-			OstTrace0( TRACE_NORMAL, DUP6_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL(): Deleted." );
-			CPIXLOGSTRING("CCalendarPlugin::CreateEntryL(): Deleted.");
-			}
-		else
-			{
-			OstTrace1( TRACE_NORMAL, DUP7_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL();Error %d in deleting", err );
-			CPIXLOGSTRING2("CCalendarPlugin::CreateEntryL(): Error %d in deleting.", err);				
-			}
+		OstTrace1( TRACE_NORMAL, DUP2_CCALENDARPLUGIN_CREATEENTRYL, "CCalendarPlugin::CreateEntryL: iIndexer->RemoveL;err=%d", err );
 		}
 
 	}
--- a/harvesterplugins/calendar/traces/ccalendarpluginTraces.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/calendar/traces/ccalendarpluginTraces.h	Wed Aug 18 09:49:49 2010 +0300
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
 // DO NOT EDIT, CHANGES WILL BE LOST
 
 #ifndef __CCALENDARPLUGINTRACES_H__
@@ -15,11 +15,8 @@
 #define CCALENDARPLUGIN_CREATEENTRYL 0x860007
 #define DUP1_CCALENDARPLUGIN_CREATEENTRYL 0x860008
 #define DUP2_CCALENDARPLUGIN_CREATEENTRYL 0x860009
-#define DUP3_CCALENDARPLUGIN_CREATEENTRYL 0x86000a
-#define DUP4_CCALENDARPLUGIN_CREATEENTRYL 0x86000b
-#define DUP5_CCALENDARPLUGIN_CREATEENTRYL 0x86000c
-#define DUP6_CCALENDARPLUGIN_CREATEENTRYL 0x86000d
-#define DUP7_CCALENDARPLUGIN_CREATEENTRYL 0x86000e
+#define DUP8_CCALENDARPLUGIN_CREATEENTRYL 0x86000f
+#define DUP9_CCALENDARPLUGIN_CREATEENTRYL 0x860010
 
 
 #endif
--- a/harvesterplugins/calendar/traces/fixed_id.definitions	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/calendar/traces/fixed_id.definitions	Wed Aug 18 09:49:49 2010 +0300
@@ -8,9 +8,11 @@
 [TRACE]TRACE_NORMAL[0x86]_DUP1_CCALENDARPLUGIN_HANDLECHANGEDENTRYL=0x4
 [TRACE]TRACE_NORMAL[0x86]_DUP2_CCALENDARPLUGIN_CREATEENTRYL=0x9
 [TRACE]TRACE_NORMAL[0x86]_DUP2_CCALENDARPLUGIN_HANDLECHANGEDENTRYL=0x5
-[TRACE]TRACE_NORMAL[0x86]_DUP3_CCALENDARPLUGIN_CREATEENTRYL=0xa
 [TRACE]TRACE_NORMAL[0x86]_DUP3_CCALENDARPLUGIN_HANDLECHANGEDENTRYL=0x6
-[TRACE]TRACE_NORMAL[0x86]_DUP4_CCALENDARPLUGIN_CREATEENTRYL=0xb
-[TRACE]TRACE_NORMAL[0x86]_DUP5_CCALENDARPLUGIN_CREATEENTRYL=0xc
-[TRACE]TRACE_NORMAL[0x86]_DUP6_CCALENDARPLUGIN_CREATEENTRYL=0xd
-[TRACE]TRACE_NORMAL[0x86]_DUP7_CCALENDARPLUGIN_CREATEENTRYL=0xe
+[TRACE]TRACE_NORMAL[0x86]_DUP8_CCALENDARPLUGIN_CREATEENTRYL=0xf
+[TRACE]TRACE_NORMAL[0x86]_DUP9_CCALENDARPLUGIN_CREATEENTRYL=0x10
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP3_CCALENDARPLUGIN_CREATEENTRYL=0xa
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP4_CCALENDARPLUGIN_CREATEENTRYL=0xb
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP5_CCALENDARPLUGIN_CREATEENTRYL=0xc
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP6_CCALENDARPLUGIN_CREATEENTRYL=0xd
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP7_CCALENDARPLUGIN_CREATEENTRYL=0xe
--- a/harvesterplugins/contacts/group/contactsplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/contacts/group/contactsplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -46,6 +46,8 @@
 LIBRARY       cpixharvesterplugininterface.lib
 LIBRARY       cpixsearchclient.lib
 
+// For Enabling Highlighter
+//MACRO USE_HIGHLIGHTER
 
 // For logging
 LIBRARY 	  flogger.lib 
--- a/harvesterplugins/contacts/src/ccontactsplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/contacts/src/ccontactsplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -310,16 +310,38 @@
 	if (! (findpos < 0) || (findpos >= aFieldSet.Count() ) )
 		{
 		CContactItemField& additionalField = aFieldSet[ findpos ];
-		CContactTextField* fieldText = additionalField.TextStorage();
-		if ( fieldText && fieldText->Text() != KNullDesC )
-			{
-			TInt currentSize = iExcerpt->Size();
-			TInt newSize = currentSize + fieldText->Text().Size() + 1;
-			iExcerpt = iExcerpt->ReAllocL(newSize);
-			TPtr ptr = iExcerpt->Des();
-			ptr.Append(fieldText->Text());
-			ptr.Append(KExcerptDelimiter);
-			}
+		TInt newfieldsize = 0;
+		if( additionalField.StorageType() == KStorageTypeDateTime)
+		            {
+		            CContactDateField* fieldDate = additionalField.DateTimeStorage();
+		            if (fieldDate)
+		                {
+		                TBuf<30> dateString;
+		                fieldDate->Time().FormatL(dateString, KTimeFormat);
+                        TInt currentSize = iExcerpt->Size();
+                        TInt newSize = currentSize + dateString.Size()+ 1;
+                        iExcerpt = iExcerpt->ReAllocL(newSize);
+                        TPtr ptr = iExcerpt->Des();
+                        ptr.Append(dateString);
+                        ptr.Append(KExcerptDelimiter);
+		                }
+		            
+		            }
+		        else
+		            {
+		            CContactTextField* fieldText = additionalField.TextStorage();
+		            if (fieldText && fieldText->Text() != KNullDesC )
+		                {
+                          TInt currentSize = iExcerpt->Size();
+                          TInt newSize = currentSize + fieldText->Text().Size() + 1;
+                          iExcerpt = iExcerpt->ReAllocL(newSize);
+                          TPtr ptr = iExcerpt->Des();
+                          ptr.Append(fieldText->Text());
+                          ptr.Append(KExcerptDelimiter);
+		                }
+		            }
+		
+		
 		}
 	}
 
@@ -383,10 +405,15 @@
             /* The order of fields in excerpt is as below. The order in this case
              * is the order of fields shown when you 'Edit' the contact.
              */
+#ifdef USE_HIGHLIGHTER            
+            AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldGivenName, KContactsGivenNameField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText );
+            AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldFamilyName, KContactsFamilyNameField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField:: EIndexFreeText );
+#else
             AddFieldL( *index_item, fieldSet, KUidContactFieldGivenName, KContactsGivenNameField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText );
-            AddFieldL( *index_item, fieldSet, KUidContactFieldFamilyName, KContactsFamilyNameField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField:: EIndexFreeText );
+            AddFieldL( *index_item, fieldSet, KUidContactFieldFamilyName, KContactsFamilyNameField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField:: EIndexFreeText );        
+#endif            
             AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldPhoneNumber, KContactsPhoneNumberField );
-            AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldEMail, KContactsEMailField );
+            AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldEMail, KContactsEMailField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText );
             AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldSIPID, KContactsSIPIDField );
             AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldCompanyName, KContactsCompanyNameField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText );
             AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldJobTitle, KContactsJobTitleField, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText );
@@ -419,9 +446,13 @@
             
             AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldIMAddress, KContactIMAddress);
             AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldServiceProvider, KContactServiceProvider);
-            
+#ifdef USE_HIGHLIGHTER
+            AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldBirthday, KContactBirthday);
+            AddFieldToDocumentAndExcerptL( *index_item, fieldSet, KUidContactFieldAnniversary, KContactAnniversary);
+#else
             AddFieldL( *index_item, fieldSet, KUidContactFieldBirthday, KContactBirthday);
-            AddFieldL( *index_item, fieldSet, KUidContactFieldAnniversary, KContactAnniversary);
+            AddFieldL( *index_item, fieldSet, KUidContactFieldAnniversary, KContactAnniversary);      
+#endif            
             index_item->AddExcerptL(*iExcerpt);
             }
         
--- a/harvesterplugins/file/inc/cfileplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/file/inc/cfileplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -79,6 +79,12 @@
      * @aExt file extention
      */
 	TBool IsFileTypeMedia(const TDesC& aExt);
+	
+	/**
+     * RemoveFileDatabaseL deletes the database file from the requested drive 
+     * @aDrive drive number
+     */
+	void RemoveFileDatabaseL(TDriveNumber aDrive);
 
 public:
 	// 
--- a/harvesterplugins/file/src/cfileplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/file/src/cfileplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -41,8 +41,9 @@
 namespace {
 
 _LIT(KCPixSearchServerPrivateDirectory, "\\Private\\2001f6f7\\");
+_LIT(KIndexingDBPath,"indexing\\indexdb");
 _LIT(KPathIndexDbPath, CPIX_INDEVICE_INDEXDB);
-
+_LIT(KfileDBPath, "\\root\\file");
 _LIT(KPathFolder, "\\root\\file\\folder");
 _LIT(KPathFileContent, "\\root\\file\\content");
 _LIT(KFileBaseAppClassContent, "root file content");
@@ -51,6 +52,7 @@
 _LIT(KFilePluginColon, ":");
 _LIT(KNameField, "Name");
 _LIT(KExtensionField, "Extension");
+_LIT(KIsFolderField, "IsFolder");
 _LIT(KMimeTypeFile, FILE_MIMETYPE);
 _LIT(KMimeTypeFolder , FOLDER_MIMETYPE);
 _LIT(KMimeTypeField , CPIX_MIMETYPE_FIELD);
@@ -273,7 +275,12 @@
     // Check if already exists
     if (iIndexer[aMedia] && iFolderIndexer[aMedia])
         return;
-
+    //remove the database incase of memory card insertion before harvesting
+    if (aForceReharvest)
+        {        
+          RemoveFileDatabaseL(aMedia);
+        }
+        
     // Add Notifications paths prior to opening IndexDB.
     AddNotificationPathsL(aMedia);
 
@@ -649,8 +656,10 @@
         {
         index_item->AddFieldL(KExtensionField, KNullDesC);
         index_item->AddFieldL(KMimeTypeField, KMimeTypeFolder, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-        }   
-    
+        }
+    TBuf<2> Isfolder;
+    Isfolder.AppendNum(aIsDir);
+    index_item->AddFieldL(KIsFolderField, Isfolder, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
     //Only content to be added to exceprt field. See appclass-hierarchy.txt
     //Add excerpt field
     //index_item->AddExcerptL(aFilePath);
@@ -659,6 +668,28 @@
     return index_item;
     }
 
+void CFilePlugin::RemoveFileDatabaseL(TDriveNumber aDrive)
+    {
+    RFs aFs;
+    User::LeaveIfError( aFs.Connect() );
+    TChar drive;
+    TInt err = aFs.DriveToChar((TDriveNumber)aDrive,drive);
+    if ( err == KErrNone )
+        {
+        TBuf<KMaxFileName> folderpath;
+        folderpath.Append(drive);
+        folderpath.Append(KFilePluginColon);
+        folderpath.Append(KCPixSearchServerPrivateDirectory);
+        folderpath.Append(KIndexingDBPath);
+        folderpath.Append(KfileDBPath);
+        CFileMan* FileMan = CFileMan::NewL(aFs);
+        if ( FileMan )
+            FileMan->Delete( folderpath );
+        delete FileMan;
+        }
+    aFs.Close();
+    }
+
 #ifdef __PERFORMANCE_DATA
 void CFilePlugin::UpdatePerformaceDataL(TDriveNumber aDriveNumber)
     {
--- a/harvesterplugins/file/src/cmmcmonitor.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/file/src/cmmcmonitor.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -133,7 +133,34 @@
     {
     OstTraceFunctionEntry0( CMMCMONITOR_STARTMONITORING_ENTRY );
     CPIXLOGSTRING("ENTER CMMCMonitor::StartMonitoring");
-    TRAP_IGNORE( RunL() ); // Need to TRAP this rather than use RunError
+    iProperty.Subscribe( iStatus );
+    SetActive();
+    User::LeaveIfError( iProperty.Get( KPSUidUikon, KUikMMCInserted, iMmcStatus ) );
+    
+    for ( TInt driveNumber = EDriveA; driveNumber <= EDriveZ; driveNumber++ )
+        {
+        const TBool foundMmc = MmcStatus( driveNumber );
+        if ( !foundMmc )
+            {
+            continue;
+            }
+
+        // This drive has been recognized as MMC. 
+        TDriveNumber drv = TDriveNumber( driveNumber );
+
+        TUint drvStatus( 0 );
+
+        const TInt err = DriveInfo::GetDriveStatus( *iFsSession, driveNumber, drvStatus );
+        if ( err ) 
+            {
+            continue;  // should not happen
+            }
+
+        if ( drvStatus & DriveInfo::EDrivePresent )
+            {            
+            iFilePlugin.MountL(drv, EFalse);
+            }
+        }
     CPIXLOGSTRING("END CMMCMonitor::StartMonitoring");
     OstTraceFunctionExit0( CMMCMONITOR_STARTMONITORING_EXIT );
     return ETrue;
@@ -242,7 +269,7 @@
             OstTrace0( TRACE_NORMAL, DUP2_CMMCMONITOR_RUNL, "CMMCMonitor::RunL insert event" );
             CPIXLOGSTRING("CMMCMonitor::RunL insert event");
             // Mount MMC and force reharvest
-            iFilePlugin.MountL(drv, EFalse); //dont force reharvest
+            iFilePlugin.MountL(drv, ETrue);
             }
         else
             {
--- a/harvesterplugins/media/audio/group/audioplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/audio/group/audioplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -56,6 +56,10 @@
 LIBRARY       bafl.lib
 // For logging
 LIBRARY 	  flogger.lib 
+
+// For enabling Highlighter
+//MACRO USE_HIGHLIGHTER
+
 //Enable this macro to get harvester performance data
 //MACRO __PERFORMANCE_DATA
 EXPORTUNFROZEN
--- a/harvesterplugins/media/audio/inc/mediaplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/audio/inc/mediaplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -123,6 +123,11 @@
     CCPIXMDEDbManager*      iDBManager;
     CMDSEntity*             iMdsItem;
     
+//for helping with testing.
+#ifdef HARVESTERPLUGINTESTER_FRIEND
+    friend class CHarvesterPluginTester;
+#endif 
+    
 #ifdef __PERFORMANCE_DATA
     TTime iStartTime;
     TTime iCompleteTime;
--- a/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/audio/src/cpixmediaaudiodoc.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -112,6 +112,12 @@
                              CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText);
        AddToFieldExcerptL(textProperty->Value());//Add artist to excerpt
        }
+#ifdef USE_HIGHLIGHTER
+    //Get the media file extension and store
+    TBuf<KMaxExtLength> extension;        
+    GetExtension(aObject.Uri(),extension);
+    AddToFieldExcerptL(extension);
+#endif  
     CMdEPropertyDef& albumPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Audio::KAlbumProperty );
     if(aObject.Property( albumPropDef, property )!= KErrNotFound)
        {
@@ -221,18 +227,15 @@
     CMdEPropertyDef& sizePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty);
     if(aObject.Property( sizePropDef, property )!= KErrNotFound)
        {
-       //Add field to document
-       if( property->Def().PropertyType() == EPropertyUint32 )
-           {
-           CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property );
-           TBuf<32> buf;
-           buf.Format(_L("%u"), sizeProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                           MdeConstants::Object::KSizeProperty,
-                           buf,
-                           CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-           AddToFieldExcerptL(buf);
-           }
+       //Add field to document       
+       CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property );
+       TBuf<32> buf;
+       buf.Format(_L("%u"), sizeProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                       MdeConstants::Object::KSizeProperty,
+                       buf,
+                       CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+       AddToFieldExcerptL(buf);       
        }
     
     //Get legal property
@@ -251,94 +254,83 @@
     if(aObject.Property( trackPropDef, property ) != KErrNotFound)
        {
        //Add field to document       
-       if( property->Def().PropertyType() == EPropertyUint16 )
-           {
-           CMdEUint16Property& trackProperty = static_cast < CMdEUint16Property& > (*property );               
-           TBuf<32> buf;
-           buf.Format(_L("%d"), trackProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                              MdeConstants::MediaObject::KTrackProperty,
-                              buf);
-           }       
+       CMdEUint16Property& trackProperty = static_cast < CMdEUint16Property& > (*property );               
+       TBuf<32> buf;
+       buf.Format(_L("%d"), trackProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                          MdeConstants::MediaObject::KTrackProperty,
+                          buf);
+       
        }
     // Capturedate property
     CMdEPropertyDef& captureDatePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCaptureDateProperty);
     if(aObject.Property( captureDatePropDef, property ) != KErrNotFound)
       {
-      //Add field to document
-      if(EPropertyTime == property->Def().PropertyType())
-          {
-          CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
-          TDateTime time = timeProperty.Value().DateTime();
-          TBuf<32> buf;
-          buf.Format( KFormatDateTime, time.Year(), 
-                                       time.Month() + 1, 
-                                       time.Day() + 1, 
-                                       time.Hour(), 
-                                       time.Minute());
-          
-          AddFiledtoDocumentL(*index_item,
-                             MdeConstants::MediaObject::KCaptureDateProperty,
-                             buf,
-                             CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-          
-          //Format for excerpt field
-          buf.Format( KExcerptFormat, time.Year(), 
-                                     time.Month() + 1, 
-                                     time.Day() + 1, 
-                                     time.Hour(), 
-                                     time.Minute());
-          AddToFieldExcerptL(buf);
-          }
+      //Add field to document      
+      CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
+      TDateTime time = timeProperty.Value().DateTime();
+      TBuf<32> buf;
+      buf.Format( KFormatDateTime, time.Year(), 
+                                   time.Month() + 1, 
+                                   time.Day() + 1, 
+                                   time.Hour(), 
+                                   time.Minute());
+      
+      AddFiledtoDocumentL(*index_item,
+                         MdeConstants::MediaObject::KCaptureDateProperty,
+                         buf,
+                         CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+      
+      //Format for excerpt field
+      buf.Format( KExcerptFormat, time.Year(), 
+                                 time.Month() + 1, 
+                                 time.Day() + 1, 
+                                 time.Hour(), 
+                                 time.Minute());
+      AddToFieldExcerptL(buf);         
       }
     //Get LastModifiedDate property
     CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KLastModifiedDateProperty);
     if(aObject.Property( dateTimePropDef, property ) != KErrNotFound)
       {
-      //Add field to document
-      if(EPropertyTime == property->Def().PropertyType())
-          {
-          CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
-          TDateTime time = timeProperty.Value().DateTime();
-          TBuf<32> buf;
-          buf.Format( KFormatDateTime, time.Year(),
-                                       time.Month() + 1,
-                                       time.Day() + 1,
-                                       time.Hour(),
-                                       time.Minute());
-          
-          AddFiledtoDocumentL(*index_item,
-                             MdeConstants::Object::KLastModifiedDateProperty,
-                             buf,
-                             CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-          //Format for excerpt field
-          buf.Format( KExcerptFormat, time.Year(), 
-                                   time.Month() + 1, 
-                                   time.Day() + 1, 
-                                   time.Hour(), 
+      //Add field to document      
+      CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
+      TDateTime time = timeProperty.Value().DateTime();
+      TBuf<32> buf;
+      buf.Format( KFormatDateTime, time.Year(),
+                                   time.Month() + 1,
+                                   time.Day() + 1,
+                                   time.Hour(),
                                    time.Minute());
-          AddToFieldExcerptL(buf);
-          }
+      
+      AddFiledtoDocumentL(*index_item,
+                         MdeConstants::Object::KLastModifiedDateProperty,
+                         buf,
+                         CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+      //Format for excerpt field
+      buf.Format( KExcerptFormat, time.Year(), 
+                               time.Month() + 1, 
+                               time.Day() + 1, 
+                               time.Hour(), 
+                               time.Minute());
+      AddToFieldExcerptL(buf);
       }
     //Get duration property
     CMdEPropertyDef& durationPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDurationProperty );
     if(aObject.Property( durationPropDef, property ) != KErrNotFound)
        {        
-       //Add field to document
-       if( property->Def().PropertyType() == EPropertyReal32 )
-           {
-           CMdEReal32Property& durationProperty = static_cast < CMdEReal32Property& > (*property );               
-           TBuf<32> buf;
-           buf.Format(_L("%f"), durationProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                          MdeConstants::MediaObject::KDurationProperty,
-                          buf );
-           }       
+       //Add field to document       
+       CMdEReal32Property& durationProperty = static_cast < CMdEReal32Property& > (*property );               
+       TBuf<32> buf;
+       buf.Format(_L("%f"), durationProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                      MdeConstants::MediaObject::KDurationProperty,
+                      buf );
+       
        }
-    if( iExcerpt )
-        {
-        index_item->AddExcerptL(*iExcerpt);
-        }
+    
+    index_item->AddExcerptL(*iExcerpt);
+
     CPIXLOGSTRING("END CCPIXMediaAudioDoc::GetCpixDocumentL");
     OstTraceFunctionExit0( CCPIXMEDIAAUDIODOC_GETCPIXDOCUMENTL_EXIT );
     return index_item;
--- a/harvesterplugins/media/audio/src/mediaplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/audio/src/mediaplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -88,6 +88,7 @@
 	delete iObjectJobQueueManager;
 	delete iMdsUtils;
 	delete iAudioDocument;
+	iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
 	delete iIndexerUtil;
 	delete iMMcMonitor;
 	delete iDBManager;
@@ -235,7 +236,7 @@
                 CPIXLOGSTRING2("CAudioPlugin::HandleMdeItemL(): Error %d in adding.", err);
                 }
             }
-        else if (aActionType == ECPixUpdateAction)
+        else
             {
             //If DocID for e.g \music\something.mp3 itself changes the we have to compare
             //existing URI with new one and Remove that first and Update to avoid 
--- a/harvesterplugins/media/image/group/imageplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/image/group/imageplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -56,6 +56,10 @@
 
 // For logging
 LIBRARY 	  flogger.lib 
+
+// For enabling Highlighter
+//MACRO USE_HIGHLIGHTER
+
 //Enable this macro to get harvester performance data
 //MACRO __PERFORMANCE_DATA
 EXPORTUNFROZEN
--- a/harvesterplugins/media/image/inc/imageplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/image/inc/imageplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -122,6 +122,12 @@
     CMMCMonitorUtil*        iMMcMonitor;//MMC monitor owned
     CCPIXMDEDbManager*      iDBManager;
     CMDSEntity*             iMdsItem;
+    
+//for helping with testing.
+#ifdef HARVESTERPLUGINTESTER_FRIEND
+    friend class CHarvesterPluginTester;
+#endif
+        
 #ifdef __PERFORMANCE_DATA
     TTime iStartTime;
     TTime iCompleteTime;
--- a/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/image/src/cpixmediaimagedoc.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -107,6 +107,12 @@
           AddToFieldExcerptL(textProperty->Value());
           }
     
+#ifdef USE_HIGHLIGHTER
+    //Get the media file extension and store
+    TBuf<KMaxExtLength> extension;        
+    GetExtension(aObject.Uri(),extension);
+    AddToFieldExcerptL(extension);
+#endif   
     //Get user comment field
     CMdEPropertyDef& commentPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCommentProperty );
     if(aObject.Property( commentPropDef, property )!= KErrNotFound)
@@ -170,75 +176,66 @@
     CMdEPropertyDef& sizePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty);
     if(aObject.Property( sizePropDef, property )!= KErrNotFound)
        {
-       //Add field to document
-       if( property->Def().PropertyType() == EPropertyUint32 )
-           {
-           CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property );
-           TBuf<32> buf;
-           buf.Format(_L("%u"), sizeProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                           MdeConstants::Object::KSizeProperty,
-                           buf,
-                           CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-           AddToFieldExcerptL(buf);
-           }
+       //Add field to document       
+       CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property );
+       TBuf<32> buf;
+       buf.Format(_L("%u"), sizeProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                       MdeConstants::Object::KSizeProperty,
+                       buf,
+                       CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+       AddToFieldExcerptL(buf);
        }
     //Get DateTimeOrginal property
     CMdEPropertyDef& dateTimeOrgPropDef = aObjectDef.GetPropertyDefL(MdeConstants::Image::KDateTimeOriginalProperty);
     if(aObject.Property( dateTimeOrgPropDef, property ) != KErrNotFound)
       {
-      //Add field to document
-      if(EPropertyTime == property->Def().PropertyType())
-          {
-          CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
-          TDateTime time = timeProperty.Value().DateTime();
-          TBuf<32> buf;
-          buf.Format( KFormatDateTime, time.Year(),
-                                       time.Month() + 1,
-                                       time.Day() + 1,
-                                       time.Hour(),
-                                       time.Minute());
-          AddFiledtoDocumentL(*index_item,
-                             MdeConstants::Image::KDateTimeOriginalProperty,
-                             buf,
-                             CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-          //Format for excerpt field
-          buf.Format( KExcerptFormat, time.Year(), 
-                                   time.Month() + 1, 
-                                   time.Day() + 1, 
-                                   time.Hour(), 
+      //Add field to document      
+      CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
+      TDateTime time = timeProperty.Value().DateTime();
+      TBuf<32> buf;
+      buf.Format( KFormatDateTime, time.Year(),
+                                   time.Month() + 1,
+                                   time.Day() + 1,
+                                   time.Hour(),
                                    time.Minute());
-          AddToFieldExcerptL(buf);
-          }
+      AddFiledtoDocumentL(*index_item,
+                         MdeConstants::Image::KDateTimeOriginalProperty,
+                         buf,
+                         CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+      //Format for excerpt field
+      buf.Format( KExcerptFormat, time.Year(), 
+                               time.Month() + 1, 
+                               time.Day() + 1, 
+                               time.Hour(), 
+                               time.Minute());
+
       }
     //Get LastModifiedDate property
     CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KLastModifiedDateProperty);
     if(aObject.Property( dateTimePropDef, property ) != KErrNotFound)
       {
       //Add field to document
-      if(EPropertyTime == property->Def().PropertyType())
-          {
-          CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
-          TDateTime time = timeProperty.Value().DateTime();
-          TBuf<32> buf;
-          buf.Format( KFormatDateTime, time.Year(),
-                                       time.Month() + 1,
-                                       time.Day() + 1,
-                                       time.Hour(),
-                                       time.Minute());
-          
-          AddFiledtoDocumentL(*index_item,
-                             MdeConstants::Object::KLastModifiedDateProperty,
-                             buf,
-                             CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-          //Format for excerpt field
-          buf.Format( KExcerptFormat, time.Year(), 
-                                   time.Month() + 1, 
-                                   time.Day() + 1, 
-                                   time.Hour(), 
+      CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
+      TDateTime time = timeProperty.Value().DateTime();
+      TBuf<32> buf;
+      buf.Format( KFormatDateTime, time.Year(),
+                                   time.Month() + 1,
+                                   time.Day() + 1,
+                                   time.Hour(),
                                    time.Minute());
-          AddToFieldExcerptL(buf);
-          }
+      
+      AddFiledtoDocumentL(*index_item,
+                         MdeConstants::Object::KLastModifiedDateProperty,
+                         buf,
+                         CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+      //Format for excerpt field
+      buf.Format( KExcerptFormat, time.Year(), 
+                               time.Month() + 1, 
+                               time.Day() + 1, 
+                               time.Hour(), 
+                               time.Minute());
+      AddToFieldExcerptL(buf);
       }
     if( iExcerpt )
         {
--- a/harvesterplugins/media/image/src/imageplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/image/src/imageplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -86,6 +86,7 @@
 	delete iObjectJobQueueManager;
 	delete iMdsUtils;
 	delete iImageDocument;
+	iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
 	delete iIndexerUtil;
 	delete iMMcMonitor;
 	delete iDBManager;
@@ -231,7 +232,7 @@
                 CPIXLOGSTRING2("CImagePlugin::HandleMdeItemL(): Error %d in adding.", err);
                 }
             }
-        else if (aActionType == ECPixUpdateAction)
+        else
             {
             //If DocID for e.g \image\something.jpeg itself changes the we have to compare
             //existing URI with new one and Remove that first and Update to avoid 
--- a/harvesterplugins/media/mediautils/inc/cpixdocfetcher.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/mediautils/inc/cpixdocfetcher.h	Wed Aug 18 09:49:49 2010 +0300
@@ -29,6 +29,21 @@
 class CMdEObject;
 class CMdEObjectDef;
 
+#define CPIX_MIMETYPE_FIELD      L"_mimetype"
+#define LCPIX_MIMETYPE_FIELD     L"_mimetype"
+const TInt KInitialExcerptLength = 5;
+const TInt KStartPosition = 2; //Start position of absolute path
+const TInt KDrivePosition = 0; //Drive position in object Uri
+const TInt KMaxMediaLength = 14;
+const TInt KMaxExtLength = 5;
+//To unsigned decimal representation as UIds are out of range for signed decimal
+_LIT(KFormat, "%u");
+_LIT(KNameField, "Name");
+_LIT(KMediaIdField, "MediaId");
+_LIT(KExtensionField, "Extension");
+_LIT(KExcerptDelimiter, " ");
+
+
 class CCPIXDocFetcher : public CBase
     {
 public:
--- a/harvesterplugins/media/mediautils/inc/cpixindexerutils.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/mediautils/inc/cpixindexerutils.h	Wed Aug 18 09:49:49 2010 +0300
@@ -144,11 +144,24 @@
      * @param TDriveNumber aMedia drive
      */
     void RemoveUnmountedDrive(TDriveNumber aMedia);
+    
+    /*
+    * Remove unmounted drive database
+    * @param TDriveNumber aMedia drive
+    * @param TDesC& aPath path of database
+    */
+   void RemoveUnmountedDatabaseL(TDriveNumber aMedia, const TDesC& aPath);
+       
 private:
     RArray<TDriveNumber>  iMountedDrives; //Array of mounted drives
     CCPixIndexer *iIndexer[EDriveZ + 1];//Array of all Indexers
     RFs           iFs; //File session
     RSearchServerSession iSearchSession; //Search session
+    
+    //for helping with testing.
+    #ifdef HARVESTERPLUGINTESTER_FRIEND
+        friend class CHarvesterPluginTester;
+    #endif
     };
 
 #endif /* CPIXINDERUTILS_H_ */
--- a/harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/mediautils/src/cpixdocfetcher.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -25,19 +25,6 @@
 #include <mdeobjectdef.h>
 #include "harvesterserverlogger.h"
 
-#define CPIX_MIMETYPE_FIELD      L"_mimetype"
-#define LCPIX_MIMETYPE_FIELD     L"_mimetype"
-const TInt KInitialExcerptLength = 5;
-const TInt KStartPosition = 2; //Start position of absolute path
-const TInt KDrivePosition = 0; //Drive position in object Uri
-const TInt KMaxMediaLength = 14;
-const TInt KMaxExtLength = 5;
-//To unsigned decimal representation as UIds are out of range for signed decimal
-_LIT(KFormat, "%u");
-_LIT(KNameField, "Name");
-_LIT(KMediaIdField, "MediaId");
-_LIT(KExtensionField, "Extension");
-_LIT(KExcerptDelimiter, " ");
 
 // -----------------------------------------------------------------------------
 // CCPIXDocFetcher::NewL()
--- a/harvesterplugins/media/mediautils/src/cpixindexerutils.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/mediautils/src/cpixindexerutils.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -28,6 +28,7 @@
 // local declarations and functions
 namespace {
 _LIT(KCPixSearchServerPrivateDirectory, "\\Private\\2001f6f7\\");
+_LIT(KIndexingDBPath,"indexing\\indexdb");
 _LIT(KPathIndexDbPath, CPIX_INDEVICE_INDEXDB);
 
 _LIT(KAtSign, "@");
@@ -276,6 +277,8 @@
         }
     if(IsDriveCanbeMountedL(aMedia))
         {
+        //clean the existing database if any
+        RemoveUnmountedDatabaseL(aMedia,aPath);
         // Form the baseappclass for this media
         TBuf<KMsgPluginBaseAppClassMaxLen> baseAppClass;
         FormBaseAppClass(TDriveNumber(aMedia), aBaseAppClassGeneric,baseAppClass);
@@ -467,4 +470,30 @@
     return iMountedDrives;
     }
 
+// -----------------------------------------------------------------------------
+// CCPixIndexerUtils::RemoveUnmountedDatabase()
+// -----------------------------------------------------------------------------
+//
+void CCPixIndexerUtils::RemoveUnmountedDatabaseL(TDriveNumber aMedia, const TDesC& aPath)
+    {
+    RFs aFs;
+    User::LeaveIfError( aFs.Connect() );
+    TChar drive;
+    TInt err = aFs.DriveToChar((TDriveNumber)aMedia,drive);
+    if ( err == KErrNone )
+        {
+        TBuf<KMaxFileName> folderpath;
+        folderpath.Append(drive);
+        folderpath.Append(KColon);
+        folderpath.Append(KCPixSearchServerPrivateDirectory);
+        folderpath.Append(KIndexingDBPath);
+        folderpath.Append(aPath);
+        CFileMan* FileMan = CFileMan::NewL(aFs);
+        if ( FileMan )
+            FileMan->Delete( folderpath );
+        delete FileMan;
+        }
+    aFs.Close();
+    }
+
 //End of file
--- a/harvesterplugins/media/video/group/videoplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/video/group/videoplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -56,6 +56,10 @@
 
 // For logging
 LIBRARY 	  flogger.lib 
+
+// For enabling Highlighter
+//MACRO USE_HIGHLIGHTER
+
 //Enable this macro to get harvester performance data
 //MACRO __PERFORMANCE_DATA
 EXPORTUNFROZEN
--- a/harvesterplugins/media/video/inc/videoplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/video/inc/videoplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -107,6 +107,11 @@
     CCPIXMDEDbManager*      iDBManager;
     CMDSEntity*             iMdsItem;
 
+//for helping with testing.
+#ifdef HARVESTERPLUGINTESTER_FRIEND
+    friend class CHarvesterPluginTester;
+#endif
+        
 #ifdef __PERFORMANCE_DATA
     TTime iStartTime;
     TTime iCompleteTime;
--- a/harvesterplugins/media/video/src/cpixmediavideodoc.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/video/src/cpixmediavideodoc.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -106,18 +106,15 @@
         CMdETextProperty* textProperty = ( CMdETextProperty* ) property;
         if( textProperty->Value().Compare(KNullDesC) > 0 )AddToFieldExcerptL(name); //Add name to excerpt field
         }
+#ifdef USE_HIGHLIGHTER
+    //Get the media file extension and store
+    TBuf<KMaxExtLength> extension;        
+    GetExtension(aObject.Uri(),extension);
+    AddToFieldExcerptL(extension);
+#endif 
 
     //URI and Excerpt is done add additional properties here 
-    CMdEPropertyDef& descriptionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDescriptionProperty );
-    if(aObject.Property( descriptionPropDef, property ) != KErrNotFound)
-       {
-       //Add field to document
-       CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property );
-       AddFiledtoDocumentL(*index_item,
-                  MdeConstants::MediaObject::KDescriptionProperty,
-                  textProperty->Value());
-       AddToFieldExcerptL(textProperty->Value());
-       }
+    
     CMdEPropertyDef& artistPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KArtistProperty );
     if(aObject.Property( artistPropDef, property )!= KErrNotFound)
        {
@@ -189,34 +186,29 @@
     CMdEPropertyDef& sizePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KSizeProperty);
     if(aObject.Property( sizePropDef, property )!= KErrNotFound)
        {
-       //Add field to document
-       if( property->Def().PropertyType() == EPropertyUint32 )
-           {
-           CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property );
-           TBuf<32> buf;
-           buf.Format(_L("%u"), sizeProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                           MdeConstants::Object::KSizeProperty,
-                           buf,
-                           CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-           AddToFieldExcerptL(buf);
-           }
+       //Add field to document       
+       CMdEUint32Property& sizeProperty = static_cast < CMdEUint32Property& > (*property );
+       TBuf<32> buf;
+       buf.Format(_L("%u"), sizeProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                       MdeConstants::Object::KSizeProperty,
+                       buf,
+                       CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+       AddToFieldExcerptL(buf);
        }    
     //Get resolution property
     CMdEPropertyDef& resolutionPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KResolutionUnitProperty );
     if(aObject.Property( resolutionPropDef, property ) != KErrNotFound)
        {
-       //Add field to document
-       if( property->Def().PropertyType() == EPropertyUint16 )
-           {
-           CMdEUint16Property& resolutionProperty = static_cast < CMdEUint16Property& > (*property );               
-           TBuf<32> buf;
-           buf.Format(_L("%d"), resolutionProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                              MdeConstants::MediaObject::KResolutionUnitProperty,
-                              buf,
-                              CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-           }       
+       //Add field to document       
+       CMdEUint16Property& resolutionProperty = static_cast < CMdEUint16Property& > (*property );               
+       TBuf<32> buf;
+       buf.Format(_L("%d"), resolutionProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                          MdeConstants::MediaObject::KResolutionUnitProperty,
+                          buf,
+                          CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+       
        }    
     //Get legal property
     CMdEPropertyDef& legalPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KLegalProperty );
@@ -226,96 +218,86 @@
        CMdETextProperty* textProperty = static_cast< CMdETextProperty* > (property );
        AddFiledtoDocumentL(*index_item,
                    MdeConstants::MediaObject::KLegalProperty,
-                   textProperty->Value());       
+                   textProperty->Value());
+       AddToFieldExcerptL(textProperty->Value());
        }
     //Get track property
     CMdEPropertyDef& trackPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KTrackProperty );
     if(aObject.Property( trackPropDef, property ) != KErrNotFound)
        {
        //Add field to document       
-       if( property->Def().PropertyType() == EPropertyUint16 )
-           {
-           CMdEUint16Property& trackProperty = static_cast < CMdEUint16Property& > (*property );               
-           TBuf<32> buf;
-           buf.Format(_L("%d"), trackProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                              MdeConstants::MediaObject::KTrackProperty,
-                              buf);
-           }       
+       CMdEUint16Property& trackProperty = static_cast < CMdEUint16Property& > (*property );               
+       TBuf<32> buf;
+       buf.Format(_L("%d"), trackProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                          MdeConstants::MediaObject::KTrackProperty,
+                          buf);
+       
        }
     // Capturedate property
     CMdEPropertyDef& captureDatePropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KCaptureDateProperty);
     if(aObject.Property( captureDatePropDef, property ) != KErrNotFound)
       {
       //Add field to document
-      if(EPropertyTime == property->Def().PropertyType())
-          {
-          CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
-          TDateTime time = timeProperty.Value().DateTime();
-          TBuf<32> buf;
-          buf.Format( KFormatDateTime, time.Year(), 
-                                       time.Month() + 1, 
-                                       time.Day() + 1, 
-                                       time.Hour(), 
-                                       time.Minute());
-          
-          AddFiledtoDocumentL(*index_item,
-                             MdeConstants::MediaObject::KCaptureDateProperty,
-                             buf,
-                             CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-          //Format for excerpt field
-          buf.Format( KExcerptFormat, time.Year(), 
-                                 time.Month() + 1, 
-                                 time.Day() + 1, 
-                                 time.Hour(), 
-                                 time.Minute());
-          AddToFieldExcerptL(buf);
-          }
+      CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
+      TDateTime time = timeProperty.Value().DateTime();
+      TBuf<32> buf;
+      buf.Format( KFormatDateTime, time.Year(), 
+                                   time.Month() + 1, 
+                                   time.Day() + 1, 
+                                   time.Hour(), 
+                                   time.Minute());
+      
+      AddFiledtoDocumentL(*index_item,
+                         MdeConstants::MediaObject::KCaptureDateProperty,
+                         buf,
+                         CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+      //Format for excerpt field
+      buf.Format( KExcerptFormat, time.Year(), 
+                             time.Month() + 1, 
+                             time.Day() + 1, 
+                             time.Hour(), 
+                             time.Minute());
+      AddToFieldExcerptL(buf);
       }
     //Get LastModifiedDate property
     CMdEPropertyDef& dateTimePropDef = aObjectDef.GetPropertyDefL(MdeConstants::Object::KLastModifiedDateProperty);
     if(aObject.Property( dateTimePropDef, property ) != KErrNotFound)
       {
-      //Add field to document
-      if(EPropertyTime == property->Def().PropertyType())
-          {
-          CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
-          TDateTime time = timeProperty.Value().DateTime();
-          TBuf<32> buf;
-          buf.Format( KFormatDateTime, time.Year(),
-                                       time.Month() + 1,
-                                       time.Day() + 1,
-                                       time.Hour(),
-                                       time.Minute());
-          
-          AddFiledtoDocumentL(*index_item,
-                             MdeConstants::Object::KLastModifiedDateProperty,
-                             buf,
-                             CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-          //Format for excerpt field
-          buf.Format( KExcerptFormat, time.Year(), 
-                                   time.Month() + 1, 
-                                   time.Day() + 1, 
-                                   time.Hour(), 
+      //Add field to document      
+      CMdETimeProperty& timeProperty = static_cast < CMdETimeProperty& > (*property);
+      TDateTime time = timeProperty.Value().DateTime();
+      TBuf<32> buf;
+      buf.Format( KFormatDateTime, time.Year(),
+                                   time.Month() + 1,
+                                   time.Day() + 1,
+                                   time.Hour(),
                                    time.Minute());
-          AddToFieldExcerptL(buf);
-          }
+      
+      AddFiledtoDocumentL(*index_item,
+                         MdeConstants::Object::KLastModifiedDateProperty,
+                         buf,
+                         CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
+      //Format for excerpt field
+      buf.Format( KExcerptFormat, time.Year(), 
+                               time.Month() + 1, 
+                               time.Day() + 1, 
+                               time.Hour(), 
+                               time.Minute());
+      AddToFieldExcerptL(buf);
       }
     //Get duration property
     CMdEPropertyDef& durationPropDef = aObjectDef.GetPropertyDefL(MdeConstants::MediaObject::KDurationProperty );
     if(aObject.Property( durationPropDef, property ) != KErrNotFound)
        {
        //Add field to document       
-       if( property->Def().PropertyType() == EPropertyReal32 )
-           {
-           CMdEReal32Property& durationProperty = static_cast < CMdEReal32Property& > (*property );               
-           TBuf<32> buf;
-           buf.Format(_L("%f"), durationProperty.Value());
-           AddFiledtoDocumentL(*index_item,
-                              MdeConstants::MediaObject::KDurationProperty,
-                              buf,
-                              CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
-           }       
+       CMdEReal32Property& durationProperty = static_cast < CMdEReal32Property& > (*property );               
+       TBuf<32> buf;
+       buf.Format(_L("%f"), durationProperty.Value());
+       AddFiledtoDocumentL(*index_item,
+                          MdeConstants::MediaObject::KDurationProperty,
+                          buf,
+                          CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
        }
     if( iExcerpt )
         {
--- a/harvesterplugins/media/video/src/videoplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/media/video/src/videoplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -73,6 +73,7 @@
     delete iObjectJobQueueManager;
     delete iMdsUtils;
     delete iVideoDocument;
+    iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
     delete iIndexerUtil;
     delete iMMcMonitor;
     delete iDBManager;
@@ -211,7 +212,7 @@
                 CPIXLOGSTRING2("CVideoPlugin::HandleMdeItemL(): Error %d in adding.", err);
                 }           
             }
-        else if (aActionType == ECPixUpdateAction)
+        else
             {
             //If DocID for e.g \video\something.3gpp itself changes the we have to compare
             //existing URI with new one and Remove that first and Update to avoid 
--- a/harvesterplugins/messaging/email/inc/cemailplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/messaging/email/inc/cemailplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -105,6 +105,10 @@
     RFs iFs;
     //Email fecther from Qt Module
     QEmailFetcher* iQEmailFetcher;
+    //for unit testing.
+    #ifdef HARVESTERPLUGINTESTER_FRIEND
+        friend class CHarvesterPluginTester;
+    #endif
 #ifdef __PERFORMANCE_DATA
     TTime iStartTime;
     TTime iCompleteTime;
--- a/harvesterplugins/messaging/smsmms/group/messageplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/messaging/smsmms/group/messageplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -53,6 +53,9 @@
 LIBRARY		  imcm.lib // CImHeader, CImEmailMessage
 LIBRARY		  etext.lib // CParaFormatLayer etc
 
+// For Enabling Highlighter
+//MACRO USE_HIGHLIGHTER
+
 // For logging
 LIBRARY 	  flogger.lib 
 
--- a/harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/messaging/smsmms/src/cmessagedatahandler.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -493,8 +493,12 @@
     
 	_LIT(KEllipsis, "...");
 	_LIT(KSpace, " ");
-	TInt excerptLength = KMsgBodyExcerptSymbols + KEllipsis().Length(); 
-
+	//
+#ifdef USE_HIGHLIGHTER	
+	TInt excerptLength = aBodyText.Length() + KEllipsis().Length();
+#else	
+	TInt excerptLength = KMsgBodyExcerptSymbols + KEllipsis().Length();
+#endif	
 	//Not removing commented out code as this may come back into use in near future.
 //	TMsvEntry entry;
 //	TMsvId service = 0;
@@ -541,11 +545,13 @@
 //		excerptPtr.Append(aSubject);
 //		excerptPtr.Append(KSpace);
 //		}
-
-	excerptPtr.Append(aBodyText.Left(KMsgBodyExcerptSymbols));
+#ifdef USE_HIGHLIGHTER
+    excerptPtr.Append(aBodyText);
+#else    
+	excerptPtr.Append(aBodyText.Left(KMsgBodyExcerptSymbols));	
 	if (aBodyText.Length() > KMsgBodyExcerptSymbols)
 		excerptPtr.Append(KEllipsis);
-
+#endif
 //	CleanupStack::PopAndDestroy(folder_str);
 	CleanupStack::PushL(excerpt);
 	return excerpt;
--- a/harvesterplugins/notes/group/notesplugin.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/notes/group/notesplugin.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -48,6 +48,8 @@
 LIBRARY       cpixsearchclient.lib
 LIBRARY       centralrepository.lib
 
+// For Enabling Highlighter
+//MACRO USE_HIGHLIGHTER
 
 // For logging
 LIBRARY 	  flogger.lib 
--- a/harvesterplugins/notes/inc/notesplugin.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/notes/inc/notesplugin.h	Wed Aug 18 09:49:49 2010 +0300
@@ -126,6 +126,12 @@
 	//Notes count
 	TInt iNoteCount;
 	
+	//for unit testing.
+	#ifdef HARVESTERPLUGINTESTER_FRIEND
+	    friend class CHarvesterPluginTester;
+	#endif	
+	
+	
 #ifdef __PERFORMANCE_DATA
     TTime iStartTime;
     TTime iCompleteTime;
--- a/harvesterplugins/notes/src/notesplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/notes/src/notesplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -55,6 +55,7 @@
 //Reference from CPix calender harvester plugin.
 _LIT(KNotesTimeFormat,"%04d %02d %02d %02d %02d");
 
+_LIT(KExcerptDelimiter, " ");
 // ---------------------------------------------------------------------------
 // CNotesPlugin::NewL
 // ---------------------------------------------------------------------------
@@ -346,11 +347,11 @@
 		index_item->AddFieldL(KNpdMemo, entry->DescriptionL());
 		// Add Date fields
 		TBuf<30> dateString;
-		TDateTime datetime = entry->EndTimeL().TimeUtcL().DateTime();		
+		TDateTime datetime = entry->EndTimeL().TimeLocalL().DateTime();		
 		dateString.Format( KNotesTimeFormat, datetime.Year(),
                                      TInt(datetime.Month()+ 1),
                                      datetime.Day() + 1,
-                                     datetime.Hour()+ 1,
+                                     datetime.Hour(),
                                      datetime.Minute());
 		 
 		index_item->AddFieldL(KNpdUpdateTime, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
@@ -359,12 +360,16 @@
 
 		//For notes, no content is expected in excerpt for now.
 		//See appclass-hierarchy.txt for details.
-//    	TInt excerptLength = entry->DescriptionL().Length();
-//		HBufC* excerpt = HBufC::NewLC(excerptLength);
-//		TPtr excerptDes = excerpt->Des();		
-//		excerptDes.Append(entry->DescriptionL());
-//      index_item->AddExcerptL(*excerpt);
-//      CleanupStack::PopAndDestroy(excerpt);      
+#ifdef USE_HIGHLIGHTER		
+    	TInt excerptLength = entry->DescriptionL().Length() + 1 + dateString.Length();
+		HBufC* excerpt = HBufC::NewLC(excerptLength);
+		TPtr excerptDes = excerpt->Des();		
+		excerptDes.Append(entry->DescriptionL());
+		excerptDes.Append(KExcerptDelimiter);
+		excerptDes.Append(dateString);
+      index_item->AddExcerptL(*excerpt);
+      CleanupStack::PopAndDestroy(excerpt);
+#endif      
 		
 		// Send for indexing
 		if (aActionType == ECPixAddAction)
@@ -373,34 +378,16 @@
             TRAP_IGNORE( iIndexer->AddL(*index_item) );
 #else
 			TRAPD( err, iIndexer->AddL(*index_item) );
-			if ( err == KErrNone )
-				{
-				OstTrace0( TRACE_NORMAL, DUP3_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL(): Added." );
-				CPIXLOGSTRING("CNotesPlugin::CreateNoteEntryL(): Added.");
-				}
-			else
-				{
-				OstTrace1( TRACE_NORMAL, DUP4_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL;Error while adding=%d", err );
-				CPIXLOGSTRING2("CNotesPlugin::CreateNoteEntryL(): Error %d in adding.", err);
-				}
+			OstTrace1( TRACE_NORMAL, DUP9_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL : iIndexer->AddL;err=%d", err );
 #endif
 			}
-		else if ( aActionType == ECPixUpdateAction )
+		else
 			{
 #ifndef _DEBUG
 		TRAP_IGNORE( iIndexer->UpdateL(*index_item) );
 #else
 			TRAPD( err, iIndexer->UpdateL(*index_item) );
-			if ( err == KErrNone )
-				{
-				OstTrace0( TRACE_NORMAL, DUP5_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL(): Updated." );
-				CPIXLOGSTRING("CNotesPlugin::CreateNoteEntryL(): Updated.");
-				}
-			else
-				{
-				OstTrace1( TRACE_NORMAL, DUP6_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL;Error while updating=%d", err );
-				CPIXLOGSTRING2("CNotesPlugin::CreateNoteEntryL(): Error %d in updating.", err);
-				}
+			OstTrace1( TRACE_NORMAL, DUP10_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL: iIndexer->UpdateL;err=%d", err );
 #endif
 			}
 		CleanupStack::PopAndDestroy(index_item);
@@ -412,16 +399,7 @@
         TRAP_IGNORE( iIndexer->DeleteL(docid_str) );
 #else
 		TRAPD( err, iIndexer->DeleteL(docid_str) );
-		if (err == KErrNone)
-			{
-			OstTrace0( TRACE_NORMAL, DUP7_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL(): Deleted." );
-			CPIXLOGSTRING("CNotesPlugin::CreateNoteEntryL(): Deleted.");
-			}
-		else
-			{
-			OstTrace1( TRACE_NORMAL, DUP8_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL;Error while deleting=%d", err );
-			CPIXLOGSTRING2("CNotesPlugin::CreateNoteEntryL(): Error %d in deleting.", err);				
-			}
+		OstTrace1( TRACE_NORMAL, DUP3_CNOTESPLUGIN_CREATENOTEENTRYL, "CNotesPlugin::CreateNoteEntryL: iIndexer->RemoveL;err=%d", err );
 #endif
 		}	
 	}
--- a/harvesterplugins/notes/traces/fixed_id.definitions	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/notes/traces/fixed_id.definitions	Wed Aug 18 09:49:49 2010 +0300
@@ -16,6 +16,7 @@
 [TRACE]TRACE_NORMAL[0x86]_CNOTESPLUGIN_DELAYEDCALLBACKL=0x2
 [TRACE]TRACE_NORMAL[0x86]_CNOTESPLUGIN_HANDLENOTECHANGEDENTRYL=0x5
 [TRACE]TRACE_NORMAL[0x86]_CNOTESPLUGIN_STARTHARVESTINGL=0x1
+[TRACE]TRACE_NORMAL[0x86]_DUP10_CNOTESPLUGIN_CREATENOTEENTRYL=0x13
 [TRACE]TRACE_NORMAL[0x86]_DUP1_CNOTESPLUGIN_CREATENOTEENTRYL=0xa
 [TRACE]TRACE_NORMAL[0x86]_DUP1_CNOTESPLUGIN_DELAYEDCALLBACKL=0x3
 [TRACE]TRACE_NORMAL[0x86]_DUP1_CNOTESPLUGIN_HANDLENOTECHANGEDENTRYL=0x6
@@ -23,8 +24,9 @@
 [TRACE]TRACE_NORMAL[0x86]_DUP2_CNOTESPLUGIN_HANDLENOTECHANGEDENTRYL=0x7
 [TRACE]TRACE_NORMAL[0x86]_DUP3_CNOTESPLUGIN_CREATENOTEENTRYL=0xc
 [TRACE]TRACE_NORMAL[0x86]_DUP3_CNOTESPLUGIN_HANDLENOTECHANGEDENTRYL=0x8
-[TRACE]TRACE_NORMAL[0x86]_DUP4_CNOTESPLUGIN_CREATENOTEENTRYL=0xd
-[TRACE]TRACE_NORMAL[0x86]_DUP5_CNOTESPLUGIN_CREATENOTEENTRYL=0xe
-[TRACE]TRACE_NORMAL[0x86]_DUP6_CNOTESPLUGIN_CREATENOTEENTRYL=0xf
-[TRACE]TRACE_NORMAL[0x86]_DUP7_CNOTESPLUGIN_CREATENOTEENTRYL=0x10
-[TRACE]TRACE_NORMAL[0x86]_DUP8_CNOTESPLUGIN_CREATENOTEENTRYL=0x11
+[TRACE]TRACE_NORMAL[0x86]_DUP9_CNOTESPLUGIN_CREATENOTEENTRYL=0x12
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP4_CNOTESPLUGIN_CREATENOTEENTRYL=0xd
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP5_CNOTESPLUGIN_CREATENOTEENTRYL=0xe
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP6_CNOTESPLUGIN_CREATENOTEENTRYL=0xf
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP7_CNOTESPLUGIN_CREATENOTEENTRYL=0x10
+[[OBSOLETE]][TRACE]TRACE_NORMAL[0x86]_DUP8_CNOTESPLUGIN_CREATENOTEENTRYL=0x11
--- a/harvesterplugins/notes/traces/notespluginTraces.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/notes/traces/notespluginTraces.h	Wed Aug 18 09:49:49 2010 +0300
@@ -1,4 +1,4 @@
-// Created by TraceCompiler 2.1.2
+// Created by TraceCompiler 2.2.3
 // DO NOT EDIT, CHANGES WILL BE LOST
 
 #ifndef __NOTESPLUGINTRACES_H__
@@ -28,11 +28,8 @@
 #define DUP1_CNOTESPLUGIN_CREATENOTEENTRYL 0x86000a
 #define DUP2_CNOTESPLUGIN_CREATENOTEENTRYL 0x86000b
 #define DUP3_CNOTESPLUGIN_CREATENOTEENTRYL 0x86000c
-#define DUP4_CNOTESPLUGIN_CREATENOTEENTRYL 0x86000d
-#define DUP5_CNOTESPLUGIN_CREATENOTEENTRYL 0x86000e
-#define DUP6_CNOTESPLUGIN_CREATENOTEENTRYL 0x86000f
-#define DUP7_CNOTESPLUGIN_CREATENOTEENTRYL 0x860010
-#define DUP8_CNOTESPLUGIN_CREATENOTEENTRYL 0x860011
+#define DUP9_CNOTESPLUGIN_CREATENOTEENTRYL 0x860012
+#define DUP10_CNOTESPLUGIN_CREATENOTEENTRYL 0x860013
 
 
 #endif
--- a/harvesterplugins/tsrc/harvesterplugintester/Bwins/harvesterplugintesteru.def	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/Bwins/harvesterplugintesteru.def	Wed Aug 18 09:49:49 2010 +0300
@@ -1,3 +1,4 @@
 EXPORTS
 	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+	?getloc@ios_base@std@@QBE?AVlocale@2@XZ @ 2 NONAME ; class std::locale std::ios_base::getloc(void) const
 
Binary file harvesterplugins/tsrc/harvesterplugintester/conf/eagle_landed.mp3 has changed
--- a/harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/conf/harvesterplugintester.cfg	Wed Aug 18 09:49:49 2010 +0300
@@ -284,6 +284,41 @@
 [Endtest]
 
 [Test]
+title TestNotesEntryNegative
+create HarvesterPluginTester foobar
+foobar TestNotesEntryNegative
+delete foobar
+[Endtest]
+
+[Test]
+title TestNotesDestructor
+create HarvesterPluginTester foobar
+foobar TestNotesDestructor
+delete foobar
+[Endtest]
+
+[Test]
+title TestNotesDelayedError
+create HarvesterPluginTester foobar
+foobar TestNotesDelayedError
+delete foobar
+[Endtest]
+
+[Test]
+title TestNotesChangeEntry
+create HarvesterPluginTester foobar
+foobar TestNotesChangeEntry
+delete foobar
+[Endtest]
+
+[Test]
+title TestNotesEntryNoIndexer
+create HarvesterPluginTester foobar
+foobar TestNotesEntryNoIndexer
+delete foobar
+[Endtest]
+
+[Test]
 title TestContactsHarvesting
 create HarvesterPluginTester foobar
 foobar TestContactsHarvesting
@@ -389,6 +424,27 @@
 [Endtest]
 
 [Test]
+title Testcalenderdestructor
+create HarvesterPluginTester foobar
+foobar Testcalenderdestructor
+delete foobar
+[Endtest]
+
+[Test]
+title TestCalChangeEntry
+create HarvesterPluginTester foobar
+foobar TestCalChangeEntry
+delete foobar
+[Endtest]
+
+[Test]
+title TestCalCreateEntry
+create HarvesterPluginTester foobar
+foobar TestCalCreateEntry
+delete foobar
+[Endtest]
+
+[Test]
 title TestCreateEmail
 create HarvesterPluginTester foobar
 foobar TestCreateEmail
@@ -403,20 +459,6 @@
 [Endtest]
 
 [Test]
-title TestAudioHarvestingUpdateIndex
-create HarvesterPluginTester foobar 
-foobar TestAudioHarvestingUpdateIndex c:\data\eagle_landed.mp3 eagle_landed.mp3 testaudio.mp3
-delete foobar
-[Endtest]
-
-[Test]
-title TestAudioHarvestingDeleteIndex
-create HarvesterPluginTester foobar 
-foobar TestAudioHarvestingDeleteIndex c:\data\eagle_landed.mp3 eagle_landed.mp3
-delete foobar
-[Endtest]
-
-[Test]
 title TestMdsSyncController
 create HarvesterPluginTester foobar
 foobar TestMdsSyncController
@@ -424,44 +466,24 @@
 [Endtest]
 
 [Test]
-title TestVideoHarvestingIndex
-create HarvesterPluginTester foobar 
-foobar TestVideoHarvestingIndex c:\data\Niagara.wmv Niagara.wmv
-delete foobar
-[Endtest]
-
-[Test]
-title TestVideoHarvestingUpdateIndex
-create HarvesterPluginTester foobar 
-foobar TestVideoHarvestingUpdateIndex c:\data\Niagara.wmv Niagara.wmv Falls.wmv
+title TestAudioHandleItem
+create HarvesterPluginTester foobar
+foobar TestAudioHandleItem 3 0
+foobar TestAudioHandleItem 4 0
+foobar TestAudioHandleItem 5 0
+foobar TestAudioHandleItem 3 1
+foobar TestAudioHandleItem 4 1
+foobar TestAudioHandleItem 5 1
+foobar TestAudioHandleItem 3 2
+foobar TestAudioHandleItem 4 2
+foobar TestAudioHandleItem 5 2
 delete foobar
 [Endtest]
 
 [Test]
-title TestVideoHarvestingDeleteIndex
-create HarvesterPluginTester foobar 
-foobar TestVideoHarvestingDeleteIndex c:\data\Niagara.wmv Niagara.wmv
-delete foobar
-[Endtest]
-
-[Test]
-title TestImageHarvestingAddIndex
-create HarvesterPluginTester foobar 
-foobar TestImageHarvestingAddIndex c:\data\square.jpg square.jpg
-delete foobar
-[Endtest]
-
-[Test]
-title TestImageHarvestingUpdateIndex
-create HarvesterPluginTester foobar 
-foobar TestImageHarvestingUpdateIndex c:\data\square.jpg square.jpg portrait.jpg
-delete foobar
-[Endtest]
-
-[Test]
-title TestImageHarvestingDeleteIndex
-create HarvesterPluginTester foobar 
-foobar TestImageHarvestingDeleteIndex c:\data\square.jpg square.jpg
+title TestAudioSyncDbManager
+create HarvesterPluginTester foobar
+foobar TestAudioSyncDbManager
 delete foobar
 [Endtest]
 
@@ -469,13 +491,45 @@
 title TestAudioMMCEventL
 create HarvesterPluginTester foobar 
 foobar TestAudioMMCEventL 2 0
+foobar TestAudioMMCEventL 2 1
+delete foobar
+[Endtest]
+
+[Test]
+title TestAudioNoIndexer
+create HarvesterPluginTester foobar 
+foobar TestAudioNoIndexer 2 3
+foobar TestAudioNoIndexer 2 4
+foobar TestAudioNoIndexer 2 5
 delete foobar
 [Endtest]
 
 [Test]
-title TestAudioMMCEventL
+title TestVideoHarvesting
 create HarvesterPluginTester foobar 
-foobar TestAudioMMCEventL 2 1
+foobar TestVideoHarvesting c:\data\Niagara.wmv Niagara.wmv
+delete foobar
+[Endtest]
+
+[Test]
+title TestVideoHandleItem
+create HarvesterPluginTester foobar
+foobar TestVideoHandleItem 10 0
+foobar TestVideoHandleItem 11 0
+foobar TestVideoHandleItem 12 0
+foobar TestVideoHandleItem 10 1
+foobar TestVideoHandleItem 11 1
+foobar TestVideoHandleItem 12 1
+foobar TestVideoHandleItem 10 2
+foobar TestVideoHandleItem 11 2
+foobar TestVideoHandleItem 12 2
+delete foobar
+[Endtest]
+
+[Test]
+title TestVideoSyncDbManager
+create HarvesterPluginTester foobar
+foobar TestVideoSyncDbManager
 delete foobar
 [Endtest]
 
@@ -483,13 +537,45 @@
 title TestVideoMMCEventL
 create HarvesterPluginTester foobar 
 foobar TestVideoMMCEventL 2 0
+foobar TestVideoMMCEventL 2 1
+delete foobar
+[Endtest]
+
+[Test]
+title TestVideoNoIndexer
+create HarvesterPluginTester foobar 
+foobar TestVideoNoIndexer 2 10
+foobar TestVideoNoIndexer 2 11
+foobar TestVideoNoIndexer 2 12
 delete foobar
 [Endtest]
 
 [Test]
-title TestVideoMMCEventL
+title TestImageHarvesting
 create HarvesterPluginTester foobar 
-foobar TestVideoMMCEventL 2 1
+foobar TestImageHarvesting c:\data\square.jpg square.jpg
+delete foobar
+[Endtest]
+
+[Test]
+title TestImageHandleItem
+create HarvesterPluginTester foobar
+foobar TestImageHandleItem 3 0
+foobar TestImageHandleItem 4 0
+foobar TestImageHandleItem 5 0
+foobar TestImageHandleItem 3 1
+foobar TestImageHandleItem 4 1
+foobar TestImageHandleItem 5 1
+foobar TestImageHandleItem 3 2
+foobar TestImageHandleItem 4 2
+foobar TestImageHandleItem 5 2
+delete foobar
+[Endtest]
+
+[Test]
+title TestImageSyncDbManager
+create HarvesterPluginTester foobar
+foobar TestImageSyncDbManager
 delete foobar
 [Endtest]
 
@@ -497,13 +583,16 @@
 title TestImageMMCEventL
 create HarvesterPluginTester foobar 
 foobar TestImageMMCEventL 2 0
+foobar TestImageMMCEventL 2 1
 delete foobar
 [Endtest]
 
 [Test]
-title TestImageMMCEventL
+title TestImageNoIndexer
 create HarvesterPluginTester foobar 
-foobar TestImageMMCEventL 2 1
+foobar TestImageNoIndexer 2 3
+foobar TestImageNoIndexer 2 4
+foobar TestImageNoIndexer 2 5
 delete foobar
 [Endtest]
 
@@ -520,3 +609,17 @@
 foobar TestHandleEmailDoc
 delete foobar
 [Endtest]
+
+[Test]
+title TestEmailBaseappclass
+create HarvesterPluginTester foobar 
+foobar TestEmailBaseappclass
+delete foobar
+[Endtest]
+
+[Test]
+title TestEmailHandleDoc
+create HarvesterPluginTester foobar 
+foobar TestEmailHandleDoc
+delete foobar
+[Endtest]
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/3GPP-70kB.3gpp has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/audio1.mp3 has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/kodak-dc210.jpg has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/nokia_logo.png has changed
Binary file harvesterplugins/tsrc/harvesterplugintester/data/cpixmediatest/song.wma has changed
--- a/harvesterplugins/tsrc/harvesterplugintester/group/bld.inf	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/group/bld.inf	Wed Aug 18 09:49:49 2010 +0300
@@ -34,6 +34,11 @@
 ../conf/eagle_landed.mp3           /epoc32/winscw/c/data/eagle_landed.mp3
 ../conf/niagara.wmv           	  /epoc32/winscw/c/data/niagara.wmv
 ../conf/square.jpg           	  /epoc32/winscw/c/data/square.jpg
+../data/cpixmediatest/audio1.mp3  /epoc32/winscw/c/data/cpixmediatest/audio1.mp3
+../data/cpixmediatest/song.wma    /epoc32/winscw/c/data/cpixmediatest/song.wma
+../data/cpixmediatest/kodak-dc210.jpg  /epoc32/winscw/c/data/cpixmediatest/kodak-dc210.jpg
+../data/cpixmediatest/nokia_logo.png  /epoc32/winscw/c/data/cpixmediatest/nokia_logo.png
+../data/cpixmediatest/3GPP-70kB.3gpp  /epoc32/winscw/c/data/cpixmediatest/3GPP-70kB.3gpp 
 
 //Note: Export for ROM build 
 ../conf/testframework.ini         z:/system/data/testframework.ini
@@ -45,6 +50,7 @@
 ../conf/testfile.txt        	  z:/ids/testfile.txt
 ../conf/eagle_landed.mp3          z:/ids/eagle_landed.mp3
 ../conf/niagara.wmv           	  z:/ids/niagara.wmv
+
 PRJ_EXPORTS
 // Specify the source file followed by its destination here
 // copy will be used to copy the source file to its destination
--- a/harvesterplugins/tsrc/harvesterplugintester/group/harvesterplugintester.mmp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/group/harvesterplugintester.mmp	Wed Aug 18 09:49:49 2010 +0300
@@ -234,7 +234,7 @@
 
 OPTION CW -wchar_t on
 MACRO _WCHAR_T_DECLARED
-//EPOCALLOWDLLDATA
+EPOCALLOWDLLDATA
 //------------------End for Eail plugin -----------------------------
 
 USERINCLUDE ../../../applications/traces 
--- a/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/inc/harvesterplugintester.h	Wed Aug 18 09:49:49 2010 +0300
@@ -213,6 +213,16 @@
         TInt PerformNotesTestL( TPtrC aString1 , TPtrC aString2 );
         virtual TInt TestDeleteNoteL( CStifItemParser& aItem);
         virtual TInt TestUpdateNoteL( CStifItemParser& aItem );
+        
+        virtual TInt TestNotesEntryNegativeL( CStifItemParser& aItem );
+        
+        virtual TInt TestNotesDestructorL ( CStifItemParser& aItem );
+        
+        virtual TInt TestNotesDelayedErrorL( CStifItemParser& aItem );
+        
+        virtual TInt TestNotesChangeEntryL( CStifItemParser& aItem );
+        
+        virtual TInt TestNotesEntryNoIndexerL( CStifItemParser& aItem );
         /*** End of Notes plugin tests   ***/
         
         virtual TInt TestStartContactsHarvesterL( CStifItemParser& aItem );
@@ -243,44 +253,60 @@
         
         virtual TInt TestCreateMmsL( CStifItemParser& aItem );
         
+        virtual TInt TestcalenderdestructorL( CStifItemParser& aItem );
+        
+        virtual TInt TestCalChangeEntryL( CStifItemParser& aItem );
+        
+        virtual TInt TestCalCreateEntryL( CStifItemParser& aItem );
+        
         virtual TInt TestCreateEmailL( CStifItemParser& aItem );
 		
 		virtual TInt TestAudioHarvestingL( CStifItemParser& aItem );
 		
-		virtual TInt TestAudioHarvestingUpdateIndexL( CStifItemParser& aItem );
-		        
-        virtual TInt TestAudioHarvestingDeleteIndexL( CStifItemParser& aItem );
+		virtual TInt TestAudioHandleItemL( CStifItemParser& aItem );
 		
 		virtual TInt TestMdsSyncControllerL( CStifItemParser& aItem );
 		
+		virtual TInt TestAudioSyncDbManagerL( CStifItemParser& aItem );
+		
+		virtual TInt TestAudioMMCEventL( CStifItemParser& aItem );
+		
+		virtual TInt TestAudioNoIndexerL( CStifItemParser& aItem );
+		
 		virtual TInt TestBlacklistPluginL( CStifItemParser& aItem );
 		
 		virtual TInt TestBlacklistPluginVersionL( CStifItemParser& aItem );
 		
-		virtual TInt TestVideoHarvestingIndexL( CStifItemParser& aItem );
-
-        virtual TInt TestVideoHarvestingUpdateIndexL( CStifItemParser& aItem );
-		
-		virtual TInt TestVideoHarvestingDeleteIndexL( CStifItemParser& aItem );
+		virtual TInt TestVideoHarvestingL( CStifItemParser& aItem );        
 		
-		virtual TInt TestImageHarvestingAddIndexL( CStifItemParser& aItem );
-		
-		virtual TInt TestImageHarvestingUpdateIndexL( CStifItemParser& aItem );
+		virtual TInt TestVideoHandleItemL( CStifItemParser& aItem );
 		
-		virtual TInt TestImageHarvestingDeleteIndexL( CStifItemParser& aItem );
-		
-		virtual TInt TestAudioMMCEventL( CStifItemParser& aItem );
+		virtual TInt TestVideoSyncDbManagerL ( CStifItemParser& aItem );
 		
 		virtual TInt TestVideoMMCEventL( CStifItemParser& aItem );
 		
+		virtual TInt TestVideoNoIndexerL( CStifItemParser& aItem );
+		
+		virtual TInt TestImageHarvestingL( CStifItemParser& aItem );		
+		
+		virtual TInt TestImageHandleItemL( CStifItemParser& aItem );
+		        
+        virtual TInt TestImageSyncDbManagerL ( CStifItemParser& aItem );		
+		
 		virtual TInt TestImageMMCEventL( CStifItemParser& aItem );
 		
+		virtual TInt TestImageNoIndexerL( CStifItemParser& aItem );
+		
 		virtual TInt TestStartEmailPluginL( CStifItemParser& aItem );
 		
 		CSearchDocument* prepareemaildocument();
 		
 		virtual TInt TestHandleEmailDocL( CStifItemParser& aItem );
 		
+		virtual TInt TestEmailBaseappclassL( CStifItemParser& aItem );
+		
+		virtual TInt TestEmailHandleDocL( CStifItemParser& aItem );
+		
 		virtual TInt TestQualifiedBaseAppClassL( CStifItemParser& );
 		
 		virtual TAny TestHandleMsgMovedL( CStifItemParser& );
--- a/harvesterplugins/tsrc/harvesterplugintester/src/ccalanderobserver.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/src/ccalanderobserver.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -72,8 +72,8 @@
     CleanupStack::PushL(entry);
             
     // For an appointment, the time as well as the date is relevant
-    TDateTime startTime(2010, EJanuary, 04, 10, 0, 0, 0);
-    TDateTime endTime(2010, EJanuary, 05, 16, 0, 0, 0);
+    TDateTime startTime(2010, EJuly, 07, 10, 0, 0, 0);
+    TDateTime endTime(2010, EJuly, 07, 16, 0, 0, 0);
     
     TCalTime calstart;
     TCalTime calstop;
--- a/harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/tsrc/harvesterplugintester/src/harvesterplugintesterblocks.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -45,11 +45,14 @@
 #include <harvesterclient.h>
 #include "mdsitementity.h"
 #include "cpixmdedbmanager.h"
+#include "cpixindexerutils.h"
 #include "cfolderrenamedharvester.h"
 #include "videoplugin.h"
 #include "imageplugin.h"
 #include "cemailplugin.h"
 #include "cmessagedatahandler.h"
+#include <common.h>
+
 _LIT(KAppBasePath,"@c:root file content");
 _LIT(KEmailAppBasePath,"@c:root msg email");
 _LIT(KAppBaseFolderFilePath,"@c:root file folder");
@@ -125,7 +128,12 @@
         ENTRY( "TestAddLongNoteL", CHarvesterPluginTester::TestAddLongNoteL ),
         ENTRY( "TestAddAlphaNumericNoteL", CHarvesterPluginTester::TestAddAlphaNumericNoteL ),
         ENTRY( "TestDeleteNoteL", CHarvesterPluginTester::TestDeleteNoteL ),
-        ENTRY( "TestUpdateNoteL", CHarvesterPluginTester::TestUpdateNoteL ),                
+        ENTRY( "TestUpdateNoteL", CHarvesterPluginTester::TestUpdateNoteL ),
+        ENTRY( "TestNotesEntryNegative", CHarvesterPluginTester::TestNotesEntryNegativeL ),
+        ENTRY( "TestNotesDestructor", CHarvesterPluginTester::TestNotesDestructorL ),
+        ENTRY( "TestNotesDelayedError", CHarvesterPluginTester::TestNotesDelayedErrorL ),
+        ENTRY( "TestNotesChangeEntry", CHarvesterPluginTester::TestNotesChangeEntryL),
+        ENTRY( "TestNotesEntryNoIndexer", CHarvesterPluginTester::TestNotesEntryNoIndexerL),
         ENTRY( "TestContactsHarvesting", CHarvesterPluginTester::TestStartContactsHarvesterL ),
         ENTRY( "TestCreateContactIndexItemL_Add", CHarvesterPluginTester::TestCreateContactIndexItemL ),
         ENTRY( "TestCreateAllContactFields", CHarvesterPluginTester::TestCreateAllContactFieldsL ),
@@ -140,25 +148,33 @@
         ENTRY( "TestCreateContactGroup", CHarvesterPluginTester::TestCreateContactGroupL ),
         ENTRY( "TestCalenderHarvesting", CHarvesterPluginTester::TestStartCalenderHarvesterL ),
         ENTRY( "TestCalenderEntry",CHarvesterPluginTester::TestCalenderEntryL ),
-        ENTRY( "TestCreateMMS",CHarvesterPluginTester::TestCreateMmsL ),
+        ENTRY( "TestCreateMMS",CHarvesterPluginTester::TestCreateMmsL ),        
+        ENTRY( "Testcalenderdestructor",CHarvesterPluginTester::TestcalenderdestructorL ),
+        ENTRY( "TestCalChangeEntry",CHarvesterPluginTester::TestCalChangeEntryL ),
+        ENTRY( "TestCalCreateEntry",CHarvesterPluginTester::TestCalCreateEntryL ),
         ENTRY( "TestCreateEmail",CHarvesterPluginTester::TestCreateEmailL ),
-		ENTRY( "TestAudioHarvesting",CHarvesterPluginTester::TestAudioHarvestingL ),
-        ENTRY( "TestAudioHarvestingUpdateIndex",CHarvesterPluginTester::TestAudioHarvestingUpdateIndexL ),
-        ENTRY( "TestAudioHarvestingDeleteIndex",CHarvesterPluginTester::TestAudioHarvestingDeleteIndexL ),
+		ENTRY( "TestAudioHarvesting",CHarvesterPluginTester::TestAudioHarvestingL ),        
 		ENTRY( "TestMdsSyncController",CHarvesterPluginTester::TestMdsSyncControllerL ),
+		ENTRY( "TestAudioHandleItem",CHarvesterPluginTester::TestAudioHandleItemL ),
+		ENTRY( "TestAudioSyncDbManager",CHarvesterPluginTester::TestAudioSyncDbManagerL ),
+        ENTRY( "TestAudioMMCEventL",CHarvesterPluginTester::TestAudioMMCEventL ),
+        ENTRY( "TestAudioNoIndexer",CHarvesterPluginTester::TestAudioNoIndexerL ),
 		//ENTRY( "TestBlacklistPlugin",CHarvesterPluginTester::TestBlacklistPluginL ),
 		//ENTRY( "TestBlacklistPluginVersion",CHarvesterPluginTester::TestBlacklistPluginVersionL ),
-		ENTRY( "TestVideoHarvestingIndex",CHarvesterPluginTester::TestVideoHarvestingIndexL ),		
-		ENTRY( "TestVideoHarvestingUpdateIndex",CHarvesterPluginTester::TestVideoHarvestingUpdateIndexL ),
-		ENTRY( "TestVideoHarvestingDeleteIndex",CHarvesterPluginTester::TestVideoHarvestingDeleteIndexL ),
-		ENTRY( "TestImageHarvestingAddIndex",CHarvesterPluginTester::TestImageHarvestingAddIndexL ),
-		ENTRY( "TestImageHarvestingUpdateIndex",CHarvesterPluginTester::TestImageHarvestingUpdateIndexL ),
-		ENTRY( "TestImageHarvestingDeleteIndex",CHarvesterPluginTester::TestImageHarvestingDeleteIndexL ),
-		ENTRY( "TestAudioMMCEventL",CHarvesterPluginTester::TestAudioMMCEventL ),
-		ENTRY( "TestVideoMMCEventL",CHarvesterPluginTester::TestVideoMMCEventL ),
+		ENTRY( "TestVideoHarvesting",CHarvesterPluginTester::TestVideoHarvestingL ),		
+        ENTRY( "TestVideoHandleItem",CHarvesterPluginTester::TestVideoHandleItemL ),
+		ENTRY( "TestVideoSyncDbManager",CHarvesterPluginTester::TestVideoSyncDbManagerL ),
+        ENTRY( "TestVideoMMCEventL",CHarvesterPluginTester::TestVideoMMCEventL ),
+        ENTRY( "TestVideoNoIndexer",CHarvesterPluginTester::TestVideoNoIndexerL ),
+		ENTRY( "TestImageHarvesting",CHarvesterPluginTester::TestImageHarvestingL ),				
+		ENTRY( "TestImageHandleItem",CHarvesterPluginTester::TestImageHandleItemL ),
+		ENTRY( "TestImageSyncDbManager",CHarvesterPluginTester::TestImageSyncDbManagerL ),
 		ENTRY( "TestImageMMCEventL",CHarvesterPluginTester::TestImageMMCEventL ),
+		ENTRY( "TestImageNoIndexer",CHarvesterPluginTester::TestImageNoIndexerL ),
 		ENTRY( "TestStartEmailPlugin",CHarvesterPluginTester::TestStartEmailPluginL ),
 		ENTRY( "TestHandleEmailDoc",CHarvesterPluginTester::TestHandleEmailDocL ),
+		ENTRY( "TestEmailBaseappclass",CHarvesterPluginTester::TestEmailBaseappclassL ),
+		ENTRY( "TestEmailHandleDoc",CHarvesterPluginTester::TestEmailHandleDocL ),
         //ADD NEW ENTRY HERE
         // [test cases entries] - Do not remove
         };
@@ -835,6 +851,7 @@
         {
         DocumentCount = searcher->SearchL(aQueryString, aDefaultField);
         }
+    session.Close();
     return DocumentCount;
     }
 
@@ -1043,7 +1060,7 @@
     return error;
     }
 
-TInt CHarvesterPluginTester::TestDeleteNoteL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestDeleteNoteL( CStifItemParser& /*aItem */)
     {	
     TInt error = KErrNone;
     _LIT( KSearchError, "Search Failed" );   
@@ -1053,9 +1070,10 @@
     
     CCalendarObserver* session = CCalendarObserver::NewL();
     plugin->StartHarvestingL( _L(NOTES_QBASEAPPCLASS) );
+    session->DeleteNoteEntryL();
     iPluginTester->iWaitForHarvester->Start();
     // Add a Note entry
-    TPtrC searchstring;
+    /*TPtrC searchstring;
     error = aItem.GetNextString( searchstring );
     HBufC8* buf8 = HBufC8::NewL(2*searchstring.Length());
     buf8->Des().Copy(searchstring);
@@ -1073,7 +1091,7 @@
         //If the entery is succesfully deleted, make error to KErrNone.To show testcase success
         if(error == KErrNotFound)
             error = KErrNone;    
-        }
+        }*/
     delete session;
     delete plugin;
     delete iPluginTester;
@@ -1125,6 +1143,76 @@
     return error;    
     }
 
+TInt CHarvesterPluginTester::TestNotesEntryNegativeL( CStifItemParser& /*aItem*/ )
+    {   
+    CNotesPlugin* plugin = CNotesPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    plugin->StartHarvestingL( _L(NOTES_QBASEAPPCLASS) );
+    iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete.
+    plugin->CreateNoteEntryL(0, ECPixUpdateAction);
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;
+    doLog( iLog, KErrNone, KNoErrorString );    
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestNotesDestructorL( CStifItemParser& /*aItem*/ )
+    {
+    CNotesPlugin* plugin = CNotesPlugin::NewL();    
+    plugin->iAsynchronizer->CancelCallback();
+    plugin->iAsynchronizer = NULL;
+    plugin->iSession->StopChangeNotification();
+    plugin->iSession = NULL;
+    delete plugin;
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestNotesDelayedErrorL( CStifItemParser& /*aItem*/ )
+    {
+    CNotesPlugin* plugin = CNotesPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    iPluginTester->SetWaitTime(2000000);
+    plugin->StartPluginL();
+    TRAPD(err, plugin->DelayedError( KErrGeneral ));
+    delete plugin;
+    delete iPluginTester;
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestNotesChangeEntryL( CStifItemParser& /*aItem*/ )
+    {
+    CNotesPlugin* plugin = CNotesPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    iPluginTester->SetWaitTime(2000000);
+    plugin->StartPluginL();
+    TCalChangeEntry calEntry;
+    calEntry.iChangeType = MCalChangeCallBack2::EChangeUndefined; //undefined type
+    plugin->HandleNoteChangedEntryL( calEntry );
+    calEntry.iChangeType = MCalChangeCallBack2::EChangeTzRules; //default check
+    plugin->HandleNoteChangedEntryL( calEntry );
+    delete plugin;
+    delete iPluginTester;
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestNotesEntryNoIndexerL( CStifItemParser& /*aItem*/ )
+    {    
+    CNotesPlugin* plugin = CNotesPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    TRAPD(err, plugin->CreateNoteEntryL(0, ECPixUpdateAction) );
+    TRAP(err, plugin->CreateNoteEntryL(0, (TCPixActionType)3) );
+    iPluginTester->SetWaitTime(2000000);    
+    CCalendarObserver* calobserver = CCalendarObserver::NewL();
+    calobserver->AddEntryL();
+    delete calobserver;
+    delete plugin;
+    delete iPluginTester;
+    return err;
+    }
+	
 TInt CHarvesterPluginTester::TestStartContactsHarvesterL( CStifItemParser& /*aItem*/ )
     {
     CContactsPlugin* plugin = CContactsPlugin::NewL();
@@ -1442,6 +1530,10 @@
 
 TInt CHarvesterPluginTester::TestStartCalenderHarvesterL( CStifItemParser& /*aItem*/ )
     {
+    CCalendarObserver* session = CCalendarObserver::NewL();
+    // Add a calender entry
+    session->AddEntryL();
+    delete session;
     CCalendarPlugin* plugin = CCalendarPlugin::NewL();
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
     plugin->StartPluginL(); //start to moniter contacts db
@@ -1534,6 +1626,67 @@
     return KErrNone;
     }
 
+TInt CHarvesterPluginTester::TestcalenderdestructorL( CStifItemParser& /*aItem */ )
+    {
+    CCalendarPlugin* plugin = CCalendarPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL(); //start to moniter contacts db   
+    plugin->Progress(100);
+    iPluginTester->SetWaitTime(2000000);
+    plugin->StartHarvestingL( _L(CALENDAR_QBASEAPPCLASS) );
+    plugin->DelayedError(KErrNone);
+    iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete.
+    plugin->Completed(KErrGeneral);  
+    plugin->iAsynchronizer->CancelCallback();
+    plugin->iAsynchronizer = NULL;
+    plugin->iSession->StopChangeNotification();
+    plugin->iSession = NULL;
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;
+    doLog( iLog, KErrNone, KNoErrorString );
+    return KErrNone; 
+    }
+
+TInt CHarvesterPluginTester::TestCalChangeEntryL( CStifItemParser& /*aItem */ )
+    {
+    CCalendarPlugin* plugin = CCalendarPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    iPluginTester->SetWaitTime(2000000);
+    plugin->StartPluginL();
+    TCalChangeEntry calEntry;
+    calEntry.iChangeType = MCalChangeCallBack2::EChangeAdd; //undefined type
+    plugin->HandleChangedEntryL( calEntry );
+    calEntry.iChangeType = MCalChangeCallBack2::EChangeUndefined; //undefined type
+    plugin->HandleChangedEntryL( calEntry );
+    calEntry.iChangeType = MCalChangeCallBack2::EChangeTzRules; //default check
+    plugin->HandleChangedEntryL( calEntry );
+    delete plugin;
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestCalCreateEntryL( CStifItemParser& /*aItem */ )
+    {
+    _LIT8(KTestmemo , "Notesplugin");
+    CCalendarPlugin* plugin = CCalendarPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    iPluginTester->SetWaitTime(2000000);
+    plugin->CreateEntryL(0,ECPixAddAction );
+    plugin->StartPluginL();
+    plugin->CreateEntryL(0,ECPixAddAction );
+    CCalendarObserver* calobserver = CCalendarObserver::NewL();
+    HBufC8* memo = HBufC8::New(10);
+    TPtr8 ptr = memo->Des();
+    ptr.Copy(KTestmemo);
+    calobserver->AddNoteL(ptr);
+    delete calobserver;
+    delete memo;
+    plugin->CreateEntryL(0,(TCPixActionType )3);
+    delete plugin;
+    delete iPluginTester;
+    return KErrNone;
+    }
+
 TInt CHarvesterPluginTester::TestCreateEmailL( CStifItemParser& /*aItem */)
     {
     TInt error = KErrNone;
@@ -1596,119 +1749,14 @@
     //Wait for one minutes after doc processing to Index and Flush to happen
     iPluginTester->SetWaitTime((TTimeIntervalMicroSeconds32)60000000);
     iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete
-    TInt count = SearchForTextL(_L("Eagle"),_L(MEDIA_QBASEAPPCLASS),KNullDesC);
-    if(count <= 0)
-        {
-        error = KErrNotFound;
-        }
-    doLog(iLog,error,_L("Error in TestAudioHarvestingL"));
+    error = doSearchL( _L("Eagle"),_L(MEDIA_QBASEAPPCLASS), ESearchTypeResultsExpected ); 
+    
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
     fileSession.Close();    
     //End search
-    return error;
-    }
-TInt CHarvesterPluginTester::TestAudioHarvestingUpdateIndexL( CStifItemParser& aItem )
-    {
-    TInt error = KErrNone;
-    TPtrC filepath;
-    TPtrC filename;
-    TPtrC newFile;
-    TBuf<KMaxFileName> srcPath(_L("c:\\data\\Sounds\\"));
-    TBuf<KMaxFileName> desPath;
-    desPath.Copy( srcPath );
-    CAudioPlugin* plugin = CAudioPlugin::NewL();
-    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
-    plugin->StartPluginL();
-    RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
-    if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
-        {
-        srcPath.Append( filename );
-        if( aItem.GetNextString(newFile) == KErrNone )
-            {
-            desPath.Append( newFile );
-            RHarvesterClient harvester;
-            User::LeaveIfError(harvester.Connect());
-            harvester.Pause();
-            TBool fileExist = BaflUtils::FileExists( fSession, srcPath );        
-            if(!fileExist)
-            {
-            BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
-            BaflUtils::CopyFile( fSession, filepath, srcPath );                    
-            }            
-            BaflUtils::RenameFile( fSession, srcPath, desPath );
-            harvester.Resume();
-            harvester.Close();
-            plugin->StartHarvestingL( _L(MEDIA_QBASEAPPCLASS) );
-            //wait for index to flush
-            iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
-            //wait till video harvesting completes
-            iPluginTester->iWaitForHarvester->Start();
-            TInt count = SearchForTextL(_L("testaudio"), _L(MEDIA_QBASEAPPCLASS), KNullDesC );
-            if(count <= 0)
-               {
-               error = KErrNotFound;
-               }
-            doLog( iLog, error, _L("Error in TestAudioHarvestingUpdateIndexL") );
-            }        
-        }
-        else
-            doLog( iLog, KErrNotFound, _L("Error in TestAudioHarvestingUpdateIndexL") );           
-        CleanupStack::PopAndDestroy();
-        delete plugin;
-        delete iPluginTester;
-        iPluginTester = NULL;
-        return error;
-        }
-
-TInt CHarvesterPluginTester::TestAudioHarvestingDeleteIndexL( CStifItemParser& aItem )
-    {
-    TInt error = KErrNone;
-    TPtrC filepath;
-    TPtrC filename;    
-    TBuf<KMaxFileName> srcPath(_L("c:\\data\\Sounds\\"));
-    CAudioPlugin* plugin = CAudioPlugin::NewL();
-    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
-    plugin->StartPluginL();
-    RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
-    if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
-        {
-        srcPath.Append( filename );        
-        RHarvesterClient harvester;
-        User::LeaveIfError(harvester.Connect());
-        harvester.Pause();
-        TBool fileExist = BaflUtils::FileExists( fSession, srcPath );        
-        if(!fileExist)
-        {
-        BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
-        BaflUtils::CopyFile( fSession, filepath, srcPath );                    
-        }            
-        BaflUtils::DeleteFile( fSession, srcPath );        
-        harvester.Resume();
-        harvester.Close();
-        plugin->StartHarvestingL( _L(MEDIA_QBASEAPPCLASS) );
-        //wait for index to flush
-        iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
-        //wait till video harvesting completes
-        iPluginTester->iWaitForHarvester->Start();
-        TInt count = SearchForTextL(_L("eagle"), _L(MEDIA_QBASEAPPCLASS), KNullDesC );
-        if(count <= 0)
-           {
-           // If the search is not found,then testcase is success
-           doLog( iLog, error, _L("Error in TestAudioHarvestingDeleteIndexL") );
-           }
-        }
-    else
-        doLog( iLog, KErrNotFound, _L("Error in TestAudioHarvestingDeleteIndexL") );           
-    CleanupStack::PopAndDestroy();
-    delete plugin;
-    delete iPluginTester;
-    iPluginTester = NULL;
+    doLog(iLog,error,_L("Error in TestAudioHarvestingL"));
     return error;
     }
         
@@ -1748,7 +1796,83 @@
     delete dbcontroller;
     return error;
     }
-	
+
+TInt CHarvesterPluginTester::TestAudioHandleItemL( CStifItemParser& aItem)
+    {
+    TInt error = KErrNone;    
+    TInt objId;    
+    TInt actionType;
+    aItem.GetNextInt ( objId );
+    aItem.GetNextInt ( actionType );    
+    CAudioPlugin* plugin = CAudioPlugin::NewL(); 
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    TRAPD( err , plugin->HandleMdeItemL(objId, (TCPixActionType)actionType) );
+    doLog(iLog,error,_L("Error in TestAudioHandleItemL"));
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestAudioSyncDbManagerL( CStifItemParser& /* aItem */)
+    {    
+    CAudioPlugin* plugin = CAudioPlugin::NewL(); 
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    CMDSEntity* entity;    
+    entity = CMDSEntity::NewL();    
+    entity->Setkey(100);
+    entity->SetUri(_L("\\music\\audio.mp3"));
+    TDriveNumber drive = TDriveNumber(EDriveC);
+    entity->SetDrive(drive);    
+    plugin->iDBManager->AddL( entity->Key(),*entity );
+    TRAPD( err , plugin->HandleMdeItemL(entity->Key(), ECPixAddAction));
+    TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixUpdateAction));
+    TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixRemoveAction));
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestAudioMMCEventL( CStifItemParser& aItem )
+    {    
+    TInt error(KErrNone);
+    TInt drive;    
+    TInt mmcstatus;
+    aItem.GetNextInt ( drive );
+    aItem.GetNextInt ( mmcstatus );    
+    CAudioPlugin* plugin = CAudioPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL(); //Initialize the Plugin
+    TRAPD( err , plugin->HandleMMCEventL( (TDriveNumber)drive , mmcstatus) );
+    //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete
+    doLog(iLog,error,_L("Error in TestAudioMMCEventL"));
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;
+    //End search
+    return err;
+    }
+
+TInt CHarvesterPluginTester::TestAudioNoIndexerL( CStifItemParser& aItem )
+    {
+    TInt drive;
+    TInt objId;
+    aItem.GetNextInt ( drive );
+    aItem.GetNextInt ( objId );
+    CAudioPlugin* plugin = CAudioPlugin::NewL(); 
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    plugin->iIndexerUtil->iIndexer[drive]= NULL;
+    TRAPD( err , plugin->HandleMdeItemL(objId, ECPixUpdateAction) );
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;    
+    return KErrNone;
+    }
+
 TInt CHarvesterPluginTester::TestBlacklistPluginL( CStifItemParser& /*aItem*/ )
     {
     //@todo: This test case shoud be in IDS middleware harvester STIF cases
@@ -1805,7 +1929,7 @@
     doLog( iLog, err, KNoErrorString );*/
     return err;
     }
-TInt CHarvesterPluginTester::TestVideoHarvestingIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoHarvestingL( CStifItemParser& aItem )
     {
     TInt error = KErrNone;
     TPtrC filepath;
@@ -1815,8 +1939,7 @@
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
     plugin->StartPluginL();
     RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
+    User::LeaveIfError( fSession.Connect());    
     if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
         {        
         TBuf<KMaxFileName> desPath(_L("c:\\data\\Videos\\"));
@@ -1843,121 +1966,72 @@
            {
            error = KErrNotFound;
            }
-        }
-        else
-           error = KErrNotFound;
-    CleanupStack::PopAndDestroy();
+        }        
+    fSession.Close();
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
-    doLog( iLog, error, _L("Error in TestVideoHarvestingIndexL") );
+    doLog( iLog, error, _L("Error in TestVideoHarvesting") );
     return error;
     }
 
-TInt CHarvesterPluginTester::TestVideoHarvestingUpdateIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoHandleItemL( CStifItemParser& aItem )
     {
-    TInt error = KErrNone;
-    TPtrC filepath;
-    TPtrC filename;
-    TPtrC newFile;
-    TBuf<KMaxFileName> srcPath(_L("c:\\data\\Videos\\"));
-    TBuf<KMaxFileName> desPath;
-    desPath.Copy( srcPath );
-    CVideoPlugin* plugin = CVideoPlugin::NewL();
+    TInt error = KErrNone;    
+    TInt objId;    
+    TInt actionType;
+    aItem.GetNextInt ( objId );
+    aItem.GetNextInt ( actionType );    
+    CVideoPlugin* plugin = CVideoPlugin::NewL(); 
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
     plugin->StartPluginL();
-    RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
-    if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
-        {
-        srcPath.Append( filename );
-        if( aItem.GetNextString(newFile) == KErrNone )
-            {
-            desPath.Append( newFile );
-            RHarvesterClient harvester;
-            User::LeaveIfError(harvester.Connect());
-            harvester.Pause();
-            TBool fileExist = BaflUtils::FileExists( fSession, srcPath );        
-            if(!fileExist)
-            {
-            BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
-            BaflUtils::CopyFile( fSession, filepath, srcPath );                    
-            }            
-            BaflUtils::RenameFile( fSession, srcPath, desPath );
-            harvester.Resume();
-            harvester.Close();
-            plugin->StartHarvestingL( _L(VIDEO_QBASEAPPCLASS) );
-            //wait for index to flush
-            iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
-            //wait till video harvesting completes
-            iPluginTester->iWaitForHarvester->Start();
-            TInt count = SearchForTextL(_L("Falls"), _L(VIDEO_QBASEAPPCLASS), KNullDesC );
-            if(count <= 0)
-               {
-               error = KErrNotFound;
-               }
-            doLog( iLog, error, _L("Error in TestVideoHarvestingUpdateIndexL") );
-            }        
-        }
-    else
-        doLog( iLog, KErrNotFound, _L("Error in TestVideoHarvestingUpdateIndexL") );           
-    CleanupStack::PopAndDestroy();
+    TRAPD( err , plugin->HandleMdeItemL(objId, (TCPixActionType)actionType) );
+    doLog(iLog,error,_L("Error in TestVideoHandleItemL"));
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
-    return error;
+    return KErrNone;
     }
 
-TInt CHarvesterPluginTester::TestVideoHarvestingDeleteIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoSyncDbManagerL( CStifItemParser& /*aItem */)
     {
-    TInt error = KErrNone;
-    TPtrC filepath;
-    TPtrC filename;    
-    TBuf<KMaxFileName> srcPath(_L("c:\\data\\Videos\\"));
-    CVideoPlugin* plugin = CVideoPlugin::NewL();
+    CVideoPlugin* plugin = CVideoPlugin::NewL(); 
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
     plugin->StartPluginL();
-    RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
-    if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
-        {
-        srcPath.Append( filename );        
-        RHarvesterClient harvester;
-        User::LeaveIfError(harvester.Connect());
-        harvester.Pause();
-        TBool fileExist = BaflUtils::FileExists( fSession, srcPath );        
-        if(!fileExist)
-        {
-        BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
-        BaflUtils::CopyFile( fSession, filepath, srcPath );                    
-        }            
-        BaflUtils::DeleteFile( fSession, srcPath );        
-        harvester.Resume();
-        harvester.Close();
-        plugin->StartHarvestingL( _L(VIDEO_QBASEAPPCLASS) );
-        //wait for index to flush
-        iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
-        //wait till video harvesting completes
-        iPluginTester->iWaitForHarvester->Start();
-        TInt count = SearchForTextL(_L("Niagara"), _L(VIDEO_QBASEAPPCLASS), KNullDesC );
-        if(count <= 0)
-           {
-           // If the search is not found,then testcase is success
-           doLog( iLog, error, _L("Error in TestVideoHarvestingDeleteIndexL") );
-           }
-        }
-    else
-        doLog( iLog, KErrNotFound, _L("Error in TestVideoHarvestingDeleteIndexL") );           
-    CleanupStack::PopAndDestroy();
+    CMDSEntity* entity;    
+    entity = CMDSEntity::NewL();    
+    entity->Setkey(101);
+    entity->SetUri(_L("\\video\\video.mpg"));
+    TDriveNumber drive = TDriveNumber(EDriveC);
+    entity->SetDrive(drive);    
+    plugin->iDBManager->AddL( entity->Key(),*entity );
+    TRAPD( err , plugin->HandleMdeItemL(entity->Key(), ECPixAddAction));
+    TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixUpdateAction));
+    TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixRemoveAction));
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
-    return error;
+    return KErrNone;
     }
 
-TInt CHarvesterPluginTester::TestImageHarvestingAddIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestVideoNoIndexerL( CStifItemParser& aItem )
+    {
+    TInt drive;
+    TInt objId;
+    aItem.GetNextInt ( drive );
+    aItem.GetNextInt ( objId );
+    CVideoPlugin* plugin = CVideoPlugin::NewL(); 
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    plugin->iIndexerUtil->iIndexer[drive]= NULL;
+    TRAPD( err , plugin->HandleMdeItemL(objId, ECPixUpdateAction) );
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;    
+    return KErrNone;
+    }
+
+TInt CHarvesterPluginTester::TestImageHarvestingL( CStifItemParser& aItem )
     {
     TInt error = KErrNone;
     TPtrC filepath;
@@ -1967,8 +2041,7 @@
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
     plugin->StartPluginL();
     RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
+    User::LeaveIfError( fSession.Connect());    
     if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
         {        
         TBuf<KMaxFileName> desPath(_L("c:\\data\\Images\\"));
@@ -1998,135 +2071,68 @@
         else
            error = KErrNotFound;
     doLog( iLog, error, _L("Error in TestImageHarvestingAddIndexL") );  
-    CleanupStack::PopAndDestroy();
-    delete plugin;
-    delete iPluginTester;
-    iPluginTester = NULL;
-    return error;
-    }
-
-TInt CHarvesterPluginTester::TestImageHarvestingUpdateIndexL( CStifItemParser& aItem )
-    {
-    TInt error = KErrNone;
-    TPtrC filepath;
-    TPtrC filename;
-    TPtrC newFile;
-    TBuf<KMaxFileName> srcPath(_L("c:\\data\\Images\\"));
-    TBuf<KMaxFileName> desPath;
-    desPath.Copy( srcPath );
-    CImagePlugin* plugin = CImagePlugin::NewL();
-    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
-    plugin->StartPluginL();
-    RFs fSession;
-    User::LeaveIfError( fSession.Connect());
-    CleanupClosePushL( fSession );
-    if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
-        {
-        srcPath.Append( filename );
-        if( aItem.GetNextString(newFile) == KErrNone )
-            {
-            desPath.Append( newFile );
-            RHarvesterClient harvester;
-            User::LeaveIfError(harvester.Connect());
-            harvester.Pause();
-            TBool fileExist = BaflUtils::FileExists( fSession, srcPath );        
-            if(!fileExist)
-            {
-            BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
-            BaflUtils::CopyFile( fSession, filepath, srcPath );                    
-            }            
-            BaflUtils::RenameFile( fSession, srcPath, desPath );
-            harvester.Resume();
-            harvester.Close();
-            plugin->StartHarvestingL( _L(IMAGE_QBASEAPPCLASS) );
-            //wait for index to flush
-            iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );            
-            iPluginTester->iWaitForHarvester->Start();
-            TInt count = SearchForTextL(_L("Portrait"), _L(IMAGE_QBASEAPPCLASS), KNullDesC );
-            if(count <= 0)
-               {
-               error = KErrNotFound;
-               }
-            doLog( iLog, error, _L("Error in TestImageHarvestingUpdateIndexL") );
-            }        
-        }
-    else
-        doLog( iLog, KErrNotFound, _L("Error in TestImageHarvestingUpdateIndexL") );           
-    CleanupStack::PopAndDestroy();
+    fSession.Close();
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
     return error;
     }
 
-TInt CHarvesterPluginTester::TestImageHarvestingDeleteIndexL( CStifItemParser& aItem )
+TInt CHarvesterPluginTester::TestImageHandleItemL( CStifItemParser& aItem )
     {
-    TInt error = KErrNone;
-    TPtrC filepath;
-    TPtrC filename;    
-    TBuf<KMaxFileName> srcPath(_L("c:\\data\\Images\\"));
-    CImagePlugin* plugin = CImagePlugin::NewL();
+    TInt error = KErrNone;    
+    TInt objId;    
+    TInt actionType;
+    aItem.GetNextInt ( objId );
+    aItem.GetNextInt ( actionType );    
+    CImagePlugin* plugin = CImagePlugin::NewL(); 
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
     plugin->StartPluginL();
-    RFs fSession;
-    User::LeaveIfError( fSession.Connect() );
-    CleanupClosePushL( fSession );
-    if((aItem.GetNextString(filepath)==KErrNone) && (aItem.GetNextString(filename) == KErrNone))
-        {
-        srcPath.Append( filename );        
-        RHarvesterClient harvester;
-        User::LeaveIfError(harvester.Connect());
-        harvester.Pause();
-        TBool fileExist = BaflUtils::FileExists( fSession, srcPath );        
-        if(!fileExist)
-        {
-        BaflUtils::EnsurePathExistsL( fSession, srcPath );//Create folder
-        BaflUtils::CopyFile( fSession, filepath, srcPath );                    
-        }            
-        BaflUtils::DeleteFile( fSession, srcPath );        
-        harvester.Resume();
-        harvester.Close();
-        plugin->StartHarvestingL( _L(IMAGE_QBASEAPPCLASS) );
-        //wait for index to flush
-        iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)60000000 );
-        //wait till image harvesting completes
-        iPluginTester->iWaitForHarvester->Start();
-        TInt count = SearchForTextL(_L("Square"), _L(IMAGE_QBASEAPPCLASS), KNullDesC );
-        if(count <= 0)
-           {
-           // If the search is not found,then testcase is success
-           doLog( iLog, error, _L("Error in TestImageHarvestingDeleteIndexL") );
-           }
-        }
-    else
-        doLog( iLog, KErrNotFound, _L("Error in TestImageHarvestingDeleteIndexL") );           
-    CleanupStack::PopAndDestroy();
+    TRAPD( err , plugin->HandleMdeItemL(objId, (TCPixActionType)actionType) );
+    doLog(iLog,error,_L("Error in TestImageHandleItemL"));
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
-    return error;
+    return KErrNone;
     }
 
-TInt CHarvesterPluginTester::TestAudioMMCEventL( CStifItemParser& aItem )
-    {    
-    TInt error(KErrNone);
-    TInt drive;    
-    TInt mmcstatus;
-    aItem.GetNextInt ( drive );
-    aItem.GetNextInt ( mmcstatus );    
-    CAudioPlugin* plugin = CAudioPlugin::NewL();
+TInt CHarvesterPluginTester::TestImageSyncDbManagerL( CStifItemParser& /*aItem */)
+    {
+    CImagePlugin* plugin = CImagePlugin::NewL(); 
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
-    plugin->StartPluginL(); //Initialize the Plugin
-    TRAPD( err , plugin->HandleMMCEventL( (TDriveNumber)drive , mmcstatus) );
-    //iPluginTester->iWaitForHarvester->Start(); //Start Wait AO and let it complete
-    doLog(iLog,error,_L("Error in TestAudioMMCEventL"));
+    plugin->StartPluginL();
+    CMDSEntity* entity;    
+    entity = CMDSEntity::NewL();    
+    entity->Setkey(102);
+    entity->SetUri(_L("\\image\\image.jpg"));
+    TDriveNumber drive = TDriveNumber(EDriveC);
+    entity->SetDrive(drive);    
+    plugin->iDBManager->AddL( entity->Key(),*entity );
+    TRAPD( err , plugin->HandleMdeItemL(entity->Key(), ECPixAddAction));
+    TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixUpdateAction));
+    TRAP( err , plugin->HandleMdeItemL(entity->Key(), ECPixRemoveAction));
     delete plugin;
     delete iPluginTester;
     iPluginTester = NULL;
-    //End search
-    return err;
+    return KErrNone;
     }
-        
+
+TInt CHarvesterPluginTester::TestImageNoIndexerL( CStifItemParser& aItem )
+    {
+    TInt drive;
+    TInt objId;
+    aItem.GetNextInt ( drive );
+    aItem.GetNextInt ( objId );
+    CImagePlugin* plugin = CImagePlugin::NewL(); 
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( plugin );
+    plugin->StartPluginL();
+    plugin->iIndexerUtil->iIndexer[drive]= NULL;
+    TRAPD( err , plugin->HandleMdeItemL(objId, ECPixUpdateAction) );
+    delete plugin;
+    delete iPluginTester;
+    iPluginTester = NULL;    
+    return KErrNone;
+    }        
 TInt CHarvesterPluginTester::TestVideoMMCEventL( CStifItemParser& aItem )
     {
     TInt error(KErrNone);
@@ -2177,8 +2183,11 @@
     iLog->Log( KExample );
     CEmailPlugin* emailPlugin = CEmailPlugin::NewL();
     CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( emailPlugin );    
-    emailPlugin->StartPluginL(); //Calls Add
+    emailPlugin->StartPluginL();
+    iPluginTester->SetWaitTime( (TTimeIntervalMicroSeconds32)5000000 );
     emailPlugin->StartHarvestingL( KEmailAppBasePath );
+    emailPlugin->HarvestingCompleted();
+    iPluginTester->iWaitForHarvester->Start();
     delete emailPlugin;
     delete iPluginTester;
     doLog( iLog, KErrNone, KNoErrorString );
@@ -2194,14 +2203,63 @@
     // Print to log file
     iLog->Log( KExample );
     CEmailPlugin* emailPlugin = CEmailPlugin::NewL();
-    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( emailPlugin );   
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( emailPlugin );
+    TRAPD(err , emailPlugin->StartPluginL());
     CSearchDocument* doc = prepareemaildocument();
-    TRAPD(err , emailPlugin->HandleDocumentL( doc , ECPixAddAction));
-    iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete.
+    TRAP(err , emailPlugin->HandleDocumentL( doc , ECPixAddAction));    
+    TRAP(err , emailPlugin->HandleDocumentL( doc , ECPixRemoveAction));
+    //iPluginTester->iWaitForHarvester->Start();//Wait here till Harvesting is complete.
+    delete doc;
     delete emailPlugin;
     delete iPluginTester;
     doLog( iLog, err, KNoErrorString );
     return err;
     }
 
+TInt CHarvesterPluginTester::TestEmailBaseappclassL( CStifItemParser& /*aItem*/ )
+    {
+    _LIT( KHarvesterPluginTester, "HarvesterPluginTester: %S" );
+    _LIT( KExample, "In TestEmailBaseappclassL" );
+    TestModuleIf().Printf( 0, KHarvesterPluginTester, KExample );
+    
+    TDriveNumber drive ( EDriveA ); 
+    _LIT( appcls1 ,"@c:root msg email" );
+    _LIT( appcls2 ,"@*:root msg email" );
+    _LIT( appcls3 ,"d:root msg email" );    
+    CEmailPlugin* emailPlugin = CEmailPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( emailPlugin );
+    TRAPD(err , emailPlugin->StartPluginL());
+    TRAP(err, emailPlugin->StartHarvestingL(appcls1));
+    delete emailPlugin->iIndexer[EDriveC];
+    emailPlugin->iIndexer[EDriveC] = NULL;
+    TRAP(err, emailPlugin->StartHarvestingL(appcls1));
+    TRAP(err, emailPlugin->StartHarvestingL(appcls2));
+    TRAP(err, emailPlugin->StartHarvestingL(appcls3));
+    delete emailPlugin;
+    delete iPluginTester;
+    return err;
+    }
+
+TInt CHarvesterPluginTester::TestEmailHandleDocL( CStifItemParser& /*aItem*/ )
+    {
+    _LIT( KHarvesterPluginTester, "HarvesterPluginTester: %S" );
+    _LIT( KExample, "In TestEmailHandleDocL" );
+    TestModuleIf().Printf( 0, KHarvesterPluginTester, KExample );
+    CEmailPlugin* emailPlugin = CEmailPlugin::NewL();
+    CHarvesterObserver* iPluginTester = CHarvesterObserver::NewL( emailPlugin );
+    CSearchDocument* doc = prepareemaildocument();
+    TRAPD(err , emailPlugin->StartPluginL());
+    TRAP(err, emailPlugin->StartHarvestingL( KEmailAppBasePath ));    
+    delete emailPlugin->iIndexer[EDriveC];    
+    TRAP(err,emailPlugin->HandleDocumentL(doc,ECPixRemoveAction));
+    TRAP(err,emailPlugin->HandleDocumentL(doc,ECPixAddAction));
+    emailPlugin->MountL(EDriveC);
+    TRAP(err,emailPlugin->HandleDocumentL(doc,ECPixAddAction));
+    TRAP(err,emailPlugin->HandleDocumentL(doc,ECPixUpdateAction));
+    delete doc;
+    delete emailPlugin;
+    delete iPluginTester;
+    return err;
+    }
+
 //  [End of File] - Do not remove
Binary file onlinesearchproviders/data/providerdatabase.sq has changed
--- a/onlinesearchproviders/onlinesearchproviders.pro	Tue Jul 06 14:17:22 2010 +0300
+++ b/onlinesearchproviders/onlinesearchproviders.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -22,5 +22,7 @@
 CONFIG += ordered
 
 symbian: {	
-		BLD_INF_RULES.prj_exports += "rom/issearch.iby CORE_APP_LAYER_IBY_EXPORT_PATH(issearch.iby)"		
+		BLD_INF_RULES.prj_exports += "rom/issearch.iby CORE_APP_LAYER_IBY_EXPORT_PATH(issearch.iby)"
+		BLD_INF_RULES.prj_exports += "data/providerdatabase.sq /epoc32/data/z/private/20022F35/providerdatabase.sq"
+				
 	 }
\ No newline at end of file
--- a/rom/cpix_app.iby	Tue Jul 06 14:17:22 2010 +0300
+++ b/rom/cpix_app.iby	Wed Aug 18 09:49:49 2010 +0300
@@ -38,7 +38,7 @@
 ECOM_PLUGIN( cpixfileplugin.dll, cpixfileplugin.rsc)
 
 // Bookmark plugin
-ECOM_PLUGIN( cpixbookmarksplugin.dll, cpixbookmarksplugin.rsc)
+//ECOM_PLUGIN( cpixbookmarksplugin.dll, cpixbookmarksplugin.rsc)
 
 //Calender plugin
 ECOM_PLUGIN( cpixcalendarplugin.dll, cpixcalendarplugin.rsc)
--- a/searchui/Searchapplication/Searchapplication.pro	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/Searchapplication/Searchapplication.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -37,7 +37,7 @@
 CONFIG += console
 CONFIG += hb console mobility 
 
-TRANSLATIONS += searchsw.ts 
+TRANSLATIONS += search.ts 
 nft:DEFINES += NFT
 
 DEPENDPATH += . \
--- a/searchui/Searchapplication/src/main.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/Searchapplication/src/main.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -36,7 +36,7 @@
     QTranslator translator;
     QString lang = QLocale::system().name();
     QString path = "Z:/resource/qt/translations/";
-    translator.load("searchsw_" + lang, path);
+    translator.load("search_" + lang, path);
     app.installTranslator(&translator);
 
     QTranslator commonTranslator;
--- a/searchui/bwins/searchindevicehandleru.def	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/bwins/searchindevicehandleru.def	Wed Aug 18 09:49:49 2010 +0300
@@ -1,26 +1,29 @@
 EXPORTS
 	??0InDeviceHandler@@QAE@XZ @ 1 NONAME ; InDeviceHandler::InDeviceHandler(void)
 	?setCategory@InDeviceHandler@@QAEXVQString@@@Z @ 2 NONAME ; void InDeviceHandler::setCategory(class QString)
-	?getDocumentAtIndex@InDeviceHandler@@QAEPAVQCPixDocument@@H@Z @ 3 NONAME ; class QCPixDocument * InDeviceHandler::getDocumentAtIndex(int)
-	?isPrepared@InDeviceHandler@@QAE_NXZ @ 4 NONAME ; bool InDeviceHandler::isPrepared(void)
-	?handleAsyncSearchResult@InDeviceHandler@@IAEXHH@Z @ 5 NONAME ; void InDeviceHandler::handleAsyncSearchResult(int, int)
-	?qt_metacast@InDeviceHandler@@UAEPAXPBD@Z @ 6 NONAME ; void * InDeviceHandler::qt_metacast(char const *)
-	?cancelLastSearch@InDeviceHandler@@QAEXXZ @ 7 NONAME ; void InDeviceHandler::cancelLastSearch(void)
-	?getDocumentAsyncAtIndex@InDeviceHandler@@QAEXH@Z @ 8 NONAME ; void InDeviceHandler::getDocumentAsyncAtIndex(int)
-	?metaObject@InDeviceHandler@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * InDeviceHandler::metaObject(void) const
-	??_EInDeviceHandler@@UAE@I@Z @ 10 NONAME ; InDeviceHandler::~InDeviceHandler(unsigned int)
-	?qt_metacall@InDeviceHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 11 NONAME ; int InDeviceHandler::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?handleSearchResult@InDeviceHandler@@IAEXHH@Z @ 12 NONAME ; void InDeviceHandler::handleSearchResult(int, int)
-	?tr@InDeviceHandler@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString InDeviceHandler::tr(char const *, char const *, int)
-	??1InDeviceHandler@@UAE@XZ @ 14 NONAME ; InDeviceHandler::~InDeviceHandler(void)
-	?trUtf8@InDeviceHandler@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString InDeviceHandler::trUtf8(char const *, char const *)
-	?getDocumentAsync@InDeviceHandler@@AAEXHPAVQCPixDocument@@@Z @ 16 NONAME ; void InDeviceHandler::getDocumentAsync(int, class QCPixDocument *)
-	?tr@InDeviceHandler@@SA?AVQString@@PBD0@Z @ 17 NONAME ; class QString InDeviceHandler::tr(char const *, char const *)
-	?trUtf8@InDeviceHandler@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString InDeviceHandler::trUtf8(char const *, char const *, int)
-	?getStaticMetaObject@InDeviceHandler@@SAABUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const & InDeviceHandler::getStaticMetaObject(void)
-	?getSearchResultCount@InDeviceHandler@@QAEHXZ @ 20 NONAME ; int InDeviceHandler::getSearchResultCount(void)
-	?searchAsync@InDeviceHandler@@QAEXVQString@@0@Z @ 21 NONAME ; void InDeviceHandler::searchAsync(class QString, class QString)
-	?staticMetaObject@InDeviceHandler@@2UQMetaObject@@B @ 22 NONAME ; struct QMetaObject const InDeviceHandler::staticMetaObject
-	?getSearchResult@InDeviceHandler@@AAEXHH@Z @ 23 NONAME ; void InDeviceHandler::getSearchResult(int, int)
-	?handleDocument@InDeviceHandler@@IAEXHPAVQCPixDocument@@@Z @ 24 NONAME ; void InDeviceHandler::handleDocument(int, class QCPixDocument *)
+	?getDocumentAtIndex@InDeviceHandler@@QAEPAVCpixDocument@@H@Z @ 3 NONAME ; class CpixDocument * InDeviceHandler::getDocumentAtIndex(int)
+	?getDocumentAsync@InDeviceHandler@@AAEXHPAVCpixDocument@@@Z @ 4 NONAME ; void InDeviceHandler::getDocumentAsync(int, class CpixDocument *)
+	?isPrepared@InDeviceHandler@@QAE_NXZ @ 5 NONAME ; bool InDeviceHandler::isPrepared(void)
+	?handleAsyncSearchResult@InDeviceHandler@@IAEXHH@Z @ 6 NONAME ; void InDeviceHandler::handleAsyncSearchResult(int, int)
+	?qt_metacast@InDeviceHandler@@UAEPAXPBD@Z @ 7 NONAME ; void * InDeviceHandler::qt_metacast(char const *)
+	?getBatchDocumentAsyncAtIndex@InDeviceHandler@@QAEXHH@Z @ 8 NONAME ; void InDeviceHandler::getBatchDocumentAsyncAtIndex(int, int)
+	?cancelLastSearch@InDeviceHandler@@QAEXXZ @ 9 NONAME ; void InDeviceHandler::cancelLastSearch(void)
+	?getDocumentAsyncAtIndex@InDeviceHandler@@QAEXH@Z @ 10 NONAME ; void InDeviceHandler::getDocumentAsyncAtIndex(int)
+	?metaObject@InDeviceHandler@@UBEPBUQMetaObject@@XZ @ 11 NONAME ; struct QMetaObject const * InDeviceHandler::metaObject(void) const
+	??_EInDeviceHandler@@UAE@I@Z @ 12 NONAME ; InDeviceHandler::~InDeviceHandler(unsigned int)
+	?qt_metacall@InDeviceHandler@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13 NONAME ; int InDeviceHandler::qt_metacall(enum QMetaObject::Call, int, void * *)
+	?getBatchDocumentAsync@InDeviceHandler@@AAEXHHPAPAVCpixDocument@@@Z @ 14 NONAME ; void InDeviceHandler::getBatchDocumentAsync(int, int, class CpixDocument * *)
+	?handleSearchResult@InDeviceHandler@@IAEXHH@Z @ 15 NONAME ; void InDeviceHandler::handleSearchResult(int, int)
+	?tr@InDeviceHandler@@SA?AVQString@@PBD0H@Z @ 16 NONAME ; class QString InDeviceHandler::tr(char const *, char const *, int)
+	??1InDeviceHandler@@UAE@XZ @ 17 NONAME ; InDeviceHandler::~InDeviceHandler(void)
+	?trUtf8@InDeviceHandler@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString InDeviceHandler::trUtf8(char const *, char const *)
+	?handleBatchDocument@InDeviceHandler@@IAEXHHPAPAVCpixDocument@@@Z @ 19 NONAME ; void InDeviceHandler::handleBatchDocument(int, int, class CpixDocument * *)
+	?tr@InDeviceHandler@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString InDeviceHandler::tr(char const *, char const *)
+	?trUtf8@InDeviceHandler@@SA?AVQString@@PBD0H@Z @ 21 NONAME ; class QString InDeviceHandler::trUtf8(char const *, char const *, int)
+	?getStaticMetaObject@InDeviceHandler@@SAABUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const & InDeviceHandler::getStaticMetaObject(void)
+	?handleDocument@InDeviceHandler@@IAEXHPAVCpixDocument@@@Z @ 23 NONAME ; void InDeviceHandler::handleDocument(int, class CpixDocument *)
+	?getSearchResultCount@InDeviceHandler@@QAEHXZ @ 24 NONAME ; int InDeviceHandler::getSearchResultCount(void)
+	?searchAsync@InDeviceHandler@@QAEXVQString@@0@Z @ 25 NONAME ; void InDeviceHandler::searchAsync(class QString, class QString)
+	?staticMetaObject@InDeviceHandler@@2UQMetaObject@@B @ 26 NONAME ; struct QMetaObject const InDeviceHandler::staticMetaObject
+	?getSearchResult@InDeviceHandler@@AAEXHH@Z @ 27 NONAME ; void InDeviceHandler::getSearchResult(int, int)
 
--- a/searchui/eabi/searchindevicehandleru.def	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/eabi/searchindevicehandleru.def	Wed Aug 18 09:49:49 2010 +0300
@@ -4,23 +4,26 @@
 	_ZN15InDeviceHandler11qt_metacastEPKc @ 3 NONAME
 	_ZN15InDeviceHandler11searchAsyncE7QStringS0_ @ 4 NONAME
 	_ZN15InDeviceHandler11setCategoryE7QString @ 5 NONAME
-	_ZN15InDeviceHandler14handleDocumentEiP13QCPixDocument @ 6 NONAME
+	_ZN15InDeviceHandler14handleDocumentEiP12CpixDocument @ 6 NONAME
 	_ZN15InDeviceHandler15getSearchResultEii @ 7 NONAME
 	_ZN15InDeviceHandler16cancelLastSearchEv @ 8 NONAME
-	_ZN15InDeviceHandler16getDocumentAsyncEiP13QCPixDocument @ 9 NONAME
+	_ZN15InDeviceHandler16getDocumentAsyncEiP12CpixDocument @ 9 NONAME
 	_ZN15InDeviceHandler16staticMetaObjectE @ 10 NONAME DATA 16
 	_ZN15InDeviceHandler18getDocumentAtIndexEi @ 11 NONAME
 	_ZN15InDeviceHandler18handleSearchResultEii @ 12 NONAME
 	_ZN15InDeviceHandler19getStaticMetaObjectEv @ 13 NONAME
-	_ZN15InDeviceHandler20getSearchResultCountEv @ 14 NONAME
-	_ZN15InDeviceHandler23getDocumentAsyncAtIndexEi @ 15 NONAME
-	_ZN15InDeviceHandler23handleAsyncSearchResultEii @ 16 NONAME
-	_ZN15InDeviceHandlerC1Ev @ 17 NONAME
-	_ZN15InDeviceHandlerC2Ev @ 18 NONAME
-	_ZN15InDeviceHandlerD0Ev @ 19 NONAME
-	_ZN15InDeviceHandlerD1Ev @ 20 NONAME
-	_ZN15InDeviceHandlerD2Ev @ 21 NONAME
-	_ZNK15InDeviceHandler10metaObjectEv @ 22 NONAME
-	_ZTI15InDeviceHandler @ 23 NONAME
-	_ZTV15InDeviceHandler @ 24 NONAME
+	_ZN15InDeviceHandler19handleBatchDocumentEiiPP12CpixDocument @ 14 NONAME
+	_ZN15InDeviceHandler20getSearchResultCountEv @ 15 NONAME
+	_ZN15InDeviceHandler21getBatchDocumentAsyncEiiPP12CpixDocument @ 16 NONAME
+	_ZN15InDeviceHandler23getDocumentAsyncAtIndexEi @ 17 NONAME
+	_ZN15InDeviceHandler23handleAsyncSearchResultEii @ 18 NONAME
+	_ZN15InDeviceHandler28getBatchDocumentAsyncAtIndexEii @ 19 NONAME
+	_ZN15InDeviceHandlerC1Ev @ 20 NONAME
+	_ZN15InDeviceHandlerC2Ev @ 21 NONAME
+	_ZN15InDeviceHandlerD0Ev @ 22 NONAME
+	_ZN15InDeviceHandlerD1Ev @ 23 NONAME
+	_ZN15InDeviceHandlerD2Ev @ 24 NONAME
+	_ZNK15InDeviceHandler10metaObjectEv @ 25 NONAME
+	_ZTI15InDeviceHandler @ 26 NONAME
+	_ZTV15InDeviceHandler @ 27 NONAME
 
--- a/searchui/inc/Search_global.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/inc/Search_global.h	Wed Aug 18 09:49:49 2010 +0300
@@ -26,6 +26,8 @@
 #include <e32hal.h>
 #endif
 #endif
+//settings file 
+const QString SETTINGS_INI_PATH("C:\\private\\2002c377\\searchsettings.ini");
 //#define OST_TRACE_COMPILER_IN_USE //Uncomment to enable performance measurements.
 
 #ifdef OST_TRACE_COMPILER_IN_USE
--- a/searchui/indevicehandler/inc/indevicehandler.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/indevicehandler/inc/indevicehandler.h	Wed Aug 18 09:49:49 2010 +0300
@@ -32,9 +32,8 @@
 #define DEFAULT_SEARCH_FIELD "_aggregate"
 #endif
 
-class QCPixSearcher;
-class QCPixDocument;
-
+class CpixSearcher;
+class CpixDocument;
 SEARCH_CLASS(SearchInDeviceHandlerTest)
 
 /**
@@ -76,12 +75,18 @@
      * Signalled when user requests for the result item
      * error and result item will be returned
      */
-    void handleDocument(int aError, QCPixDocument* aDoc);
+    void handleDocument(int aError, CpixDocument* aDoc);
+
+    /**
+     * Signalled when user requests for the result item in batch
+     * error and result item will be returned
+     */
+    void handleBatchDocument(int aError, int aCount, CpixDocument** aDoc);
 
 private slots:
 
     /**
-     * slot connects to QCPixSearcher to get the status of search results 
+     * slot connects to CpixSearcher to get the status of search results 
      * @since S60 ?S60_version.
      * @param aError error code.
      * @param aEstimatedResultCount number of results
@@ -90,12 +95,22 @@
     void getSearchResult(int aError, int aEstimatedResultCount);
 
     /**
-     * slot connects to QCPixSearcher to get the result item 
+     * slot connects to CpixSearcher to get the result item 
      * @since S60 ?S60_version.
      * @param aError error code.
      * @param aDocument result item
      */
-    void getDocumentAsync(int aError, QCPixDocument* aDocument);
+    void getDocumentAsync(int aError, CpixDocument* aDocument);
+
+    /**
+     * slot connects to CpixSearcher to get the result item 
+     * @since S60 ?S60_version.
+     * @param aError error code.
+     * @param aCount number of result item.
+     * @param aDocument array of Documents
+     */
+    void getBatchDocumentAsync(int aError, int aCount,
+            CpixDocument** aDocument);
 
 public:
 
@@ -104,7 +119,7 @@
      * @since S60 ?S60_version.
      * @param aIndex index 
      */
-    QCPixDocument* getDocumentAtIndex(int aIndex);
+    CpixDocument* getDocumentAtIndex(int aIndex);
 
     /**
      * returns the result item asynchronously.
@@ -113,7 +128,13 @@
      */
     void getDocumentAsyncAtIndex(int aIndex);
 
-  
+    /**
+     * returns the result item asynchronously.
+     * @since S60 ?S60_version.
+     * @param aIndex index 
+     * @param aCount number of result item
+     */
+    void getBatchDocumentAsyncAtIndex(int aIndex, int aCount);
 
     /**
      * initate the search asynchronously.
@@ -156,14 +177,14 @@
      * interface for CPix.
      * Own.
      */
-    QCPixSearcher *mSearchInterface;
+    CpixSearcher *mSearchInterface;
 
     /**
      * number of results on current search.        
      */
     int mSearchResultCount;
 
-SEARCH_FRIEND_CLASS    (SearchInDeviceHandlerTest)
+    SEARCH_FRIEND_CLASS (SearchInDeviceHandlerTest)
     };
 
 #endif //INDEVICEHANDLER_H
--- a/searchui/indevicehandler/indevicehandler.pro	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/indevicehandler/indevicehandler.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -18,7 +18,7 @@
 TARGET = searchindevicehandler
 
    
-   LIBS += -lqcpixsearchclient
+   LIBS += -lcpixsearch
    LIBS += -lhbcore
    
 DEFINES += BUILD_INDEVICEHANDLER 
@@ -29,9 +29,6 @@
 INCLUDEPATH += ./inc \
                ../inc 
 
-               
-#TRANSLATIONS=searchstateprovider.ts
-
 symbian {
     TARGET.UID2 = 0x20004C45
     TARGET.UID3 = 0x2002C37B
--- a/searchui/indevicehandler/src/indevicehandler.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/indevicehandler/src/indevicehandler.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -15,8 +15,8 @@
  *
  */
 #include "indevicehandler.h"
-#include <qcpixsearcher.h>
-#include <qcpixdocument.h>
+#include <cpixsearcher.h>
+#include <cpixdocument.h>
 
 // ---------------------------------------------------------------------------
 // InDeviceHandler::InDeviceHandler()
@@ -34,11 +34,17 @@
     {
     if (mSearchInterface)
         {
+        disconnect(mSearchInterface, SIGNAL(handleSearchResults(int,int)),
+                this, SLOT(getSearchResult(int,int)));
+        disconnect(mSearchInterface,
+                SIGNAL(handleDocument(int,CpixDocument*)), this,
+                SLOT(getDocumentAsync(int,CpixDocument*)));
+        disconnect(mSearchInterface,
+                SIGNAL(handleDocument(int,CpixDocument*)), this,
+                SLOT(getDocumentAsync(int,CpixDocument*)));
         delete mSearchInterface;
-
         }
     }
-
 // ---------------------------------------------------------------------------
 // InDeviceHandler::getSearchResult(int aError, int estimatedResultCount)
 // aError: error code
@@ -47,33 +53,43 @@
 //
 void InDeviceHandler::getSearchResult(int aError, int estimatedResultCount)
     {
-    qDebug() << aError << estimatedResultCount;
     mSearchResultCount = estimatedResultCount;
     emit handleAsyncSearchResult(aError, estimatedResultCount);
     }
 // ---------------------------------------------------------------------------
-// InDeviceHandler::getDocumentAsync(int aError, QCPixDocument* aDocument)
+// InDeviceHandler::getDocumentAsync(int aError, CpixDocument* aDocument)
 // aError: error code
 // aDocument: holding the result item
 // ---------------------------------------------------------------------------
 //
-void InDeviceHandler::getDocumentAsync(int aError, QCPixDocument* aDocument)
+void InDeviceHandler::getDocumentAsync(int aError, CpixDocument* aDocument)
     {
     emit handleDocument(aError, aDocument);
     }
 // ---------------------------------------------------------------------------
+// InDeviceHandler::getBatchDocumentAsync(int aError, CpixDocument* aDocument)
+// aError: error code
+// aDocument: holding the result item
+// ---------------------------------------------------------------------------
+//
+void InDeviceHandler::getBatchDocumentAsync(int aError, int aCount,
+        CpixDocument** aDocument)
+    {
+    emit handleBatchDocument(aError, aCount, aDocument);
+    }
+// ---------------------------------------------------------------------------
 // InDeviceHandler::getDocumentAtIndex(int aIndex)
 // aIndex: item index to be found
 // ---------------------------------------------------------------------------
 //
-QCPixDocument* InDeviceHandler::getDocumentAtIndex(int aIndex)
+CpixDocument* InDeviceHandler::getDocumentAtIndex(int aIndex)
     {
-    QCPixDocument* doc = NULL;
+    CpixDocument* doc = NULL;
     if (mSearchInterface)
         {
         try
             {
-            doc = mSearchInterface->getDocument(aIndex);
+            doc = mSearchInterface->document(aIndex);
 
             }
         catch (...)
@@ -85,7 +101,6 @@
     return doc;
     }
 
-
 // ---------------------------------------------------------------------------
 // InDeviceHandler::getSearchResultCount()
 // gets the number of hits
@@ -106,7 +121,7 @@
         {
         try
             {
-            mSearchInterface->getDocumentAsync(aIndex);
+            mSearchInterface->documentAsync(aIndex);
             }
         catch (...)
             {
@@ -114,7 +129,27 @@
             return;
             }
         }
-
+    }
+// ---------------------------------------------------------------------------
+// InDeviceHandler::getBatchDocumentAsyncAtIndex
+// aIndex :  index of item to be found async
+// aCount :  number of result items
+// ---------------------------------------------------------------------------
+//
+void InDeviceHandler::getBatchDocumentAsyncAtIndex(int aIndex, int aCount)
+    {
+    if (mSearchInterface)
+        {
+        try
+            {
+            mSearchInterface->batchdocumentAsync(aIndex, aCount);
+            }
+        catch (...)
+            {
+            // handle the exception
+            return;
+            }
+        }
     }
 // ---------------------------------------------------------------------------
 // InDeviceHandler::searchAsync
@@ -148,7 +183,6 @@
 void InDeviceHandler::cancelLastSearch()
     {
     if (mSearchInterface)
-
         {
         try
             {
@@ -177,37 +211,23 @@
         {
         QString database("root ");
         database.append(astring);
-        mSearchInterface = QCPixSearcher::newInstance(database,
+        mSearchInterface = CpixSearcher::newInstance(database,
                 DEFAULT_SEARCH_FIELD);
         }
     else
         {
-        mSearchInterface = QCPixSearcher::newInstance("root",
-        DEFAULT_SEARCH_FIELD);
+        mSearchInterface = CpixSearcher::newInstance("root",
+                DEFAULT_SEARCH_FIELD);
         }
     if (mSearchInterface)
         {
-        try
-            {
-            mSearchInterface->connect(mSearchInterface,
-                    SIGNAL(handleSearchResults(int,int)), this,
-                    SLOT(getSearchResult(int,int)));
-            }
-        catch (...)
-            {
-            // handle the exception
-            }
-
-        try
-            {
-            mSearchInterface->connect(mSearchInterface,
-                    SIGNAL(handleDocument(int,QCPixDocument*)), this,
-                    SLOT(getDocumentAsync(int,QCPixDocument*)));
-            }
-        catch (...)
-            {
-            // handle the exception
-            }
+        connect(mSearchInterface, SIGNAL(handleSearchResults(int,int)), this,
+                SLOT(getSearchResult(int,int)));
+        connect(mSearchInterface, SIGNAL(handleDocument(int,CpixDocument*)),
+                this, SLOT(getDocumentAsync(int,CpixDocument*)));
+        connect(mSearchInterface,
+                SIGNAL(handleBatchDocuments(int,int,CpixDocument**)), this,
+                SLOT(getBatchDocumentAsync(int,int,CpixDocument**)));
         }
     }
 
@@ -222,7 +242,5 @@
         {
         return true;
         }
-
     return false;
-
     }
--- a/searchui/indevicehandler/tsrc/t_indevicehandler/src/t_indevicehandler.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/indevicehandler/tsrc/t_indevicehandler/src/t_indevicehandler.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -1,7 +1,7 @@
 #include "t_indevicehandler.h"
 #include "indevicehandler.h"
 #include <qsignalspy.h>
-#include <qcpixdocument.h>
+#include <cpixdocument.h>
 SearchInDeviceHandlerTest::SearchInDeviceHandlerTest()
     {
     }
@@ -48,7 +48,7 @@
     QTest::qWait(2000);
 
     QSignalSpy spy(indevicehandler,
-            SIGNAL(handleDocument(int, QCPixDocument*)));
+            SIGNAL(handleDocument(int, CpixDocument*)));
     indevicehandler->getDocumentAsyncAtIndex(0);
     QTest::qWait(2000);
     QCOMPARE(spy.count(), 1);
@@ -72,7 +72,7 @@
     indevicehandler->searchAsync("jpg*");
     QTest::qWait(2000);
     QSignalSpy spy(indevicehandler,
-            SIGNAL(handleDocument(int, QCPixDocument*)));
+            SIGNAL(handleDocument(int, CpixDocument*)));
     indevicehandler->getDocumentAsyncAtIndex(0);
     QTest::qWait(2000);
     QCOMPARE(spy.count(), 1);
--- a/searchui/onlinehandler/tsrc/t_baiduplugin/src/t_baiduplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/onlinehandler/tsrc/t_baiduplugin/src/t_baiduplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -77,7 +77,7 @@
     popup->setHeadingWidget(label);
     HbAction * action = new HbAction(hbTrId("Back"), popup);
     connect(action, SIGNAL(triggered()), this, SLOT(BackEvent()));
-    popup->setPrimaryAction(action);
+    popup->addAction(action);
     popup->show();
 #else
     QString url("http://www.baidu.com/s?wd=");
--- a/searchui/onlinehandler/tsrc/t_bingplugin/src/t_bingplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/onlinehandler/tsrc/t_bingplugin/src/t_bingplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -78,7 +78,7 @@
     popup->setHeadingWidget(label);
     HbAction * action = new HbAction(hbTrId("Back"), popup);
     connect(action, SIGNAL(triggered()), this, SLOT(BackEvent()));
-    popup->setPrimaryAction(action);
+    popup->addAction(action);
     popup->show();
 #else
     QString url("http://www.bing.com/search?q=");
--- a/searchui/onlinehandler/tsrc/t_googleplugin/src/t_googleplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/onlinehandler/tsrc/t_googleplugin/src/t_googleplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -81,7 +81,7 @@
     popup->setHeadingWidget(label);
     HbAction * action = new HbAction(hbTrId("Back"), popup);
     connect(action, SIGNAL(triggered()), this, SLOT(BackEvent()));
-    popup->setPrimaryAction(action);
+    popup->addAction(action);
     popup->show();
 #else
     qDebug() << "search:activatePlugin armvs" ;
--- a/searchui/onlinehandler/tsrc/t_onlinehandler/src/t_onlinehandler.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/onlinehandler/tsrc/t_onlinehandler/src/t_onlinehandler.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -54,9 +54,9 @@
     {
     OnlineHandler* onlinetestobj = new OnlineHandler();
     onlinetestobj->readSettings();
-    QSignalSpy spy(onlinetestobj, SIGNAL(pluginIntialized(bool)));
+  //  QSignalSpy spy(onlinetestobj, SIGNAL(pluginIntialized(bool)));
     onlinetestobj->initializePlugin();
-    QCOMPARE(spy.count(), 1);
+   // QCOMPARE(spy.count(), 1);
     delete onlinetestobj;
     }
 void SearchOnlineHandlerTest::testactivatePlugin()
@@ -118,9 +118,9 @@
     OnlineHandler* onlinetestobj = new OnlineHandler();
     onlinetestobj->readSettings();
     onlinetestobj->initializePlugin();
-    QSignalSpy spy(onlinetestobj, SIGNAL(pluginShutdown(bool)));
+ //   QSignalSpy spy(onlinetestobj, SIGNAL(pluginShutdown(bool)));
     onlinetestobj->unloadPluginandExit();
-    QCOMPARE(spy.count(), 1);
+    //QCOMPARE(spy.count(), 1);
     delete onlinetestobj;
     }
 
--- a/searchui/rom/searchresources.iby	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/rom/searchresources.iby	Wed Aug 18 09:49:49 2010 +0300
@@ -23,7 +23,7 @@
 #include <data_caging_paths_for_iby.hrh>
 
 //Language resource files
-data=DATAZ_\QT_TRANSLATIONS_DIR\searchsw.qm QT_TRANSLATIONS_DIR\searchsw.qm
+data=DATAZ_\QT_TRANSLATIONS_DIR\search.qm QT_TRANSLATIONS_DIR\search.qm
 
 // Application resource file.
 data=DATAZ_/resource/apps/Searchapplication.RSC     /resource/apps/Searchapplication.RSC
--- a/searchui/runtimeproviders/searchruntimeprovider/inc/searchruntime.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/runtimeproviders/searchruntimeprovider/inc/searchruntime.h	Wed Aug 18 09:49:49 2010 +0300
@@ -89,24 +89,11 @@
 private:
 
     /**
-     * Creates gui service parts
-     * @since S60 ?S60_version.
-     */
-    void createGuiServiceParts();
-
-    /**
      * Creates states
      * @since S60 ?S60_version.
      */
     void createStates();
 
-private:  
-
-    /**
-     * Window to visualize scene
-     */
-    HbMainWindow *mWindow;   
-
 SEARCH_FRIEND_CLASS    (SearchRuntimeProviderTest)
 
     };
--- a/searchui/runtimeproviders/searchruntimeprovider/src/searchruntime.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/runtimeproviders/searchruntimeprovider/src/searchruntime.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -24,7 +24,6 @@
 #include <qfinalstate.h>
 #include <qdebug.h>
 #include <hbapplication.h>
-#include <hbmainwindow.h>
 
 #define hbApp qobject_cast<HbApplication*>(qApp)
 
@@ -40,9 +39,8 @@
 // ---------------------------------------------------------------------------
 //
 SearchRuntime::SearchRuntime(QObject* aParent) :
-    QStateMachine(aParent), mWindow(0)
+    QStateMachine(aParent)
     {
-    createGuiServiceParts();
     createStates();
     }
 
@@ -52,8 +50,6 @@
 //
 SearchRuntime::~SearchRuntime()
     {
-    delete mWindow;
-    //  delete mStateMachine;
     }
 
 // ---------------------------------------------------------------------------
@@ -73,24 +69,12 @@
     {
     emit stopped();
     }
-
-// ---------------------------------------------------------------------------
-// SearchRuntime::createGuiServiceParts()
-// ---------------------------------------------------------------------------
-//
-void SearchRuntime::createGuiServiceParts()
-    {
-    mWindow = new HbMainWindow();
-    mWindow->show();
-    }
-
 // ---------------------------------------------------------------------------
 // SearchRuntime::createStates()
 // ---------------------------------------------------------------------------
 //
 void SearchRuntime::createStates()
     {
-
     SearchStateProvider stateProvider;
 
     QFinalState* finalState = new QFinalState();
@@ -143,13 +127,13 @@
 
     connect(wizardSettingState, SIGNAL(publishSelectedCategory(int,bool)),
             wizardProgressiveState, SLOT(getSettingCategory(int,bool)));
-    
+
     connect(wizardSettingState, SIGNAL(publishISProviderIcon(int,HbIcon)),
             wizardProgressiveState, SLOT(slotISProvidersIcon(int,HbIcon)));
 
     connect(wizardProgressiveState, SIGNAL(inDeviceSearchQuery(QString)),
             wizardOnlineState, SLOT(slotIndeviceQuery(QString)));
-    
+
     connect(wizardProgressiveState, SIGNAL(launchLink(int,QString)),
             wizardOnlineState, SLOT(slotlaunchLink(int,QString)));
 
@@ -189,5 +173,4 @@
     connect(this, SIGNAL(started()), SLOT(handleStateMachineStarted()));
     connect(this, SIGNAL(stopped()), SLOT(handleStateMachineStopped()));
     connect(this, SIGNAL(finished()), SLOT(handleStateMachineStopped()));
-
     }
--- a/searchui/stateproviders/searchstateprovider/inc/searchonlinestate.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/inc/searchonlinestate.h	Wed Aug 18 09:49:49 2010 +0300
@@ -21,11 +21,13 @@
 #include <hbicon.h>
 SEARCH_CLASS( SearchStateProviderTest)
 
-class HbDocumentLoader;
+class HbListWidget;
 class HbView;
 class HbSearchPanel;
 class HbMainWindow;
 class OnlineHandler;
+class SearchUiLoader;
+
 /** @ingroup group_searchonlinestate
  * @brief The state handles wizard activation and interaction.
  *
@@ -78,8 +80,7 @@
      * @since S60 ?S60_version.
      */
     void activateSignals();
-    
-    void createui();
+
 public slots:
 
     /**
@@ -154,6 +155,11 @@
      */
     void onlineSearchQuery(QString);
 
+    /**
+     * Signalled when UI is ready on online state        
+     */
+    void applicationReady();
+
 private:
     HbMainWindow* mMainWindow;
     /**
@@ -169,22 +175,24 @@
     HbSearchPanel* mSearchPanel;
 
     /**
-     * HbDocumentLoader instance.
+     * The List View widget.    
      */
-    HbDocumentLoader* mDocumentLoader;
+    HbListWidget* mListView;
 
     /**
      * OnlineHandler instance.
      */
     OnlineHandler* mInternetHandler;
 
+    SearchUiLoader* mUiLoader;
+
     /**
      * search keyword.
      */
     QString mSearchQuery;
     bool mSearchReady;
     bool mIndeviceQueryAvailable;
-    bool mIsUICreated;
+   
     /**
      * friend class for unit testing
      */
--- a/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h	Wed Aug 18 09:49:49 2010 +0300
@@ -63,16 +63,16 @@
 #endif //OST_TRACE_COMPILER_IN_USE
 class HbMainWindow;
 class HbView;
-class HbDocumentLoader;
 class HbSearchPanel;
 class CFbsBitmap;
 class InDeviceHandler;
-class QCPixDocument;
+class CpixDocument;
 class NotesEditorInterface;
 class EventViewerPluginInterface;
 class HbListWidget;
 class HbListWidgetItem;
 class QPluginLoader;
+class SearchUiLoader;
 SEARCH_CLASS( SearchStateProviderTest)
 /** @ingroup group_searchstateprovider
  * @brief The state where progressive search state is shown
@@ -144,11 +144,20 @@
      */
     void constructHandlers();
 
+    InDeviceHandler* constructHandlers(int mDatabase);
+
     /**
      * setting the categories .
      * @since S60 ?S60_version.
      */
     void setSelectedCategories();
+
+    /**
+     * parse the result documents.
+     * @since S60 ?S60_version.
+     */
+    void parseDocument(CpixDocument* aDoc);
+
 public slots:
 
     /**
@@ -165,7 +174,16 @@
      * @param aError error code.
      * @param aDoc result item
      */
-    void onGetDocumentComplete(int aError, QCPixDocument* aDoc);
+    void onGetDocumentComplete(int aError, CpixDocument* aDoc);
+
+    /**
+     * slot connects to CSearchHandler to get the result item asynchronously 
+     * @since S60 ?S60_version.
+     * @param aError error code.
+     * @param aDoc result item
+     */
+    void onGetBatchDocumentComplete(int aError, int aCount,
+            CpixDocument** aDoc);
 
     /**
      * slot connects to list view to launch the respective application
@@ -205,7 +223,7 @@
     /**
      * slot connects to search state  for internet search
      * @since S60 ?S60_version.
-     */  
+     */
 
     void handleOk(const QVariant& var);
 
@@ -220,15 +238,37 @@
      * Slot implemented to delete the calenderviewer plugin  
      * @since S60 ?S60_version.
      */
-
     void _viewingCompleted();
 
+    /**
+     * Slot to notify when view is ready   
+     * @since S60 ?S60_version.
+     */
     void viewReady();
-    
+
+    /**
+     * Slot to notify form query update form online state   
+     * @since S60 ?S60_version.
+     */
     void slotOnlineQuery(QString);
-    
+
+    /**
+     * Slot to update the online service providers for suggestion links 
+     * @since S60 ?S60_version.
+     */
     void slotISProvidersIcon(int, HbIcon);
 
+    /**
+     * Slot to launch the search result screen with the activity URI  
+     * @since S60 ?S60_version.
+     */
+    void activityRequested(const QString &name);
+
+    /**
+     * Slot to notify when theme is changed
+     * @since S60 ?S60_version.
+     */
+    void slotPrepareResultIcons();
 private:
 
     /**
@@ -283,14 +323,14 @@
     void LaunchApplicationL(const TUid aUid);
 
     /**
-     * Function to parse the  QCPixDocument with the given filter       
+     * Function to parse the  CpixDocument with the given filter       
      */
-    QString filterDoc(const QCPixDocument* aDoc, const QString& filter);
+    QString filterDoc(const CpixDocument* aDoc, const QString& filter);
 
     /**
-     * Function to parse the  QCPixDocument with the given filters       
+     * Function to parse the  CpixDocument with the given filters       
      */
-    QStringList filterDoc(const QCPixDocument* aDoc, const QString& filter1,
+    QStringList filterDoc(const CpixDocument* aDoc, const QString& filter1,
             const QString& filter2, const QString& filter3 = QString());
 
     /**
@@ -312,10 +352,15 @@
      * setting state will be  activated.
      */
     void switchProToSettingsState();
-    
+
     void inDeviceSearchQuery(QString);
 
-    void launchLink(int,QString);
+    void launchLink(int, QString);
+
+    /**
+     * Signalled when UI is ready on progressive state        
+     */
+    void applicationReady();
 private:
 
     HbMainWindow* mMainWindow;
@@ -333,19 +378,11 @@
     HbListWidget* mListView;
 
     /**
-     * Document handler to load .docml.
-     * Own.
-     */
-    HbDocumentLoader* mDocumentLoader;
-
-    /**
      * The searchpanel widget.
      * Own.
      */
     HbSearchPanel* mSearchPanel;
 
- 
-
     /**
      * qt interface for CPix engine
      * Own.
@@ -444,9 +481,9 @@
      * 
      */
     QPluginLoader *mNotespluginLoader;
-    
+
     QMap<int, HbIcon> mISprovidersIcon;
-    
+
     bool mOnlineQueryAvailable;
 
 private:
@@ -467,6 +504,13 @@
      * 
      */
     QSize mListViewIconSize;
+
+    SearchUiLoader* mUiLoader;
+
+    bool mStateStatus;
+
+    bool mValidateHandlerCreation;
+
 #ifdef OST_TRACE_COMPILER_IN_USE
     QTime m_totalSearchUiTime;
     QTime m_categorySearchUiTime;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/inc/searchuiloader.h	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Declaration of the Ui Loader .
+ *
+ */
+#ifndef SEARCH_CONTROLLER_H
+#define SEARCH_CONTROLLER_H
+
+#include "search_global.h"
+#include <qobject.h>
+#include <qmutex.h>
+#include <hbmainwindow.h>
+class HbDocumentLoader;
+class HbView;
+class HbListWidget;
+class HbSearchPanel;
+class TsTaskSettings;
+class SearchMainWindow;
+class HbShrinkingVkbHost;
+SEARCH_CLASS( SearchStateProviderTest)
+
+class SearchUiLoader : public QObject
+    {
+Q_OBJECT
+public:
+
+    /**
+     * Singleton construtor
+     * @since S60 ?S60_version.
+     */
+    static SearchUiLoader* instance()
+        {
+        static QMutex mutex;
+        if (!m_instance)
+            {
+            mutex.lock();
+            m_instanceCounter++;
+            if (!m_instance)
+                {
+                m_instance = new SearchUiLoader;
+                }
+            mutex.unlock();
+            }
+
+        return m_instance;
+        }
+
+    /**
+     * Singleton destructor
+     * @since S60 ?S60_version.
+     */
+    static void deleteinstance()
+        {
+        m_instanceCounter--;
+        if ((m_instanceCounter <= 0) && (m_instance))
+            {
+            delete m_instance;
+            m_instance = 0;
+            }
+        }
+public slots:
+
+    /**
+     * Slot to send the application to background fake exit
+     * @since S60 ?S60_version.
+     */
+    void slotsendtobackground();
+
+    /**
+     * Slot to open vkb 
+     * @since S60 ?S60_version.
+     */
+    void slotbringvkb();
+
+public:
+
+    /**
+     * Function returns the HbListWidget object 
+     *  @param aUid Unique app Id.
+     */
+    HbView* View()
+        {
+        return mView;
+        }
+
+    /**
+     * Function returns the HbListWidget object
+     *  @param aUid Unique app Id.
+     */
+    HbListWidget* ListWidget()
+        {
+        return mListWidget;
+        }
+
+    /**
+     * Function returns the HbSearchPanel object
+     *  @param aUid Unique app Id.
+     */
+    HbSearchPanel* SearchPanel()
+        {
+        return mSearchPanel;
+        }    
+private:
+    /**
+     * Constructor.
+     * @since S60 ?S60_version.     
+     * @param aParent Owner.
+     */
+    SearchUiLoader();
+    /**
+     * Destructor.
+     * @since S60 ?S60_version.
+     */
+    ~SearchUiLoader();
+private:
+
+    /**
+     * static instance to make single instance
+     * Own.
+     */
+    static SearchUiLoader *m_instance;
+
+    /**
+     * counter for number for instance
+     * Own.
+     */
+    static int m_instanceCounter;
+
+    /**
+     * Doucument loader API
+     * Own.
+     */
+    HbDocumentLoader* mDocumentLoader;
+
+    /**
+     * Application view 
+     * Own.
+     */
+    HbView* mView;
+
+    /**
+     * Listwidget to show the search results
+     * Own.
+     */
+    HbListWidget* mListWidget;
+
+    /**
+     * searchpanel for query
+     * Own.
+     */
+    HbSearchPanel* mSearchPanel;
+
+    /**
+     * to hide for task switcher
+     * Own.
+     */
+    TsTaskSettings* mClient;
+
+    /**
+     * application main window
+     */
+    SearchMainWindow* mMainWindow;
+
+    /**
+     * vkbhost to resize the result screen 
+     * Own.
+     */
+    HbShrinkingVkbHost* mVirtualKeyboard;
+
+    /**
+     * flag to validate fake exit
+     * Own.
+     */
+    bool mBringtoForground;
+private:
+    SEARCH_FRIEND_CLASS ( SearchStateProviderTest)
+    };
+
+class SearchMainWindow : public HbMainWindow
+    {
+Q_OBJECT
+public:
+    /**
+     * Constructor.
+     * @since S60 ?S60_version.
+     */
+    SearchMainWindow()
+        {
+        connect(this, SIGNAL(viewReady()), this, SLOT(slotViewReady()));
+        }
+    /**
+     * Function capture the focusin event 
+     *  @param event .
+     */
+    void focusInEvent(QFocusEvent * event)
+        {
+        Q_UNUSED(event);
+        slotViewReady();
+        }
+public slots:
+    /**
+     * Slot to send the application to background fake exit
+     * @since S60 ?S60_version.
+     */
+    void slotViewReady();
+signals:
+    /**
+     * signal to send the notification for vkb
+     * @since S60 ?S60_version.
+     */
+    void bringvkb();
+    };
+#endif //SEARCH_CONTROLLER_H
--- a/searchui/stateproviders/searchstateprovider/inc/settingswidget.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/inc/settingswidget.h	Wed Aug 18 09:49:49 2010 +0300
@@ -112,9 +112,7 @@
      */
 
     void initialize();
-    
-    void setSettingsFilePath();
-    
+
     void loadIS();
 
 public slots:
@@ -139,7 +137,7 @@
     void slotproviderDetails(QString, HbIcon, int);
 
     void slotdefaultProvider(const int);
-    
+
     void slotitemSelected(int);
 signals:
     /**
@@ -157,8 +155,8 @@
      * 
      */
     void selectedItemCategory(int, bool);
-    
-    void ISProvidersIcon(HbIcon,int);
+
+    void ISProvidersIcon(HbIcon, int);
 
 private:
     /**
@@ -250,10 +248,9 @@
     bool mchangestate;
 
     OnlineHandler *mInternetHandler;
-   // QStringList mServiceProviders;
+
     QMap<int, QString> mServiceProviders;
-    
-    QString mSettingFileName;
-SEARCH_FRIEND_CLASS    (SearchStateProviderTest)
+
+    SEARCH_FRIEND_CLASS (SearchStateProviderTest)
     };
 #endif
--- a/searchui/stateproviders/searchstateprovider/resources/resources.qrc	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/resources/resources.qrc	Wed Aug 18 09:49:49 2010 +0300
@@ -1,6 +1,6 @@
 <RCC>
     <qresource prefix="/xml">
-        <file alias="searchstateprovider.docml">searchstateprovider.docml</file>
-        <file alias="delimeterscreen.docml">delimeterscreen.docml</file>
+        <file alias="searchstateprovider.docml">searchstateprovider.docml.bin</file>
+        <file alias="delimeterscreen.docml">delimeterscreen.docml.bin</file>
     </qresource>
 </RCC>
--- a/searchui/stateproviders/searchstateprovider/searchstateprovider.pro	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/searchstateprovider.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -36,9 +36,12 @@
     LIBS += -L$$PWD/../../../bin/debug
 }
 
+
+DOCML += resources/searchstateprovider.docml resources/delimeterscreen.docml
+
 LIBS += -lsearchindevicehandler
 LIBS += -lxqservice 
-LIBS += -lqcpixsearchclient
+LIBS += -lcpixsearch
 LIBS += -laknskins 
 LIBS += -lfbscli
 LIBS += -laknicon
@@ -52,6 +55,7 @@
 LIBS += -lapgrfx
 LIBS += -lws32
 LIBS += -lavkon
+LIBS += -ltstaskmonitorclient.dll
 
 coverage:DEFINES += COVERAGE_MEASUREMENT
 
--- a/searchui/stateproviders/searchstateprovider/src/searchonlinestate.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/src/searchonlinestate.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -17,7 +17,7 @@
 
 #include "searchonlinestate.h"
 #include "onlinehandler.h"
-#include <hbdocumentloader.h>
+#include "searchuiloader.h"
 #include <hbview.h>
 #include <hblabel.h>
 #include <hbstackedwidget.h>
@@ -30,24 +30,35 @@
 #include <qdir.h>
 #include <hbsearchpanel.h>
 #include <hbapplication.h>
+#include <hblistwidget.h>
 #define hbApp qobject_cast<HbApplication*>(qApp)
-const char *SEARCHONLINESTATE_DOCML = ":/xml/searchstateprovider.docml";
-const char *ONLINE_TOC_VIEW = "tocView";
-const char *ONLINE_TUT_SEARCHPANEL_WIDGET = "searchPanel";
 
 // ---------------------------------------------------------------------------
 // SearchOnlineState::SearchOnlineState
 // ---------------------------------------------------------------------------
 //
 SearchOnlineState::SearchOnlineState(QState *parent) :
-    QState(parent), mMainWindow(NULL), mView(NULL), mSearchPanel(NULL),
-            mDocumentLoader(NULL)
+    QState(parent), mMainWindow(NULL), mView(NULL), mSearchPanel(NULL)
     {
-
+    mUiLoader = SearchUiLoader::instance();
     mInternetHandler = new OnlineHandler();
     mSearchReady = true;
     mIndeviceQueryAvailable = false;
-    mIsUICreated = false;
+
+    mMainWindow = hbInstance->allMainWindows().at(0);
+
+    mView = mUiLoader->View();
+    mListView = mUiLoader->ListWidget();
+    mSearchPanel = mUiLoader->SearchPanel();
+    if (mSearchPanel)
+        {
+        mSearchPanel->setFocus();
+        }
+    if (mView && mMainWindow)
+        {
+        mMainWindow->addView(mView);
+        mMainWindow->setCurrentView(mView);
+        }
     //activateSignals();
     }
 // ---------------------------------------------------------------------------
@@ -56,44 +67,9 @@
 //
 SearchOnlineState::~SearchOnlineState()
     {
-    delete mDocumentLoader;
+    SearchUiLoader::deleteinstance();
     delete mInternetHandler;
     }
-void SearchOnlineState::createui()
-    {
-    mMainWindow = hbInstance->allMainWindows().at(0);
-    mDocumentLoader = new HbDocumentLoader();
-    bool ok = false;
-    mDocumentLoader->load(SEARCHONLINESTATE_DOCML, &ok);
-
-    QGraphicsWidget *widget = mDocumentLoader->findWidget(ONLINE_TOC_VIEW);
-    Q_ASSERT_X(ok && (widget != 0), "ONLINE_TOC_VIEW", "invalid view");
-
-    mView = qobject_cast<HbView*> (widget);
-    if (mView)
-        {
-        mView->setTitle(hbTrId("txt_search_title_search"));
-        }
-
-    mSearchPanel = qobject_cast<HbSearchPanel *> (
-            mDocumentLoader->findWidget(ONLINE_TUT_SEARCHPANEL_WIDGET));
-    if (mSearchPanel)
-        {
-        mSearchPanel->setSearchOptionsEnabled(true);
-
-        mSearchPanel->setProgressive(false);
-
-        mSearchPanel->setPlaceholderText(hbTrId(
-                "txt_search_dialog_search_internet"));
-
-        mSearchPanel->setCancelEnabled(false);          
-        }
-    if (mView && mMainWindow)
-        {
-        mMainWindow->addView(mView);
-        mMainWindow->setCurrentView(mView);
-        }
-    }
 // ---------------------------------------------------------------------------
 // SearchOnlineState::onEntry
 // ---------------------------------------------------------------------------
@@ -102,12 +78,16 @@
     {
     qDebug() << "search:SearchOnlineState::onEntry";
     QState::onEntry(event);
-    if (!mIsUICreated)
+    if (mSearchPanel)
         {
-        createui();
-        mIsUICreated = true;
+        mSearchPanel->setProgressive(false);
+        mSearchPanel->setPlaceholderText(hbTrId(
+                "txt_search_dialog_search_internet"));
         }
-
+    if (mListView)
+        {
+        mListView->setVisible(false);
+        }
     activateSignals();
     // If this is not the current view, we're getting back from plugin view  
     if (mMainWindow)
@@ -243,8 +223,11 @@
 // ---------------------------------------------------------------------------
 void SearchOnlineState::slotIndeviceQuery(QString str)
     {
-    mSearchQuery = str;
-    mIndeviceQueryAvailable = true;
+    if (mSearchQuery != str)
+        {
+        mSearchQuery = str;
+        mIndeviceQueryAvailable = true;
+        }
     }
 // ---------------------------------------------------------------------------
 // SearchOnlineState::slotlaunchLink
@@ -271,4 +254,5 @@
                 }
             }
         }//PERF_APP_LAUNCH_END("SearchAppplication View is ready");
+    emit applicationReady();
     }
--- a/searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/src/searchprogressivestate.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -16,18 +16,17 @@
  */
 #include "searchprogressivestate.h"
 #include "indevicehandler.h"
-#include <qcpixdocument.h>
-#include <qcpixdocumentfield.h>
+#include "searchuiloader.h"
+#include <cpixdocument.h>
+#include <cpixdocumentfield.h>
 #include <hbmainwindow.h>
 #include <hbview.h>
 #include <hblabel.h>
 #include <hbicon.h>
 #include <hbmenu.h>
 #include <hbinstance.h>
-#include <hbdocumentloader.h>
 #include <hbsearchpanel.h>
 #include <hbaction.h>
-#include <hbframebackground.h>
 #include <hbapplication.h>
 #include <qsortfilterproxymodel.h>
 #include <AknsUtils.h>
@@ -53,80 +52,39 @@
 #include <hblistwidgetitem.h>
 #include <hbabstractviewitem.h>
 #include <hblistviewitem.h>
+#include <hbactivitymanager.h>
 #define hbApp qobject_cast<HbApplication*>(qApp)
-const char *SEARCHSTATEPROVIDER_DOCML = ":/xml/searchstateprovider.docml";
-const char *TOC_VIEW = "tocView";
-const char *TUT_SEARCHPANEL_WIDGET = "searchPanel";
-const char *TUT_LIST_VIEW = "listView";
-const int totalcategories = 10;
+const int totalcategories_normalreason = 10;
+const int totalcategories_activityreasonreason = 13;
+const int intial_iteration = 3;
+const int batch_iteration = 20;
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::SearchProgressiveState
 // ---------------------------------------------------------------------------
 SearchProgressiveState::SearchProgressiveState(QState *parent) :
     QState(parent), mMainWindow(NULL), mView(NULL), mListView(NULL),
-            mDocumentLoader(NULL), mSearchHandler(NULL), mNotesEditor(0),
-            mAiwMgr(0), mRequest(0)
+            mSearchHandler(NULL), mNotesEditor(0), mAiwMgr(0), mRequest(0)
     {
+    mUiLoader = SearchUiLoader::instance();
 
     mMainWindow = hbInstance->allMainWindows().at(0);
 
     mAiwMgr = new XQApplicationManager;
 
-    mDocumentLoader = new HbDocumentLoader();
-    bool ok = false;
-    mDocumentLoader->load(SEARCHSTATEPROVIDER_DOCML, &ok);
-
-    QGraphicsWidget *widget = mDocumentLoader->findWidget(TOC_VIEW);
-    Q_ASSERT_X(ok && (widget != 0), "TOC_VIEW", "invalid view");
-
-    mView = qobject_cast<HbView*> (widget);
-    if (mView)
-        {
-        mView->setTitle(hbTrId("txt_search_title_search"));
-        }
-
-    mListView = qobject_cast<HbListWidget *> (mDocumentLoader->findWidget(
-            TUT_LIST_VIEW));
-    Q_ASSERT_X(ok && (mListView != 0), "TUT_LIST_VIEW", "invalid viewocML file");
+    mView = mUiLoader->View();
+    mListView = mUiLoader->ListWidget();
+    mSearchPanel = mUiLoader->SearchPanel();
 
-    if (mListView)
-        {
-        HbAbstractViewItem *prototype = mListView->itemPrototypes().first();
-        HbFrameBackground frame;
-        frame.setFrameGraphicsName("qtg_fr_list_normal");
-        frame.setFrameType(HbFrameDrawer::NinePieces);
-        prototype->setDefaultFrame(frame);
+    HbStyle style;
+    qreal x;
+    style.parameter("hb-param-graphic-size-primary-large", x);
+    QSizeF size(x, x);
+    mListViewIconSize = size.toSize();
 
-        HbListViewItem *prototypeListView = qobject_cast<HbListViewItem *> (
-                prototype);
-        prototypeListView->setGraphicsSize(HbListViewItem::LargeIcon);
-        if (prototypeListView)
-            {
-            HbStyle style;
-            qreal x;
-            style.parameter("hb-param-graphic-size-primary-large", x);
-            QSizeF size(x, x);
-            mListViewIconSize = size.toSize();
-            prototypeListView->setTextFormat(Qt::RichText);
-            }
-
-        HbAbstractItemView::ItemAnimations noCreationAndRemovalAnimations =
-                HbAbstractItemView::All;
-        noCreationAndRemovalAnimations ^= HbAbstractItemView::Appear;
-        noCreationAndRemovalAnimations ^= HbAbstractItemView::Disappear;
-        mListView->setEnabledAnimations(noCreationAndRemovalAnimations);
-        }
-
-    mSearchPanel = qobject_cast<HbSearchPanel *> (
-            mDocumentLoader->findWidget(TUT_SEARCHPANEL_WIDGET));
     if (mSearchPanel)
         {
-        mSearchPanel->setSearchOptionsEnabled(true);
-
         mSearchPanel->setPlaceholderText(hbTrId(
                 "txt_search_dialog_search_device"));
-
-        mSearchPanel->setCancelEnabled(false);
         mSearchPanel->setFocus();
         }
 
@@ -143,24 +101,12 @@
     mResultparser = 0;
     loadSettings = true;
 
-    //Icon creation in array
-    RArray<TUid> appUid;
-    appUid.Append(TUid::Uid(0x20022EF9));//contact
-    appUid.Append(TUid::Uid(0x10207C62));//audio
-    appUid.Append(TUid::Uid(0x200211FE));//video 
-    appUid.Append(TUid::Uid(0x20000A14));//image 
-    appUid.Append(TUid::Uid(0x2001FE79));//msg
-    appUid.Append(TUid::Uid(0x200255BA));//email 
-    appUid.Append(TUid::Uid(0x10005901));//calender
-    appUid.Append(TUid::Uid(0x20029F80));//notes
-    //appUid.Append(TUid::Uid(0x20022F35));//application
-    appUid.Append(TUid::Uid(0x10008D39));//bookmark
-    appUid.Append(TUid::Uid(0x2002BCC0));//files
+    if (hbApp)
+        {
+        connect(hbApp->activityManager(), SIGNAL(activityRequested(QString)),
+                this, SLOT(activityRequested(QString)));
+        }
 
-    for (int i = 0; i < appUid.Count(); i++)
-        {
-        TRAP_IGNORE(mIconArray.append(getAppIconFromAppIdL(appUid[i])));
-        }
 #ifdef OST_TRACE_COMPILER_IN_USE 
     //start() the timers to avoid worrying abt having to start()/restart() later
     m_categorySearchApiTime.start();
@@ -188,6 +134,13 @@
         }
 
     mOnlineQueryAvailable = false;
+    //Prepare the icons,listen of theme change    
+    connect(hbInstance->theme(), SIGNAL(changeFinished()), this,
+            SLOT(slotPrepareResultIcons()));
+    slotPrepareResultIcons();
+
+    // creating the handler if it is not prepared, useful when user try to create before 
+    mValidateHandlerCreation = false;
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::~SearchProgressiveState
@@ -198,10 +151,6 @@
         {
         delete mAiwMgr;
         }
-    if (mDocumentLoader)
-        {
-        delete mDocumentLoader;
-        }
     for (int i = 0; i < mSearchHandlerList.count(); i++)
         {
         delete mSearchHandlerList.at(i);
@@ -211,70 +160,22 @@
         mNotespluginLoader->unload();
         delete mNotespluginLoader;
         }
+    SearchUiLoader::deleteinstance();
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::constructHandlers
 // ---------------------------------------------------------------------------
 void SearchProgressiveState::constructHandlers()
     {
-    InDeviceHandler* handler = NULL;
-    for (int i = 0; i < totalcategories; i++)
+    int categories = totalcategories_normalreason;
+
+    if (hbApp && hbApp->activateReason() == Hb::ActivationReasonActivity)
         {
-        handler = new InDeviceHandler();
-        switch (i)
-            {
-            case 0:
-                {
-                handler->setCategory("");
-                break;
-                }
-            case 1:
-                {
-                handler->setCategory("contact");
-                break;
-                }
-            case 2:
-                {
-                handler->setCategory("media");
-                break;
-                }
-            case 3:
-                {
-                handler->setCategory("msg");
-                break;
-                }
-            case 4:
-                {
-                handler->setCategory("msg email");
-                break;
-                }
-            case 5:
-                {
-                handler->setCategory("calendar");
-                break;
-                }
-            case 6:
-                {
-                handler->setCategory("notes");
-                break;
-                }
-            case 7:
-                {
-                handler->setCategory("applications");
-                break;
-                }
-            case 8:
-                {
-                handler->setCategory("file");
-                break;
-                }
-            case 9:
-                {
-                handler->setCategory("bookmark");
-                break;
-                }
-            }
-        mSearchHandlerList.append(handler);
+        categories = totalcategories_activityreasonreason;
+        }
+    for (int i = 0; i < categories; i++)
+        {
+        mSearchHandlerList.append(constructHandlers(i));
         }
     }
 // ---------------------------------------------------------------------------
@@ -284,8 +185,19 @@
     {
     //  WMS_LOG << "::onEntry";
     QState::onEntry(event);
+
+    mStateStatus = true;// used for conditional execution for the slots that are connected as transitions
+    if (mSearchPanel)
+        {
+        mSearchPanel->setPlaceholderText(hbTrId(
+                "txt_search_dialog_search_device"));
+        mSearchPanel->setProgressive(true);
+        }
+    if (mListView)
+        {
+        mListView->setVisible(true);
+        }
     activateSignals();
-
     // If this is not the current view, we're getting back from plugin view  
     if (mMainWindow)
         {
@@ -297,6 +209,7 @@
         }
     if (loadSettings)
         {
+        // to get the intial settings form delimeter  
         emit switchProToSettingsState();
         loadSettings = false;
         }
@@ -313,6 +226,7 @@
 void SearchProgressiveState::onExit(QEvent *event)
     {
     QState::onExit(event);
+    mStateStatus = false;
     deActivateSignals();
     }
 // ---------------------------------------------------------------------------
@@ -326,8 +240,12 @@
                 SIGNAL(handleAsyncSearchResult(int,int)), this,
                 SLOT(onAsyncSearchComplete(int,int)));
         connect(mSearchHandlerList.at(i),
-                SIGNAL(handleDocument(int,QCPixDocument*)), this,
-                SLOT(onGetDocumentComplete(int,QCPixDocument*)));
+                SIGNAL(handleDocument(int,CpixDocument*)), this,
+                SLOT(onGetDocumentComplete(int,CpixDocument*)));
+        connect(mSearchHandlerList.at(i),
+                SIGNAL(handleBatchDocument(int,int,CpixDocument**)), this,
+                SLOT(onGetBatchDocumentComplete(int,int,CpixDocument**)));
+
         }
     if (mListView)
         {
@@ -341,9 +259,7 @@
         connect(mSearchPanel, SIGNAL(searchOptionsClicked()), this,
                 SLOT(setSettings()));
         }
-
     connect(mMainWindow, SIGNAL(viewReady()), this, SLOT(viewReady()));
-
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::deActivateSignals
@@ -356,8 +272,11 @@
                 SIGNAL(handleAsyncSearchResult(int,int)), this,
                 SLOT(onAsyncSearchComplete(int,int)));
         disconnect(mSearchHandlerList.at(i),
-                SIGNAL(handleDocument(int,QCPixDocument*)), this,
-                SLOT(onGetDocumentComplete(int,QCPixDocument*)));
+                SIGNAL(handleDocument(int,CpixDocument*)), this,
+                SLOT(onGetDocumentComplete(int,CpixDocument*)));
+        disconnect(mSearchHandlerList.at(i),
+                SIGNAL(handleBatchDocument(int,int,CpixDocument**)), this,
+                SLOT(onGetBatchDocumentComplete(int,int,CpixDocument**)));
         }
     if (mListView)
         {
@@ -404,185 +323,56 @@
 // SearchProgressiveState::onGetDocumentComplete
 // ---------------------------------------------------------------------------
 void SearchProgressiveState::onGetDocumentComplete(int aError,
-        QCPixDocument* aDoc)
+        CpixDocument* aDoc)
     {
-    PERF_CAT_GETDOC_TIME_ACCUMULATE
-    if (aDoc == NULL || aError != 0)
+    if (aError)
         return;
-    QStringList liststr;
-    QString secondrow = aDoc->excerpt();
-    QString firstrow;
-    HbListWidgetItem* listitem = new HbListWidgetItem();
-
-    if (aDoc->baseAppClass().contains("contact"))
-        {
-        QStringList docsList = filterDoc(aDoc, "GivenName", "FamilyName");
-        if (docsList.value(0, "").length())
-            {
-            firstrow.append(docsList.at(0));
-            }
-        if (docsList.value(1, "").length())
-            {
-            if (firstrow.length())
-                firstrow.append(" ");
-            firstrow.append(docsList.at(1));
-            }
-        if (firstrow.length() == 0)
-            {
-            firstrow = hbTrId("txt_phob_dblist_unnamed");
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(0), Qt::DecorationRole);
-        }
-    else if (aDoc->baseAppClass().contains("audio"))
-        {
-        QStringList audioList = filterDoc(aDoc, "Title", "MediaId");
-        if (audioList.value(0, "").length())
-            {
-            firstrow.append(audioList.at(0));
-            }
-        if (firstrow.length() == 0)
-            {
-            firstrow = hbTrId("txt_mus_dblist_val_unknown4");
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(1), Qt::DecorationRole);
-        if (audioList.value(1, "").length())
-            {
-            listitem->setData(audioList.at(1), Qt::UserRole + 2);
-            }
-        }
-    else if (aDoc->baseAppClass().contains("video"))
-        {
-        QStringList videoList = filterDoc(aDoc, "Title", "MediaId", "Name");
-        if (videoList.value(0, "").length())
-            {
-            firstrow.append(videoList.at(0));
-            }
-        if (firstrow.length() == 0 && videoList.value(2, "").length())
-            {
-            firstrow.append(videoList.at(2));
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(2), Qt::DecorationRole);
-        if (videoList.value(1, "").length())
-            {
-            listitem->setData(videoList.at(1), Qt::UserRole + 2);
-            }
-        }
-    else if (aDoc->baseAppClass().contains("image"))
-        {
-        QStringList imageList = filterDoc(aDoc, "Name", "MediaId");
-        if (imageList.value(0, "").length())
-            {
-            firstrow.append(imageList.at(0));
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(3), Qt::DecorationRole);
-        if (imageList.value(1, "").length())
-            {
-            listitem->setData(imageList.at(1), Qt::UserRole + 2);
-            }
-        }
-    else if (aDoc->baseAppClass().contains("msg email"))
-        {
-        qDebug() << "searchui:on Get doc email";
-        QStringList emailList = filterDoc(aDoc, "Sender", "MailBoxId",
-                "FolderId");
-
-        qDebug() << "searchui:recipients" << emailList.at(0) << emailList.at(
-                1) << emailList.at(2);
-        firstrow.append(emailList.at(0));
-        listitem->setData(emailList.at(1), Qt::UserRole + 2);
-        listitem->setData(emailList.at(2), Qt::UserRole + 3);
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(5), Qt::DecorationRole);
-        }
-    else if (aDoc->baseAppClass().contains("msg"))
-        {
-        QStringList msgList = filterDoc(aDoc, "Subject", "Body");
-        if (msgList.value(0, "").length())
-            {
-            firstrow.append(msgList.at(0));
-            }
-        else
-            {
-            if (msgList.value(1, "").length())
-                firstrow.append(msgList.at(1));
-            }
-        if (firstrow.length() == 0)
-            {
-            firstrow = " ";// space if subject and body are missing
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(4), Qt::DecorationRole);
-        } 
-    else if (aDoc->baseAppClass().contains("calendar"))
-        {
-        firstrow.append(filterDoc(aDoc, "Summary"));
-        if (firstrow.length() == 0)
-            {
-            firstrow = hbTrId("txt_calendar_preview_unnamed");
-            }
-
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(6), Qt::DecorationRole);
-        }
-    else if (aDoc->baseAppClass().contains("notes"))
-        {
-        firstrow.append(filterDoc(aDoc, "Memo"));
-        if (firstrow.length() == 0)
-            {
-            firstrow = hbTrId("txt_notes_dblist_unnamed");
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(7), Qt::DecorationRole);
-        }
-    else if (aDoc->baseAppClass().contains("applications"))
-        {
-        firstrow.append(filterDoc(aDoc, "Name"));
-        liststr << firstrow;
-        bool ok;
-        TRAP_IGNORE(listitem->setData(getAppIconFromAppIdL(TUid::Uid(aDoc->docId().toInt(
-                                                &ok, 16))), Qt::DecorationRole));
-        }
-    else if (aDoc->baseAppClass().contains("bookmark"))
-        {
-        firstrow.append(filterDoc(aDoc, "Name"));
-        if (firstrow.length() == 0)
-            {
-            firstrow = "UnKnown";
-            }
-        liststr << firstrow << secondrow;
-        listitem->setData(secondrow, Qt::UserRole + 2);
-        listitem->setData(mIconArray.at(8), Qt::DecorationRole);
-        }
-    else if (aDoc->baseAppClass().contains("file"))
-        {
-        firstrow.append(filterDoc(aDoc, "Name"));
-        if (firstrow.length() == 0)
-            firstrow = aDoc->baseAppClass();
-        liststr << firstrow << secondrow;
-        listitem->setData(mIconArray.at(9), Qt::DecorationRole);
-        }
-    listitem->setText(firstrow);
-    listitem->setSecondaryText(secondrow);
-    listitem->setData(aDoc->docId(), Qt::UserRole);
-    listitem->setData(aDoc->baseAppClass(), Qt::UserRole + 1);
-    mListView->addItem(listitem);
-
+    parseDocument(aDoc);
     mResultparser++;
     if (mResultparser < mResultcount)
         {
         PERF_CAT_GETDOC_TIME_RESTART
-        mSearchHandler->getDocumentAsyncAtIndex(mResultparser);
+        if (mResultparser < intial_iteration)
+            {
+            mSearchHandler->getDocumentAsyncAtIndex(mResultparser);
+            }
+        else
+            {
+            mSearchHandler->getBatchDocumentAsyncAtIndex(mResultparser,
+                    batch_iteration);
+            }
         }
     else
         {
         PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG
         searchOnCategory(mSearchString);
         }
+    }
+// ---------------------------------------------------------------------------
+// SearchProgressiveState::onGetDocumentComplete
+// ---------------------------------------------------------------------------
+void SearchProgressiveState::onGetBatchDocumentComplete(int aError,
+        int aCount, CpixDocument** aDoc)
+    {
+    if (aError)
+        return;
+    for (int i = 0; i < aCount; i++)
+        {
+        parseDocument(aDoc[i]);
+        }
     delete aDoc;
+    mResultparser += aCount;
+    if (mResultparser < mResultcount)
+        {
+        PERF_CAT_GETDOC_TIME_RESTART
+        mSearchHandler->getBatchDocumentAsyncAtIndex(mResultparser,
+                batch_iteration);
+        }
+    else
+        {
+        PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG
+        searchOnCategory(mSearchString);
+        }
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::getSettingCategory
@@ -597,7 +387,8 @@
 void SearchProgressiveState::openResultitem(HbListWidgetItem * item)
     {
     if (item == NULL)
-        return;PERF_RESULT_ITEM_LAUNCH_TIME_RESTART
+        return;
+    PERF_RESULT_ITEM_LAUNCH_TIME_RESTART
     QList<QVariant> args;
     bool t;
     mRequest = NULL;
@@ -605,7 +396,7 @@
         {
         PERF_RESULT_ITEM_FOR_LAUNCHING("contact")
         mRequest = mAiwMgr->create("com.nokia.services.phonebookservices",
-                "Fetch", "open(int)", false);
+                "Fetch", "open(int)", true);
 
         int uid = (item->data(Qt::UserRole)).toInt(&t);
         args << uid;
@@ -614,7 +405,7 @@
         {
         PERF_RESULT_ITEM_FOR_LAUNCHING("bookmark")
         QDesktopServices::openUrl(item->data(Qt::UserRole + 2).toString());
-PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG        ("")
+        PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("")
 
         }
     else if (item->data(Qt::UserRole + 1).toString().contains("calendar"))
@@ -622,10 +413,10 @@
         QDir pluginDir = QDir(QString("z:/resource/qt/plugins/calendar"));
         QPluginLoader *calAgandaViewerPluginLoader = new QPluginLoader(
                 pluginDir.absoluteFilePath(QString(
-                                "agendaeventviewerplugin.qtplugin")));
+                        "agendaeventviewerplugin.qtplugin")));
 
         calAgandaViewerPluginInstance = qobject_cast<
-        EventViewerPluginInterface *> (
+                EventViewerPluginInterface *> (
                 calAgandaViewerPluginLoader->instance());
 
         connect(calAgandaViewerPluginInstance, SIGNAL(viewingCompleted()),
@@ -638,7 +429,7 @@
     else if (item->data(Qt::UserRole + 1).toString().contains("applications"))
         {
         PERF_RESULT_ITEM_FOR_LAUNCHING("applications")
-        TRAP_IGNORE(LaunchApplicationL(TUid::Uid((item->data(Qt::UserRole)).toString().toInt(&t, 16))));
+        TRAP_IGNORE(LaunchApplicationL(TUid::Uid((item->data(Qt::UserRole)).toString().toUInt(&t, 16))));
         PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG("")
         }
     else if (item->data(Qt::UserRole + 1).toString().contains("file"))
@@ -646,7 +437,7 @@
         PERF_RESULT_ITEM_FOR_LAUNCHING("file")
         QString uid = item->data(Qt::UserRole).toString();
         QFile file(uid);
-        mRequest = mAiwMgr->create(file, false);
+        mRequest = mAiwMgr->create(file, true);
         args << file.fileName();
         }
     else if ((item->data(Qt::UserRole + 1).toString().contains("video"))
@@ -659,14 +450,14 @@
         uid.append(':');
         uid.append(item->data(Qt::UserRole).toString());
         QFile file(uid);
-        mRequest = mAiwMgr->create(file, false);
+        mRequest = mAiwMgr->create(file, true);
         args << file.fileName();
         }
 
     else if (item->data(Qt::UserRole + 1).toString().contains("notes"))
         {
         PERF_RESULT_ITEM_FOR_LAUNCHING("notes")
-        if(mNotesEditor)
+        if (mNotesEditor)
             {
             mNotesEditor->edit(item->data(Qt::UserRole).toInt());
             }
@@ -677,23 +468,24 @@
 
         mRequest = mAiwMgr->create("nmail",
                 "com.nokia.symbian.IEmailMessageView",
-                "viewMessage(QVariant,QVariant,QVariant)", false);
+                "viewMessage(QVariant,QVariant,QVariant)", true);
 
         args << item->data(Qt::UserRole + 2).toULongLong(&t) << item->data(
-                Qt::UserRole + 3).toULongLong(&t) << item->data(Qt::UserRole).toULongLong(&t);
+                Qt::UserRole + 3).toULongLong(&t)
+                << item->data(Qt::UserRole).toULongLong(&t);
         }
     else if (item->data(Qt::UserRole + 1).toString().contains("msg"))
         {
         PERF_RESULT_ITEM_FOR_LAUNCHING("msg")
-        mRequest = mAiwMgr->create("com.nokia.services.hbserviceprovider",
-                "conversationview", "view(int)", false);
+        mRequest = mAiwMgr->create("messaging",
+                "com.nokia.symbian.IMessageView", "view(int)", true);
 
         int uid = (item->data(Qt::UserRole)).toInt(&t);
         args << uid;
         }
-    else if(item->data(Qt::UserRole + 1).toString().contains("links"))
+    else if (item->data(Qt::UserRole + 1).toString().contains("links"))
         {
-        emit launchLink((item->data(Qt::UserRole)).toInt(&t),mOriginalString);
+        emit launchLink((item->data(Qt::UserRole)).toInt(&t), mOriginalString);
         }
     if (mRequest)
         {
@@ -725,7 +517,7 @@
 void SearchProgressiveState::handleOk(const QVariant& var)
     {
     Q_UNUSED(var);
-PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG    ("")
+    PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("")
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::handleError
@@ -782,7 +574,7 @@
 void SearchProgressiveState::searchOnCategory(const QString aKeyword)
     {
 #ifdef OST_TRACE_COMPILER_IN_USE
-    if( mDatabasecount != 0 )
+    if (mDatabasecount != 0)
         {//Search just started.
         PERF_CAT_UI_ENDLOG
         }
@@ -800,6 +592,18 @@
             {
             mSearchHandler = mSearchHandlerList.at(1);
             }
+        else if (mTemplist.at(mDatabasecount).contains("image"))
+            {
+            mSearchHandler = mSearchHandlerList.at(10);
+            }
+        else if (mTemplist.at(mDatabasecount).contains("audio"))
+            {
+            mSearchHandler = mSearchHandlerList.at(11);
+            }
+        else if (mTemplist.at(mDatabasecount).contains("video"))
+            {
+            mSearchHandler = mSearchHandlerList.at(12);
+            }
         else if (mTemplist.at(mDatabasecount).contains("media"))
             {
             mSearchHandler = mSearchHandlerList.at(2);
@@ -834,7 +638,7 @@
             }
         // mSearchHandler->setCategory(mTemplist.at(mDatabasecount));
         mDatabasecount++;
-        if (mSearchHandler->isPrepared())
+        if (mSearchHandler != NULL && mSearchHandler->isPrepared())
             {
             PERF_CAT_API_TIME_RESTART
             mSearchHandler->searchAsync(aKeyword, "_aggregate");
@@ -863,6 +667,26 @@
     {
     PERF_CAT_TOTAL_TIME_RESTART
     mOriginalString = aKeyword.trimmed();
+
+    if (!mValidateHandlerCreation)
+        {
+        for (int i = 0; i < mSearchHandlerList.count(); i++)
+            {
+            /* ignoring bookmark to getrid of unnecesary check as bookmark support is withdrawn
+             * keeping perfomance into consideration, otherwise not  
+             */
+            if (!mSearchHandlerList.at(i)->isPrepared() && (i != 9))
+                {
+                constructHandlers(i);
+                mValidateHandlerCreation = false;
+                }
+            else
+                {
+                mValidateHandlerCreation = true;
+                }
+            }
+        }
+
     for (int i = 0; i < mSearchHandlerList.count(); i++)
         {
         mSearchHandlerList.at(i)->cancelLastSearch();
@@ -875,12 +699,9 @@
         {
         mDatabasecount = 0;
         mLinkindex = 0;
-        //Prefix query
         mSearchString = "$prefix(\"";
         mSearchString += mOriginalString;
         mSearchString += "\")";
-        /*mSearchString = mOriginalString;
-         mSearchString.append('*');*/
         searchOnCategory(mSearchString);
         }
     }
@@ -899,7 +720,7 @@
 // ---------------------------------------------------------------------------
 void SearchProgressiveState::settingsaction(bool avalue)
     {
-    if (avalue)
+    if (avalue && mStateStatus)
         {
         QMapIterator<int, bool> i(mTempSelectedCategory);
         QMapIterator<int, bool> j(mSelectedCategory);
@@ -1046,7 +867,6 @@
         CleanupStack::PopAndDestroy(apaMaskedBitmap);
         }
     CleanupStack::PopAndDestroy(&apaLsSession);
-
     if (icon.isNull() || !(icon.size().isValid()))
         icon = HbIcon("qtg_large_application");
     return icon;
@@ -1059,7 +879,6 @@
     {
     CFbsBitmap *bitamp(0);
     CFbsBitmap *mask(0);
-
     if (AknIconUtils::IsMifFile(fileName))
         {
         // SVG icon
@@ -1072,17 +891,13 @@
         AknIconUtils::CreateIconLC(bitamp, mask, fileName, bitmapIndex,
                 maskIndex);
         }
-
     AknIconUtils::DisableCompression(bitamp);
     AknIconUtils::SetSize(bitamp, TSize(size.width(), size.height()),
             EAspectRatioPreservedAndUnusedSpaceRemoved);
-
     AknIconUtils::DisableCompression(mask);
     AknIconUtils::SetSize(mask, TSize(size.width(), size.height()),
             EAspectRatioPreservedAndUnusedSpaceRemoved);
-
     fromBitmapAndMaskToPixmapL(bitamp, mask, pixmap);
-
     // bitmap and icon, AknsUtils::CreateIconLC doesn't specify the order
     CleanupStack::Pop(2);
     }
@@ -1186,7 +1001,7 @@
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::filterDoc
 // ---------------------------------------------------------------------------
-QString SearchProgressiveState::filterDoc(const QCPixDocument* aDoc,
+QString SearchProgressiveState::filterDoc(const CpixDocument* aDoc,
         const QString& filter)
     {
     for (int i = 0; i < aDoc->fieldCount(); i++)
@@ -1201,7 +1016,7 @@
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::filterDoc
 // ---------------------------------------------------------------------------
-QStringList SearchProgressiveState::filterDoc(const QCPixDocument* aDoc,
+QStringList SearchProgressiveState::filterDoc(const CpixDocument* aDoc,
         const QString& filter1, const QString& filter2,
         const QString& filter3)
     {
@@ -1318,7 +1133,7 @@
         CleanupStack::PopAndDestroy(&appArcSession);
         }
     CleanupStack::PopAndDestroy(&wsSession);
-PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG    ("")
+    PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("")
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::_viewingCompleted
@@ -1327,7 +1142,7 @@
     {
     if (calAgandaViewerPluginInstance)
         calAgandaViewerPluginInstance->deleteLater();
-PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG    ("")
+    PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG ("")
     }
 // ---------------------------------------------------------------------------
 // SearchProgressiveState::viewReady
@@ -1340,17 +1155,383 @@
             {
             QVariantHash params = hbApp->activateParams();
             QString searchKey = params.value("query").toString();
+            params.remove("query");
+            params.remove("activityname");
+            QList<QVariant> list = params.values();
+            mTemplist.clear();
+            for (int i = 0; i < list.count(); i++)
+                {
+                QString str = list.at(i).toString();
+                if (!str.isNull())
+                    mTemplist.append(str);
+                }
             if (searchKey.length() > 0)
                 mSearchPanel->setCriteria(searchKey);
             }
-        }PERF_APP_LAUNCH_END("SearchAppplication View is ready");
+        }
+    PERF_APP_LAUNCH_END("SearchAppplication View is ready");
+    emit applicationReady();
     }
+// ---------------------------------------------------------------------------
+// SearchProgressiveState::slotOnlineQuery
+// ---------------------------------------------------------------------------
 void SearchProgressiveState::slotOnlineQuery(QString str)
     {
-    mOriginalString = str;
-    mOnlineQueryAvailable = true;
+    if (mOriginalString != str)
+        {
+        mOriginalString = str;
+        mOnlineQueryAvailable = true;
+        }
     }
+// ---------------------------------------------------------------------------
+// SearchProgressiveState::slotISProvidersIcon
+// ---------------------------------------------------------------------------
 void SearchProgressiveState::slotISProvidersIcon(int id, HbIcon icon)
     {
     mISprovidersIcon.insert(id, icon);
     }
+// ---------------------------------------------------------------------------
+// SearchProgressiveState::slotPrepareResultIcons
+// ---------------------------------------------------------------------------
+void SearchProgressiveState::slotPrepareResultIcons()
+    {
+    //Icon creation in array
+    QStringList icons;
+    icons << "qtg_large_phonebook" << "qtg_large_tone" << "qtg_large_video"
+            << "qtg_large_photos" << "qtg_large_message" << "qtg_large_email"
+            << "qtg_large_calendar" << "qtg_large_notes"
+            << "qtg_large_web_link" << "qtg_large_text" << "qtg_large_sisx"
+            << "qtg_large_java" << "qtg_large_flash" << "qtg_large_folder"
+            << "qtg_large_query";
+    mIconArray.clear();
+    for (int i = 0; i < icons.count(); i++)
+        {
+        HbIcon icon(icons.at(i));
+        if (icon.isNull() || !(icon.size().isValid()))
+            icon = HbIcon("qtg_large_application");
+        mIconArray.append(icon);
+        }
+    /*QList<TUid> appUid;
+     appUid.append(TUid::Uid(0x20022EF9));//contact
+     appUid.append(TUid::Uid(0x10207C62));//audio
+     appUid.append(TUid::Uid(0x200211FE));//video 
+     appUid.append(TUid::Uid(0x20000A14));//image 
+     appUid.append(TUid::Uid(0x2001FE79));//msg
+     appUid.append(TUid::Uid(0x200255BA));//email 
+     appUid.append(TUid::Uid(0x10005901));//calender
+     appUid.append(TUid::Uid(0x20029F80));//notes
+     //appUid.Append(TUid::Uid(0x20022F35));//application
+     appUid.append(TUid::Uid(0x10008D39));//bookmark
+     appUid.append(TUid::Uid(0x2002BCC0));//files
+
+     for (int i = 0; i < appUid.count(); i++)
+     {
+     TRAP_IGNORE(mIconArray.append(getAppIconFromAppIdL(appUid.at(i))));
+     }*/
+    }
+// ---------------------------------------------------------------------------
+// SearchProgressiveState::activityRequested
+// ---------------------------------------------------------------------------
+void SearchProgressiveState::activityRequested(const QString &name)
+    {
+    /* when search application is launched in normal and then supporting for activity uri
+     * for normal search launching "media" is used instead of "media image","media audio","media video" 
+     */
+    if (mSearchHandlerList.count() != totalcategories_activityreasonreason)
+        {
+        InDeviceHandler* handler = NULL;
+        handler->setCategory("media image");
+        mSearchHandlerList.append(handler);
+        handler->setCategory("media audio");
+        mSearchHandlerList.append(handler);
+        handler->setCategory("media video");
+        mSearchHandlerList.append(handler);
+        }
+    if (name == "SearchDeviceQueryView")
+        {
+        QVariantHash params = hbApp->activateParams();
+        QString searchKey = params.value("query").toString();
+        int i = params.count();
+        params.remove("query");
+        params.remove("activityname");
+        QList<QVariant> list = params.values();
+        int j = list.count();
+        mTemplist.clear();
+        for (int i = 0; i < list.count(); i++)
+            {
+            QString str = list.at(i).toString();
+            if (!str.isNull())
+                mTemplist.append(str);
+            }
+        if (searchKey.length() > 0)
+            mSearchPanel->setCriteria(searchKey);
+        }
+    }
+// ---------------------------------------------------------------------------
+// SearchProgressiveState::parseDocument
+// ---------------------------------------------------------------------------
+void SearchProgressiveState::parseDocument(CpixDocument* aDoc)
+    {
+    PERF_CAT_GETDOC_TIME_ACCUMULATE
+    if (aDoc == NULL)
+        return;
+    QString secondrow = aDoc->excerpt();
+    QString firstrow;
+    HbListWidgetItem* listitem = new HbListWidgetItem();
+
+    if (aDoc->baseAppClass().contains("contact"))
+        {
+        QStringList docsList = filterDoc(aDoc, "GivenName", "FamilyName");
+        if (docsList.value(0, "").length())
+            {
+            firstrow.append(docsList.at(0));
+            }
+        if (docsList.value(1, "").length())
+            {
+            if (firstrow.length())
+                firstrow.append(" ");
+            firstrow.append(docsList.at(1));
+            }
+        if (firstrow.length() == 0)
+            {
+            firstrow = hbTrId("txt_phob_dblist_unnamed");
+            }
+        listitem->setData(mIconArray.at(0), Qt::DecorationRole);
+        }
+    else if (aDoc->baseAppClass().contains("audio"))
+        {
+        QStringList audioList = filterDoc(aDoc, "Title", "MediaId");
+        if (audioList.value(0, "").length())
+            {
+            firstrow.append(audioList.at(0));
+            }
+        if (firstrow.length() == 0)
+            {
+            firstrow = hbTrId("txt_mus_dblist_val_unknown4");
+            }
+        listitem->setData(mIconArray.at(1), Qt::DecorationRole);
+        if (audioList.value(1, "").length())
+            {
+            listitem->setData(audioList.at(1), Qt::UserRole + 2);
+            }
+        }
+    else if (aDoc->baseAppClass().contains("video"))
+        {
+        QStringList videoList = filterDoc(aDoc, "Title", "MediaId", "Name");
+        if (videoList.value(0, "").length())
+            {
+            firstrow.append(videoList.at(0));
+            }
+        if (firstrow.length() == 0 && videoList.value(2, "").length())
+            {
+            firstrow.append(videoList.at(2));
+            }
+        listitem->setData(mIconArray.at(2), Qt::DecorationRole);
+        if (videoList.value(1, "").length())
+            {
+            listitem->setData(videoList.at(1), Qt::UserRole + 2);
+            }
+        }
+    else if (aDoc->baseAppClass().contains("image"))
+        {
+        QStringList imageList = filterDoc(aDoc, "Name", "MediaId");
+        if (imageList.value(0, "").length())
+            {
+            firstrow.append(imageList.at(0));
+            }
+        listitem->setData(mIconArray.at(3), Qt::DecorationRole);
+        if (imageList.value(1, "").length())
+            {
+            listitem->setData(imageList.at(1), Qt::UserRole + 2);
+            }
+        }
+    else if (aDoc->baseAppClass().contains("msg email"))
+        {
+        QStringList emailList = filterDoc(aDoc, "Sender", "MailBoxId",
+                "FolderId");
+        firstrow.append(emailList.at(0));
+        listitem->setData(emailList.at(1), Qt::UserRole + 2);
+        listitem->setData(emailList.at(2), Qt::UserRole + 3);
+        listitem->setData(mIconArray.at(5), Qt::DecorationRole);
+        }
+    else if (aDoc->baseAppClass().contains("msg"))
+        {
+        QStringList msgList = filterDoc(aDoc, "Folder", "To", "From");
+        if (msgList.value(0).contains("Inbox"))
+            {
+            firstrow.append(msgList.at(2));
+            }
+        else
+            {
+            if (msgList.value(1, "").length())
+                firstrow.append(msgList.at(1));
+            }
+        listitem->setData(mIconArray.at(4), Qt::DecorationRole);
+        }
+    else if (aDoc->baseAppClass().contains("calendar"))
+        {
+        firstrow.append(filterDoc(aDoc, "Summary"));
+        if (firstrow.length() == 0)
+            {
+            firstrow = hbTrId("txt_calendar_preview_unnamed");
+            }
+        listitem->setData(mIconArray.at(6), Qt::DecorationRole);
+        }
+    else if (aDoc->baseAppClass().contains("notes"))
+        {
+        firstrow.append(filterDoc(aDoc, "Memo"));
+        if (firstrow.length() == 0)
+            {
+            firstrow = hbTrId("txt_notes_dblist_unnamed");
+            }
+        listitem->setData(mIconArray.at(7), Qt::DecorationRole);
+        }
+    else if (aDoc->baseAppClass().contains("applications"))
+        {
+        firstrow.append(filterDoc(aDoc, "Name"));
+        bool ok;
+        TRAP_IGNORE(listitem->setData(getAppIconFromAppIdL(TUid::Uid(aDoc->docId().toUInt(
+                                                &ok, 16))), Qt::DecorationRole));
+        }
+    else if (aDoc->baseAppClass().contains("bookmark"))
+        {
+        firstrow.append(filterDoc(aDoc, "Name"));
+        if (firstrow.length() == 0)
+            {
+            firstrow = "UnKnown";
+            }
+        listitem->setData(secondrow, Qt::UserRole + 2);
+        listitem->setData(mIconArray.at(8), Qt::DecorationRole);
+        }
+    else if (aDoc->baseAppClass().contains("file folder"))
+        {
+        bool ok;
+        QStringList fileList = filterDoc(aDoc, "Name", "IsFolder",
+                "Extension");
+        firstrow = fileList.at(0);
+        if (fileList.at(1).toInt(&ok) == 1) // folder result icon map 
+
+            {
+            listitem->setData(mIconArray.at(13), Qt::DecorationRole);
+            }
+        else
+            {
+            if (fileList.at(2).contains("sis", Qt::CaseInsensitive)
+                    || fileList.at(1).contains("sisx", Qt::CaseInsensitive))
+                {
+                listitem->setData(mIconArray.at(10), Qt::DecorationRole);
+                }
+            else if (fileList.at(2).contains("java", Qt::CaseInsensitive)
+                    || fileList.at(2).contains("jar", Qt::CaseInsensitive)
+                    || fileList.at(2).contains("jad", Qt::CaseInsensitive))
+                {
+                listitem->setData(mIconArray.at(11), Qt::DecorationRole);
+                }
+            else if (fileList.at(2).contains("swf", Qt::CaseInsensitive))
+                {
+                listitem->setData(mIconArray.at(12), Qt::DecorationRole);
+                }
+            else
+                {
+                listitem->setData(mIconArray.at(14), Qt::DecorationRole);
+                }
+            }
+        }
+    else if (aDoc->baseAppClass().contains("file"))
+        {
+        QStringList fileList = filterDoc(aDoc, "Name", "Extension");
+        firstrow = fileList.at(0);
+        if (firstrow.length() == 0)
+            firstrow = aDoc->baseAppClass();
+        if (fileList.at(1).contains("txt", Qt::CaseInsensitive))
+            {
+            listitem->setData(mIconArray.at(9), Qt::DecorationRole);
+            }
+        else
+            {
+            listitem->setData(mIconArray.at(14), Qt::DecorationRole);
+            }
+        }
+    listitem->setText(firstrow);
+    listitem->setSecondaryText(secondrow);
+    listitem->setData(aDoc->docId(), Qt::UserRole);
+    listitem->setData(aDoc->baseAppClass(), Qt::UserRole + 1);
+    mListView->addItem(listitem);
+
+    delete aDoc;
+    }
+
+InDeviceHandler* SearchProgressiveState::constructHandlers(int mDatabase)
+    {
+    InDeviceHandler* handler = NULL;
+    handler = new InDeviceHandler();
+    switch (mDatabase)
+        {
+        case 0:
+            {
+            handler->setCategory("");
+            break;
+            }
+        case 1:
+            {
+            handler->setCategory("contact");
+            break;
+            }
+        case 2:
+            {
+            handler->setCategory("media");
+            break;
+            }
+        case 3:
+            {
+            handler->setCategory("msg");
+            break;
+            }
+        case 4:
+            {
+            handler->setCategory("msg email");
+            break;
+            }
+        case 5:
+            {
+            handler->setCategory("calendar");
+            break;
+            }
+        case 6:
+            {
+            handler->setCategory("notes");
+            break;
+            }
+        case 7:
+            {
+            handler->setCategory("applications");
+            break;
+            }
+        case 8:
+            {
+            handler->setCategory("file");
+            break;
+            }
+        case 9:
+            {
+            // handler->setCategory("bookmark");
+            break;
+            }
+        case 10:
+            {
+            handler->setCategory("media image");
+            break;
+            }
+        case 11:
+            {
+            handler->setCategory("media audio");
+            break;
+            }
+        case 12:
+            {
+            handler->setCategory("media video");
+            break;
+            }
+        }
+    return handler;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/src/searchuiloader.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Implementation of the uicontroller.
+ *
+ */
+
+#include "searchuiloader.h"
+#include <hbdocumentloader.h>
+#include <hbview.h>
+#include <hblistwidget.h>
+#include <hbsearchpanel.h>
+#include <hbabstractviewitem.h>
+#include <hbframebackground.h>
+#include <hblistviewitem.h>
+#include <hbmainwindow.h>
+#include <hbaction.h>
+#include <hbinstance.h>
+#include <tstasksettings.h>
+#include <hbshrinkingvkbhost.h>
+#include <qinputcontext.h>
+
+const char *SEARCHSTATEPROVIDER_DOCML = ":/xml/searchstateprovider.docml";
+const char *TOC_VIEW = "tocView";
+const char *TUT_SEARCHPANEL_WIDGET = "searchPanel";
+const char *TUT_LIST_VIEW = "listView";
+
+SearchUiLoader *SearchUiLoader::m_instance = 0;
+int SearchUiLoader::m_instanceCounter = 0;
+
+// ---------------------------------------------------------------------------
+// SearchUiLoader::SearchUiLoader
+// ---------------------------------------------------------------------------
+SearchUiLoader::SearchUiLoader() :
+    mDocumentLoader(NULL), mView(NULL), mListWidget(NULL),
+            mSearchPanel(NULL), mClient(NULL), mMainWindow(NULL)
+    {
+    bool ok = false;
+
+    mDocumentLoader = new HbDocumentLoader();
+
+    mDocumentLoader->load(SEARCHSTATEPROVIDER_DOCML, &ok);
+
+    QGraphicsWidget *widget = mDocumentLoader->findWidget(TOC_VIEW);
+
+    Q_ASSERT_X(ok && (widget != 0), "TOC_VIEW", "invalid view");
+
+    mView = qobject_cast<HbView*> (widget);
+
+    if (mView)
+        {
+        mView->setTitle(hbTrId("txt_search_title_search"));
+        }
+
+    mListWidget = qobject_cast<HbListWidget *> (mDocumentLoader->findWidget(
+            TUT_LIST_VIEW));
+
+    Q_ASSERT_X(ok && (mListWidget != 0), "TUT_LIST_VIEW", "invalid viewocML file");
+
+    if (mListWidget)
+        {
+        HbAbstractViewItem *prototype = mListWidget->itemPrototypes().first();
+        HbFrameBackground frame;
+        frame.setFrameGraphicsName("qtg_fr_list_normal");
+        frame.setFrameType(HbFrameDrawer::NinePieces);
+        prototype->setDefaultFrame(frame);
+        HbListViewItem *prototypeListView = qobject_cast<HbListViewItem *> (
+                prototype);
+        prototypeListView->setGraphicsSize(HbListViewItem::LargeIcon);
+        if (prototypeListView)
+            {
+            prototypeListView->setTextFormat(Qt::RichText);
+            }
+        HbAbstractItemView::ItemAnimations noCreationAndRemovalAnimations =
+                HbAbstractItemView::All;
+        noCreationAndRemovalAnimations ^= HbAbstractItemView::Appear;
+        noCreationAndRemovalAnimations ^= HbAbstractItemView::Disappear;
+        mListWidget->setEnabledAnimations(noCreationAndRemovalAnimations);
+        }
+
+    mSearchPanel = qobject_cast<HbSearchPanel *> (
+            mDocumentLoader->findWidget(TUT_SEARCHPANEL_WIDGET));
+    if (mSearchPanel)
+        {
+        Qt::InputMethodHints hints = mSearchPanel->inputMethodHints();
+        hints |= Qt::ImhNoPredictiveText;
+        mSearchPanel->setInputMethodHints(hints);
+        mSearchPanel->setSearchOptionsEnabled(true);
+        mSearchPanel->setCancelEnabled(false);
+        }
+
+    mMainWindow = new SearchMainWindow();
+    connect(mMainWindow, SIGNAL(bringvkb()), this, SLOT(slotbringvkb()));
+
+    HbAction *action = new HbAction(Hb::DoneNaviAction);
+    connect(action, SIGNAL(triggered()), this, SLOT(slotsendtobackground()));
+    mView->setNavigationAction(action);
+
+    mVirtualKeyboard = new HbShrinkingVkbHost(mView);
+
+    mBringtoForground = true;
+    }
+// ---------------------------------------------------------------------------
+// SearchUiLoader::~SearchUiLoader
+// ---------------------------------------------------------------------------
+SearchUiLoader::~SearchUiLoader()
+    {
+    delete mMainWindow;
+    delete mDocumentLoader;
+    delete mClient;
+    }
+// ---------------------------------------------------------------------------
+// SearchUiLoader::slotsendtobackground
+// ---------------------------------------------------------------------------
+void SearchUiLoader::slotsendtobackground()
+    {
+    if (!mClient)
+        mClient = new TsTaskSettings;
+    mClient->setVisibility(false);
+    mListWidget->clear();
+    mSearchPanel->setCriteria(QString());
+    mMainWindow->lower();
+    mBringtoForground = true;
+    }
+// ---------------------------------------------------------------------------
+// SearchUiLoader::slotbringvkb
+// ---------------------------------------------------------------------------
+void SearchUiLoader::slotbringvkb()
+    {
+    if (mBringtoForground)
+        {
+        if (!mClient)
+            mClient = new TsTaskSettings;
+        mClient->setVisibility(true);
+        mSearchPanel->setFocus();
+        QInputContext *ic = qApp->inputContext();
+        if (ic)
+            {
+            mBringtoForground = false;
+            QEvent *event = new QEvent(QEvent::RequestSoftwareInputPanel);
+            ic->filterEvent(event);
+            delete event;
+            }
+        }
+    }
+// ---------------------------------------------------------------------------
+// SearchMainWindow::slotViewReady
+// ---------------------------------------------------------------------------
+void SearchMainWindow::slotViewReady()
+    {
+    emit bringvkb();
+    }
--- a/searchui/stateproviders/searchstateprovider/src/settingswidget.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/src/settingswidget.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -15,6 +15,7 @@
  *
  */
 #include "settingswidget.h"
+#include "onlinehandler.h"
 #include <hbdialog.h>
 #include <hbcheckbox.h>
 #include <qgraphicslinearlayout.h>
@@ -38,7 +39,7 @@
 #include <qsqldatabase.h>
 #include <qsqlquery.h>
 #include <cpixcontentinfocommon.h>
-#include "onlinehandler.h"
+
 const char *DELIMETER_DOCML = ":/xml/delimeterscreen.docml";
 const char *DIALOG = "dialog";
 const char *DATAFORM = "dataForm";
@@ -52,19 +53,16 @@
             mModel(NULL), mSelectedScope(0), mSelectedProvider(0), comboBox(
                     NULL), mInternetHandler(NULL)
     {
-    setSettingsFilePath();
     for (int i = 0; i < 8; i++)
         {
         mDeviceMapping.append(false);
         }
-
     mDeviceCategoryRefList = (QStringList() << "first" << "second" << "third"
             << "fourth" << "fifth" << "sixth" << "seventh" << "eigth");
 
     mchangestate = true;
     mInstialize = true;
     isInternetSelected = false;
-
     storeDefaultSettings();
     }
 //----------------------------------------------------------------------------------------------------------------------------
@@ -84,7 +82,6 @@
         {
         widget = mDocumentLoader->findWidget(DIALOG);
         Q_ASSERT_X(ok && (widget != 0), "DIALOG", "invalid view");
-
         popup = qobject_cast<HbDialog*> (widget);
         }
     if (!dataform)
@@ -101,7 +98,6 @@
         {
         signalMapper = new QSignalMapper(this);
         }
-
     createGui();
     }
 //----------------------------------------------------------------------------------------------------------------------------
@@ -237,6 +233,7 @@
         connect(mradiolist, SIGNAL(itemSelected(int)), this,
                 SLOT(slotitemSelected(int)));
         }
+    setActionVisibility();
     }
 //----------------------------------------------------------------------------------------------------------------------------
 //SettingsWidget::preparecategories()
@@ -245,15 +242,27 @@
 void SettingsWidget::preparecategories()
     {
     // read form database
-    QString mConnectionName("cpixcontentinfo.sq");
-    QString mDatabaseName("c:\\Private\\2001f6fb\\cpixcontentinfo.sq");
+
+    mDeviceListDisplay.clear();
+    mCategoryList.clear();
+    mDeviceMapping.clear();
+    for (int i = 0; i < 8; i++)
+        {
+        mDeviceMapping.append(false);
+        }
+    mCategoryDbMapping.clear();
+
+    QString mConnectionName(QString::fromUtf16(KContentInfoFileName().Ptr(),
+            KContentInfoFileName().Length()));
+    QString mDatabaseName(QString::fromUtf16(KCIDBPath().Ptr(),
+            KCIDBPath().Length()) + "\\" + mConnectionName);
 
     QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", mConnectionName);
     db.setDatabaseName(mDatabaseName);
 
     QSqlQuery query(QSqlDatabase::database(mConnectionName));
-    QString statement = "SELECT NAME FROM table1";
-
+    QString statement = QString("SELECT * FROM ") + QString::fromUtf16(
+            KContentInfoTableName().Ptr(), KContentInfoTableName().Length());
     query.prepare(statement);
     query.exec();
     while (query.next())
@@ -268,7 +277,6 @@
             {
             mCategoryDbMapping.insert(category_name, true);
             }
-        qDebug() << "string db= " << category_name;
         }
     db.close();
 
@@ -284,8 +292,6 @@
      mCategoryDbMapping.insert("Bookmarks", true); 
      mCategoryDbMapping.insert("Files", true); */
 
-    // mCategoryDbMapping.insert("email", true); // to remove once email starts working
-
     mDeviceListDisplay.append(hbTrId("txt_search_list_select_all"));
     mDeviceMapping.insert(0, true);
 
@@ -294,46 +300,39 @@
         mDeviceMapping.insert(1, true);
         mDeviceListDisplay.append(hbTrId("txt_search_list_contatcs"));
         }
-
     if (mCategoryDbMapping.value("Audios") || mCategoryDbMapping.value(
             "Images") || mCategoryDbMapping.value("Videos"))
         {
         mDeviceListDisplay.append(hbTrId("txt_search_list_media"));
         mDeviceMapping.insert(2, true);
         }
-
     if (mCategoryDbMapping.value("Messages") || mCategoryDbMapping.value(
             "email"))
         {
         mDeviceListDisplay.append(hbTrId("txt_search_list_messagemail"));
         mDeviceMapping.insert(3, true);
         }
-
     if (mCategoryDbMapping.value("Calendar") || mCategoryDbMapping.value(
             "Notes"))
         {
         mDeviceListDisplay.append(hbTrId("txt_search_list_calendarnotes"));
         mDeviceMapping.insert(4, true);
         }
-
     if (mCategoryDbMapping.value("Applications"))
         {
         mDeviceListDisplay.append(hbTrId("txt_search_list_applications"));
         mDeviceMapping.insert(5, true);
         }
-
     if (mCategoryDbMapping.value("Bookmarks"))
         {
         mDeviceListDisplay.append(hbTrId("txt_search_list_bookmarks"));
         mDeviceMapping.insert(6, true);
         }
-
     if (mCategoryDbMapping.value("Files"))
         {
         mDeviceListDisplay.append(hbTrId("txt_search_list_all_other_files"));
         mDeviceMapping.insert(7, true);
         }
-    // internetCategoryList = (QStringList() << "Google" << "Bing" << "Yahoo");
 
     if (mServiceProviders.count())
         {
@@ -345,7 +344,6 @@
         mCategoryList = (QStringList() << hbTrId("txt_search_list_device"));
         }
     }
-
 //----------------------------------------------------------------------------------------------------------------------------
 //SettingsWidget::~SettingsWidget()
 //
@@ -353,17 +351,13 @@
 SettingsWidget::~SettingsWidget()
     {
     delete signalMapper;
-    //delete popup;
-    //delete dataform;
     delete mModel;
-    //delete mradiolist;
     mDeviceCheckBoxList.clear();
     mInternetCheckBoxList.clear();
     mModelItemList.clear();
     mActions.clear();
     delete mDocumentLoader;
     delete mInternetHandler;
-    //delete popup;
     }
 //----------------------------------------------------------------------------------------------------------------------------
 //SettingsWidget::launchSettingWidget()
@@ -376,6 +370,17 @@
         initialize();
         mInstialize = false;
         }
+    if (mDeviceListDisplay.count() != 7)
+        {
+        preparecategories();
+        q_currentIndexChanged(mSelectedScope);
+        QDir dir;
+        dir.remove(SETTINGS_INI_PATH);
+        storeDefaultSettings();
+        }
+    // refresh the screen to top     
+    QModelIndex index = mModel->index(0, 0);
+    dataform->scrollTo(index);
     comboBox->setCurrentIndex(mSelectedScope);
     loadDeviceSettings();
     setActionVisibility();
@@ -393,18 +398,21 @@
         if (mDeviceCheckBoxList.at(i)->checkState() == Qt::Checked)
             {
             noItemSelected = false;
+            break;
             }
         }
     if (!isInternetSelected)
         {
-        for (int i = 0; i < mActions.count(); i++)
-            popup->removeAction(mActions.at(i));
-        popup->addActions(mActions);
+        mActions.at(0)->setVisible(true);
         if (noItemSelected)
             {
-            popup->removeAction(mActions.at(0));
+            mActions.at(0)->setVisible(false);
             }
         }
+    else
+        {
+        mActions.at(0)->setVisible(true);
+        }
     }
 //----------------------------------------------------------------------------------------------------------------------------
 //SettingsWidget::itemChecked( int selectedIndex)
@@ -489,7 +497,7 @@
 
 void SettingsWidget::storeSettingsToiniFile()
     {
-    QSettings appSettings(mSettingFileName, QSettings::IniFormat);
+    QSettings appSettings(SETTINGS_INI_PATH, QSettings::IniFormat);
     isInternetSelected ? (mSelectedScope = 1) : (mSelectedScope = 0);
     appSettings.setValue("selectedcategory", mSelectedScope);
     appSettings.setValue("devicecount", mDeviceCategoryRefList.count());
@@ -517,10 +525,8 @@
                 appSettings.setValue(mDeviceCategoryRefList.at(i), 0);
                 emit selectedItemCategory(i, false);
                 }
-
             }
         }
-
     }
 //----------------------------------------------------------------------------------------------------------------------------
 //void SettingsWidget::loadBaseSettings()
@@ -528,7 +534,7 @@
 //----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::loadBaseSettings()
     {
-    QSettings appSettings(mSettingFileName, QSettings::IniFormat);
+    QSettings appSettings(SETTINGS_INI_PATH, QSettings::IniFormat);
     mSelectedScope = appSettings.value("selectedcategory", 0).toInt();
     mSelectedScope ? (isInternetSelected = true) : (isInternetSelected
             = false);
@@ -540,7 +546,7 @@
 //----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::loadDeviceSettings()
     {
-    QSettings appSettings(mSettingFileName, QSettings::IniFormat);
+    QSettings appSettings(SETTINGS_INI_PATH, QSettings::IniFormat);
     int value;
     if (!isInternetSelected)
         {
@@ -549,7 +555,6 @@
             {
             value
                     = appSettings.value(mDeviceCategoryRefList.at(i), 1).toInt();
-
             if (mDeviceMapping.count() && mDeviceCheckBoxList.count()
                     && mDeviceMapping.at(i))
                 {
@@ -566,7 +571,6 @@
             value
                   ? (emit selectedItemCategory(i, true))
                      : (emit selectedItemCategory(i, false));
-
             }
         }
     }
@@ -579,14 +583,13 @@
     loadBaseSettings();
     return isInternetSelected;
     }
-
 //----------------------------------------------------------------------------------------------------------------------------
 //void SettingsWidget::storeDefaultSettings()
 //
 //----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::storeDefaultSettings()
     {
-    QSettings appSettings(mSettingFileName, QSettings::IniFormat);
+    QSettings appSettings(SETTINGS_INI_PATH, QSettings::IniFormat);
     if (!appSettings.contains("selectedcategory")) // change the settings for the first time only
         {
         mSelectedScope = 0;
@@ -596,15 +599,27 @@
             appSettings.setValue(mDeviceCategoryRefList.at(i), 1);
         }
     }
+//----------------------------------------------------------------------------------------------------------------------------
+//void SettingsWidget::slotproviderDetails()
+//
+//----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::slotproviderDetails(QString name, HbIcon icon, int id)
     {
     mServiceProviders.insert(id, name);
     emit ISProvidersIcon(icon, id);
     }
+//----------------------------------------------------------------------------------------------------------------------------
+//void SettingsWidget::slotdefaultProvider()
+//
+//----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::slotdefaultProvider(const int value)
     {
     mSelectedProvider = value;
     }
+//----------------------------------------------------------------------------------------------------------------------------
+//void SettingsWidget::slotitemSelected()
+//
+//----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::slotitemSelected(int value)
     {
     QMapIterator<int, QString> i(mServiceProviders);
@@ -620,11 +635,10 @@
         selectedindex++;
         }
     }
-void SettingsWidget::setSettingsFilePath()
-    {
-    mSettingFileName.append(QDir::currentPath());
-    mSettingFileName.append(QString("/searchsettings.ini"));
-    }
+//----------------------------------------------------------------------------------------------------------------------------
+//void SettingsWidget::loadIS()
+//
+//----------------------------------------------------------------------------------------------------------------------------
 void SettingsWidget::loadIS()
     {
     if (!mInternetHandler)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/inc/t_searchactivity.h	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#ifndef SEARCHTESTACTIVITY_H_
+#define SEARCHTESTACTIVITY_H_
+
+#include <hbwidget.h>
+#include <qgraphicslinearlayout.h>
+#include <hbpushbutton.h>
+#include <hblabel.h>
+#include <hbLineedit.h>
+class HbCheckBox;
+class SearchTestActivity : public HbWidget
+    {
+Q_OBJECT
+public:
+    SearchTestActivity(QGraphicsItem *parent = 0);
+    ~SearchTestActivity();
+
+private:
+
+    QGraphicsLinearLayout *mColumn1Layout;
+    QGraphicsLinearLayout *mColumn2Layout;
+
+    QGraphicsLinearLayout *mCheckBoxLayout;
+    QGraphicsLinearLayout *mButtonLayout;
+
+    QGraphicsLinearLayout *mMainLayout;
+
+    HbLineEdit *mLineEdit;
+    HbPushButton *mIndevice;
+    HbPushButton *mOnline;
+
+    QObject *mActivityManager;
+    QList<HbCheckBox*> mselectioncheckbox;
+
+private slots:
+    void launchDeviceApp();
+    void launchInternetApp();
+
+    };
+
+#endif /* SEARCHTESTACTIVITY_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/src/main.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include "t_searchactivity.h"
+
+
+
+
+int main(int argc, char **argv)
+{
+    HbApplication app(argc, argv);
+    SearchTestActivity* lw = new SearchTestActivity();
+    HbMainWindow mainWindow;
+    mainWindow.addView( lw );
+    mainWindow.show();
+
+    return app.exec();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/src/t_searchactivity.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include "t_searchactivity.h"
+#include <qurl.h>
+#include <qservicemanager.h>
+#include <hbcheckbox.h>
+QTM_USE_NAMESPACE
+
+const QString KAppUid = "0x2002C377";
+
+SearchTestActivity::SearchTestActivity(QGraphicsItem *parent) :
+    HbWidget(parent)
+    {
+
+    QServiceManager serviceManager;
+    mActivityManager = serviceManager.loadInterface(
+            "com.nokia.qt.activities.ActivityManager");
+    //mActivityManager->run
+    if (!mActivityManager)
+        {
+        qFatal(
+                "Cannot initialize critical com.nokia.qt.activities.ActivityManager service.");
+        }
+
+    mColumn1Layout = new QGraphicsLinearLayout(Qt::Vertical);
+    mColumn2Layout = new QGraphicsLinearLayout(Qt::Vertical);
+    mButtonLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    mMainLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mCheckBoxLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+
+    HbCheckBox* check1 = new HbCheckBox(this);
+    check1->setText("contact");
+    HbCheckBox* check2 = new HbCheckBox(this);
+    check2->setText("media");
+    HbCheckBox* check3 = new HbCheckBox(this);
+    check3->setText("calendar");
+    HbCheckBox* check4 = new HbCheckBox(this);
+    check4->setText("notes");
+    HbCheckBox* check5 = new HbCheckBox(this);
+    check5->setText("image");
+    HbCheckBox* check6 = new HbCheckBox(this);
+    check6->setText("audio");
+    HbCheckBox* check7 = new HbCheckBox(this);
+    check7->setText("video");
+    HbCheckBox* check8 = new HbCheckBox(this);
+    check8->setText("bookmark");
+    HbCheckBox* check9 = new HbCheckBox(this);
+    check9->setText("msg");
+    HbCheckBox* check10 = new HbCheckBox(this);
+    check10->setText("file");
+    HbCheckBox* check11 = new HbCheckBox(this);
+    check11->setText("applications");
+    HbCheckBox* check12 = new HbCheckBox(this);
+    check12->setText("email");
+
+    mColumn1Layout->addItem(check1);
+    mColumn1Layout->addItem(check2);    
+    mColumn1Layout->addItem(check3);
+    mColumn1Layout->addItem(check4);
+    mColumn1Layout->addItem(check5);    
+    mColumn1Layout->addItem(check6);
+    
+    mColumn2Layout->addItem(check7);
+    mColumn2Layout->addItem(check8);
+    mColumn2Layout->addItem(check9);
+    mColumn2Layout->addItem(check10);
+    mColumn2Layout->addItem(check11);
+    mColumn2Layout->addItem(check12);
+    
+    mCheckBoxLayout->addItem(mColumn1Layout);
+    mCheckBoxLayout->addItem(mColumn2Layout); 
+    
+
+    mIndevice = new HbPushButton("InDevice");
+    mIndevice->setMaximumHeight(50);
+    mOnline = new HbPushButton("Online");
+    mOnline->setMaximumHeight(50);
+    
+    mButtonLayout->addItem(mIndevice);
+    mButtonLayout->addItem(mOnline);
+    
+    
+    mLineEdit = new HbLineEdit("");
+    mLineEdit->setPlaceholderText("Search Query");
+    
+    
+
+    mMainLayout->addItem(mCheckBoxLayout);
+    mMainLayout->addItem(mLineEdit);
+    mMainLayout->addItem(mButtonLayout);
+
+    
+    
+    connect(mIndevice, SIGNAL(released()), this, SLOT(launchDeviceApp()));
+    connect(mOnline, SIGNAL(released()), this,
+            SLOT(launchInternetApp()));
+
+    setLayout(mMainLayout);
+
+    mselectioncheckbox.append(check1);
+    mselectioncheckbox.append(check2);
+    mselectioncheckbox.append(check3);
+    mselectioncheckbox.append(check4);
+    mselectioncheckbox.append(check5);
+    mselectioncheckbox.append(check6);
+    mselectioncheckbox.append(check7);
+    mselectioncheckbox.append(check8);
+    mselectioncheckbox.append(check9);
+    mselectioncheckbox.append(check10);
+    mselectioncheckbox.append(check11);
+    mselectioncheckbox.append(check12);
+    }
+
+SearchTestActivity::~SearchTestActivity()
+    {    
+    delete mMainLayout;    
+    delete mActivityManager;    
+    }
+
+void SearchTestActivity::launchDeviceApp()
+    {
+    QUrl url;
+    url.setScheme("appto");
+    url.setHost(KAppUid);
+    url.addQueryItem("activityname", "SearchDeviceQueryView");
+    url.addQueryItem("query",mLineEdit->text());
+    /*
+     * QString str = "a";
+     * url.addQueryItem("query", str);
+    */
+    
+    for (int i = 0; i < mselectioncheckbox.count(); i++)
+        {
+        if (mselectioncheckbox.at(i)->isChecked())
+            {
+            QString str = mselectioncheckbox.at(i)->text();
+            url.addQueryItem(str, str);
+            }
+        }
+    QString debugString = url.toString();
+    bool ok = QMetaObject::invokeMethod(mActivityManager, "launchActivity",
+            Q_ARG(QUrl, url));
+    if (ok)
+        {
+        //mResultLabel->setPlainText("ok");
+        }
+    else
+        {
+        //mResultLabel->setPlainText("fail");
+        }
+    }
+
+void SearchTestActivity::launchInternetApp()
+    {
+    QUrl url;
+    url.setScheme("appto");
+    url.setHost(KAppUid);
+    url.addQueryItem("activityname", "SearchWebQueryView");
+    url.addQueryItem("query", mLineEdit->text());
+    /*QString str = "a";
+    url.addQueryItem("query", str);*/
+
+    for (int i = 0; i < mselectioncheckbox.count(); i++)
+        {
+        if (mselectioncheckbox.at(i)->isChecked())
+            {
+            QString str = mselectioncheckbox.at(i)->text();
+            url.addQueryItem(str, str);
+            }
+        }
+    QString debugString = url.toString();
+    bool ok = QMetaObject::invokeMethod(mActivityManager, "launchActivity",
+            Q_ARG(QUrl, url));
+    if (ok)
+        {
+        //mResultLabel->setPlainText("ok");
+        }
+    else
+        {
+        //mResultLabel->setPlainText("fail");
+        }
+
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/t_searchactivity.pri	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+#Header files
+HEADERS += ./inc/*.h 
+
+#Source files
+SOURCES += ./src/*.cpp 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchactivity/t_searchactivity.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:  Search stateprovider unit test project file
+#
+
+TEMPLATE = app
+
+CONFIG += hb console mobility
+
+MOBILITY = serviceframework
+
+symbian {         
+CONFIG += symbian_test               
+TARGET.UID2 = 0x100039CE
+
+TARGET.CAPABILITY = ALL -TCB -DRM
+TARGET.EPOCSTACKSIZE = 0x14000 // 80kB
+TARGET.EPOCHEAPSIZE = 0x20000 0x800000 // 128kB - 16MB
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE 
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+}
+
+include(t_searchactivity.pri)
+
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/inc/t_searchstateprovider.h	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/inc/t_searchstateprovider.h	Wed Aug 18 09:49:49 2010 +0300
@@ -57,7 +57,7 @@
     void testopenResultitem();
     void testgetSettingCategory();
     void testsetSettings();
-    void teststartNewSearch();    
+    void teststartNewSearch();
     void testsettingsaction();
     void testcancelSearch();
     void testhandleOkError();
@@ -103,15 +103,26 @@
     void testcreateGui();
     void testpreparecategories();
     void testq_currentIndexChanged();
-
     void selectedItemCategory();
 
-    /* void testOnWizardAddedSignalledNoWizardInCS();
-     void testProgressUpdated();
-     void testWizardSelected();    
+    /**
+     * t_searchonlinestate.cpp
      */
+    void teststartOnlineSearch();
+    void testonlinesetSettings();
+    void testonlinecancelSearch();    
+    void testslotbackEventTriggered();
+    void testslotIndeviceQuery();
+    void testslotlaunchLink();
+    void testslotviewReady();    
+
+    /**
+     * t_searchstateprovider.cpp
+     * unit test code for uiloader
+     */
+    void testcreatenanddelete();
+    void testslotsendtobackground();
 private:
-
     /**
      * Helper method testing construction of state
      *
@@ -121,10 +132,9 @@
      * @return True if state was created successfully, false otherwise.
      * @since S60 ?S60_version.
      */
-    bool verifyStateCreation(const QString& uri);    
-
-    HbMainWindow* mainWindow();
-
+    bool verifyStateCreation(const QString& uri);
+    
+    HbMainWindow *mainWindow();
 private:
 
     HbMainWindow *mMainWindow;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchonlinestate.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -0,0 +1,65 @@
+#include "t_searchstateprovider.h"
+#include "searchonlinestate.h"
+
+void SearchStateProviderTest::teststartOnlineSearch()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->startOnlineSearch("query");
+    delete onlinestate;
+    }
+void SearchStateProviderTest::testonlinesetSettings()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->mSearchQuery = "query";
+    QSignalSpy spy(onlinestate, SIGNAL(onlineSearchQuery(QString)));
+    onlinestate->setSettings();
+    QCOMPARE(spy.count(), 1);
+    QSignalSpy spy1(onlinestate, SIGNAL(switchOnlineToSettingsState()));
+    onlinestate->setSettings();
+    QCOMPARE(spy1.count(), 1);
+    delete onlinestate;
+    }
+void SearchStateProviderTest::testonlinecancelSearch()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->cancelSearch();
+    delete onlinestate;
+    }
+void SearchStateProviderTest::testslotbackEventTriggered()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->slotbackEventTriggered();
+    delete onlinestate;
+    }
+void SearchStateProviderTest::testslotIndeviceQuery()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->slotIndeviceQuery("query");
+    delete onlinestate;
+    }
+void SearchStateProviderTest::testslotlaunchLink()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->slotlaunchLink(1,"Query");
+    delete onlinestate;
+    }
+void SearchStateProviderTest::testslotviewReady()
+    {
+    SearchOnlineState* onlinestate = new SearchOnlineState();
+    QEvent *event = new QEvent(QEvent::None);
+    onlinestate->onEntry(event);
+    onlinestate->slotviewReady();
+    delete onlinestate;
+    }
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchprogressivestate.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -14,6 +14,7 @@
 #include <AknIconUtils.h> 
 #include <apgcli.h>
 #include <hbsearchpanel.h>
+#include  <qmap.h>
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -27,8 +28,7 @@
 
     QVERIFY(progressiveState != NULL);
     QVERIFY(progressiveState->mView);
-    QVERIFY(progressiveState->mListView);
-    QVERIFY(progressiveState->mDocumentLoader);
+    QVERIFY(progressiveState->mListView);    
     QVERIFY(progressiveState->mSearchPanel);
     //QVERIFY(progressiveState->mSearchHandler);
 
@@ -109,9 +109,11 @@
     progressiveState->mSearchHandler
             = progressiveState->mSearchHandlerList.at(2);
    
-    
-    progressiveState->mSearchHandler->searchAsync("jpg*", "_aggregate");
-    QTest::qWait(2000);
+    //progressiveState->mSearchHandler->searchAsync("$prefix(\\jpg\\", "_aggregate");
+    //progressiveState->mSearchHandler->searchAsync("$prefix(\"jpg\")", "_aggregate");
+    progressiveState->onAsyncSearchComplete(-1,0);
+    progressiveState->onAsyncSearchComplete(0,0);
+    progressiveState->onAsyncSearchComplete(0,10);
     QVERIFY(progressiveState->mResultcount);
 
     delete progressiveState;
@@ -216,7 +218,7 @@
     SearchProgressiveState* progressiveState = new SearchProgressiveState();
     QEvent *event = new QEvent(QEvent::None);
     progressiveState->onEntry(event);
-    QSignalSpy spy(progressiveState, SIGNAL(settingsState()));
+    QSignalSpy spy(progressiveState, SIGNAL(switchProToSettingsState()));
     progressiveState->setSettings();
     QCOMPARE(spy.count(), 1);
     delete progressiveState;
@@ -326,7 +328,11 @@
     {
     SearchProgressiveState* progressiveState = new SearchProgressiveState();
     QEvent *event = new QEvent(QEvent::None);
-    progressiveState->onEntry(event);    
+    progressiveState->onEntry(event);
+   
+   
+    //progressiveState->mISprovidersIcon.insert(1,icon1);
+    progressiveState->mISprovidersIcon.insert(1, progressiveState->mIconArray.at(1));
     progressiveState->createSuggestionLink();
     QCOMPARE(progressiveState->mListView->count(), 1);
     delete progressiveState;
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchsettingsstate.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchsettingsstate.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -42,7 +42,7 @@
     {
     SearchSettingsState* settingsState = new SearchSettingsState();
 
-    QSignalSpy spy(settingsState, SIGNAL(backEventTriggered()));
+    QSignalSpy spy(settingsState, SIGNAL(clickstatus(bool)));
     settingsState->handleBackEvent(true);
     QCOMPARE(spy.count(), 1);
 
@@ -74,7 +74,7 @@
     {
     SearchSettingsState* settingsState = new SearchSettingsState();
     QSignalSpy spy(settingsState,
-                SIGNAL(customizeGoButton(bool)));
+                SIGNAL(switchToProState()));
     
     settingsState->isInternetOn();    
     
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchstateprovider.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_searchstateprovider.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -18,10 +18,11 @@
 #include "t_searchstateprovider.h"
 //#include "searchruntimeprovider.h"
 #include "searchstateprovider.h"
-
+#include "searchuiloader.h"
 #include <qmetatype.h>
 #include <qstate.h>
-
+#include <hblistwidget.h>
+#include <hbsearchpanel.h>
 #include <hbinstance.h>
 #include <hbmainwindow.h>
 #include <hbview.h>
@@ -115,6 +116,22 @@
     QVERIFY(verifyStateCreation("search.nokia.com/state/wizardsettingstate"));
     // delete wind;
     }
+void SearchStateProviderTest::testcreatenanddelete()
+    {    
+    SearchUiLoader* uiloader = SearchUiLoader::instance();    
+    QVERIFY(uiloader->View());
+    QVERIFY(uiloader->ListWidget());
+    QVERIFY(uiloader->SearchPanel());
+    uiloader->deleteLater();
+    }
+void SearchStateProviderTest::testslotsendtobackground()
+    {
+    SearchUiLoader* uiloader = SearchUiLoader::instance();
+    uiloader->slotsendtobackground();
+    QCOMPARE(uiloader->mListWidget->count(),0);
+    QCOMPARE(uiloader->mSearchPanel->criteria(),QString());
+    uiloader->deleteLater();
+    }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_settingswidget.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/src/t_settingswidget.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -142,7 +142,7 @@
 void SearchStateProviderTest::teststoreDefaultSettings()
     {
     QDir dir;
-    bool ret = dir.remove("search.ini");
+    bool ret = dir.remove(SETTINGS_INI_PATH);
 
     SettingsWidget* settingswizard = new SettingsWidget();
     settingswizard->initialize();
--- a/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/t_searchstateprovider/t_searchstateprovider.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -35,7 +35,7 @@
 
 LIBS += -lsearchindevicehandler
 LIBS += -lxqservice 
-LIBS += -lqcpixsearchclient
+LIBS += -lcpixsearch
 LIBS += -laknskins 
 LIBS += -lfbscli
 LIBS += -laknicon
@@ -48,6 +48,7 @@
 LIBS += -lapgrfx
 LIBS += -lws32
 LIBS += -lavkon
+LIBS += -ltstaskmonitorclient.dll
 
 CONFIG += qtestlib \
           symbian_test \
--- a/searchui/stateproviders/searchstateprovider/tsrc/tsrc.pro	Tue Jul 06 14:17:22 2010 +0300
+++ b/searchui/stateproviders/searchstateprovider/tsrc/tsrc.pro	Wed Aug 18 09:49:49 2010 +0300
@@ -16,6 +16,7 @@
 
 TEMPLATE = subdirs
 
-SUBDIRS  = t_searchstateprovider
+SUBDIRS  = t_searchstateprovider \
+           t_searchactivity
            
 CONFIG  += ordered
\ No newline at end of file