1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * Startup state implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPHONESTATESTARTUP_H |
|
21 #define CPHONESTATESTARTUP_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "cphonestate.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * Startup state |
|
31 */ |
|
32 class CPhoneStateStartup : public CPhoneState |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Destructor. |
|
38 */ |
|
39 IMPORT_C virtual ~CPhoneStateStartup(); |
|
40 |
|
41 /** |
|
42 * Creates the Startup state class |
|
43 * @param aStateMachine: a state machine |
|
44 * @param aViewCommandHandle: handle to the PhoneUIView |
|
45 * @return an instance of class CPhoneStateStartup |
|
46 */ |
|
47 IMPORT_C static CPhoneStateStartup* NewL( |
|
48 MPhoneStateMachine* aStateMachine, |
|
49 MPhoneViewCommandHandle* aViewCommandHandle, |
|
50 MPhoneCustomization* aPhoneCustomization ); |
|
51 |
|
52 /** |
|
53 * A message handling function for Phone Engine messages |
|
54 * @param aMessage Message from Phone Engine |
|
55 * @param aCallId Call id the message concerns |
|
56 */ |
|
57 IMPORT_C void HandlePhoneEngineMessageL( |
|
58 const TInt aMessage, |
|
59 TInt aCallId ); |
|
60 |
|
61 IMPORT_C void HandleKeyMessageL( |
|
62 TPhoneKeyEventMessages aMessage, |
|
63 TKeyCode aCode ); |
|
64 |
|
65 IMPORT_C void HandleKeyEventL( |
|
66 const TKeyEvent& aKeyEvent, |
|
67 TEventCode aEventCode ); |
|
68 |
|
69 /** |
|
70 * Handles startup of the phone application |
|
71 */ |
|
72 IMPORT_C virtual void HandlePhoneStartupL(); |
|
73 |
|
74 /** |
|
75 * Indicates when the Idle app is in the foreground. |
|
76 */ |
|
77 IMPORT_C virtual void HandleIdleForegroundEventL(); |
|
78 |
|
79 protected: |
|
80 |
|
81 /** |
|
82 * ConstructL() |
|
83 */ |
|
84 IMPORT_C virtual void ConstructL(); |
|
85 |
|
86 /** |
|
87 * By default EPOC constructor is private. |
|
88 */ |
|
89 IMPORT_C CPhoneStateStartup( |
|
90 MPhoneStateMachine* aStateMachine, |
|
91 MPhoneViewCommandHandle* aViewCommandHandle, |
|
92 MPhoneCustomization* aPhoneCustomization ); |
|
93 |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * Passes create number entry command forward if NE can be created. |
|
99 */ |
|
100 IMPORT_C void HandleCreateNumberEntryL( const TKeyEvent& aKeyEvent, |
|
101 TEventCode aEventCode ); |
|
102 |
|
103 /** |
|
104 * Plays DTMF tone for key event |
|
105 * */ |
|
106 IMPORT_C void HandleDtmfKeyToneL( const TKeyEvent& aKeyEvent, |
|
107 TEventCode aEventCode ); |
|
108 |
|
109 /** |
|
110 * A message handling function for message EPEMessagePEConstructionReady. |
|
111 * @param aCallId: the call id of the call |
|
112 */ |
|
113 void HandlePEConstructionReadyL( TInt aCallId ); |
|
114 |
|
115 /** |
|
116 * Starts to shows note. |
|
117 */ |
|
118 static TInt DoShowNoteL( TAny* aAny ); |
|
119 |
|
120 /** |
|
121 * Create and show appropriate note AFTER idle callback |
|
122 * if necessary. |
|
123 */ |
|
124 void CreateAndShowNoteAfterIdle(); |
|
125 |
|
126 |
|
127 protected: // Data |
|
128 |
|
129 // Provides phone engine startup status |
|
130 TBool iPEReady; |
|
131 |
|
132 private: // Data |
|
133 |
|
134 // Provides phone application startup status |
|
135 TBool iPhoneReady; |
|
136 |
|
137 // Ownded: idle object to create note. |
|
138 CIdle* iCreateNote; |
|
139 }; |
|
140 |
|
141 #endif // CPHONESTATESTARTUP_H |
|
142 |
|
143 // End of File |
|