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