diff -r 12af337248b1 -r bd7edf625bdd calendarui/controller/src/calensendingstate.cpp --- a/calendarui/controller/src/calensendingstate.cpp Tue Aug 31 15:13:43 2010 +0300 +++ b/calendarui/controller/src/calensendingstate.cpp Wed Sep 01 12:32:31 2010 +0100 @@ -11,21 +11,18 @@ * * Contributors: * -* Description: Calendar state machine +* Description: Calendar state machine * */ + // includes #include "calensendingstate.h" #include "calendarui_debug.h" // Debug macros #include "calencontroller.h" #include "calenstatemachine.h" #include "calennotifier.h" -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "calensendingstateTraces.h" -#endif // ---------------------------------------------------------------------------- // CCalenSendingState::NewLC @@ -34,13 +31,13 @@ CCalenSendingState* CCalenSendingState::NewLC( CCalenController& aController, RHashSet& aOutstandingNotifications ) { - OstTraceFunctionEntry0( CCALENSENDINGSTATE_NEWLC_ENTRY ); - + TRACE_ENTRY_POINT; + CCalenSendingState* self = new ( ELeave ) CCalenSendingState( aController,aOutstandingNotifications ); CleanupStack::PushL( self ); self->ConstructL(); - OstTraceFunctionExit0( CCALENSENDINGSTATE_NEWLC_EXIT ); + TRACE_EXIT_POINT; return self; } @@ -50,11 +47,10 @@ // ---------------------------------------------------------------------------- void CCalenSendingState::ConstructL() { - OstTraceFunctionEntry0( CCALENSENDINGSTATE_CONSTRUCTL_ENTRY ); - + TRACE_ENTRY_POINT; BaseConstructL(); - OstTraceFunctionExit0( CCALENSENDINGSTATE_CONSTRUCTL_EXIT ); + TRACE_EXIT_POINT; } // ---------------------------------------------------------------------------- @@ -65,9 +61,9 @@ RHashSet& aOutstandingNotifications ) : CCalenState( aController, aOutstandingNotifications ) { - OstTraceFunctionEntry0( CCALENSENDINGSTATE_CCALENSENDINGSTATE_ENTRY ); + TRACE_ENTRY_POINT; - OstTraceFunctionExit0( CCALENSENDINGSTATE_CCALENSENDINGSTATE_EXIT ); + TRACE_EXIT_POINT; } // ---------------------------------------------------------------------------- @@ -76,9 +72,9 @@ // ---------------------------------------------------------------------------- CCalenSendingState::~CCalenSendingState() { - OstTraceFunctionEntry0( DUP1_CCALENSENDINGSTATE_CCALENSENDINGSTATE_ENTRY ); + TRACE_ENTRY_POINT; - OstTraceFunctionExit0( DUP1_CCALENSENDINGSTATE_CCALENSENDINGSTATE_EXIT ); + TRACE_EXIT_POINT; } // ---------------------------------------------------------------------------- @@ -88,8 +84,7 @@ TBool CCalenSendingState::HandleCommandL( const TCalenCommand& aCommand, CCalenStateMachine& aStateMachine ) { - OstTraceFunctionEntry0( CCALENSENDINGSTATE_HANDLECOMMANDL_ENTRY ); - + TRACE_ENTRY_POINT; TInt cmd = aCommand.Command(); MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd ); @@ -97,15 +92,20 @@ TBool cmdUsed = EFalse; - if( ECalenFasterAppExit == cmd ) + if(ECalenFasterAppExit == cmd) { SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState ); ActivateCurrentStateL(aStateMachine); RequestCallbackL( handler, aCommand ); cmdUsed = ETrue; } + else if(ECalenStartActiveStep == cmd) + { + RequestCallbackL( handler, aCommand ); + cmdUsed = ETrue; + } - OstTraceFunctionExit0( CCALENSENDINGSTATE_HANDLECOMMANDL_EXIT ); + TRACE_EXIT_POINT; return cmdUsed; } @@ -116,10 +116,11 @@ void CCalenSendingState::HandleNotificationL(const TCalenNotification& aNotification, CCalenStateMachine& aStateMachine ) { - OstTraceFunctionEntry0( CCALENSENDINGSTATE_HANDLENOTIFICATIONL_ENTRY ); - + TRACE_ENTRY_POINT; + switch( aNotification ) { + case ECalenNotifyEntrySendCancel: case ECalenNotifyDialogClosed: // issued when send method query dialog is cancelled { // FIXME Should have a ECalenNotifyEntrySent? @@ -139,7 +140,7 @@ break; } - OstTraceFunctionExit0( CCALENSENDINGSTATE_HANDLENOTIFICATIONL_EXIT ); + TRACE_EXIT_POINT; }