diff -r b73252188534 -r f23c07ec56e2 harvester/common/src/harvesterplugin.cpp --- a/harvester/common/src/harvesterplugin.cpp Thu Aug 19 10:20:41 2010 +0300 +++ b/harvester/common/src/harvesterplugin.cpp Tue Aug 31 15:37:30 2010 +0300 @@ -65,7 +65,8 @@ iDtor_ID_Key( KNullUid ), iOriginPropertyDef( NULL ), iTitlePropertyDef( NULL ), - iHarvesting( EFalse ) + iHarvesting( EFalse ), + iPaused( EFalse ) { } @@ -109,6 +110,7 @@ { if( iState == EHarvesterIdle ) { + iPaused = EFalse; SetNextRequest( EHarvesterGathering ); } } @@ -154,6 +156,7 @@ } else { + WRITELOG( "CHarvesterPlugin::RunL EHarvesterGathering - items in queue" ); if ( !iHarvesting ) { TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( ETrue ) ); @@ -244,12 +247,28 @@ } // --------------------------------------------------------------------------- +// StartHarvest +// --------------------------------------------------------------------------- +// +EXPORT_C void CHarvesterPlugin::StopHarvest() + { + Cancel(); + iState = EHarvesterIdle; + if( iHarvesting ) + { + TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( EFalse ) ); + iHarvesting = EFalse; + } + iPaused = ETrue; + } + +// --------------------------------------------------------------------------- // SetNextRequest // --------------------------------------------------------------------------- // void CHarvesterPlugin::SetNextRequest( THarvesterState aState ) { - if ( ! IsActive() ) + if ( !IsActive() && !iPaused ) { iState = aState; SetActive();