calendarui/controller/src/calenstate.cpp
branchRCL_3
changeset 65 12af337248b1
parent 19 1984aceb8774
child 66 bd7edf625bdd
equal deleted inserted replaced
60:96907930389d 65:12af337248b1
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   Calendar state machine
    14 * Description:  Calendar state machine
    15 *
    15 *
    16 */
    16 */
    17 
       
    18 
    17 
    19 
    18 
    20 // includes
    19 // includes
    21 #include "calendarui_debug.h"           // Debug macros
    20 #include "calendarui_debug.h"           // Debug macros
    22 #include "calenstate.h"                 // Calendar States
    21 #include "calenstate.h"                 // Calendar States
    23 #include "calencontroller.h"
    22 #include "calencontroller.h"
    24 #include "calenstatemachine.h"
    23 #include "calenstatemachine.h"
    25 #include "calennotifier.h"
    24 #include "calennotifier.h"
    26 #include "calenasynccallback.h"
    25 #include "calenasynccallback.h"
       
    26 #include "OstTraceDefinitions.h"
       
    27 #ifdef OST_TRACE_COMPILER_IN_USE
       
    28 #include "calenstateTraces.h"
       
    29 #endif
    27 
    30 
    28 // ----------------------------------------------------------------------------
    31 // ----------------------------------------------------------------------------
    29 // CCalenState::CCalenState
    32 // CCalenState::CCalenState
    30 // C++ constructor
    33 // C++ constructor
    31 // ----------------------------------------------------------------------------
    34 // ----------------------------------------------------------------------------
    32 CCalenState::CCalenState( CCalenController& aController,RHashSet<TCalenNotification>&  aOutstandingNotifications )
    35 CCalenState::CCalenState( CCalenController& aController,RHashSet<TCalenNotification>&  aOutstandingNotifications )
    33     : iController( aController ),
    36     : iController( aController ),
    34       iOutstandingNotifications( aOutstandingNotifications ),
    37       iOutstandingNotifications( aOutstandingNotifications ),
    35       iPreviousState( CCalenStateMachine::ECalenIdleState )
    38       iPreviousState( CCalenStateMachine::ECalenIdleState )
    36     {
    39     {
    37     TRACE_ENTRY_POINT;
    40     OstTraceFunctionEntry0( CCALENSTATE_CCALENSTATE_ENTRY );
    38 
    41     
    39     TRACE_EXIT_POINT;
    42     OstTraceFunctionExit0( CCALENSTATE_CCALENSTATE_EXIT );
    40     }
    43     }
    41 
    44 
    42 // ----------------------------------------------------------------------------
    45 // ----------------------------------------------------------------------------
    43 // CCalenState::ConstructL
    46 // CCalenState::ConstructL
    44 // second phase construction
    47 // second phase construction
    45 // ----------------------------------------------------------------------------
    48 // ----------------------------------------------------------------------------
    46 void CCalenState::BaseConstructL()
    49 void CCalenState::BaseConstructL()
    47     {
    50     {
    48     TRACE_ENTRY_POINT;
    51     OstTraceFunctionEntry0( CCALENSTATE_BASECONSTRUCTL_ENTRY );
    49     
    52     
    50     TCalenCommand command;
    53     TCalenCommand command;
    51     MCalenCommandHandler* handler( NULL );
    54     MCalenCommandHandler* handler( NULL );
    52     iCallBackPackage = new( ELeave ) CCalenCallbackPackage( this, command, handler );
    55     iCallBackPackage = new( ELeave ) CalenCallbackPackage( this, command, handler );
    53     
    56     
    54     TRACE_EXIT_POINT;
    57     OstTraceFunctionExit0( CCALENSTATE_BASECONSTRUCTL_EXIT );
    55     }
    58     }
    56 
    59 
    57 // ----------------------------------------------------------------------------
    60 // ----------------------------------------------------------------------------
    58 // CCalenState::~CCalenState
    61 // CCalenState::~CCalenState
    59 // Destructor
    62 // Destructor
    60 // ----------------------------------------------------------------------------
    63 // ----------------------------------------------------------------------------
    61 CCalenState::~CCalenState()
    64 CCalenState::~CCalenState()
    62     {
    65     {
    63     TRACE_ENTRY_POINT;
    66     OstTraceFunctionEntry0( DUP1_CCALENSTATE_CCALENSTATE_ENTRY );
    64     
    67     
    65     delete iCallBackPackage;
    68     delete iCallBackPackage;
    66     iCallBackPackage = NULL;
    69     iCallBackPackage = NULL;
    67     delete iCmdCallback;
    70     delete iCmdCallback;
    68     
    71     
    69     TRACE_EXIT_POINT;
    72     OstTraceFunctionExit0( DUP1_CCALENSTATE_CCALENSTATE_EXIT );
    70     }
    73     }
    71 
    74 
    72 // ----------------------------------------------------------------------------
    75 // ----------------------------------------------------------------------------
    73 // CCalenState::RequestCallback
    76 // CCalenState::RequestCallback
    74 // Request a callback
    77 // Request a callback
    75 // ----------------------------------------------------------------------------
    78 // ----------------------------------------------------------------------------
    76 void CCalenState::RequestCallbackL( MCalenCommandHandler* aCommandHandler, const TCalenCommand& aCommand )
    79 void CCalenState::RequestCallbackL( MCalenCommandHandler* aCommandHandler, const TCalenCommand& aCommand )
    77     {
    80     {
    78     TRACE_ENTRY_POINT;
    81     OstTraceFunctionEntry0( CCALENSTATE_REQUESTCALLBACKL_ENTRY );
    79 
    82     
    80     iCallBackPackage->SetCommandHandler(this, aCommand, aCommandHandler);
    83     iCallBackPackage->SetCommandHandler(this, aCommand, aCommandHandler);
    81      
    84      
    82     if( !iCmdCallback )
    85     if( !iCmdCallback )
    83         {
    86         {
    84         TCallBack callback( CommandCallback, iCallBackPackage );
    87         TCallBack callback( CommandCallback, iCallBackPackage );
    85         iCmdCallback = CCalenAsyncCallBack::NewL( callback, CActive::EPriorityHigh , iController );
    88         iCmdCallback = CalenAsyncCallBack::NewL( callback, CActive::EPriorityHigh , iController );
    86        }
    89        }
    87 
    90 
    88     TCallBack callback( CommandCallback, iCallBackPackage );
    91     TCallBack callback( CommandCallback, iCallBackPackage );
    89     
    92     
    90     iCmdCallback->Cancel();
    93     iCmdCallback->Cancel();
    91     iCmdCallback->Set( callback );
    94     iCmdCallback->Set( callback );
    92     iCmdCallback->CallBack();
    95     iCmdCallback->CallBack();
    93     
    96     
    94     TRACE_EXIT_POINT;
    97     OstTraceFunctionExit0( CCALENSTATE_REQUESTCALLBACKL_EXIT );
    95     }
    98     }
    96 
    99 
    97 
   100 
    98 
   101 
    99 // ----------------------------------------------------------------------------
   102 // ----------------------------------------------------------------------------
   100 // CCalenState::CommandCallback
   103 // CCalenState::CommandCallback
   101 // Static callback function
   104 // Static callback function
   102 // ----------------------------------------------------------------------------
   105 // ----------------------------------------------------------------------------
   103 TInt CCalenState::CommandCallback( TAny* aCommandStruct )
   106 TInt CCalenState::CommandCallback( TAny* aCommandStruct )
   104     {
   107     {
   105     TRACE_ENTRY_POINT;
   108     OstTraceFunctionEntry0( CCALENSTATE_COMMANDCALLBACK_ENTRY );
       
   109     
   106     TBool continueCommand(EFalse);
   110     TBool continueCommand(EFalse);
   107     
   111     
   108     CCalenCallbackPackage* package = static_cast<CCalenCallbackPackage*>( aCommandStruct );
   112     CalenCallbackPackage* package = static_cast<CalenCallbackPackage*>( aCommandStruct );
   109     continueCommand = package->HandleCallBack();
   113     continueCommand = package->HandleCallBack();
   110     
   114     
   111     TRACE_EXIT_POINT;
   115     OstTraceFunctionExit0( CCALENSTATE_COMMANDCALLBACK_EXIT );
   112     return continueCommand;
   116     return continueCommand;
   113     }
   117     }
   114 
   118 
   115 // ----------------------------------------------------------------------------
   119 // ----------------------------------------------------------------------------
   116 // CCalenState::HandleNotificationL
   120 // CCalenState::HandleNotificationL
   119 // to the command issued.
   123 // to the command issued.
   120 // ----------------------------------------------------------------------------
   124 // ----------------------------------------------------------------------------
   121 void CCalenState::HandleNotificationL(const TCalenNotification& aNotification,
   125 void CCalenState::HandleNotificationL(const TCalenNotification& aNotification,
   122                                       CCalenStateMachine& aStateMachine )
   126                                       CCalenStateMachine& aStateMachine )
   123     {
   127     {
   124     TRACE_ENTRY_POINT;
   128     OstTraceFunctionEntry0( CCALENSTATE_HANDLENOTIFICATIONL_ENTRY );
   125     
   129     
   126     switch( aNotification )
   130     switch( aNotification )
   127         {
   131         {
   128         case ECalenNotifyAppBackgrounded:
   132         case ECalenNotifyAppBackgrounded:
   129         	{
   133         	{
   130         	CCalenStateMachine::TCalenStateIndex cachedState = aStateMachine.GetCurrentState();
   134         	CCalenStateMachine::TCalenStateIndex cachedState = aStateMachine.GetCurrentState();
   131         	// Never send calendar to background state in MapState as maps will
   135 			aStateMachine.SetCurrentState(CCalenStateMachine::ECalenBackgroundState);
   132         	// launched in cahin mode not in stand alone mode
   136 			aStateMachine.SetCurrentPreviousState(cachedState);
   133         	if((cachedState != CCalenStateMachine::ECalenMapState) &&
   137 			iOutstandingNotifications.InsertL(aNotification);
   134         		(cachedState != CCalenStateMachine::ECalenPopulationState))
   138 			aStateMachine.ActivateCurrentStateL();
   135         		{
   139         	    
   136                 aStateMachine.SetCurrentState(CCalenStateMachine::ECalenBackgroundState);
       
   137                 aStateMachine.SetCurrentPreviousState(cachedState);
       
   138                 iOutstandingNotifications.InsertL(aNotification);
       
   139                 aStateMachine.ActivateCurrentStateL();
       
   140         	    }
       
   141         	}
   140         	}
   142             break;
   141             break;
   143         default:
   142         default:
   144             iController.Notifier().BroadcastApprovedNotification( aNotification );
   143             iController.Notifier().BroadcastApprovedNotification( aNotification );
   145             break;
   144             break;
   146         }
   145         }
   147     
   146     
   148    
   147     OstTraceFunctionExit0( CCALENSTATE_HANDLENOTIFICATIONL_EXIT );
   149     TRACE_EXIT_POINT;
       
   150 
       
   151     }
   148     }
   152 
   149 
   153 
   150 
   154 // ----------------------------------------------------------------------------
   151 // ----------------------------------------------------------------------------
   155 // CCalenState::PreviousState
   152 // CCalenState::PreviousState
   156 // C++ constructor
   153 // C++ constructor
   157 // ----------------------------------------------------------------------------
   154 // ----------------------------------------------------------------------------
   158 CCalenStateMachine::TCalenStateIndex CCalenState::PreviousState()
   155 CCalenStateMachine::TCalenStateIndex CCalenState::PreviousState()
   159     {
   156     {
   160     TRACE_ENTRY_POINT;
   157     OstTraceFunctionEntry0( CCALENSTATE_PREVIOUSSTATE_ENTRY );
   161     
   158     
   162     TRACE_EXIT_POINT;
   159     OstTraceFunctionExit0( CCALENSTATE_PREVIOUSSTATE_EXIT );
   163     return iPreviousState;
   160     return iPreviousState;
   164     }
   161     }
   165 
   162 
   166 // ----------------------------------------------------------------------------
   163 // ----------------------------------------------------------------------------
   167 // CCalenState::SetPreviousState
   164 // CCalenState::SetPreviousState
   168 // Sets previous state.
   165 // Sets previous state.
   169 // ----------------------------------------------------------------------------
   166 // ----------------------------------------------------------------------------
   170 void CCalenState::SetPreviousState(const CCalenStateMachine::TCalenStateIndex& aPreviousState )
   167 void CCalenState::SetPreviousState(const CCalenStateMachine::TCalenStateIndex& aPreviousState )
   171     {
   168     {
   172     TRACE_ENTRY_POINT;
   169     OstTraceFunctionEntry0( CCALENSTATE_SETPREVIOUSSTATE_ENTRY );
   173     
   170     
   174     iPreviousState = aPreviousState;
   171     iPreviousState = aPreviousState;
   175     
   172     
   176     TRACE_EXIT_POINT;
   173     OstTraceFunctionExit0( CCALENSTATE_SETPREVIOUSSTATE_EXIT );
   177     }
   174     }
   178     
   175     
   179 // ----------------------------------------------------------------------------
   176 // ----------------------------------------------------------------------------
   180 // CCalenState::CommandExecuting
   177 // CCalenState::CommandExecuting
   181 // From CCalenState
   178 // From CCalenState
   182 // ----------------------------------------------------------------------------    
   179 // ----------------------------------------------------------------------------    
   183 void CCalenState::CommandExecuting()
   180 void CCalenState::CommandExecuting()
   184     {
   181     {
   185     TRACE_ENTRY_POINT;
   182     OstTraceFunctionEntry0( CCALENSTATE_COMMANDEXECUTING_ENTRY );
   186     TRACE_EXIT_POINT;
   183     
       
   184     OstTraceFunctionExit0( CCALENSTATE_COMMANDEXECUTING_EXIT );
   187     }  
   185     }  
   188 
   186 
   189 // ----------------------------------------------------------------------------
   187 // ----------------------------------------------------------------------------
   190 // CCalenState::CCalenCallbackPackage::CCalenCallbackPackage
   188 // CCalenState::CalenCallbackPackage::CalenCallbackPackage
   191 // C++ constructor
   189 // C++ constructor
   192 // ----------------------------------------------------------------------------
   190 // ----------------------------------------------------------------------------
   193 CCalenState::CCalenCallbackPackage::CCalenCallbackPackage( CCalenState* aSelf,
   191 CCalenState::CalenCallbackPackage::CalenCallbackPackage( CCalenState* aSelf,
   194                         TCalenCommand aCommand,  MCalenCommandHandler* aCommandHandler)
   192                         TCalenCommand aCommand,  MCalenCommandHandler* aCommandHandler)
   195     : iSelf( aSelf ), iCommand( aCommand ), iCommandHandler( aCommandHandler )                   
   193     : iSelf( aSelf ), iCommand( aCommand ), iCommandHandler( aCommandHandler )                   
   196     {
   194     {
   197     TRACE_ENTRY_POINT;
   195     OstTraceFunctionEntry0( CALENCALLBACKPACKAGE_CALENCALLBACKPACKAGE_ENTRY );
   198     TRACE_EXIT_POINT;
   196     
   199     }
   197     OstTraceFunctionExit0( CALENCALLBACKPACKAGE_CALENCALLBACKPACKAGE_EXIT );
   200 
   198     }
   201 // ----------------------------------------------------------------------------
   199 
   202 // CCalenState::CCalenCallbackPackage::HandleCallBack
   200 // ----------------------------------------------------------------------------
       
   201 // CCalenState::CalenCallbackPackage::HandleCallBack
   203 // Handles a callback
   202 // Handles a callback
   204 // ----------------------------------------------------------------------------
   203 // ----------------------------------------------------------------------------
   205 TBool CCalenState::CCalenCallbackPackage::HandleCallBack()
   204 TBool CCalenState::CalenCallbackPackage::HandleCallBack()
   206     {
   205     {
   207     TRACE_ENTRY_POINT;
   206     OstTraceFunctionEntry0( CALENCALLBACKPACKAGE_HANDLECALLBACK_ENTRY );
       
   207     
   208     TBool continueCommand(EFalse);
   208     TBool continueCommand(EFalse);
   209 
   209 
   210     iSelf->CommandExecuting();
   210     iSelf->CommandExecuting();
   211     PIM_TRAPD_HANDLE ( continueCommand = iCommandHandler->HandleCommandL( iCommand ) );
   211     PIM_TRAPD_HANDLE ( continueCommand = iCommandHandler->HandleCommandL( iCommand ) );
   212     
   212     
   213     TRACE_EXIT_POINT;
   213     OstTraceFunctionExit0( CALENCALLBACKPACKAGE_HANDLECALLBACK_EXIT );
   214     return continueCommand;
   214     return continueCommand;
   215     }
   215     }
   216 
   216 
   217 // ----------------------------------------------------------------------------
   217 // ----------------------------------------------------------------------------
   218 // CCalenState::CCalenCallbackPackage::SetCommandHandler
   218 // CCalenState::CalenCallbackPackage::SetCommandHandler
   219 // Sets the command handler and command
   219 // Sets the command handler and command
   220 // ----------------------------------------------------------------------------
   220 // ----------------------------------------------------------------------------
   221 void CCalenState::CCalenCallbackPackage::SetCommandHandler(CCalenState* aSelf,
   221 void CCalenState::CalenCallbackPackage::SetCommandHandler(CCalenState* aSelf,
   222                         TCalenCommand aCommand,  MCalenCommandHandler* aCommandHandler)
   222                         TCalenCommand aCommand,  MCalenCommandHandler* aCommandHandler)
   223     {
   223     {
   224     TRACE_ENTRY_POINT;
   224     OstTraceFunctionEntry0( CALENCALLBACKPACKAGE_SETCOMMANDHANDLER_ENTRY );
   225         
   225     
   226     iSelf = aSelf;
   226     iSelf = aSelf;
   227     iCommand = aCommand;
   227     iCommand = aCommand;
   228     iCommandHandler = aCommandHandler; 
   228     iCommandHandler = aCommandHandler; 
   229 
   229 
   230     TRACE_EXIT_POINT;    
   230     OstTraceFunctionExit0( CALENCALLBACKPACKAGE_SETCOMMANDHANDLER_EXIT );
   231     }
   231     }
   232     
   232     
   233 // ----------------------------------------------------------------------------
   233 // ----------------------------------------------------------------------------
   234 // CCalenState::HandleStateActivationL
   234 // CCalenState::HandleStateActivationL
   235 // Default behavior when state is activated. Check and issue any outstanding
   235 // Default behavior when state is activated. Check and issue any outstanding
   236 // notifications
   236 // notifications
   237 // ----------------------------------------------------------------------------
   237 // ----------------------------------------------------------------------------
   238 void CCalenState::HandleStateActivationL(CCalenStateMachine& /*aStateMachine*/)
   238 void CCalenState::HandleStateActivationL(CCalenStateMachine& /*aStateMachine*/)
   239 	{
   239 	{
   240     TRACE_ENTRY_POINT;
   240     OstTraceFunctionEntry0( CCALENSTATE_HANDLESTATEACTIVATIONL_ENTRY );
   241     
   241     
   242     // Can only issue one of the following Notifications
   242     // Can only issue one of the following Notifications
   243     // ECalenNotifySettingsChanged or 
   243     // ECalenNotifySettingsChanged or 
   244     // ECalenNotifySystemLocaleChanged or
   244     // ECalenNotifySystemLocaleChanged or
   245     // ECalenNotifySettingsClosed
   245     // ECalenNotifySettingsClosed
   262         notification = iterator.Next();
   262         notification = iterator.Next();
   263         }
   263         }
   264     
   264     
   265     iOutstandingNotifications.Close();
   265     iOutstandingNotifications.Close();
   266     
   266     
   267     TRACE_EXIT_POINT;
   267 	OstTraceFunctionExit0( CCALENSTATE_HANDLESTATEACTIVATIONL_EXIT );
   268 	}
   268 	}
   269 
   269 
   270 // ----------------------------------------------------------------------------
   270 // ----------------------------------------------------------------------------
   271 // CCalenState::SetCurrentState
   271 // CCalenState::SetCurrentState
   272 // Sets the current state
   272 // Sets the current state
   273 // ----------------------------------------------------------------------------
   273 // ----------------------------------------------------------------------------
   274 void CCalenState::SetCurrentState(CCalenStateMachine& aStateMachine,
   274 void CCalenState::SetCurrentState(CCalenStateMachine& aStateMachine,
   275 								  const CCalenStateMachine::TCalenStateIndex& aState )	
   275 								  const CCalenStateMachine::TCalenStateIndex& aState )	
   276 	{
   276 	{
   277     TRACE_ENTRY_POINT;
   277     OstTraceFunctionEntry0( CCALENSTATE_SETCURRENTSTATE_ENTRY );
   278     
   278     
   279     aStateMachine.SetCurrentState(aState);
   279     aStateMachine.SetCurrentState(aState);
   280     
   280     
   281     TRACE_EXIT_POINT;	
   281 	OstTraceFunctionExit0( CCALENSTATE_SETCURRENTSTATE_EXIT );
   282 	}
   282 	}
   283 
   283 
   284 // ----------------------------------------------------------------------------
   284 // ----------------------------------------------------------------------------
   285 // CCalenState::GetCurrentState
   285 // CCalenState::GetCurrentState
   286 // Gets the current state
   286 // Gets the current state
   287 // ----------------------------------------------------------------------------
   287 // ----------------------------------------------------------------------------
   288 CCalenStateMachine::TCalenStateIndex CCalenState::GetCurrentState(
   288 CCalenStateMachine::TCalenStateIndex CCalenState::GetCurrentState(
   289 											CCalenStateMachine& aStateMachine)
   289 											CCalenStateMachine& aStateMachine)
   290 	{
   290 	{
   291 	TRACE_ENTRY_POINT;
   291     OstTraceFunctionEntry0( CCALENSTATE_GETCURRENTSTATE_ENTRY );
   292 	TRACE_EXIT_POINT;
   292     
   293 	
   293     OstTraceFunctionExit0( CCALENSTATE_GETCURRENTSTATE_EXIT );
   294 	return aStateMachine.GetCurrentState();
   294 	return aStateMachine.GetCurrentState();
   295 	}
   295 	}
   296 
   296 
   297 // ----------------------------------------------------------------------------
   297 // ----------------------------------------------------------------------------
   298 // CCalenState::SetPreviousState
   298 // CCalenState::SetPreviousState
   299 // Sets the previous state through state machine
   299 // Sets the previous state through state machine
   300 // ----------------------------------------------------------------------------
   300 // ----------------------------------------------------------------------------
   301 void CCalenState::SetCurrentPreviousState(CCalenStateMachine& aStateMachine, 
   301 void CCalenState::SetCurrentPreviousState(CCalenStateMachine& aStateMachine, 
   302 								const CCalenStateMachine::TCalenStateIndex& aState)
   302 								const CCalenStateMachine::TCalenStateIndex& aState)
   303 	{
   303 	{
   304 	TRACE_ENTRY_POINT;
   304     OstTraceFunctionEntry0( CCALENSTATE_SETCURRENTPREVIOUSSTATE_ENTRY );
   305 	
   305     
   306 	aStateMachine.SetCurrentPreviousState(aState);
   306 	aStateMachine.SetCurrentPreviousState(aState);
   307 	
   307 	
   308 	TRACE_EXIT_POINT;
   308 	OstTraceFunctionExit0( CCALENSTATE_SETCURRENTPREVIOUSSTATE_EXIT );
   309 	}
   309 	}
   310 
   310 
   311 // ----------------------------------------------------------------------------
   311 // ----------------------------------------------------------------------------
   312 // CCalenState::ActivateCurrentStateL
   312 // CCalenState::ActivateCurrentStateL
   313 // Activate current state
   313 // Activate current state
   314 // ----------------------------------------------------------------------------
   314 // ----------------------------------------------------------------------------
   315 void CCalenState::ActivateCurrentStateL(CCalenStateMachine& aStateMachine)
   315 void CCalenState::ActivateCurrentStateL(CCalenStateMachine& aStateMachine)
   316 	{
   316 	{
   317     TRACE_ENTRY_POINT;
   317     OstTraceFunctionEntry0( CCALENSTATE_ACTIVATECURRENTSTATEL_ENTRY );
   318 	
   318     
   319     aStateMachine.ActivateCurrentStateL();
   319     aStateMachine.ActivateCurrentStateL();
   320     	
   320     	
   321     TRACE_EXIT_POINT;	
   321 	OstTraceFunctionExit0( CCALENSTATE_ACTIVATECURRENTSTATEL_EXIT );
   322 	}
   322 	}
   323 // ----------------------------------------------------------------------------
   323 // ----------------------------------------------------------------------------
   324 // CCalenState::CancelPreviousCmd
   324 // CCalenState::CancelPreviousCmd
   325 // Cancel the previous command
   325 // Cancel the previous command
   326 // ----------------------------------------------------------------------------
   326 // ----------------------------------------------------------------------------
   327 void CCalenState::CancelPreviousCmd(CCalenStateMachine& aStateMachine)
   327 void CCalenState::CancelPreviousCmd(CCalenStateMachine& aStateMachine)
   328 	{
   328 	{
   329 	TRACE_ENTRY_POINT;
   329     OstTraceFunctionEntry0( CCALENSTATE_CANCELPREVIOUSCMD_ENTRY );
   330 	
   330     
   331 	aStateMachine.CancelPreviousCmd();
   331 	aStateMachine.CancelPreviousCmd();
   332 	
   332 	
   333 	TRACE_EXIT_POINT;
   333 	OstTraceFunctionExit0( CCALENSTATE_CANCELPREVIOUSCMD_EXIT );
   334 	}
   334 	}
   335 
   335 
   336 // ----------------------------------------------------------------------------
   336 // ----------------------------------------------------------------------------
   337 // CCalenState::CancelExecutingCmd
   337 // CCalenState::CancelExecutingCmd
   338 // Cancels executing command
   338 // Cancels executing command
   339 // ----------------------------------------------------------------------------
   339 // ----------------------------------------------------------------------------
   340 void CCalenState::CancelExecutingCmd()
   340 void CCalenState::CancelExecutingCmd()
   341 	{
   341 	{
   342     TRACE_ENTRY_POINT;
   342     OstTraceFunctionEntry0( CCALENSTATE_CANCELEXECUTINGCMD_ENTRY );
   343 	
   343     
   344 	if(iCmdCallback)
   344 	if(iCmdCallback)
   345 		{
   345 		{
   346 		iCmdCallback->Cancel();
   346 		iCmdCallback->Cancel();
   347 		}
   347 		}
   348     	
   348     	
   349     TRACE_EXIT_POINT;	
   349 	OstTraceFunctionExit0( CCALENSTATE_CANCELEXECUTINGCMD_EXIT );
   350 	}	
   350 	}	
   351 // End of file
   351 // End of file