--- a/harvester/server/src/harvesterao.cpp Mon Jun 21 16:09:02 2010 +0300
+++ b/harvester/server/src/harvesterao.cpp Thu Jul 15 19:07:24 2010 +0300
@@ -42,6 +42,11 @@
#include "harvestercenreputil.h"
#include "restorewatcher.h"
#include "backupsubscriber.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "harvesteraoTraces.h"
+#endif
+
// constants
const TInt32 KFileMonitorPluginUid = 0x20007186; // file monitor plugin implementation uid
@@ -104,6 +109,7 @@
CHarvesterAO* CHarvesterAO::NewLC()
{
WRITELOG( "CHarvesterAO::NewLC() - begin" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_NEWLC, "CHarvesterAO::NewLC" );
CHarvesterAO* self = new (ELeave) CHarvesterAO();
CleanupStack::PushL( self );
@@ -118,6 +124,7 @@
CHarvesterAO* CHarvesterAO::NewL()
{
WRITELOG( "CHarvesterAO::NewL() - begin" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_NEWL, "CHarvesterAO::NewL" );
CHarvesterAO* self = CHarvesterAO::NewLC();
CleanupStack::Pop( self );
@@ -131,6 +138,7 @@
CHarvesterAO::CHarvesterAO() : CActive( KHarvesterPriorityHarvestingPlugin )
{
WRITELOG( "CHarvesterAO::CHarvesterAO() - begin" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_CHARVESTERAO, "CHarvesterAO::CHarvesterAO" );
iServerPaused = ETrue;
iNextRequest = ERequestIdle;
@@ -155,6 +163,7 @@
CHarvesterAO::~CHarvesterAO()
{
WRITELOG( "CHarvesterAO::~CHarvesterAO()" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_CHARVESTERAO, "CHarvesterAO::~CHarvesterAO" );
Cancel();
@@ -246,7 +255,8 @@
void CHarvesterAO::ConstructL()
{
WRITELOG( "CHarvesterAO::ConstructL() - begin" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_CONSTRUCTL, "CHarvesterAO::ConstructL - begin" );
+
CActiveScheduler::Add( this );
User::LeaveIfError( iFs.Connect() );
@@ -323,7 +333,9 @@
TFileName mmcSoundPath( mmcRoot );
mmcSoundPath.Append( sounds );
iMmcSoundsPath = mmcSoundPath.Right( mmcSoundPath.Length() - 1 ).AllocL();
-
+
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_CONSTRUCTL, "CHarvesterAO::ConstructL - end" );
+
WRITELOG( "CHarvesterAO::ConstructL() - end" );
}
@@ -334,6 +346,7 @@
void CHarvesterAO::LoadMonitorPluginsL()
{
WRITELOG( "CHarvesterAO::LoadMonitorPluginsL()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_LOADMONITORPLUGINSL, "CHarvesterAO::LoadMonitorPluginsL" );
RImplInfoPtrArray infoArray;
@@ -364,6 +377,8 @@
else
{
WRITELOG( "CHarvesterAO::LoadMonitorPlugins() - Failed to load a monitor plugin!" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_LOADMONITORPLUGINSL, "CHarvesterAO::LoadMonitorPluginsL - Failed to load a monitor plugin!" );
+
delete plugin;
plugin = NULL;
}
@@ -379,9 +394,11 @@
void CHarvesterAO::DeleteMonitorPlugins()
{
WRITELOG( "CHarvesterAO::DeleteMonitorPlugins()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_DELETEMONITORPLUGINS, "CHarvesterAO::DeleteMonitorPlugins" );
iMonitorPluginArray.ResetAndDestroy();
iMonitorPluginArray.Close();
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_DELETEMONITORPLUGINS, "CHarvesterAO::DeleteMonitorPlugins - end" );
WRITELOG( "CHarvesterAO::DeleteMonitorPlugins() - end" );
}
@@ -392,7 +409,8 @@
void CHarvesterAO::StartMonitoring()
{
WRITELOG( "CHarvesterAO::StartMonitoring()" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_STARTMONITORING, "CHarvesterAO::StartMonitoring" );
+
const TInt count( iMonitorPluginArray.Count() );
for ( TInt i = 0; i < count; i++ )
@@ -409,6 +427,8 @@
void CHarvesterAO::StopMonitoring()
{
WRITELOG( "CHarvesterAO::StopMonitoring()" );
+
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_STOPMONITORING, "CHarvesterAO::StopMonitoring" );
const TInt count( iMonitorPluginArray.Count() );
@@ -425,12 +445,15 @@
void CHarvesterAO::PauseMonitoring()
{
WRITELOG( "CHarvesterAO::PauseMonitoring()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_PAUSEMONITORING, "CHarvesterAO::PauseMonitoring" );
+
const TInt count( iMonitorPluginArray.Count() );
for ( TInt i = 0; i<count; i++ )
{
iMonitorPluginArray[i]->PauseMonitoring();
}
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_PAUSEMONITORING, "CHarvesterAO::PauseMonitoring - end" );
WRITELOG( "CHarvesterAO::PauseMonitoring() - end" );
}
@@ -441,6 +464,7 @@
void CHarvesterAO::ResumeMonitoring()
{
WRITELOG( "CHarvesterAO::ResumeMonitoring()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_RESUMEMONITORING, "CHarvesterAO::ResumeMonitoring" );
const TInt count( iMonitorPluginArray.Count() );
@@ -459,6 +483,7 @@
void CHarvesterAO::HandleUnmount( TUint32 aMediaId )
{
WRITELOG1( "CHarvesterAO::HandleUnmount(%d)", aMediaId );
+ OstTrace1( TRACE_NORMAL, CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount;aMediaId=%d", aMediaId );
iUnmountDetected = ETrue;
@@ -477,6 +502,8 @@
#ifdef _DEBUG
WRITELOG1( "CHarvesterAO::HandleUnmount() iReadyPHArray.Count() = %d", iReadyPHArray.Count() );
+ OstTrace1( TRACE_NORMAL, DUP1_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount;iReadyPHArray.Count()=%d", iReadyPHArray.Count() );
+
#endif
TInt arrayCount( iReadyPHArray.Count() );
if( arrayCount > 0 )
@@ -489,6 +516,8 @@
if( err == KErrNone && mediaId == aMediaId )
{
WRITELOG1( "CHarvesterAO::HandleUnmount() remove iReadyPHArray %d", i);
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iReadyPHArray %d", i );
+
delete hd;
hd = NULL;
iReadyPHArray.Remove( i );
@@ -501,6 +530,8 @@
iReadyPHArray.Compress();
}
WRITELOG1( "CHarvesterAO::HandleUnmount() DecreaseItemCountL iReadyPHArray %d", removed);
+ OstTrace1( TRACE_NORMAL, DUP3_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount DecreaseItemCountL iReadyPHArray %d", removed );
+
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypePlaceholder, removed) );
}
@@ -508,6 +539,8 @@
#ifdef _DEBUG
WRITELOG1( "CHarvesterAO::HandleUnmount() iPHArray.Count() = %d", iPHArray.Count() );
+ OstTrace1( TRACE_NORMAL, DUP4_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount iPHArray.Count()=%d", iPHArray.Count() );
+
#endif
arrayCount = iPHArray.Count();
if( arrayCount > 0 )
@@ -520,6 +553,8 @@
if( err == KErrNone && mediaId == aMediaId )
{
WRITELOG1( "CHarvesterAO::HandleUnmount() remove iPHArray %d", i);
+ OstTrace1( TRACE_NORMAL, DUP5_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iPHArray %d", i );
+
delete hd;
hd = NULL;
iPHArray.Remove( i );
@@ -532,6 +567,7 @@
iPHArray.Compress();
}
WRITELOG1( "CHarvesterAO::HandleUnmount() DecreaseItemCountL iPHArray %d", removed);
+ OstTrace1( TRACE_NORMAL, DUP6_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount DecreaseItemCountL iPHArray %d", removed );
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypePlaceholder, removed) );
}
@@ -539,6 +575,8 @@
#ifdef _DEBUG
WRITELOG1( "CHarvesterAO::HandleUnmount() iContainerPHArray.Count() = %d", iContainerPHArray.Count() );
+ OstTrace1( TRACE_NORMAL, DUP7_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount iContainerPHArray.Count()=%d", iContainerPHArray.Count() );
+
#endif
arrayCount = iContainerPHArray.Count();
if( arrayCount > 0 )
@@ -551,6 +589,8 @@
if( err == KErrNone && mediaId == aMediaId )
{
WRITELOG1( "CHarvesterAO::HandleUnmount() remove iContainerPHArray %d", i);
+ OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iContainerPHArray %d", i );
+
delete hd;
hd = NULL;
iContainerPHArray.Remove( i );
@@ -601,11 +641,16 @@
const TUint count = iQueue->ItemsInQueue();
WRITELOG1( "CHarvesterAO::HandleUnmount() iQueue.Count() = %d", count );
+ OstTrace1( TRACE_NORMAL, DUP10_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount iQueue.Count() = %d", count );
+
if( count > 0 )
{
WRITELOG( "CHarvesterAO::HandleUnmount() remove iQueue" );
+ OstTrace0( TRACE_NORMAL, DUP11_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iQueue" );
removed = iQueue->RemoveItems( aMediaId );
WRITELOG1( "CHarvesterAO::HandleUnmount() removed iQueue = %d", removed );
+ OstTrace1( TRACE_NORMAL, DUP12_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount removed iQueue = %d", removed );
+
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypePlaceholder, removed ) );
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, removed ) );
}
@@ -650,6 +695,8 @@
if( removed )
{
WRITELOG1( "CHarvesterAO::HandleUnmount() remove from plugins = %d", removed);
+ OstTrace1( TRACE_NORMAL, DUP13_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove from plugins = %d", removed );
+
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypePlaceholder, removed ) );
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, removed ) );
}
@@ -673,7 +720,8 @@
void CHarvesterAO::StartComposersL()
{
WRITELOG( "CHarvesterAO::StartComposersL()" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_STARTCOMPOSERSL, "CHarvesterAO::StartComposersL" );
+
RImplInfoPtrArray infoArray;
TCleanupItem cleanupItem( MdsUtils::CleanupEComArray, &infoArray );
CleanupStack::PushL( cleanupItem );
@@ -707,6 +755,7 @@
void CHarvesterAO::StopComposers()
{
WRITELOG( "CHarvesterAO::StopComposers()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_STOPCOMPOSERS, "CHarvesterAO::StopComposers" );
const TInt count( iComposerPluginArray.Count() );
for ( TInt i = count; --i >= 0; )
@@ -724,6 +773,7 @@
void CHarvesterAO::DeleteComposers()
{
WRITELOG( "CHarvesterAO::DeleteComposers()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_DELETECOMPOSERS, "CHarvesterAO::DeleteComposers" );
iComposerPluginArray.ResetAndDestroy();
iComposerPluginArray.Close();
@@ -738,6 +788,7 @@
TBool CHarvesterAO::IsComposingReady()
{
WRITELOG( "CHarvesterAO::IsComposingReady()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_ISCOMPOSINGREADY, "CHarvesterAO::IsComposingReady" );
const TInt count( iComposerPluginArray.Count() );
for ( TInt i = count; --i >= 0; )
@@ -759,6 +810,7 @@
void CHarvesterAO::ReadItemFromQueueL()
{
WRITELOG( "CHarvesterAO::ReadItemFromQueueL()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_READITEMFROMQUEUEL, "CHarvesterAO::ReadItemFromQueueL" );
CHarvesterData* hd = iQueue->GetNextItem();
@@ -873,6 +925,7 @@
void CHarvesterAO::HandlePlaceholdersL( TBool aCheck )
{
WRITELOG( "CHarvesterAO::HandlePlaceholdersL()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_HANDLEPLACEHOLDERSL, "CHarvesterAO::HandlePlaceholdersL" );
RPointerArray<CMdEObject> mdeObjectArray;
CleanupClosePushL( mdeObjectArray );
@@ -974,6 +1027,8 @@
if ( err != KErrNone )
{
WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - cannot create placeholder data object for camera. file does not exists" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HANDLEPLACEHOLDERSL, "CHarvesterAO::HandlePlaceholdersL- cannot create placeholder data object for camera. file does not exists" );
+
// notify observer
HarvestCompleted( hd->ClientId(), hd->Uri(), err );
delete hd;
@@ -1002,6 +1057,8 @@
if( !phData )
{
WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - Placeholder data object NULL - abort" );
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLEPLACEHOLDERSL, "CHarvesterAO::HandlePlaceholdersL - Placeholder data object NULL - abort" );
+
const TInt error( KErrUnknown );
// notify observer
HarvestCompleted( hd->ClientId(), hd->Uri(), error );
@@ -1088,6 +1145,8 @@
if( isPreinstalled == MdeConstants::MediaObject::EPreinstalled )
{
WRITELOG("CHarvesterAO::HandlePlaceholdersL() - preinstalled");
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_HANDLEPLACEHOLDERSL, "CHarvesterAO::HandlePlaceholdersL - preinstalled" );
+
mdeObject->AddInt32PropertyL( *iPropDefs->iPreinstalledPropertyDef, isPreinstalled );
}
@@ -1193,6 +1252,8 @@
if( objDefStr.Length() == 0 )
{
WRITELOG( "CHarvesterAO::CheckFileExtensionAndHarvestL() - cannot get object definition" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - cannot get object definition" );
+
isError = ETrue;
}
else if( objDefStr == KInUse )
@@ -1221,21 +1282,29 @@
else
{
WRITELOG( "CHarvesterAO::CheckFileExtensionAndHarvestL() - getting mdeobject" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - getting mdeobject" );
+
TRAP( mdeError, mdeObject = iMdeObjectHandler->GetMetadataObjectL( *aHD, objDefStr ) );
}
TInt harvesterError = KErrNone;
if( mdeError != KErrNone)
{
WRITELOG1( "CHarvesterAO::CheckFileExtensionAndHarvestL() - cannot get mde object. error: %d", mdeError );
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - cannot get mde object. error: %d", mdeError );
+
MdsUtils::ConvertTrapError( mdeError, harvesterError );
if( harvesterError == KMdEErrHarvestingFailedPermanent )
{
WRITELOG( "CHarvesterAO::CheckFileExtensionAndHarvestL() - permanent fail" );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - permanent fail" );
+
isError = ETrue;
}
else if ( harvesterError == KMdEErrHarvestingFailed )
{
WRITELOG( "CHarvesterAO::CheckFileExtensionAndHarvestL() - KMdEErrHarvestingFailed");
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - KMdEErrHarvestingFailed" );
+
aHD->SetErrorCode( KMdEErrHarvestingFailed );
HarvestingCompleted( aHD );
return;
@@ -1245,6 +1314,8 @@
if( !mdeObject )
{
WRITELOG( "CHarvesterAO::CheckFileExtensionAndHarvestL() - mde object is null. stop harvesting" );
+ OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - mde object is null. stop harvesting" );
+
isError = ETrue;
}
}
@@ -1284,9 +1355,13 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::CheckFileExtensionAndHarvestL() - plugin error: %d", err );
+ OstTrace1( TRACE_NORMAL, DUP6_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - plugin error: %d", err );
+
if ( err == KErrInUse )
{
WRITELOG( "CHarvesterAO::CheckFileExtensionAndHarvestL() - item in use" );
+ OstTrace0( TRACE_NORMAL, DUP7_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL - item in use" );
+
aHD->SetErrorCode( KMdEErrHarvestingFailed );
HarvestingCompleted( aHD );
return;
@@ -1305,6 +1380,8 @@
}
WRITELOG1("CHarvesterAO::CheckFileExtensionAndHarvestL() - ends with error %d", pluginErr );
+ OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL) - ends with error %d", pluginErr );
+
SetNextRequest( ERequestHarvest );
}
@@ -1315,7 +1392,8 @@
void CHarvesterAO::HarvestingCompleted( CHarvesterData* aHD )
{
WRITELOG( "CHarvesterAO::HarvestingCompleted()" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted" );
+
if ( aHD->ErrorCode() == KErrNone )
{
iReHarvester->CheckItem( *aHD );
@@ -1324,6 +1402,8 @@
if( !aHD->TakeSnapshot() )
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() origin is not camera or clf" );
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted origin is not camera or clf" );
+
aHD->MdeObject().SetPlaceholder( EFalse );
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypePlaceholder ) );
TRAP( mdeError, iMdeObjectHandler->SetMetadataObjectL( *aHD ) );
@@ -1334,6 +1414,8 @@
WRITELOG( "==============================ERROR===============================" );
WRITELOG( "CHarvesterAO::HarvestingCompleted() - cannot set metadata object" );
WRITELOG( "==============================ERROR done =========================" );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - cannot set metadata object" );
+
delete aHD;
aHD = NULL;
@@ -1342,9 +1424,13 @@
else
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() mdeError == KErrNone" );
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted mdeError == KErrNone" );
+
if ( aHD->TakeSnapshot() && iCtxEngine )
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() - Taking a context snapshot." );
+ OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - Taking a context snapshot." );
+
iCtxEngine->ContextSnapshot( *this, *aHD );
}
else
@@ -1353,6 +1439,8 @@
if( locData )
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() - Creating location object. " );
+ OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - Creating location object." );
+
RLocationObjectManipulator lo;
const TInt loError = lo.Connect();
@@ -1363,11 +1451,14 @@
if( err != KErrNone )
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() - Location object creation failed!!!" );
+ OstTrace0( TRACE_NORMAL, DUP7_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - Location object creation failed!!!" );
+
}
}
else
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() - LocationObjectManipulator connect failed!!!" );
+ OstTrace0( TRACE_NORMAL, DUP8_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - LocationObjectManipulator connect failed!!" );
}
lo.Close();
@@ -1385,6 +1476,8 @@
#ifdef _DEBUG
WRITELOG( "==============================ERROR===============================" );
WRITELOG1( "CHarvesterAO::HarvestingCompleted() - not OK! Error: %d", aHD->ErrorCode() );
+ OstTrace1( TRACE_NORMAL, DUP9_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - not OK! Error: %d", aHD->ErrorCode() );
+
#endif
const TInt errorCode( aHD->ErrorCode() );
@@ -1392,6 +1485,7 @@
{
#ifdef _DEBUG
WRITELOG1("CHarvesterAO::HarvestingCompleted() - KMdEErrHarvestingFailed - %S - reharvesting", &aHD->Uri() );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - KMdEErrHarvestingFailed - reharvesting" );
#endif
iReHarvester->AddItem( aHD );
}
@@ -1399,7 +1493,7 @@
errorCode == KMdEErrHarvestingFailedUnknown )
{
WRITELOG( "CHarvesterAO::HarvestingCompleted() - KMdEErrHarvestingFailedPermanent - no need to re-harvest!" );
-
+ OstTrace0( TRACE_NORMAL, DUP10_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - KMdEErrHarvestingFailedPermanent - no need to re-harvest!" );
TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ) );
delete aHD;
@@ -1408,11 +1502,15 @@
else
{
WRITELOG1( "CHarvesterAO::HarvestingCompleted() - unknown error: %d", errorCode );
+ OstTrace1( TRACE_NORMAL, DUP11_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - unknown error: %d", errorCode );
+
delete aHD;
aHD = NULL;
}
WRITELOG( "==============================ERROR done =========================" );
+ OstTrace0( TRACE_NORMAL, DUP12_CHARVESTERAO_HARVESTINGCOMPLETED, "==============================ERROR done =========================" );
+
}
SetNextRequest( ERequestHarvest );
@@ -1425,7 +1523,8 @@
void CHarvesterAO::HandleSessionOpened( CMdESession& aSession, TInt aError )
{
WRITELOG( "HarvesterThread::HandleSessionOpened()" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened" );
+
if ( KErrNone == aError )
{
TBool isTNMDaemonEnabled( EFalse );
@@ -1444,6 +1543,7 @@
else
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - error creating mde harvester session" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened) - error creating mde harvester session" );
}
// Setting up context Engine (initialization is ready when ContextInitializationStatus -callback is called)
@@ -1451,6 +1551,7 @@
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - Context Engine creation failed" );
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - Context Engine creation failed" );
}
#ifdef _DEBUG
@@ -1458,6 +1559,7 @@
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - ObjectHandler creation failed" );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - ObjectHandler creation failed" );
}
// Setting up monitor plugins
@@ -1465,6 +1567,7 @@
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - error loading monitor plugins" );
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - error loading monitor plugins" );
}
// To check if the default namespace structure is in order
@@ -1472,12 +1575,15 @@
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - error loading default schema" );
+ OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - error loading default schema" );
}
TRAP( errorTrap, StartComposersL() );
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - couldn't start composer plugins" );
+ OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - couldn't start composer plugins" );
+
}
#else
// The idea here is that all of these methods needs to be called,
@@ -1495,6 +1601,7 @@
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - couldn't start diskspace observer" );
+ OstTrace0( TRACE_NORMAL, DUP7_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - couldn't start diskspace observer" );
}
TRAP( errorTrap, iOnDemandAO = COnDemandAO::NewL( *iMdESession, *iQueue,
@@ -1505,11 +1612,13 @@
if ( errorTrap != KErrNone )
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - couldn't start on demand observer" );
+ OstTrace0( TRACE_NORMAL, DUP8_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - couldn't start on demand observer" );
}
}
else
{
WRITELOG( "CHarvesterAO::HandleSessionOpened() - couldn't create on demand observer" );
+ OstTrace0( TRACE_NORMAL, DUP9_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - couldn't create on demand observer" );
}
// Initializing pause indicator
@@ -1517,7 +1626,8 @@
#ifdef _DEBUG
WRITELOG( "HarvesterThread::HandleSessionOpened() - Succeeded!" );
-
+ OstTrace0( TRACE_NORMAL, DUP10_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - Succeeded!" );
+
TBool isRomScanEnabled( EFalse );
TRAP_IGNORE( CHarvesterCenRepUtil::IsRomScanEnabledL( isRomScanEnabled ) );
@@ -1527,6 +1637,7 @@
if( errorTrap != KErrNone )
{
WRITELOG1( "CHarvesterAO::HandleSessionOpened() - BootRomScanL() returned error: %d", errorTrap );
+ OstTrace1( TRACE_NORMAL, DUP11_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - BootRomScanL() returned error: %d", errorTrap );
}
}
@@ -1534,6 +1645,7 @@
if( errorTrap != KErrNone )
{
WRITELOG1( "CHarvesterAO::HandleSessionOpened() - BootPartialRestoreScanL() returned error: %d", errorTrap );
+ OstTrace1( TRACE_NORMAL, DUP12_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - BootPartialRestoreScanL() returned error: %d", errorTrap );
}
#else
// The idea here is that all of these three methods needs to be called,
@@ -1574,6 +1686,7 @@
{
iServerPaused = ETrue;
WRITELOG1( "HarvesterThread::HandleSessionOpened() - Failed: %d!", aError );
+ OstTrace1( TRACE_NORMAL, DUP13_CHARVESTERAO_HANDLESESSIONOPENED, "CHarvesterAO::HandleSessionOpened - Failed: %d!", aError );
}
}
@@ -1585,7 +1698,8 @@
{
if ( KErrNone != aError )
{
- WRITELOG1( "HarvesterThread::HandleSessionError() - Error: %d!", aError );
+ WRITELOG1( "HarvesterThread::HandleSessionError() - Error: %d!", aError );
+ OstTrace1( TRACE_NORMAL, CHARVESTERAO_HANDLESESSIONERROR, "CHarvesterAO::HandleSessionError - Error: %d!", aError );
}
}
@@ -1596,10 +1710,13 @@
void CHarvesterAO::ContextInitializationStatus( TInt aErrorCode )
{
WRITELOG( "CHarvesterAO::ContextInitializationStatus()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS, "CHarvesterAO::ContextInitializationStatus" );
if ( KErrNone == aErrorCode )
{
WRITELOG( "HarvesterThread::ContextInitializationStatus() - Succeeded!" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS, "CHarvesterAO::ContextInitializationStatus - Succeeded!" );
+
iContextEngineInitialized = ETrue;
if ( iMdeSessionInitialized )
{
@@ -1609,6 +1726,8 @@
else
{
WRITELOG1( "HarvesterThread::ContextInitializationStatus() - Failed: %d!", aErrorCode );
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS, "CHarvesterAO::ContextInitializationStatus - Failed: %d!", aErrorCode );
+
}
}
@@ -1619,6 +1738,7 @@
TInt CHarvesterAO::PauseHarvester()
{
WRITELOG( "CHarvesterAO::PauseHarvester()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_PAUSEHARVESTER, "CHarvesterAO::PauseHarvester" );
iHarvesterPluginFactory->PauseHarvester( ETrue );
iServerPaused = ETrue;
@@ -1630,7 +1750,8 @@
// Everything is paused
WRITELOG( "CHarvesterAO::PauseHarvester() - Moving paused state paused" );
-
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_PAUSEHARVESTER, "CHarvesterAO::PauseHarvester - Moving paused state paused" );
+
return KErrNone;
}
@@ -1641,6 +1762,7 @@
void CHarvesterAO::ResumeHarvesterL()
{
WRITELOG( "CHarvesterAO::ResumeHarvesterL()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_RESUMEHARVESTERL, "CHarvesterAO::ResumeHarvesterL" );
iHarvesterPluginFactory->PauseHarvester( EFalse );
iServerPaused = EFalse;
@@ -1661,6 +1783,8 @@
void CHarvesterAO::RunL()
{
WRITELOG( "CHarvesterAO::RunL" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_RUNL, "CHarvesterAO::RunL" );
+
// check if pause is requested
if ( this->iServerPaused && iNextRequest != ERequestPause && iNextRequest != ERequestResume)
{
@@ -1679,6 +1803,8 @@
case ERequestIdle:
{
WRITELOG( "CHarvesterAO::RunL - ERequestIdle" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestIdle" );
+
iReadyPHArray.Compress();
iContainerPHArray.Compress();
iPHArray.Compress();
@@ -1690,6 +1816,7 @@
case ERequestHarvest:
{
WRITELOG( "CHarvesterAO::RunL - ERequestHarvest" );
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestHarvest" );
// harvest new items first...
if ( iQueue->ItemsInQueue() > 0 )
@@ -1735,6 +1862,7 @@
{
#ifdef _DEBUG
WRITELOG1("CHarvesterAO::RunL - items in ready pharray: %d", arrayCount );
+ OstTrace1( TRACE_NORMAL, DUP3_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - items in ready pharray: %d", arrayCount );
#endif
TInt endIndex( KPlaceholderQueueSize );
if( arrayCount < KPlaceholderQueueSize )
@@ -1770,7 +1898,9 @@
{
#ifdef _DEBUG
WRITELOG( "CHarvesterAO::RunL - ERequestContainerPlaceholder" );
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestContainerPlaceholder" );
WRITELOG1( "CHarvesterAO::RunL - Items in container pharray: %d", iContainerPHArray.Count() );
+ OstTrace1( TRACE_NORMAL, DUP5_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - Items in container pharray: %d", iContainerPHArray.Count() );
#endif
TInt count = iContainerPHArray.Count() > KContainerPlaceholderQueueSize ? KContainerPlaceholderQueueSize : iContainerPHArray.Count();
TInt i = 0;
@@ -1799,6 +1929,7 @@
case ERequestPause:
{
WRITELOG( "CHarvesterAO::RunL - ERequestPause" );
+ OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestPause" );
User::LeaveIfError( PauseHarvester() );
iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStatePaused );
if( iHarvesterStatusObserver )
@@ -1812,6 +1943,7 @@
case ERequestResume:
{
WRITELOG( "CHarvesterAO::RunL - ERequestResume" );
+ OstTrace0( TRACE_NORMAL, DUP7_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestResume" );
ResumeHarvesterL();
iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateResumed );
if( iHarvesterStatusObserver )
@@ -1825,6 +1957,7 @@
default:
{
WRITELOG( "CHarvesterAO::RunL - Not supported request" );
+ OstTrace0( TRACE_NORMAL, DUP8_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - Not supported request" );
User::Leave( KErrNotSupported );
}
break;
@@ -1838,6 +1971,7 @@
void CHarvesterAO::DoCancel()
{
WRITELOG( "CHarvesterAO::DoCancel()" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_DOCANCEL, "CHarvesterAO::DoCancel" );
}
// ---------------------------------------------------------------------------
@@ -1847,17 +1981,22 @@
TInt CHarvesterAO::RunError( TInt aError )
{
WRITELOG( "CHarvesterAO::RunError" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError" );
+
switch( iNextRequest )
{
case ERequestHarvest:
{
WRITELOG( "CHarvesterAO::RunError - state ERequestHarvest" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError - state ERequestHarvest" );
}
break;
case ERequestPause:
{
WRITELOG( "CHarvesterAO::RunError - state ERequestPause" );
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError - state ERequestPause" );
+
if ( aError == KErrNotReady )
{
SetNextRequest( ERequestPause );
@@ -1872,6 +2011,8 @@
case ERequestResume:
{
WRITELOG( "CHarvesterAO::RunError - state ERequestResume" );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError - state ERequestResume" );
+
if( iHarvesterStatusObserver )
{
iHarvesterStatusObserver->ResumeReady( aError );
@@ -1882,6 +2023,7 @@
default:
{
WRITELOG( "CHarvesterAO::RunError - unknown state" );
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError - unknown state" );
}
break;
}
@@ -1896,6 +2038,8 @@
void CHarvesterAO::SetNextRequest( TRequest aRequest )
{
WRITELOG( "CHarvesterAO::SetNextRequest" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_SETNEXTREQUEST, "CHarvesterAO::SetNextRequest" );
+
iNextRequest = aRequest;
if ( !IsActive() )
@@ -1914,6 +2058,8 @@
TBool CHarvesterAO::IsServerPaused()
{
WRITELOG( "CHarvesterAO::IsServerPaused" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_ISSERVERPAUSED, "CHarvesterAO::IsServerPaused" );
+
return iServerPaused;
}
@@ -1927,6 +2073,8 @@
{
// close blacklist database connection
WRITELOG( "CHarvesterAO::BackupRestoreStart" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_BACKUPRESTORESTART, "CHarvesterAO::BackupRestoreStart" );
+
iBlacklist->CloseDatabase();
}
@@ -1940,6 +2088,8 @@
{
// restart blacklist database connection
WRITELOG( "CHarvesterAO::BackupRestoreReady" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_BACKUPRESTOREREADY, "CHarvesterAO::BackupRestoreReady" );
+
iBlacklist->OpenDatabase();
}
@@ -1951,14 +2101,18 @@
void CHarvesterAO::HandleDiskSpaceNotificationL( TDiskSpaceDirection aDiskSpaceDirection )
{
WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL()");
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL" );
+
if( MMdSHarvesterDiskSpaceObserver::EMore == aDiskSpaceDirection )
{
WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL() - disk full");
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL - disk full" );
iDiskFull = EFalse;
}
else
{
WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL() - disk space available");
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL - disk space available" );
iDiskFull = ETrue;
if( iServerPaused )
{
@@ -1987,6 +2141,8 @@
void CHarvesterAO::HarvestFile( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::HarvestFile" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile" );
+
const TInt KParamUri = 0;
const TInt KParamAlbumIds = 1;
const TInt KParamAddLocation = 2;
@@ -1997,6 +2153,8 @@
if ( ! uri )
{
WRITELOG( "CHarvesterAO::HarvestFile - out of memory creating uri container" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - out of memory creating uri container" );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrNoMemory );
@@ -2009,6 +2167,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFile - error in reading aMessage (uri): %d", err );
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - error in reading aMessage (uri): %d", err );
+
if (!aMessage.IsNull())
{
aMessage.Complete( err );
@@ -2028,6 +2188,8 @@
if ( !albumIdBuf )
{
WRITELOG( "CHarvesterAO::HarvestFile - error creating album id buffer." );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - error creating album id buffer." );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrNoMemory );
@@ -2041,6 +2203,7 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFile - error in reading aMessage (albumIds): %d", err );
+ OstTrace1( TRACE_NORMAL, DUP4_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - error in reading aMessage (albumIds): %d", err );
delete albumIdBuf;
albumIdBuf = NULL;
delete uri;
@@ -2056,6 +2219,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFile - error in reading album id array: %d", err );
+ OstTrace1( TRACE_NORMAL, DUP5_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - error in reading album id array: %d", err );
+
delete albumIdBuf;
albumIdBuf = NULL;
delete uri;
@@ -2079,6 +2244,8 @@
albumIdBuf = NULL;
WRITELOG1( "CHarvesterAO::HarvestFile - album id count: %d", albumIds.Count() );
+ OstTrace1( TRACE_NORMAL, DUP6_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - album id count: %d", albumIds.Count() );
+
}
TBool addLocation;
@@ -2087,6 +2254,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFile - error in reading aMessage (addLocation): %d", err );
+ OstTrace1( TRACE_NORMAL, DUP7_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - error in reading aMessage (addLocation): %d", err );
+
delete uri;
uri = NULL;
if (!aMessage.IsNull())
@@ -2097,12 +2266,16 @@
}
WRITELOG1( "RHarvesterClient::HarvestFile - add location: %d", addLocation );
+ OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - add location: %d", addLocation );
+
CHarvesterData* hd = NULL;
TRAP( err, hd = CHarvesterData::NewL( uri ) );
if ( err != KErrNone || !hd )
{
WRITELOG( "CHarvesterAO::HarvestFile - creating harvUri failed" );
+ OstTrace0( TRACE_NORMAL, DUP9_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - creating harvUri failed" );
+
albumIds.Close();
delete uri;
uri = NULL;
@@ -2129,6 +2302,7 @@
else
{
WRITELOG( "CHarvesterAO::HarvestFile - creating clientData failed" );
+ OstTrace0( TRACE_NORMAL, DUP10_CHARVESTERAO_HARVESTFILE, "CHarvesterAO::HarvestFile - creating clientData failed" );
}
if( iQueue )
@@ -2164,6 +2338,8 @@
void CHarvesterAO::HarvestFileWithUID( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::HarvestFileWithUID" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID" );
+
const TInt KParamUri = 0;
const TInt KParamAlbumIds = 1;
const TInt KParamAddLocation = 2;
@@ -2174,6 +2350,8 @@
if ( ! uri )
{
WRITELOG( "CHarvesterAO::HarvestFileWithUID - out of memory creating uri container" );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - out of memory creating uri container" );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrNoMemory );
@@ -2186,6 +2364,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFileWithUID - error in reading aMessage (uri): %d", err );
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - error in reading aMessage (uri): %d", err );
+
if (!aMessage.IsNull())
{
aMessage.Complete( err );
@@ -2205,6 +2385,8 @@
if ( !albumIdBuf )
{
WRITELOG( "CHarvesterAO::HarvestFileWithUID - error creating album id buffer." );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - error creating album id buffer." );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrNoMemory );
@@ -2218,6 +2400,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFileWithUID - error in reading aMessage (albumIds): %d", err );
+ OstTrace1( TRACE_NORMAL, DUP4_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - error in reading aMessage (albumIds): %d", err );
+
delete albumIdBuf;
albumIdBuf = NULL;
delete uri;
@@ -2233,6 +2417,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFileWithUID - error in reading album id array: %d", err );
+ OstTrace1( TRACE_NORMAL, DUP5_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - error in reading album id array: %d", err );
+
delete albumIdBuf;
albumIdBuf = NULL;
delete uri;
@@ -2257,6 +2443,7 @@
#ifdef _DEBUG
WRITELOG1( "CHarvesterAO::HarvestFileWithUID - album id count: %d", albumIds.Count() );
+ OstTrace1( TRACE_NORMAL, DUP6_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - album id count: %d", albumIds.Count() );
#endif
}
@@ -2266,6 +2453,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::HarvestFileWithUID - error in reading aMessage (addLocation): %d", err );
+ OstTrace1( TRACE_NORMAL, DUP7_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - error in reading aMessage (addLocation): %d", err );
+
delete uri;
uri = NULL;
if (!aMessage.IsNull())
@@ -2276,12 +2465,16 @@
}
WRITELOG1( "RHarvesterClient::HarvestFileWithUID - add location: %d", addLocation );
+ OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - add location: %d", addLocation );
+
CHarvesterData* hd = NULL;
TRAP( err, hd = CHarvesterData::NewL( uri ) );
if ( err != KErrNone || !hd )
{
WRITELOG( "CHarvesterAO::HarvestFileWithUID - creating harvUri failed" );
+ OstTrace0( TRACE_NORMAL, DUP9_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - creating harvUri failed" );
+
albumIds.Close();
delete uri;
uri = NULL;
@@ -2308,6 +2501,7 @@
else
{
WRITELOG( "CHarvesterAO::HarvestFileWithUID - creating clientData failed" );
+ OstTrace0( TRACE_NORMAL, DUP10_CHARVESTERAO_HARVESTFILEWITHUID, "CHarvesterAO::HarvestFileWithUID - creating clientData failed" );
}
if( iQueue )
@@ -2341,10 +2535,13 @@
void CHarvesterAO::RegisterProcessOrigin( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::RegisterProcessOrigin" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_REGISTERPROCESSORIGIN, "CHarvesterAO::RegisterProcessOrigin" );
if ( !iProcessOriginMapper )
{
WRITELOG( "CHarvesterAO::RegisterProcessOrigin - mapper not available." );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_REGISTERPROCESSORIGIN, "CHarvesterAO::RegisterProcessOrigin - mapper not available." );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrNotSupported );
@@ -2357,6 +2554,8 @@
if ( MdsUtils::IsValidProcessId( processId ) )
{
WRITELOG1( "CHarvesterAO::RegisterProcessOrigin - error reading processId. Read: %d", processId.iUid );
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_REGISTERPROCESSORIGIN, "CHarvesterAO::RegisterProcessOrigin - error reading processId. Read: %d", processId.iUid );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrCorrupt );
@@ -2368,9 +2567,13 @@
TOrigin origin = STATIC_CAST( TOrigin, aMessage.Int1() );
WRITELOG1( "CHarvesterAO::RegisterProcessOrigin - origin: %d", origin );
+ OstTrace1( TRACE_NORMAL, DUP3_CHARVESTERAO_REGISTERPROCESSORIGIN, "CHarvesterAO::RegisterProcessOrigin - origin: %d", origin );
+
if ( origin < 0 )
{
WRITELOG( "CHarvesterAO::RegisterProcessOrigin - error reading origin from aMessage (negative)." );
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_REGISTERPROCESSORIGIN, "CHarvesterAO::RegisterProcessOrigin - error reading origin from aMessage (negative)." );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrCorrupt );
@@ -2382,6 +2585,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::RegisterProcessOrigin - error registering mapping: %d", err );
+ OstTrace1( TRACE_NORMAL, DUP5_CHARVESTERAO_REGISTERPROCESSORIGIN, "CHarvesterAO::RegisterProcessOrigin - error registering mapping: %d", err );
+
if (!aMessage.IsNull())
{
aMessage.Complete( err );
@@ -2401,10 +2606,13 @@
void CHarvesterAO::UnregisterProcessOrigin( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::UnregisterProcessOrigin" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_UNREGISTERPROCESSORIGIN, "CHarvesterAO::UnregisterProcessOrigin" );
+
if ( !iProcessOriginMapper )
{
WRITELOG( "CHarvesterAO::RegisterProcessOrigin - mapper not available." );
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_UNREGISTERPROCESSORIGIN, "CHarvesterAO::UnregisterProcessOrigin - mapper not available." );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrNotSupported );
@@ -2417,6 +2625,8 @@
if ( MdsUtils::IsValidProcessId( processId ) )
{
WRITELOG1( "CHarvesterAO::UnregisterProcessOrigin - error reading processId. Read: %d", processId.iUid );
+ OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_UNREGISTERPROCESSORIGIN, "CHarvesterAO::UnregisterProcessOrigin - error reading processId. Read: %d", processId.iUid );
+
if (!aMessage.IsNull())
{
aMessage.Complete( KErrCorrupt );
@@ -2428,6 +2638,8 @@
if ( err != KErrNone )
{
WRITELOG1( "CHarvesterAO::UnregisterProcessOrigin - error unregistering mapping: %d", err );
+ OstTrace1( TRACE_NORMAL, DUP3_CHARVESTERAO_UNREGISTERPROCESSORIGIN, "CHarvesterAO::UnregisterProcessOrigin - error unregistering mapping: %d", err );
+
if (!aMessage.IsNull())
{
aMessage.Complete( err );
@@ -2447,7 +2659,8 @@
TInt CHarvesterAO::RegisterHarvestComplete( const CHarvesterServerSession& aSession, const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::RegisterHarvestComplete" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_REGISTERHARVESTCOMPLETE, "CHarvesterAO::RegisterHarvestComplete" );
+
return iHarvestFileMessages.Append(
THarvestFileRequest( aSession, aMessage ) );
}
@@ -2459,6 +2672,7 @@
TInt CHarvesterAO::UnregisterHarvestComplete( const CHarvesterServerSession& aSession )
{
WRITELOG( "CHarvesterAO::UnregisterHarvestComplete" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_UNREGISTERHARVESTCOMPLETE, "CHarvesterAO::UnregisterHarvestComplete" );
TInt err( KErrNotFound );
if ( iHarvestFileMessages.Count() > 0 )
@@ -2502,6 +2716,7 @@
void CHarvesterAO::RegisterHarvesterEvent( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::RegisterHarvesterEvent" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_REGISTERHARVESTEREVENT, "CHarvesterAO::RegisterHarvesterEvent" );
TRAPD( err, iHarvesterEventManager->RegisterEventObserverL( aMessage ) );
aMessage.Complete( err );
@@ -2514,6 +2729,7 @@
void CHarvesterAO::UnregisterHarvesterEvent( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::UnregisterHarvesterEvent" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_UNREGISTERHARVESTEREVENT, "CHarvesterAO::UnregisterHarvesterEvent" );
const TInt err = iHarvesterEventManager->UnregisterEventObserver( aMessage );
aMessage.Complete( err );
@@ -2522,6 +2738,7 @@
void CHarvesterAO::GetLastObserverId( const RMessage2& aMessage )
{
WRITELOG( "CHarvesterAO::GetLastObserverId" );
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_GETLASTOBSERVERID, "CHarvesterAO::GetLastObserverId" );
TUint observerId = iHarvesterEventManager->GetLastClientId();
@@ -2537,24 +2754,29 @@
void CHarvesterAO::ContextSnapshotStatus( CHarvesterData* aHD )
{
WRITELOG( "CHarvesterAO::ContextSnapshotStatus()" );
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_CONTEXTSNAPSHOTSTATUS, "CHarvesterAO::ContextSnapshotStatus" );
+
HarvestCompleted( aHD->ClientId(), aHD->Uri(), aHD->ErrorCode() );
const TInt errorCode = aHD->ErrorCode();
if( errorCode != KErrNone && errorCode != KErrCompletion )
{
- WRITELOG1( "CHarvesterAO::ContextSnapshotStatus() - error occurred: %d", errorCode );
+ WRITELOG1( "CHarvesterAO::ContextSnapshotStatus() - error occurred: %d", errorCode );
+ OstTrace1( TRACE_NORMAL, DUP1_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS, "CHarvesterAO::ContextSnapshotStatus - error occurred: %d", errorCode );
}
else
{
if( errorCode == KErrCompletion )
{
WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - snapshot could not be completed" );
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS, "CHarvesterAO::ContextSnapshotStatus - snapshot could not be completed" );
WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - processing non-context data anyway" );
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS, "CHarvesterAO::ContextSnapshotStatus - processing non-context data anyway" );
}
else
{
WRITELOG( "CHarvesterAO::ContextSnapshotStatus() - successfully completed" );
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS, "CHarvesterAO::ContextSnapshotStatus - successfully completed" );
}
if( aHD->Origin() == MdeConstants::Object::ECamera )
{
@@ -2566,6 +2788,7 @@
WRITELOG( "==============================ERROR===============================" );
WRITELOG( "CHarvesterAO::HarvestingCompleted() - cannot set metadata object" );
WRITELOG( "==============================ERROR done =========================" );
+ OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS, "CHarvesterAO::ContextSnapshotStatus - cannot set metadata object" );
}
}
}
@@ -2598,6 +2821,8 @@
if ( aClientId == msg.Identity() )
{
WRITELOG1( "CHarvesterAO::HarvestingCompleted() - Completing Fast Harvest request! Error code: %d", aErr );
+ OstTrace1( TRACE_NORMAL, CHARVESTERAO_HARVESTCOMPLETED, "CHarvesterAO::HarvestCompleted - Completing Fast Harvest request! Error code: %d", aErr );
+
if (!msg.IsNull())
{
msg.Write( KParamUri, aUri );
@@ -2606,6 +2831,7 @@
else
{
WRITELOG("CHarvesterAO::HarvestingCompleted() NOT COMPLETING AS msg->iMessage->IsNull returns ETrue");
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HARVESTCOMPLETED, "CHarvesterAO::HarvestCompleted NOT COMPLETING AS msg->iMessage->IsNull returns ETrue" );
}
iHarvestFileMessages.Remove( i );
if( iHarvestFileMessages.Count() == 0 )
@@ -2620,6 +2846,7 @@
void CHarvesterAO::BootRomScanL()
{
WRITELOG("CHarvesterAO::BootRomScanL()");
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_BOOTROMSCANL, "CHarvesterAO::BootRomScanL" );
if( !iMdeSessionInitialized )
{
@@ -2666,7 +2893,8 @@
iMdEHarvesterSession->ChangeCDriveMediaId();
WRITELOG("CHarvesterAO::BootPartialRestoreScanL() - partial restore");
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_BOOTPARTIALRESTORESCANL, "CHarvesterAO::BootPartialRestoreScanL - partial restore" );
+
RPointerArray<TScanItem> scanItems;
TCleanupItem cleanupItem( MdsUtils::CleanupPtrArray<TScanItem>, &scanItems );
CleanupStack::PushL( cleanupItem );
@@ -2682,6 +2910,8 @@
BootScanL( scanItems, ignorePaths, EFalse );
WRITELOG("CHarvesterAO::BootPartialRestoreScanL() - iRestoreWatcher->UnregisterL()");
+ OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_BOOTPARTIALRESTORESCANL, "CHarvesterAO::BootPartialRestoreScanL - iRestoreWatcher->UnregisterL()" );
+
iRestoreWatcher->UnregisterL();
CleanupStack::PopAndDestroy( &ignorePaths );
@@ -2710,8 +2940,8 @@
TBool aCheckDrive )
{
WRITELOG("CHarvesterAO::BootScanL() - begin");
-
-
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - begin" );
+
TInt drive( -1 );
TInt massStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) );
if( massStorageError == KErrNone )
@@ -2740,6 +2970,7 @@
#ifdef _DEBUG
WRITELOG1("CHarvesterAO::BootScanL() - item count: %d", aScanItems.Count() );
+ OstTrace1( TRACE_NORMAL, DUP1_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - item count: %d", aScanItems.Count() );
#endif
RPointerArray<CHarvesterData> hdArray;
@@ -2808,6 +3039,7 @@
if( !IsDescInArray( path, aIgnorePaths ) )
{
WRITELOG("CHarvesterAO::BootScanL() - scanFolders.AppendL");
+ OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - scanFolders.AppendL" );
TScanItem* item = new (ELeave) TScanItem();
item->iPath = name->AllocL();
item->iPreinstalled = MdeConstants::MediaObject::ENotPreinstalled;
@@ -2824,6 +3056,7 @@
if( !IsDescInArray( filename, aIgnorePaths ) )
{
WRITELOG("CHarvesterAO::BootScanL() - check files");
+ OstTrace0( TRACE_NORMAL, DUP3_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - check files" );
RArray<TPtrC> uris;
RArray<TMdSFileInfo> fileInfos;
@@ -2888,6 +3121,8 @@
}
WRITELOG("CHarvesterAO::BootScanL() - iQueue->Append");
+ OstTrace0( TRACE_NORMAL, DUP4_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - iQueue->Append" );
+
iQueue->MonitorEvent( hdArray );
CleanupStack::PopAndDestroy( &hdArray );
@@ -2896,6 +3131,7 @@
iMassMemoryIdChecked = ETrue;
WRITELOG("CHarvesterAO::BootScanL() - end");
+ OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - end" );
}
void CHarvesterAO::SetHarvesterStatusObserver( MHarvesterStatusObserver* aObserver )
@@ -2973,6 +3209,8 @@
void CHarvesterAO::MemoryLow()
{
WRITELOG("CHarvesterAO::MemoryLow()");
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_MEMORYLOW, "CHarvesterAO::MemoryLow" );
+
iRamFull = ETrue;
if( iServerPaused )
@@ -2992,6 +3230,8 @@
void CHarvesterAO::MemoryGood()
{
WRITELOG("CHarvesterAO::MemoryGood()");
+ OstTrace0( TRACE_NORMAL, CHARVESTERAO_MEMORYGOOD, "CHarvesterAO::MemoryGood" );
+
iRamFull = EFalse;
if( !iDiskFull && !iManualPauseEnabled && iServerPaused )