37
|
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 |
virtual void UpdateInCallCbaL();
|
|
100 |
|
|
101 |
TBool HandleCommandL( TInt aCommand );
|
|
102 |
|
|
103 |
void DisconnectEmergencyCallL();
|
|
104 |
|
|
105 |
void HandleKeyMessageL(
|
|
106 |
TPhoneKeyEventMessages aMessage,
|
|
107 |
TKeyCode aCode );
|
|
108 |
|
|
109 |
/**
|
|
110 |
* By default EPOC constructor is private.
|
|
111 |
*/
|
|
112 |
CPhoneEmergency(
|
|
113 |
MPhoneStateMachine* aStateMachine,
|
|
114 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
115 |
MPhoneCustomization* aPhoneCustomization );
|
|
116 |
|
|
117 |
void HandleKeyEventL(
|
|
118 |
const TKeyEvent& aKeyEvent,
|
|
119 |
TEventCode aEventCode );
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Sends key events to the phone engine
|
|
123 |
* @param aKeyEvent a key event
|
|
124 |
* @param aEventCode key event code
|
|
125 |
*/
|
|
126 |
void SendKeyEventL(
|
|
127 |
const TKeyEvent& aKeyEvent,
|
|
128 |
TEventCode aEventCode );
|
|
129 |
|
|
130 |
/**
|
|
131 |
* ConstructL()
|
|
132 |
*/
|
|
133 |
virtual void ConstructL();
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Handle EPEMessageAudioOutputChanged
|
|
137 |
*/
|
|
138 |
void HandleAudioOutputChangedL();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Handle initializing cba's
|
|
142 |
*/
|
|
143 |
void UpdateSetupCbaL();
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Handles commands from the Remote Control framework.
|
|
147 |
* @param aOperationId The operation ID of the command.
|
|
148 |
* @param aButtonAct The button action associated with the command.
|
|
149 |
* @return ETrue if the event was handled, EFalse otherwise.
|
|
150 |
*/
|
|
151 |
IMPORT_C virtual TBool HandleRemConCommandL(
|
|
152 |
TRemConCoreApiOperationId aOperationId,
|
|
153 |
TRemConCoreApiButtonAction aButtonAct );
|
|
154 |
|
|
155 |
private:
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Check whether UseEmergencyNoIhfCBA set should be used or not.
|
|
159 |
* @param aAudioOutput current audio output type.
|
|
160 |
* @return ETrue if UseEmergencyNoIhfCBA should be used,
|
|
161 |
* EFalse otherwise.
|
|
162 |
*/
|
|
163 |
TBool UseEmergencyNoIhfCBA( const TPEAudioOutput& aAudioOutput ) const;
|
|
164 |
|
|
165 |
/**
|
|
166 |
* Check whether UseHandsetEmergencyCBA set should be used or not.
|
|
167 |
* @param aAudioOutput current audio output type.
|
|
168 |
* @return ETrue if UseHandsetEmergencyCBA should be used,
|
|
169 |
* EFalse otherwise.
|
|
170 |
*/
|
|
171 |
TBool UseHandsetEmergencyCBA( const TPEAudioOutput& aAudioOutput ) const;
|
|
172 |
|
|
173 |
/**
|
|
174 |
* Check whether the touch call handling is supported or not.
|
|
175 |
* @return ETrue if KFeatureIdTouchCallHandling is supported,
|
|
176 |
* EFalse otherwise.
|
|
177 |
*/
|
|
178 |
TBool TouchCallHandlingSupported () const;
|
|
179 |
|
|
180 |
private:
|
|
181 |
/**
|
|
182 |
* Is device lock on/off
|
|
183 |
*/
|
|
184 |
TBool iDeviceLockOn;
|
|
185 |
|
|
186 |
/**
|
|
187 |
* If true update emergency call wait note
|
|
188 |
*/
|
|
189 |
TBool iCallSetup;
|
|
190 |
|
|
191 |
/**
|
|
192 |
* Status of startup
|
|
193 |
*/
|
|
194 |
TBool iStartupInterrupted;
|
|
195 |
|
|
196 |
/**
|
|
197 |
* If true show call summary ( termination ) note
|
|
198 |
*/
|
|
199 |
TBool iConnected;
|
|
200 |
};
|
|
201 |
|
|
202 |
#endif // CPHONEEMERGENCY
|
|
203 |
|
|
204 |
// End of File
|