calendarui/controller/src/caleneditingstate.cpp
branchRCL_3
changeset 29 12af337248b1
parent 0 f979ecb2b13e
child 30 bd7edf625bdd
--- a/calendarui/controller/src/caleneditingstate.cpp	Thu Aug 19 09:53:43 2010 +0300
+++ b/calendarui/controller/src/caleneditingstate.cpp	Tue Aug 31 15:13:43 2010 +0300
@@ -22,22 +22,25 @@
 #include "calencontroller.h"
 #include "calenstatemachine.h"
 #include "calennotifier.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "caleneditingstateTraces.h"
+#endif
 
 // ----------------------------------------------------------------------------
 // CCalenEditingState::NewLC
 // First stage construction
 // ----------------------------------------------------------------------------
 CCalenEditingState* CCalenEditingState::NewLC( CCalenController& aController,
-                    RHashSet<TCalenNotification>& aOutstandingNotifications )
+                                                            RHashSet<TCalenNotification>& aOutstandingNotifications )
     {
-    TRACE_ENTRY_POINT;
-
-    CCalenEditingState* self = new( ELeave ) CCalenEditingState( aController,
-                                                    aOutstandingNotifications );
+    OstTraceFunctionEntry0( CCALENEDITINGSTATE_NEWLC_ENTRY );
+    
+    CCalenEditingState* self = new( ELeave ) CCalenEditingState( aController, aOutstandingNotifications );
     CleanupStack::PushL( self );
     self->ConstructL();
 
-    TRACE_EXIT_POINT;
+    OstTraceFunctionExit0( CCALENEDITINGSTATE_NEWLC_EXIT );
     return self;
     }
 
@@ -47,10 +50,11 @@
 // ----------------------------------------------------------------------------
 void CCalenEditingState::ConstructL()
     {
-    TRACE_ENTRY_POINT;
+    OstTraceFunctionEntry0( CCALENEDITINGSTATE_CONSTRUCTL_ENTRY );
+    
     BaseConstructL();
     
-    TRACE_EXIT_POINT;
+    OstTraceFunctionExit0( CCALENEDITINGSTATE_CONSTRUCTL_EXIT );
     }
     
 // ----------------------------------------------------------------------------
@@ -58,12 +62,12 @@
 // C++ Constructor
 // ----------------------------------------------------------------------------
 CCalenEditingState::CCalenEditingState( CCalenController& aController,
-            RHashSet<TCalenNotification>& aOutstandingNotifications )
+                                                        RHashSet<TCalenNotification>& aOutstandingNotifications )
     : CCalenState( aController, aOutstandingNotifications )
     {
-    TRACE_ENTRY_POINT;
-
-    TRACE_EXIT_POINT;
+    OstTraceFunctionEntry0( CCALENEDITINGSTATE_CCALENEDITINGSTATE_ENTRY );
+    
+    OstTraceFunctionExit0( CCALENEDITINGSTATE_CCALENEDITINGSTATE_EXIT );
     }
     
 // ----------------------------------------------------------------------------
@@ -72,9 +76,9 @@
 // ----------------------------------------------------------------------------    
 CCalenEditingState::~CCalenEditingState()
     {
-    TRACE_ENTRY_POINT;
+    OstTraceFunctionEntry0( DUP1_CCALENEDITINGSTATE_CCALENEDITINGSTATE_ENTRY );
     
-    TRACE_EXIT_POINT;
+    OstTraceFunctionExit0( DUP1_CCALENEDITINGSTATE_CCALENEDITINGSTATE_EXIT );
     }
 
 // ----------------------------------------------------------------------------
@@ -84,7 +88,7 @@
 TBool CCalenEditingState::HandleCommandL( const TCalenCommand& aCommand,
                               CCalenStateMachine& aStateMachine )
     {
-    TRACE_ENTRY_POINT
+    OstTraceFunctionEntry0( CCALENEDITINGSTATE_HANDLECOMMANDL_ENTRY );
     
     TInt cmd = aCommand.Command();
     MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd );
@@ -93,7 +97,7 @@
      
     TBool cmdUsed = EFalse;
     switch( cmd )
