20 #include "calenidlestate.h" |
20 #include "calenidlestate.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 "calenidlestateTraces.h" |
|
28 #endif |
25 |
29 |
26 // ---------------------------------------------------------------------------- |
30 // ---------------------------------------------------------------------------- |
27 // CalenIdleState::NewLC |
31 // CalenIdleState::NewLC |
28 // First stage construction |
32 // First stage construction |
29 // ---------------------------------------------------------------------------- |
33 // ---------------------------------------------------------------------------- |
30 CCalenIdleState* CCalenIdleState::NewLC( CCalenController& aController, |
34 CCalenIdleState* CCalenIdleState::NewLC( CCalenController& aController, |
31 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
35 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
32 { |
36 { |
33 TRACE_ENTRY_POINT; |
37 OstTraceFunctionEntry0( CCALENIDLESTATE_NEWLC_ENTRY ); |
34 |
38 |
35 CCalenIdleState* self = new ( ELeave ) CCalenIdleState( aController, |
39 CCalenIdleState* self = new ( ELeave ) CCalenIdleState( aController, |
36 aOutstandingNotifications ); |
40 aOutstandingNotifications ); |
37 CleanupStack::PushL( self ); |
41 CleanupStack::PushL( self ); |
38 self->ConstructL(); |
42 self->ConstructL(); |
39 |
43 |
40 TRACE_EXIT_POINT; |
44 OstTraceFunctionExit0( CCALENIDLESTATE_NEWLC_EXIT ); |
41 return self; |
45 return self; |
42 } |
46 } |
43 |
47 |
44 // ---------------------------------------------------------------------------- |
48 // ---------------------------------------------------------------------------- |
45 // CCalenIdleState::ConstructL |
49 // CCalenIdleState::ConstructL |
46 // Second stage construction |
50 // Second stage construction |
47 // ---------------------------------------------------------------------------- |
51 // ---------------------------------------------------------------------------- |
48 void CCalenIdleState::ConstructL() |
52 void CCalenIdleState::ConstructL() |
49 { |
53 { |
50 TRACE_ENTRY_POINT; |
54 OstTraceFunctionEntry0( CCALENIDLESTATE_CONSTRUCTL_ENTRY ); |
|
55 |
51 BaseConstructL(); |
56 BaseConstructL(); |
52 |
57 |
53 TRACE_EXIT_POINT; |
58 OstTraceFunctionExit0( CCALENIDLESTATE_CONSTRUCTL_EXIT ); |
54 } |
59 } |
55 |
60 |
56 // ---------------------------------------------------------------------------- |
61 // ---------------------------------------------------------------------------- |
57 // CCalenIdleState::CCalenIdleState |
62 // CCalenIdleState::CCalenIdleState |
58 // C++ Constructor |
63 // C++ Constructor |
59 // ---------------------------------------------------------------------------- |
64 // ---------------------------------------------------------------------------- |
60 CCalenIdleState::CCalenIdleState( CCalenController& aController, |
65 CCalenIdleState::CCalenIdleState( CCalenController& aController, |
61 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
66 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
62 : CCalenState( aController, aOutstandingNotifications ) |
67 : CCalenState( aController, aOutstandingNotifications ) |
63 { |
68 { |
64 TRACE_ENTRY_POINT; |
69 OstTraceFunctionEntry0( CCALENIDLESTATE_CCALENIDLESTATE_ENTRY ); |
65 |
70 |
66 TRACE_EXIT_POINT; |
71 OstTraceFunctionExit0( CCALENIDLESTATE_CCALENIDLESTATE_EXIT ); |
67 } |
72 } |
68 |
73 |
69 // ---------------------------------------------------------------------------- |
74 // ---------------------------------------------------------------------------- |
70 // CCalenIdleState::CCalenIdleState |
75 // CCalenIdleState::CCalenIdleState |
71 // Destructor |
76 // Destructor |
72 // ---------------------------------------------------------------------------- |
77 // ---------------------------------------------------------------------------- |
73 CCalenIdleState::~CCalenIdleState() |
78 CCalenIdleState::~CCalenIdleState() |
74 { |
79 { |
75 TRACE_ENTRY_POINT; |
80 OstTraceFunctionEntry0( DUP1_CCALENIDLESTATE_CCALENIDLESTATE_ENTRY ); |
76 |
81 |
77 TRACE_EXIT_POINT; |
82 OstTraceFunctionExit0( DUP1_CCALENIDLESTATE_CCALENIDLESTATE_EXIT ); |
78 } |
83 } |
79 |
84 |
80 // ---------------------------------------------------------------------------- |
85 // ---------------------------------------------------------------------------- |
81 // CCalenIdleState::HandleCommandL |
86 // CCalenIdleState::HandleCommandL |
82 // From CCalenState |
87 // From CCalenState |
83 // ---------------------------------------------------------------------------- |
88 // ---------------------------------------------------------------------------- |
84 TBool CCalenIdleState::HandleCommandL( const TCalenCommand& aCommand, |
89 TBool CCalenIdleState::HandleCommandL( const TCalenCommand& aCommand, |
85 CCalenStateMachine& aStateMachine ) |
90 CCalenStateMachine& aStateMachine ) |
86 { |
91 { |
87 TRACE_ENTRY_POINT; |
92 OstTraceFunctionEntry0( CCALENIDLESTATE_HANDLECOMMANDL_ENTRY ); |
88 |
93 |
89 TInt cmd = aCommand.Command(); |
94 TInt cmd = aCommand.Command(); |
90 MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd ); |
95 MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd ); |
91 |
96 |
92 ASSERT( handler ); // FIXME: error ui |
97 ASSERT( handler ); // FIXME: error ui |
218 break; |
223 break; |
219 } |
224 } |
220 |
225 |
221 RequestCallbackL( handler, aCommand ); |
226 RequestCallbackL( handler, aCommand ); |
222 |
227 |
223 TRACE_EXIT_POINT; |
228 OstTraceFunctionExit0( CCALENIDLESTATE_HANDLECOMMANDL_EXIT ); |
224 return cmdUsed; |
229 return cmdUsed; |
225 } |
230 } |
226 |
231 |
227 // ---------------------------------------------------------------------------- |
232 // ---------------------------------------------------------------------------- |
228 // CCalenIdleState::HandleNotificationL |
233 // CCalenIdleState::HandleNotificationL |
229 // From CCalenState |
234 // From CCalenState |
230 // ---------------------------------------------------------------------------- |
235 // ---------------------------------------------------------------------------- |
231 void CCalenIdleState::HandleNotificationL(const TCalenNotification& aNotification, |
236 void CCalenIdleState::HandleNotificationL(const TCalenNotification& aNotification, |
232 CCalenStateMachine& aStateMachine) |
237 CCalenStateMachine& aStateMachine) |
233 { |
238 { |
234 TRACE_ENTRY_POINT; |
239 OstTraceFunctionEntry0( CCALENIDLESTATE_HANDLENOTIFICATIONL_ENTRY ); |
235 |
240 |
236 CCalenState::HandleNotificationL( aNotification, aStateMachine ); |
241 CCalenState::HandleNotificationL( aNotification, aStateMachine ); |
237 |
242 |
238 TRACE_EXIT_POINT; |
243 OstTraceFunctionExit0( CCALENIDLESTATE_HANDLENOTIFICATIONL_EXIT ); |
239 } |
244 } |
240 |
245 |
241 // end of file |
246 // end of file |
242 |
247 |