|
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 "calenhelpstate.h" |
|
22 #include "calendarui_debug.h" // Debug macros |
|
23 #include "calencontroller.h" |
|
24 #include "calenstatemachine.h" |
|
25 #include "calennotifier.h" |
|
26 |
|
27 // ---------------------------------------------------------------------------- |
|
28 // CCalenHelpState::NewLC |
|
29 // First stage construction |
|
30 // ---------------------------------------------------------------------------- |
|
31 CCalenHelpState* CCalenHelpState::NewLC( CCalenController& aController, |
|
32 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
|
33 { |
|
34 TRACE_ENTRY_POINT; |
|
35 |
|
36 CCalenHelpState* self = new ( ELeave ) CCalenHelpState( aController, aOutstandingNotifications ); |
|
37 CleanupStack::PushL( self ); |
|
38 self->ConstructL(); |
|
39 |
|
40 TRACE_EXIT_POINT; |
|
41 return self; |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // CCalenHelpState::ConstructL |
|
46 // Second stage construction |
|
47 // ---------------------------------------------------------------------------- |
|
48 void CCalenHelpState::ConstructL() |
|
49 { |
|
50 TRACE_ENTRY_POINT; |
|
51 BaseConstructL(); |
|
52 |
|
53 TRACE_EXIT_POINT; |
|
54 } |
|
55 |
|
56 // ---------------------------------------------------------------------------- |
|
57 // CCalenHelpState::CCalenHelpState |
|
58 // C++ Constructor |
|
59 // ---------------------------------------------------------------------------- |
|
60 CCalenHelpState::CCalenHelpState( CCalenController& aController, |
|
61 RHashSet<TCalenNotification>& aOutstandingNotifications ) |
|
62 : CCalenState( aController, aOutstandingNotifications ) |
|
63 { |
|
64 TRACE_ENTRY_POINT; |
|
65 |
|
66 TRACE_EXIT_POINT; |
|
67 } |
|
68 |
|
69 // ---------------------------------------------------------------------------- |
|
70 // CCalenHelpState::CCalenHelpState |
|
71 // Destructor |
|
72 // ---------------------------------------------------------------------------- |
|
73 CCalenHelpState::~CCalenHelpState() |
|
74 { |
|
75 TRACE_ENTRY_POINT; |
|
76 |
|
77 TRACE_EXIT_POINT; |
|
78 } |
|
79 |
|
80 // ---------------------------------------------------------------------------- |
|
81 // CCalenHelpState::HandleCommandL |
|
82 // From CCalenState |
|
83 // ---------------------------------------------------------------------------- |
|
84 TBool CCalenHelpState::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 |
|
100 RequestCallbackL( handler, aCommand ); |
|
101 cmdUsed = ETrue; |
|
102 } |
|
103 |
|
104 TRACE_EXIT_POINT; |
|
105 return cmdUsed; |
|
106 |
|
107 } |
|
108 |
|
109 // ---------------------------------------------------------------------------- |
|
110 // CCalenHelpState::HandleNotificationL |
|
111 // From CCalenState |
|
112 // ---------------------------------------------------------------------------- |
|
113 void CCalenHelpState::HandleNotificationL(const TCalenNotification& /*aNotification*/, |
|
114 CCalenStateMachine& /*aStateMachine*/ ) |
|
115 { |
|
116 TRACE_ENTRY_POINT; |
|
117 TRACE_EXIT_POINT; |
|
118 } |
|
119 |
|
120 |
|
121 |
|
122 // end of file |