-        {
+    {
     	case ECalenDeleteCurrentEntry:
     	case ECalenDeleteSeries:
     	case ECalenDeleteCurrentOccurrence:
@@ -106,6 +110,7 @@
 	        cmdUsed = ETrue;
 	        break;
     		}
+    		
     	case ECalenSend: // For handling send in viewer
     		{
     		CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
@@ -116,6 +121,7 @@
 	        cmdUsed = ETrue;
 	        break;	
     		}
+    		
     	case ECalenFasterAppExit:
     		{
 	        SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
@@ -123,51 +129,22 @@
 	        cmdUsed = ETrue;
 	        break;
         	}
+        	
     	case ECalenGetLocation:
     	case ECalenShowLocation:
-    		{
-    		CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
-	        SetCurrentState( aStateMachine, CCalenStateMachine::ECalenMapState );
-	        SetCurrentPreviousState( aStateMachine, cachedState );
-	        ActivateCurrentStateL(aStateMachine);        
-	        cmdUsed = ETrue;
-	        break;	
-    		}
-    	case ECalenAddAttachment:
-    	case ECalenRemoveAttachment:
-    	case ECalenViewAttachmentList:
-    	case ECalenAddAttachmentFromViewer:
-            {
-            CCalenStateMachine::TCalenStateIndex cachedState = GetCurrentState(aStateMachine);
-            SetCurrentState( aStateMachine, CCalenStateMachine::ECalenAttachmentState );
-            SetCurrentPreviousState( aStateMachine, cachedState );
-            ActivateCurrentStateL(aStateMachine);        
-            cmdUsed = ETrue;
-            }
-            break;
-    	case ECalenMissedEventViewFromIdle:
-    	    {
-    	    cmdUsed = ETrue;
-    	    break;
-    	    }
-    	case ECalenEventViewFromAlarm:
-    	case ECalenEventViewFromAlarmStopOnly:
-    	    {
-    	    cmdUsed = ETrue;
-    	    break;
-    	    }   
+    		{       	
+    		}	
+	
     	default:
     		break;
     		
-        }
+    }
     
 	if(cmdUsed)
-	    {
-	    RequestCallbackL( handler, aCommand );
-	    }
+		RequestCallbackL( handler, aCommand );
 	
-    TRACE_EXIT_POINT;
     
+    OstTraceFunctionExit0( CCALENEDITINGSTATE_HANDLECOMMANDL_EXIT );
     return cmdUsed;
     }
 
@@ -178,7 +155,7 @@
 void CCalenEditingState::HandleNotificationL(const TCalenNotification& aNotification,
                                               CCalenStateMachine& aStateMachine )
     {
-    TRACE_ENTRY_POINT;
+    OstTraceFunctionEntry0( CCALENEDITINGSTATE_HANDLENOTIFICATIONL_ENTRY );
     
     switch( aNotification )
         {
@@ -187,7 +164,7 @@
         case ECalenNotifyInstanceSaved:
         case ECalenNotifyDialogClosed:
         case ECalenNotifyEntryDeleted:
-        case ECalenNotifyMarkedEntryCompleted:
+        case ECalenNotifyEditorClosedFromViewer:
             {
             SetCurrentState( aStateMachine, iPreviousState );
             // Let new state does the broadcast
@@ -195,23 +172,12 @@
 			ActivateCurrentStateL(aStateMachine);
             }
             break;
-        case ECalenNotifyCancelStatusUpdation:
-              {
-              SetCurrentState( aStateMachine, iPreviousState);
-              SetCurrentPreviousState( aStateMachine, GetCurrentState(aStateMachine) );
-
-              iOutstandingNotifications.InsertL(aNotification);
-              ActivateCurrentStateL(aStateMachine);
-              
-              CancelPreviousCmd(aStateMachine);
-              }
-            break;
         default:
-           CCalenState::HandleNotificationL( aNotification, aStateMachine );
-            break;
+        	iOutstandingNotifications.InsertL(aNotification);
+			break;
         }
-        
-    TRACE_EXIT_POINT;
+    	
+    OstTraceFunctionExit0( CCALENEDITINGSTATE_HANDLENOTIFICATIONL_EXIT );
     }
 
 // end of file