20 #include "calenbackgroundstate.h" |
20 #include "calenbackgroundstate.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 "calenbackgroundstateTraces.h" |
|
28 #endif |
25 |
29 |
26 // ---------------------------------------------------------------------------- |
30 // ---------------------------------------------------------------------------- |
27 // CCalenBackgroundState::NewLC |
31 // CCalenBackgroundState::NewLC |
28 // First stage construction |
32 // First stage construction |
29 // ---------------------------------------------------------------------------- |
33 // ---------------------------------------------------------------------------- |
30 CCalenBackgroundState* CCalenBackgroundState::NewLC( CCalenController& aController, |
34 CCalenBackgroundState* CCalenBackgroundState::NewLC( CCalenController& aController, |
31 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
35 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
32 { |
36 { |
33 TRACE_ENTRY_POINT; |
37 OstTraceFunctionEntry0( CCALENBACKGROUNDSTATE_NEWLC_ENTRY ); |
34 |
38 |
35 CCalenBackgroundState* self = new ( ELeave ) CCalenBackgroundState( aController,aOutstandingNotifications ); |
39 CCalenBackgroundState* self = new ( ELeave ) CCalenBackgroundState( aController,aOutstandingNotifications ); |
36 CleanupStack::PushL( self ); |
40 CleanupStack::PushL( self ); |
37 self->ConstructL(); |
41 self->ConstructL(); |
38 |
42 |
39 TRACE_EXIT_POINT; |
43 OstTraceFunctionExit0( CCALENBACKGROUNDSTATE_NEWLC_EXIT ); |
40 return self; |
44 return self; |
41 } |
45 } |
42 |
46 |
43 // ---------------------------------------------------------------------------- |
47 // ---------------------------------------------------------------------------- |
44 // CCalenBackgroundState::ConstructL |
48 // CCalenBackgroundState::ConstructL |
45 // Second stage construction |
49 // Second stage construction |
46 // ---------------------------------------------------------------------------- |
50 // ---------------------------------------------------------------------------- |
47 void CCalenBackgroundState::ConstructL() |
51 void CCalenBackgroundState::ConstructL() |
48 { |
52 { |
49 TRACE_ENTRY_POINT; |
53 OstTraceFunctionEntry0( CCALENBACKGROUNDSTATE_CONSTRUCTL_ENTRY ); |
|
54 |
50 BaseConstructL(); |
55 BaseConstructL(); |
51 |
56 |
52 TRACE_EXIT_POINT; |
57 OstTraceFunctionExit0( CCALENBACKGROUNDSTATE_CONSTRUCTL_EXIT ); |
53 } |
58 } |
54 |
59 |
55 // ---------------------------------------------------------------------------- |
60 // ---------------------------------------------------------------------------- |
56 // CCalenBackgroundState::CCalenBackgroundState |
61 // CCalenBackgroundState::CCalenBackgroundState |
57 // C++ Constructor |
62 // C++ Constructor |
58 // ---------------------------------------------------------------------------- |
63 // ---------------------------------------------------------------------------- |
59 CCalenBackgroundState::CCalenBackgroundState( CCalenController& aController, |
64 CCalenBackgroundState::CCalenBackgroundState( 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( CCALENBACKGROUNDSTATE_CCALENBACKGROUNDSTATE_ENTRY ); |
64 |
69 |
65 TRACE_EXIT_POINT; |
70 OstTraceFunctionExit0( CCALENBACKGROUNDSTATE_CCALENBACKGROUNDSTATE_EXIT ); |
66 } |
71 } |
67 |
72 |
68 // ---------------------------------------------------------------------------- |
73 // ---------------------------------------------------------------------------- |
69 // CCalenBackgroundState::CCalenBackgroundState |
74 // CCalenBackgroundState::CCalenBackgroundState |
70 // Destructor |
75 // Destructor |
71 // ---------------------------------------------------------------------------- |
76 // ---------------------------------------------------------------------------- |
72 CCalenBackgroundState::~CCalenBackgroundState() |
77 CCalenBackgroundState::~CCalenBackgroundState() |
73 { |
78 { |
74 TRACE_ENTRY_POINT; |
79 OstTraceFunctionEntry0( DUP1_CCALENBACKGROUNDSTATE_CCALENBACKGROUNDSTATE_ENTRY ); |
75 |
80 |
76 TRACE_EXIT_POINT; |
81 OstTraceFunctionExit0( DUP1_CCALENBACKGROUNDSTATE_CCALENBACKGROUNDSTATE_EXIT ); |
77 } |
82 } |
78 |
83 |
79 // ---------------------------------------------------------------------------- |
84 // ---------------------------------------------------------------------------- |
80 // CCalenBackgroundState::HandleCommandL |
85 // CCalenBackgroundState::HandleCommandL |
81 // From CCalenState |
86 // From CCalenState |
82 // ---------------------------------------------------------------------------- |
87 // ---------------------------------------------------------------------------- |
83 TBool CCalenBackgroundState::HandleCommandL( const TCalenCommand& aCommand, |
88 TBool CCalenBackgroundState::HandleCommandL( const TCalenCommand& aCommand, |
84 CCalenStateMachine& aStateMachine ) |
89 CCalenStateMachine& aStateMachine ) |
85 { |
90 { |
86 TRACE_ENTRY_POINT; |
91 OstTraceFunctionEntry0( CCALENBACKGROUNDSTATE_HANDLECOMMANDL_ENTRY ); |
|
92 |
87 |
93 |
88 //When application is pushed background |
94 //When application is pushed background |
89 //1,when launched from active idle ,( AI screen or missed alarm softnotification/small indicator), |
95 //1,when launched from active idle ,( AI screen or missed alarm softnotification/small indicator), |
90 // multiple entires -> Day view |
96 // multiple entires -> Day view |
91 //2,when launched from active idle ( AI screen or missed alarm softnotification/small indicator), |
97 //2,when launched from active idle ( AI screen or missed alarm softnotification/small indicator), |
169 // iOutstandingNotifications.InsertL(aNotification); |
175 // iOutstandingNotifications.InsertL(aNotification); |
170 iController.Notifier().BroadcastApprovedNotification( aNotification ); |
176 iController.Notifier().BroadcastApprovedNotification( aNotification ); |
171 break; |
177 break; |
172 } |
178 } |
173 |
179 |
174 TRACE_EXIT_POINT; |
180 OstTraceFunctionExit0( CCALENBACKGROUNDSTATE_HANDLENOTIFICATIONL_EXIT ); |
175 } |
181 } |
176 |
182 |
177 // ---------------------------------------------------------------------------- |
183 // ---------------------------------------------------------------------------- |
178 // CCalenBackgroundState::HandleStateActivationL |
184 // CCalenBackgroundState::HandleStateActivationL |
179 // Behavior when state is activated. |
185 // Behavior when state is activated. |
180 // ---------------------------------------------------------------------------- |
186 // ---------------------------------------------------------------------------- |
181 void CCalenBackgroundState::HandleStateActivationL(CCalenStateMachine& aStateMachine) |
187 void CCalenBackgroundState::HandleStateActivationL(CCalenStateMachine& aStateMachine) |
182 { |
188 { |
183 TRACE_ENTRY_POINT; |
189 OstTraceFunctionEntry0( CCALENBACKGROUNDSTATE_HANDLESTATEACTIVATIONL_ENTRY ); |
|
190 |
184 if(iOutstandingNotifications.Find(ECalenNotifyAppBackgrounded)) |
191 if(iOutstandingNotifications.Find(ECalenNotifyAppBackgrounded)) |
185 { |
192 { |
186 CCalenState::HandleStateActivationL(aStateMachine); |
193 CCalenState::HandleStateActivationL(aStateMachine); |
187 } |
194 } |
188 |
195 |
189 TRACE_EXIT_POINT; |
196 OstTraceFunctionExit0( CCALENBACKGROUNDSTATE_HANDLESTATEACTIVATIONL_EXIT ); |
190 } |
197 } |
191 |
198 |
192 // end of file |
199 // end of file |