calendarui/controller/src/calensendingstate.cpp
changeset 51 0b38fc5b94c6
parent 18 c198609911f9
child 89 b57382753122
equal deleted inserted replaced
46:ecd7b9840282 51:0b38fc5b94c6
    20 #include "calensendingstate.h"
    20 #include "calensendingstate.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 "calensendingstateTraces.h"
       
    28 #endif
    25 
    29 
    26 // ----------------------------------------------------------------------------
    30 // ----------------------------------------------------------------------------
    27 // CCalenSendingState::NewLC
    31 // CCalenSendingState::NewLC
    28 // First stage construction
    32 // First stage construction
    29 // ----------------------------------------------------------------------------
    33 // ----------------------------------------------------------------------------
    30 CCalenSendingState* CCalenSendingState::NewLC( CCalenController& aController,
    34 CCalenSendingState* CCalenSendingState::NewLC( CCalenController& aController,
    31                                                     RHashSet<TCalenNotification>&  aOutstandingNotifications )
    35                                                     RHashSet<TCalenNotification>&  aOutstandingNotifications )
    32     {
    36     {
    33     TRACE_ENTRY_POINT;
    37     OstTraceFunctionEntry0( CCALENSENDINGSTATE_NEWLC_ENTRY );
    34 
    38     
    35     CCalenSendingState* self = new ( ELeave ) CCalenSendingState( aController,aOutstandingNotifications );
    39     CCalenSendingState* self = new ( ELeave ) CCalenSendingState( aController,aOutstandingNotifications );
    36     CleanupStack::PushL( self );
    40     CleanupStack::PushL( self );
    37     self->ConstructL();
    41     self->ConstructL();
    38 
    42 
    39     TRACE_EXIT_POINT;
    43     OstTraceFunctionExit0( CCALENSENDINGSTATE_NEWLC_EXIT );
    40     return self;
    44     return self;
    41     }
    45     }
    42 
    46 
    43 // ----------------------------------------------------------------------------
    47 // ----------------------------------------------------------------------------
    44 // CCalenSendingState::ConstructL
    48 // CCalenSendingState::ConstructL
    45 // Second stage construction
    49 // Second stage construction
    46 // ----------------------------------------------------------------------------
    50 // ----------------------------------------------------------------------------
    47 void CCalenSendingState::ConstructL()
    51 void CCalenSendingState::ConstructL()
    48     {
    52     {
    49     TRACE_ENTRY_POINT;
    53     OstTraceFunctionEntry0( CCALENSENDINGSTATE_CONSTRUCTL_ENTRY );
       
    54     
    50     BaseConstructL();
    55     BaseConstructL();
    51     
    56     
    52     TRACE_EXIT_POINT;
    57     OstTraceFunctionExit0( CCALENSENDINGSTATE_CONSTRUCTL_EXIT );
    53     }
    58     }
    54     
    59     
    55 // ----------------------------------------------------------------------------
    60 // ----------------------------------------------------------------------------
    56 // CCalenSendingState::CCalenSendingState
    61 // CCalenSendingState::CCalenSendingState
    57 // C++ Constructor
    62 // C++ Constructor
    58 // ----------------------------------------------------------------------------
    63 // ----------------------------------------------------------------------------
    59 CCalenSendingState::CCalenSendingState( CCalenController& aController,
    64 CCalenSendingState::CCalenSendingState( 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( CCALENSENDINGSTATE_CCALENSENDINGSTATE_ENTRY );
    64     
    69     
    65     TRACE_EXIT_POINT;
    70     OstTraceFunctionExit0( CCALENSENDINGSTATE_CCALENSENDINGSTATE_EXIT );
    66     }
    71     }
    67     
    72     
    68 // ----------------------------------------------------------------------------
    73 // ----------------------------------------------------------------------------
    69 // CCalenSendingState::CCalenSendingState
    74 // CCalenSendingState::CCalenSendingState
    70 // Destructor
    75 // Destructor
    71 // ----------------------------------------------------------------------------    
    76 // ----------------------------------------------------------------------------    
    72 CCalenSendingState::~CCalenSendingState()
    77 CCalenSendingState::~CCalenSendingState()
    73     {
    78     {
    74     TRACE_ENTRY_POINT;
    79     OstTraceFunctionEntry0( DUP1_CCALENSENDINGSTATE_CCALENSENDINGSTATE_ENTRY );
    75     
    80     
    76     TRACE_EXIT_POINT;
    81     OstTraceFunctionExit0( DUP1_CCALENSENDINGSTATE_CCALENSENDINGSTATE_EXIT );
    77     }
    82     }
    78 
    83 
    79 // ----------------------------------------------------------------------------
    84 // ----------------------------------------------------------------------------
    80 // CCalenSendingState::HandleCommandL
    85 // CCalenSendingState::HandleCommandL
    81 // From CCalenState
    86 // From CCalenState
    82 // ----------------------------------------------------------------------------    
    87 // ----------------------------------------------------------------------------    
    83 TBool CCalenSendingState::HandleCommandL( const TCalenCommand& aCommand,
    88 TBool CCalenSendingState::HandleCommandL( const TCalenCommand& aCommand,
    84                                          CCalenStateMachine& aStateMachine )
    89                                          CCalenStateMachine& aStateMachine )
    85     {
    90     {
    86     TRACE_ENTRY_POINT;
    91     OstTraceFunctionEntry0( CCALENSENDINGSTATE_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     
    97         ActivateCurrentStateL(aStateMachine);
   103         ActivateCurrentStateL(aStateMachine);
    98         RequestCallbackL( handler, aCommand );
   104         RequestCallbackL( handler, aCommand );
    99         cmdUsed = ETrue;
   105         cmdUsed = ETrue;
   100         }
   106         }
   101 
   107 
   102     TRACE_EXIT_POINT;
   108     OstTraceFunctionExit0( CCALENSENDINGSTATE_HANDLECOMMANDL_EXIT );
   103     return cmdUsed;
   109     return cmdUsed;
   104     }
   110     }
   105 
   111 
   106 // ----------------------------------------------------------------------------
   112 // ----------------------------------------------------------------------------
   107 // CCalenSendingState::HandleNotificationL
   113 // CCalenSendingState::HandleNotificationL
   108 // From CCalenState
   114 // From CCalenState
   109 // ----------------------------------------------------------------------------        
   115 // ----------------------------------------------------------------------------        
   110 void CCalenSendingState::HandleNotificationL(const TCalenNotification& aNotification,
   116 void CCalenSendingState::HandleNotificationL(const TCalenNotification& aNotification,
   111                                               CCalenStateMachine& aStateMachine )
   117                                               CCalenStateMachine& aStateMachine )
   112     {
   118     {
   113     TRACE_ENTRY_POINT;
   119     OstTraceFunctionEntry0( CCALENSENDINGSTATE_HANDLENOTIFICATIONL_ENTRY );
   114 
   120     
   115     switch( aNotification )
   121     switch( aNotification )
   116         {
   122         {
   117         case ECalenNotifyDialogClosed:  // issued when send method query dialog is cancelled
   123         case ECalenNotifyDialogClosed:  // issued when send method query dialog is cancelled
   118         	{
   124         	{
   119         	// FIXME Should have a ECalenNotifyEntrySent?
   125         	// FIXME Should have a ECalenNotifyEntrySent?
   131         default:
   137         default:
   132             CCalenState::HandleNotificationL( aNotification, aStateMachine );
   138             CCalenState::HandleNotificationL( aNotification, aStateMachine );
   133             break;
   139             break;
   134         }
   140         }
   135 
   141 
   136     TRACE_EXIT_POINT;
   142     OstTraceFunctionExit0( CCALENSENDINGSTATE_HANDLENOTIFICATIONL_EXIT );
   137     }
   143     }
   138 
   144 
   139 
   145 
   140  // end of file
   146  // end of file