|
1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Calendar state machine |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // includes |
|
21 #include "calenprintingstate.h" |
|
22 #include "calendarui_debug.h" // Debug macros |
|
23 #include "calencontroller.h" |
|
24 #include "calenstatemachine.h" |
|
25 #include "calennotifier.h" |
|
26 |
|
27 // ---------------------------------------------------------------------------- |
|
28 // CCalenPrintingState::NewLC |
|
29 // First stage construction |
|
30 // ---------------------------------------------------------------------------- |
|
31 CCalenPrintingState* CCalenPrintingState::NewLC( CCalenController& aController, |
|
32 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
|
33 { |
|
34 TRACE_ENTRY_POINT; |
|
35 |
|
36 CCalenPrintingState* self = new ( ELeave ) CCalenPrintingState( aController,aOutstandingNotifications ); |
|
37 CleanupStack::PushL( self ); |
|
38 self->ConstructL(); |
|
39 |
|
40 TRACE_EXIT_POINT; |
|
41 return self; |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // CCalenPrintingState::ConstructL |
|
46 // Second stage construction |
|
47 // ---------------------------------------------------------------------------- |
|
48 void CCalenPrintingState::ConstructL() |
|
49 { |
|
50 TRACE_ENTRY_POINT; |
|
51 BaseConstructL(); |
|
52 |
|
53 TRACE_EXIT_POINT; |
|
54 } |
|
55 |
|
56 // ---------------------------------------------------------------------------- |
|
57 // CCalenPrintingState::CCalenPrintingState |
|
58 // C++ Constructor |
|
59 // ---------------------------------------------------------------------------- |
|
60 CCalenPrintingState::CCalenPrintingState( CCalenController& aController, |
|
61 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
|
62 : CCalenState( aController, aOutstandingNotifications ) |
|
63 { |
|
64 TRACE_ENTRY_POINT; |
|
65 |
|
66 TRACE_EXIT_POINT; |
|
67 } |
|
68 |
|
69 // ---------------------------------------------------------------------------- |
|
70 // CCalenPrintingState::CCalenPrintingState |
|
71 // Destructor |
|
72 // ---------------------------------------------------------------------------- |
|
73 CCalenPrintingState::~CCalenPrintingState() |
|
74 { |
|
75 TRACE_ENTRY_POINT; |
|
76 |
|
77 TRACE_EXIT_POINT; |
|
78 } |
|
79 |
|
80 // ---------------------------------------------------------------------------- |
|
81 // CCalenPrintingState::HandleCommandL |
|
82 // From CCalenState |
|
83 // ---------------------------------------------------------------------------- |
|
84 TBool CCalenPrintingState::HandleCommandL( const TCalenCommand& aCommand, |
|
85 CCalenStateMachine& aStateMachine ) |
|
86 { |
|
87 TRACE_ENTRY_POINT; |
|
88 TInt cmd = aCommand.Command(); |
|
89 MCalenCommandHandler* handler = iController.GetCommandHandlerL( cmd ); |
|
90 |
|
91 ASSERT( handler ); // FIXME: error ui |
|
92 |
|
93 TBool cmdUsed = EFalse; |
|
94 |
|
95 if( ECalenFasterAppExit == cmd ) |
|
96 { |
|
97 SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState ); |
|
98 ActivateCurrentStateL(aStateMachine); |
|
99 RequestCallbackL( handler, aCommand ); |
|
100 cmdUsed = ETrue; |
|
101 } |
|
102 |
|
103 TRACE_EXIT_POINT; |
|
104 return cmdUsed; |
|
105 } |
|
106 |
|
107 // ---------------------------------------------------------------------------- |
|
108 // CCalenPrintingState::HandleNotificationL |
|
109 // From CCalenState |
|
110 // ---------------------------------------------------------------------------- |
|
111 void CCalenPrintingState::HandleNotificationL(const TCalenNotification& /*aNotification*/, |
|
112 CCalenStateMachine& /*aStateMachine*/ ) |
|
113 { |
|
114 TRACE_ENTRY_POINT; |
|
115 TRACE_EXIT_POINT; |
|
116 } |
|
117 |
|
118 // end of file |