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 "calenprintingstate.h" |
21 #include "calenprintingstate.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 "calenprintingstateTraces.h" |
|
28 #endif |
|
29 |
26 |
30 // ---------------------------------------------------------------------------- |
27 // ---------------------------------------------------------------------------- |
31 // CCalenPrintingState::NewLC |
28 // CCalenPrintingState::NewLC |
32 // First stage construction |
29 // First stage construction |
33 // ---------------------------------------------------------------------------- |
30 // ---------------------------------------------------------------------------- |
34 CCalenPrintingState* CCalenPrintingState::NewLC( CCalenController& aController, |
31 CCalenPrintingState* CCalenPrintingState::NewLC( CCalenController& aController, |
35 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
32 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
36 { |
33 { |
37 OstTraceFunctionEntry0( CCALENPRINTINGSTATE_NEWLC_ENTRY ); |
34 TRACE_ENTRY_POINT; |
38 |
35 |
39 CCalenPrintingState* self = new ( ELeave ) CCalenPrintingState( aController,aOutstandingNotifications ); |
36 CCalenPrintingState* self = new ( ELeave ) CCalenPrintingState( aController,aOutstandingNotifications ); |
40 CleanupStack::PushL( self ); |
37 CleanupStack::PushL( self ); |
41 self->ConstructL(); |
38 self->ConstructL(); |
42 |
39 |
43 OstTraceFunctionExit0( CCALENPRINTINGSTATE_NEWLC_EXIT ); |
40 TRACE_EXIT_POINT; |
44 return self; |
41 return self; |
45 } |
42 } |
46 |
43 |
47 // ---------------------------------------------------------------------------- |
44 // ---------------------------------------------------------------------------- |
48 // CCalenPrintingState::ConstructL |
45 // CCalenPrintingState::ConstructL |
49 // Second stage construction |
46 // Second stage construction |
50 // ---------------------------------------------------------------------------- |
47 // ---------------------------------------------------------------------------- |
51 void CCalenPrintingState::ConstructL() |
48 void CCalenPrintingState::ConstructL() |
52 { |
49 { |
53 OstTraceFunctionEntry0( CCALENPRINTINGSTATE_CONSTRUCTL_ENTRY ); |
50 TRACE_ENTRY_POINT; |
54 |
|
55 BaseConstructL(); |
51 BaseConstructL(); |
56 |
52 |
57 OstTraceFunctionExit0( CCALENPRINTINGSTATE_CONSTRUCTL_EXIT ); |
53 TRACE_EXIT_POINT; |
58 } |
54 } |
59 |
55 |
60 // ---------------------------------------------------------------------------- |
56 // ---------------------------------------------------------------------------- |
61 // CCalenPrintingState::CCalenPrintingState |
57 // CCalenPrintingState::CCalenPrintingState |
62 // C++ Constructor |
58 // C++ Constructor |
63 // ---------------------------------------------------------------------------- |
59 // ---------------------------------------------------------------------------- |
64 CCalenPrintingState::CCalenPrintingState( CCalenController& aController, |
60 CCalenPrintingState::CCalenPrintingState( CCalenController& aController, |
65 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
61 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
66 : CCalenState( aController, aOutstandingNotifications ) |
62 : CCalenState( aController, aOutstandingNotifications ) |
67 { |
63 { |
68 OstTraceFunctionEntry0( CCALENPRINTINGSTATE_CCALENPRINTINGSTATE_ENTRY ); |
64 TRACE_ENTRY_POINT; |
69 |
65 |
70 OstTraceFunctionExit0( CCALENPRINTINGSTATE_CCALENPRINTINGSTATE_EXIT ); |
66 TRACE_EXIT_POINT; |
71 } |
67 } |
72 |
68 |
73 // ---------------------------------------------------------------------------- |
69 // ---------------------------------------------------------------------------- |
74 // CCalenPrintingState::CCalenPrintingState |
70 // CCalenPrintingState::CCalenPrintingState |
75 // Destructor |
71 // Destructor |
76 // ---------------------------------------------------------------------------- |
72 // ---------------------------------------------------------------------------- |
77 CCalenPrintingState::~CCalenPrintingState() |
73 CCalenPrintingState::~CCalenPrintingState() |
78 { |
74 { |
79 OstTraceFunctionEntry0( DUP1_CCALENPRINTINGSTATE_CCALENPRINTINGSTATE_ENTRY ); |
75 TRACE_ENTRY_POINT; |
80 |
76 |
81 OstTraceFunctionExit0( DUP1_CCALENPRINTINGSTATE_CCALENPRINTINGSTATE_EXIT ); |
77 TRACE_EXIT_POINT; |
82 } |
78 } |
83 |
79 |
84 // ---------------------------------------------------------------------------- |
80 // ---------------------------------------------------------------------------- |
85 // CCalenPrintingState::HandleCommandL |
81 // CCalenPrintingState::HandleCommandL |
86 // From CCalenState |
82 // From CCalenState |
87 // ---------------------------------------------------------------------------- |
83 // ---------------------------------------------------------------------------- |
88 TBool CCalenPrintingState::HandleCommandL( const TCalenCommand& aCommand, |
84 TBool CCalenPrintingState::HandleCommandL( const TCalenCommand& aCommand, |
89 CCalenStateMachine& aStateMachine ) |
85 CCalenStateMachine& aStateMachine ) |
90 { |
86 { |
91 OstTraceFunctionEntry0( CCALENPRINTINGSTATE_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 |