--- a/calendarui/controller/src/calenstatemachine.cpp Fri Jul 02 19:56:46 2010 +0530
+++ b/calendarui/controller/src/calenstatemachine.cpp Mon Jul 12 02:32:28 2010 +0530
@@ -32,6 +32,10 @@
#include "calensendingstate.h"
#include "calensettingsstate.h"
#include "calenviewingstate.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "calenstatemachineTraces.h"
+#endif
const TInt KHashLength = 64;
@@ -43,14 +47,14 @@
//
CCalenStateMachine* CCalenStateMachine::NewL( CCalenController& aController )
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_NEWL_ENTRY );
+
CCalenStateMachine* self = new ( ELeave ) CCalenStateMachine( aController );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_NEWL_EXIT );
return self;
}
@@ -64,8 +68,9 @@
: iController( aController ) ,
iOutstandingNotifications(&::HashCalenNotificationFunction,&::HashCalenNotificationIdentityRelation)
{
- TRACE_ENTRY_POINT;
- TRACE_EXIT_POINT;
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_CCALENSTATEMACHINE_ENTRY );
+
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_CCALENSTATEMACHINE_EXIT );
}
// ----------------------------------------------------------------------------
@@ -76,8 +81,8 @@
//
void CCalenStateMachine::ConstructL()
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_CONSTRUCTL_ENTRY );
+
CCalenState* state = NULL;
iOutstandingNotifications.ReserveL(KHashLength);
@@ -127,7 +132,7 @@
ASSERT( iStates.Count() == KCalenLastState );
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_CONSTRUCTL_EXIT );
}
// ----------------------------------------------------------------------------
@@ -138,12 +143,12 @@
//
CCalenStateMachine::~CCalenStateMachine()
{
- TRACE_ENTRY_POINT;
+ OstTraceFunctionEntry0( DUP1_CCALENSTATEMACHINE_CCALENSTATEMACHINE_ENTRY );
iOutstandingNotifications.Close();
iStates.ResetAndDestroy();
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( DUP1_CCALENSTATEMACHINE_CCALENSTATEMACHINE_EXIT );
}
// ----------------------------------------------------------------------------
@@ -154,11 +159,11 @@
//
void CCalenStateMachine::HandleNotification(const TCalenNotification aNotification )
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_HANDLENOTIFICATION_ENTRY );
+
TRAP_IGNORE(iStates[iCurrentState]->HandleNotificationL( aNotification, *this));
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_HANDLENOTIFICATION_EXIT );
}
// ----------------------------------------------------------------------------
@@ -169,6 +174,9 @@
//
CCalenStateMachine::TCalenStateIndex CCalenStateMachine::CurrentState()
{
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_CURRENTSTATE_ENTRY );
+
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_CURRENTSTATE_EXIT );
return iCurrentState;
}
@@ -180,11 +188,11 @@
//
TBool CCalenStateMachine::HandleCommandL( const TCalenCommand& aCommand )
{
- TRACE_ENTRY_POINT;
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_HANDLECOMMANDL_ENTRY );
TBool cmdUsed = iStates[iCurrentState]->HandleCommandL( aCommand, *this);
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_HANDLECOMMANDL_EXIT );
return cmdUsed;
}
@@ -196,8 +204,8 @@
//
void CCalenStateMachine::CancelPreviousCmd()
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_CANCELPREVIOUSCMD_ENTRY );
+
TCalenStateIndex previousState = iStates[iCurrentState]->PreviousState();
iStates[iCurrentState]->CancelExecutingCmd();
@@ -206,7 +214,7 @@
iCurrentState = previousState;
}
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_CANCELPREVIOUSCMD_EXIT );
}
// ----------------------------------------------------------------------------
@@ -217,10 +225,10 @@
//
CCalenStateMachine::TCalenStateIndex CCalenStateMachine::GetCurrentState()
{
- TRACE_ENTRY_POINT;
- TRACE_EXIT_POINT;
-
- return iCurrentState;
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_GETCURRENTSTATE_ENTRY );
+
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_GETCURRENTSTATE_EXIT );
+ return iCurrentState;
}
// ----------------------------------------------------------------------------
@@ -231,11 +239,11 @@
//
void CCalenStateMachine::SetCurrentState(const TCalenStateIndex& aState)
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_SETCURRENTSTATE_ENTRY );
+
iCurrentState = aState;
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_SETCURRENTSTATE_EXIT );
}
// ----------------------------------------------------------------------------
@@ -246,11 +254,11 @@
//
void CCalenStateMachine::SetCurrentPreviousState(const TCalenStateIndex& aState)
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_SETCURRENTPREVIOUSSTATE_ENTRY );
+
iStates[iCurrentState]->SetPreviousState(aState);
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_SETCURRENTPREVIOUSSTATE_EXIT );
}
// ----------------------------------------------------------------------------
@@ -261,10 +269,10 @@
//
void CCalenStateMachine::ActivateCurrentStateL()
{
- TRACE_ENTRY_POINT;
-
+ OstTraceFunctionEntry0( CCALENSTATEMACHINE_ACTIVATECURRENTSTATEL_ENTRY );
+
iStates[iCurrentState]->HandleStateActivationL(*this);
- TRACE_EXIT_POINT;
+ OstTraceFunctionExit0( CCALENSTATEMACHINE_ACTIVATECURRENTSTATEL_EXIT );
}
// End of file