--- a/harvester/client/src/harvesterclientao.cpp Tue Aug 31 15:37:30 2010 +0300
+++ b/harvester/client/src/harvesterclientao.cpp Wed Sep 01 12:24:24 2010 +0100
@@ -51,7 +51,7 @@
OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_CHARVESTERCLIENTAO, "CHarvesterClientAO::~CHarvesterClientAO" );
WRITELOG( "CHarvesterClientAO::~CHarvesterClientAO()" );
- CancelRequest();
+ Cancel();
}
// ---------------------------------------------------------------------------
@@ -60,10 +60,9 @@
// ---------------------------------------------------------------------------
//
CHarvesterClientAO::CHarvesterClientAO( RHarvesterClient& aHarvesterClient )
- : CActive( CActive::EPriorityUserInput ),
+ : CActive( CActive::EPriorityStandard ),
iObserver( NULL ),
- iHarvesterClient( aHarvesterClient ),
- iCancelled( EFalse )
+ iHarvesterClient( aHarvesterClient )
{
OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO, "CHarvesterClientAO::CHarvesterClientAO" );
@@ -101,14 +100,13 @@
void CHarvesterClientAO::RemoveObserver( MHarvestObserver* /*aObserver*/ )
{
WRITELOG( "CHarvesterClientAO::RemoveObserver()" );
- OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_REMOVEOBSERVER, "CHarvesterClientAO::RemoveObserver" );
if ( iObserver )
{
WRITELOG( "CHarvesterClientAO::RemoveObserver() - deleting observer" );
iObserver = NULL;
}
- CancelRequest();
+ Cancel();
}
// ---------------------------------------------------------------------------
@@ -120,7 +118,6 @@
WRITELOG( "CHarvesterClientAO::DoCancel()" );
OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_DOCANCEL, "CHarvesterClientAO::DoCancel" );
iHarvesterClient.UnregisterHarvestComplete();
- WRITELOG( "CHarvesterClientAO::DoCancel() - end" );
}
// ---------------------------------------------------------------------------
@@ -129,12 +126,9 @@
//
void CHarvesterClientAO::Active()
{
- WRITELOG( "CHarvesterClientAO::Active" );
if ( iObserver && !IsActive())
{
- WRITELOG( "CHarvesterClientAO::Active - calling RegisterHarvestComplete" );
iHarvesterClient.RegisterHarvestComplete(iURI, iStatus);
- iCancelled = EFalse;
SetActive();
}
}
@@ -163,12 +157,10 @@
}
// if the request was not canceled or server is not terminated, Activating AO again
- if ( status != KErrCancel && status != KErrServerTerminated && iObserver && !iCancelled )
+ if ( status != KErrCancel && status != KErrServerTerminated && iObserver )
{
- WRITELOG( "CHarvesterClientAO::RunL() - not cancelled or terminated, calling Active" );
Active();
}
- WRITELOG( "CHarvesterClientAO::RunL() - end" );
}
// ---------------------------------------------------------------------------
@@ -185,24 +177,3 @@
return KErrNone;
}
-
-// ---------------------------------------------------------------------------
-// Active
-// ---------------------------------------------------------------------------
-//
-void CHarvesterClientAO::CancelRequest()
- {
- WRITELOG( "CHarvesterClientAO::CancelRequest" );
- if( !iCancelled )
- {
- WRITELOG( "CHarvesterClientAO::CancelRequest - not cancelled, calling Cancel" );
- iCancelled = ETrue;
- Cancel();
- }
- if( !IsActive() )
- {
- WRITELOG( "CHarvesterClientAO::CancelRequest - setting priority to High" );
- SetPriority( CActive::EPriorityHigh );
- }
- }
-