--- a/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp Tue Feb 02 00:24:33 2010 +0200
+++ b/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp Fri Feb 19 23:14:48 2010 +0200
@@ -22,7 +22,7 @@
_LIT( KColon, ":" );
-const TInt KDefaultDelay = 4;
+const TInt KDefaultDelay = 3;
const TInt KMillion = 1000000;
const TUid KRepositoryUid = { 0x20007183 };
@@ -78,6 +78,8 @@
TTimeIntervalMicroSeconds32 delay( 5 );
After( delay );
}
+
+ iHEM = CHarvesterEventManager::GetInstanceL();
}
CMmcScannerAO::~CMmcScannerAO()
@@ -95,6 +97,11 @@
iHdArray.ResetAndDestroy();
iHdArray.Close();
+
+ if (iHEM)
+ {
+ iHEM->ReleaseInstance();
+ }
iFs.Close();
}
@@ -136,6 +143,15 @@
WRITELOG("CMmcScannerAO::RunL - build file list");
iMmcFileList->BuildFileListL( iFs, iDrive, iEntryArray );
+
+ // send start event
+ const TInt entryCount = iEntryArray.Count();
+ if( entryCount > 0 )
+ {
+ iHEM->IncreaseItemCount( EHEObserverTypeMMC, entryCount );
+ iHEM->SendEventL( EHEObserverTypeMMC, EHEStateStarted, iHEM->ItemCount( EHEObserverTypeMMC ) );
+ }
+
SetState( EProcessFiles );
break;
}