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 * GSM-specific emergency state implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPHONEEMERGENCY |
|
21 #define CPHONEEMERGENCY |
|
22 |
|
23 // INCLUDES |
|
24 #include "cphonegsmincall.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * GSM-specific emergency single call state |
|
31 */ |
|
32 class CPhoneEmergency : public CPhoneGsmInCall |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Destructor. |
|
38 */ |
|
39 virtual ~CPhoneEmergency(); |
|
40 |
|
41 /** |
|
42 * Creates the Emergency state class |
|
43 * @param aStateMachine: a state machine |
|
44 * @param aViewCommandHandle: handle to the PhoneUIView |
|
45 * @return an instance of class CPhoneEmergency |
|
46 */ |
|
47 static CPhoneEmergency* 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 void HandlePhoneEngineMessageL( |
|
58 const TInt aMessage, |
|
59 TInt aCallId ); |
|
60 |
|
61 /** |
|
62 * Set startup status for state transition |
|
63 * @param aStartupInterrupted status |
|
64 */ |
|
65 void SetStartupInterrupted( const TBool aStartupInterrupted ); |
|
66 |
|
67 protected: |
|
68 |
|
69 /** |
|
70 * See CPhoneState |
|
71 */ |
|
72 void HandleIdleL( TInt aCallId ); |
|
73 |
|
74 /** |
|
75 * See CPhoneState |
|
76 */ |
|
77 void HandleConnectedL( TInt aCallId ); |
|
78 |
|
79 /** |
|
80 * See CPhoneState |
|
81 */ |
|
82 void HandleConnectingL( TInt aCallId ); |
|
83 |
|
84 /** |
|
85 * See CPhoneState |
|
86 */ |
|
87 void HandleDialingL( TInt aCallId ); |
|
88 |
|
89 /** |
|
90 * Handle state-specific behaviour when number entry is cleared |
|
91 */ |
|
92 virtual void HandleNumberEntryClearedL(); |
|
93 |
|
94 /** |
|
95 * Handle state-specific behaviour handleErrorL |
|
96 */ |
|
97 void HandleErrorL( const TPEErrorInfo& aErrorInfo ); |
|
98 |
|
99 /** |
|
100 * Open menu bar |
|
101 */ |
|
102 void OpenMenuBarL(); |
|
103 |
|
104 virtual void UpdateInCallCbaL(); |
|
105 |
|
106 TBool HandleCommandL( TInt aCommand ); |
|
107 |
|
108 void DisconnectEmergencyCallL(); |
|
109 |
|
110 void HandleKeyMessageL( |
|
111 TPhoneKeyEventMessages aMessage, |
|
112 TKeyCode aCode ); |
|
113 |
|
114 /** |
|
115 * By default EPOC constructor is private. |
|
116 */ |
|
117 CPhoneEmergency( |
|
118 MPhoneStateMachine* aStateMachine, |
|
119 MPhoneViewCommandHandle* aViewCommandHandle, |
|
120 MPhoneCustomization* aPhoneCustomization ); |
|
121 |
|
122 void HandleKeyEventL( |
|
123 const TKeyEvent& aKeyEvent, |
|
124 TEventCode aEventCode ); |
|
125 |
|
126 /** |
|
127 * Sends key events to the phone engine |
|
128 * @param aKeyEvent a key event |
|
129 * @param aEventCode key event code |
|
130 */ |
|
131 void SendKeyEventL( |
|
132 const TKeyEvent& aKeyEvent, |
|
133 TEventCode aEventCode ); |
|
134 |
|
135 /** |
|
136 * ConstructL() |
|
137 */ |
|
138 virtual void ConstructL(); |
|
139 |
|
140 /** |
|
141 * Handle EPEMessageAudioOutputChanged |
|
142 */ |
|
143 void HandleAudioOutputChangedL(); |
|
144 |
|
145 /** |
|
146 * Handle initializing cba's |
|
147 */ |
|
148 void UpdateSetupCbaL(); |
|
149 |
|
150 /** |
|
151 * Passes create number entry command forward if not call setup |
|
152 */ |
|
153 void HandleCreateNumberEntryL( |
|
154 const TKeyEvent& aKeyEvent, |
|
155 TEventCode aEventCode ); |
|
156 |
|
157 /** |
|
158 * Handles commands from the Remote Control framework. |
|
159 * @param aOperationId The operation ID of the command. |
|
160 * @param aButtonAct The button action associated with the command. |
|
161 * @return ETrue if the event was handled, EFalse otherwise. |
|
162 */ |
|
163 IMPORT_C virtual TBool HandleRemConCommandL( |
|
164 TRemConCoreApiOperationId aOperationId, |
|
165 TRemConCoreApiButtonAction aButtonAct ); |
|
166 |
|
167 private: |
|
168 |
|
169 /** |
|
170 * Check whether UseEmergencyNoIhfCBA set should be used or not. |
|
171 * @param aAudioOutput current audio output type. |
|
172 * @return ETrue if UseEmergencyNoIhfCBA should be used, |
|
173 * EFalse otherwise. |
|
174 */ |
|
175 TBool UseEmergencyNoIhfCBA( const TPEAudioOutput& aAudioOutput ) const; |
|
176 |
|
177 /** |
|
178 * Check whether UseHandsetEmergencyCBA set should be used or not. |
|
179 * @param aAudioOutput current audio output type. |
|
180 * @return ETrue if UseHandsetEmergencyCBA should be used, |
|
181 * EFalse otherwise. |
|
182 */ |
|
183 TBool UseHandsetEmergencyCBA( const TPEAudioOutput& aAudioOutput ) const; |
|
184 |
|
185 /** |
|
186 * Check whether the touch call handling is supported or not. |
|
187 * @return ETrue if KFeatureIdTouchCallHandling is supported, |
|
188 * EFalse otherwise. |
|
189 */ |
|
190 TBool TouchCallHandlingSupported () const; |
|
191 |
|
192 private: |
|
193 /** |
|
194 * Is device lock on/off |
|
195 */ |
|
196 TBool iDeviceLockOn; |
|
197 |
|
198 /** |
|
199 * If true update emergency call wait note |
|
200 */ |
|
201 TBool iCallSetup; |
|
202 |
|
203 /** |
|
204 * Status of startup |
|
205 */ |
|
206 TBool iStartupInterrupted; |
|
207 |
|
208 /** |
|
209 * If true show call summary ( termination ) note |
|
210 */ |
|
211 TBool iConnected; |
|
212 }; |
|
213 |
|
214 #endif // CPHONEEMERGENCY |
|
215 |
|
216 // End of File |
|