calendarui/controller/src/calenhelpstate.cpp
changeset 51 0b38fc5b94c6
parent 18 c198609911f9
child 89 b57382753122
equal deleted inserted replaced
46:ecd7b9840282 51:0b38fc5b94c6
    20 #include "calenhelpstate.h"
    20 #include "calenhelpstate.h"
    21 #include "calendarui_debug.h"           // Debug macros
    21 #include "calendarui_debug.h"           // Debug macros
    22 #include "calencontroller.h"
    22 #include "calencontroller.h"
    23 #include "calenstatemachine.h"
    23 #include "calenstatemachine.h"
    24 #include "calennotifier.h"
    24 #include "calennotifier.h"
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "calenhelpstateTraces.h"
       
    28 #endif
    25 
    29 
    26 // ----------------------------------------------------------------------------
    30 // ----------------------------------------------------------------------------
    27 // CCalenHelpState::NewLC
    31 // CCalenHelpState::NewLC
    28 // First stage construction
    32 // First stage construction
    29 // ----------------------------------------------------------------------------
    33 // ----------------------------------------------------------------------------
    30 CCalenHelpState* CCalenHelpState::NewLC( CCalenController& aController,
    34 CCalenHelpState* CCalenHelpState::NewLC( CCalenController& aController,
    31                                                 RHashSet<TCalenNotification>&  aOutstandingNotifications )
    35                                                 RHashSet<TCalenNotification>&  aOutstandingNotifications )
    32     {
    36     {
    33     TRACE_ENTRY_POINT;
    37     OstTraceFunctionEntry0( CCALENHELPSTATE_NEWLC_ENTRY );
    34 
    38     
    35     CCalenHelpState* self = new ( ELeave ) CCalenHelpState( aController, aOutstandingNotifications );
    39     CCalenHelpState* self = new ( ELeave ) CCalenHelpState( aController, aOutstandingNotifications );
    36     CleanupStack::PushL( self );
    40     CleanupStack::PushL( self );
    37     self->ConstructL();
    41     self->ConstructL();
    38 
    42 
    39     TRACE_EXIT_POINT;
    43     OstTraceFunctionExit0( CCALENHELPSTATE_NEWLC_EXIT );
    40     return self;
    44     return self;
    41     }
    45     }
    42 
    46 
    43 // ----------------------------------------------------------------------------
    47 // ----------------------------------------------------------------------------
    44 // CCalenHelpState::ConstructL
    48 // CCalenHelpState::ConstructL
    45 // Second stage construction
    49 // Second stage construction
    46 // ----------------------------------------------------------------------------
    50 // ----------------------------------------------------------------------------
    47 void CCalenHelpState::ConstructL()
    51 void CCalenHelpState::ConstructL()
    48     {
    52     {
    49     TRACE_ENTRY_POINT;
    53     OstTraceFunctionEntry0( CCALENHELPSTATE_CONSTRUCTL_ENTRY );
       
    54     
    50     BaseConstructL();
    55     BaseConstructL();
    51     
    56     
    52     TRACE_EXIT_POINT;
    57     OstTraceFunctionExit0( CCALENHELPSTATE_CONSTRUCTL_EXIT );
    53     }
    58     }
    54     
    59     
    55 // ----------------------------------------------------------------------------
    60 // ----------------------------------------------------------------------------
    56 // CCalenHelpState::CCalenHelpState
    61 // CCalenHelpState::CCalenHelpState
    57 // C++ Constructor
    62 // C++ Constructor
    58 // ----------------------------------------------------------------------------
    63 // ----------------------------------------------------------------------------
    59 CCalenHelpState::CCalenHelpState( CCalenController& aController,
    64 CCalenHelpState::CCalenHelpState( CCalenController& aController,
    60                                              RHashSet<TCalenNotification>&  aOutstandingNotifications )
    65                                              RHashSet<TCalenNotification>&  aOutstandingNotifications )
    61     : CCalenState( aController, aOutstandingNotifications )
    66     : CCalenState( aController, aOutstandingNotifications )
    62     {
    67     {
    63     TRACE_ENTRY_POINT;
    68     OstTraceFunctionEntry0( CCALENHELPSTATE_CCALENHELPSTATE_ENTRY );
    64     
    69     
    65     TRACE_EXIT_POINT;
    70     OstTraceFunctionExit0( CCALENHELPSTATE_CCALENHELPSTATE_EXIT );
    66     }
    71     }
    67     
    72     
    68 // ----------------------------------------------------------------------------
    73 // ----------------------------------------------------------------------------
    69 // CCalenHelpState::CCalenHelpState
    74 // CCalenHelpState::CCalenHelpState
    70 // Destructor
    75 // Destructor
    71 // ----------------------------------------------------------------------------    
    76 // ----------------------------------------------------------------------------    
    72 CCalenHelpState::~CCalenHelpState()
    77 CCalenHelpState::~CCalenHelpState()
    73     {
    78     {
    74     TRACE_ENTRY_POINT;
    79     OstTraceFunctionEntry0( DUP1_CCALENHELPSTATE_CCALENHELPSTATE_ENTRY );
    75     
    80 
    76     TRACE_EXIT_POINT;
    81     OstTraceFunctionExit0( DUP1_CCALENHELPSTATE_CCALENHELPSTATE_EXIT );
    77     }
    82     }
    78 
    83 
    79 // ----------------------------------------------------------------------------
    84 // ----------------------------------------------------------------------------
    80 // CCalenHelpState::HandleCommandL
    85 // CCalenHelpState::HandleCommandL
    81 // From CCalenState
    86 // From CCalenState
    82 // ----------------------------------------------------------------------------    
    87 // ----------------------------------------------------------------------------    
    83 TBool CCalenHelpState::HandleCommandL( const TCalenCommand& aCommand,
    88 TBool CCalenHelpState::HandleCommandL( const TCalenCommand& aCommand,
    84                                    CCalenStateMachine& aStateMachine )
    89                                    CCalenStateMachine& aStateMachine )
    85     {
    90     {
    86     TRACE_ENTRY_POINT;
    91     OstTraceFunctionEntry0( CCALENHELPSTATE_HANDLECOMMANDL_ENTRY );
       
    92     
    87     TInt cmd = aCommand.Command();
    93     TInt cmd = aCommand.Command();
    88     MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd );
    94     MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd );
    89     
    95     
    90     ASSERT( handler ); // FIXME: error ui
    96     ASSERT( handler ); // FIXME: error ui
    91     
    97     
    98 
   104 
    99         RequestCallbackL( handler, aCommand );
   105         RequestCallbackL( handler, aCommand );
   100         cmdUsed = ETrue;
   106         cmdUsed = ETrue;
   101         }
   107         }
   102 
   108 
   103     TRACE_EXIT_POINT;
   109     OstTraceFunctionExit0( CCALENHELPSTATE_HANDLECOMMANDL_EXIT );
   104     return cmdUsed;
   110     return cmdUsed;
   105 
   111 
   106     }
   112     }
   107 
   113 
   108 // ----------------------------------------------------------------------------
   114 // ----------------------------------------------------------------------------
   110 // From CCalenState
   116 // From CCalenState
   111 // ----------------------------------------------------------------------------        
   117 // ----------------------------------------------------------------------------        
   112 void CCalenHelpState::HandleNotificationL(const TCalenNotification& /*aNotification*/,
   118 void CCalenHelpState::HandleNotificationL(const TCalenNotification& /*aNotification*/,
   113                                           CCalenStateMachine& /*aStateMachine*/ )
   119                                           CCalenStateMachine& /*aStateMachine*/ )
   114     {
   120     {
   115     TRACE_ENTRY_POINT;
   121     OstTraceFunctionEntry0( CCALENHELPSTATE_HANDLENOTIFICATIONL_ENTRY );
   116     TRACE_EXIT_POINT;
   122     
       
   123     OstTraceFunctionExit0( CCALENHELPSTATE_HANDLENOTIFICATIONL_EXIT );
   117     }
   124     }
   118 
   125 
   119 
   126 
   120 
   127 
   121  // end of file
   128  // end of file