--- a/calendarui/controller/src/calenviewingstate.cpp Tue Aug 31 15:13:43 2010 +0300
+++ b/calendarui/controller/src/calenviewingstate.cpp Wed Sep 01 12:32:31 2010 +0100
@@ -22,10 +22,6 @@
#include "calencontroller.h"
#include "calenstatemachine.h"
#include "calennotifier.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "calenviewingstateTraces.h"
-#endif
// ----------------------------------------------------------------------------
// CCalenViewingState::NewLC
@@ -34,13 +30,13 @@
CCalenViewingState* CCalenViewingState::NewLC( CCalenController& aController,
RHashSet<TCalenNotification>& aOutstandingNotifications )
{
- OstTraceFunctionEntry0( CCALENVIEWINGSTATE_NEWLC_ENTRY );
-
+ TRACE_ENTRY_POINT;
+
CCalenViewingState* self = new ( ELeave ) CCalenViewingState( aController,aOutstandingNotifications );
CleanupStack::PushL( self );
self->ConstructL();
- OstTraceFunctionExit0( CCALENVIEWINGSTATE_NEWLC_EXIT );
+ TRACE_EXIT_POINT;
return self;
}
@@ -50,11 +46,10 @@
// ----------------------------------------------------------------------------
void CCalenViewingState::ConstructL()
{
- OstTraceFunctionEntry0( CCALENVIEWINGSTATE_CONSTRUCTL_ENTRY );
-
+ TRACE_ENTRY_POINT;
BaseConstructL();
- OstTraceFunctionExit0( CCALENVIEWINGSTATE_CONSTRUCTL_EXIT );
+ TRACE_EXIT_POINT;
}
// ----------------------------------------------------------------------------
@@ -65,9 +60,9 @@
RHashSet<TCalenNotification>& aOutstandingNotifications )
: CCalenState( aController, aOutstandingNotifications )
{
- OstTraceFunctionEntry0( CCALENVIEWINGSTATE_CCALENVIEWINGSTATE_ENTRY );
+ TRACE_ENTRY_POINT;
- OstTraceFunctionExit0( CCALENVIEWINGSTATE_CCALENVIEWINGSTATE_EXIT );
+ TRACE_EXIT_POINT;
}
// ----------------------------------------------------------------------------
@@ -76,9 +71,9 @@
// ----------------------------------------------------------------------------
CCalenViewingState::~CCalenViewingState()
{
- OstTraceFunctionEntry0( DUP1_CCALENVIEWINGSTATE_CCALENVIEWINGSTATE_ENTRY );
+ TRACE_ENTRY_POINT;
- OstTraceFunctionExit0( DUP1_CCALENVIEWINGSTATE_CCALENVIEWINGSTATE_EXIT );
+ TRACE_EXIT_POINT;
}
// ----------------------------------------------------------------------------
@@ -88,7 +83,7 @@
TBool CCalenViewingState::HandleCommandL( const TCalenCommand& aCommand,
CCalenStateMachine& aStateMachine )
{
- OstTraceFunctionEntry0( CCALENVIEWINGSTATE_HANDLECOMMANDL_ENTRY );
+ TRACE_ENTRY_POINT;
TInt cmd = aCommand.Command();
MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd );
@@ -104,7 +99,6 @@
case ECalenEditSeries:
case ECalenRestoreTodo:
case ECalenCompleteTodo:
- case ECalenEditEntryFromViewer:
{
// set the previous state as viewing state
CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
@@ -127,7 +121,6 @@
case ECalenDeleteCurrentEntry:
case ECalenDeleteSeries:
case ECalenDeleteCurrentOccurrence:
- case ECalenDeleteEntryFromViewer:
{
// set the previous state as viewing state
CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
@@ -147,12 +140,29 @@
case ECalenGetLocation:
case ECalenShowLocation:
case ECalenGetLocationAndSave:
- {
+ {
+ CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
+ SetCurrentState( aStateMachine, CCalenStateMachine::ECalenMapState );
+ SetCurrentPreviousState( aStateMachine, cachedState );
+ ActivateCurrentStateL(aStateMachine);
+
+ cmdUsed = ETrue;
+ break;
}
+ case ECalenViewAttachmentList:
+ case ECalenAddAttachmentFromViewer:
+ {
+ CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
+ SetCurrentState( aStateMachine, CCalenStateMachine::ECalenAttachmentState );
+ SetCurrentPreviousState( aStateMachine, cachedState );
+ ActivateCurrentStateL(aStateMachine);
+ cmdUsed = ETrue;
+ }
+ break;
}
RequestCallbackL( handler, aCommand );
- OstTraceFunctionExit0( CCALENVIEWINGSTATE_HANDLECOMMANDL_EXIT );
+ TRACE_EXIT_POINT;
return cmdUsed;
}
@@ -163,8 +173,8 @@
void CCalenViewingState::HandleNotificationL(const TCalenNotification& aNotification,
CCalenStateMachine& aStateMachine )
{
- OstTraceFunctionEntry0( CCALENVIEWINGSTATE_HANDLENOTIFICATIONL_ENTRY );
-
+ TRACE_ENTRY_POINT;
+
switch( aNotification )
{
case ECalenNotifyEntryClosed:
@@ -187,7 +197,7 @@
break;
}
- OstTraceFunctionExit0( CCALENVIEWINGSTATE_HANDLENOTIFICATIONL_EXIT );
+ TRACE_EXIT_POINT;
}
// ----------------------------------------------------------------------------
@@ -196,7 +206,7 @@
// ----------------------------------------------------------------------------
void CCalenViewingState::HandleStateActivationL(CCalenStateMachine& aStateMachine)
{
- OstTraceFunctionEntry0( CCALENVIEWINGSTATE_HANDLESTATEACTIVATIONL_ENTRY );
+ TRACE_ENTRY_POINT;
if( iOutstandingNotifications.Find(ECalenNotifyEntryDeleted) )
{
@@ -207,8 +217,7 @@
{
CCalenState::HandleStateActivationL(aStateMachine);
}
-
- OstTraceFunctionExit0( CCALENVIEWINGSTATE_HANDLESTATEACTIVATIONL_EXIT );
+ TRACE_EXIT_POINT;
}
// end of file