20 #include "caleneditingstate.h" |
20 #include "caleneditingstate.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 "caleneditingstateTraces.h" |
|
28 #endif |
25 |
29 |
26 // ---------------------------------------------------------------------------- |
30 // ---------------------------------------------------------------------------- |
27 // CCalenEditingState::NewLC |
31 // CCalenEditingState::NewLC |
28 // First stage construction |
32 // First stage construction |
29 // ---------------------------------------------------------------------------- |
33 // ---------------------------------------------------------------------------- |
30 CCalenEditingState* CCalenEditingState::NewLC( CCalenController& aController, |
34 CCalenEditingState* CCalenEditingState::NewLC( CCalenController& aController, |
31 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
35 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
32 { |
36 { |
33 TRACE_ENTRY_POINT; |
37 OstTraceFunctionEntry0( CCALENEDITINGSTATE_NEWLC_ENTRY ); |
34 |
38 |
35 CCalenEditingState* self = new( ELeave ) CCalenEditingState( aController, aOutstandingNotifications ); |
39 CCalenEditingState* self = new( ELeave ) CCalenEditingState( aController, aOutstandingNotifications ); |
36 CleanupStack::PushL( self ); |
40 CleanupStack::PushL( self ); |
37 self->ConstructL(); |
41 self->ConstructL(); |
38 |
42 |
39 TRACE_EXIT_POINT; |
43 OstTraceFunctionExit0( CCALENEDITINGSTATE_NEWLC_EXIT ); |
40 return self; |
44 return self; |
41 } |
45 } |
42 |
46 |
43 // ---------------------------------------------------------------------------- |
47 // ---------------------------------------------------------------------------- |
44 // CCalenEditingState::ConstructL |
48 // CCalenEditingState::ConstructL |
45 // Second stage construction |
49 // Second stage construction |
46 // ---------------------------------------------------------------------------- |
50 // ---------------------------------------------------------------------------- |
47 void CCalenEditingState::ConstructL() |
51 void CCalenEditingState::ConstructL() |
48 { |
52 { |
49 TRACE_ENTRY_POINT; |
53 OstTraceFunctionEntry0( CCALENEDITINGSTATE_CONSTRUCTL_ENTRY ); |
|
54 |
50 BaseConstructL(); |
55 BaseConstructL(); |
51 |
56 |
52 TRACE_EXIT_POINT; |
57 OstTraceFunctionExit0( CCALENEDITINGSTATE_CONSTRUCTL_EXIT ); |
53 } |
58 } |
54 |
59 |
55 // ---------------------------------------------------------------------------- |
60 // ---------------------------------------------------------------------------- |
56 // CCalenEditingState::CCalenEditingState |
61 // CCalenEditingState::CCalenEditingState |
57 // C++ Constructor |
62 // C++ Constructor |
58 // ---------------------------------------------------------------------------- |
63 // ---------------------------------------------------------------------------- |
59 CCalenEditingState::CCalenEditingState( CCalenController& aController, |
64 CCalenEditingState::CCalenEditingState( 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( CCALENEDITINGSTATE_CCALENEDITINGSTATE_ENTRY ); |
64 |
69 |
65 TRACE_EXIT_POINT; |
70 OstTraceFunctionExit0( CCALENEDITINGSTATE_CCALENEDITINGSTATE_EXIT ); |
66 } |
71 } |
67 |
72 |
68 // ---------------------------------------------------------------------------- |
73 // ---------------------------------------------------------------------------- |
69 // CCalenEditingState::CCalenEditingState |
74 // CCalenEditingState::CCalenEditingState |
70 // Destructor |
75 // Destructor |
71 // ---------------------------------------------------------------------------- |
76 // ---------------------------------------------------------------------------- |
72 CCalenEditingState::~CCalenEditingState() |
77 CCalenEditingState::~CCalenEditingState() |
73 { |
78 { |
74 TRACE_ENTRY_POINT; |
79 OstTraceFunctionEntry0( DUP1_CCALENEDITINGSTATE_CCALENEDITINGSTATE_ENTRY ); |
75 |
80 |
76 TRACE_EXIT_POINT; |
81 OstTraceFunctionExit0( DUP1_CCALENEDITINGSTATE_CCALENEDITINGSTATE_EXIT ); |
77 } |
82 } |
78 |
83 |
79 // ---------------------------------------------------------------------------- |
84 // ---------------------------------------------------------------------------- |
80 // CCalenEditingState::HandleCommandL |
85 // CCalenEditingState::HandleCommandL |
81 // From CCalenState |
86 // From CCalenState |
82 // ---------------------------------------------------------------------------- |
87 // ---------------------------------------------------------------------------- |
83 TBool CCalenEditingState::HandleCommandL( const TCalenCommand& aCommand, |
88 TBool CCalenEditingState::HandleCommandL( const TCalenCommand& aCommand, |
84 CCalenStateMachine& aStateMachine ) |
89 CCalenStateMachine& aStateMachine ) |
85 { |
90 { |
86 TRACE_ENTRY_POINT |
91 OstTraceFunctionEntry0( CCALENEDITINGSTATE_HANDLECOMMANDL_ENTRY ); |
87 |
92 |
88 TInt cmd = aCommand.Command(); |
93 TInt cmd = aCommand.Command(); |
89 MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd ); |
94 MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd ); |
90 |
95 |
91 ASSERT( handler ); |
96 ASSERT( handler ); |
136 } |
141 } |
137 |
142 |
138 if(cmdUsed) |
143 if(cmdUsed) |
139 RequestCallbackL( handler, aCommand ); |
144 RequestCallbackL( handler, aCommand ); |
140 |
145 |
141 TRACE_EXIT_POINT; |
|
142 |
146 |
|
147 OstTraceFunctionExit0( CCALENEDITINGSTATE_HANDLECOMMANDL_EXIT ); |
143 return cmdUsed; |
148 return cmdUsed; |
144 } |
149 } |
145 |
150 |
146 // ---------------------------------------------------------------------------- |
151 // ---------------------------------------------------------------------------- |
147 // CCalenEditingState::HandleNotificationL |
152 // CCalenEditingState::HandleNotificationL |
148 // From CCalenState |
153 // From CCalenState |
149 // ---------------------------------------------------------------------------- |
154 // ---------------------------------------------------------------------------- |
150 void CCalenEditingState::HandleNotificationL(const TCalenNotification& aNotification, |
155 void CCalenEditingState::HandleNotificationL(const TCalenNotification& aNotification, |
151 CCalenStateMachine& aStateMachine ) |
156 CCalenStateMachine& aStateMachine ) |
152 { |
157 { |
153 TRACE_ENTRY_POINT; |
158 OstTraceFunctionEntry0( CCALENEDITINGSTATE_HANDLENOTIFICATIONL_ENTRY ); |
154 |
159 |
155 switch( aNotification ) |
160 switch( aNotification ) |
156 { |
161 { |
157 case ECalenNotifyEntryClosed: // issued when new entry dialog is cancelled |
162 case ECalenNotifyEntryClosed: // issued when new entry dialog is cancelled |
158 case ECalenNotifyEntrySaved: |
163 case ECalenNotifyEntrySaved: |