37
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2009 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 |
* In call state implementation.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CPHONESTATEINCALL
|
|
21 |
#define CPHONESTATEINCALL
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include "cphonestate.h"
|
|
25 |
|
|
26 |
// FORWARD DECLARATIONS
|
|
27 |
class CPhoneDtmfWaitCharTimer;
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
/**
|
|
31 |
* In call state
|
|
32 |
*/
|
|
33 |
class CPhoneStateInCall : public CPhoneState
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Destructor.
|
|
39 |
*/
|
|
40 |
IMPORT_C virtual ~CPhoneStateInCall();
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Creates the InCall state class
|
|
44 |
* @param aStateMachine: a state machine
|
|
45 |
* @param aViewCommandHandle: handle to the PhoneUIView
|
|
46 |
* @return an instance of class CPhoneStateInCall
|
|
47 |
*/
|
|
48 |
static CPhoneStateInCall* NewL(
|
|
49 |
MPhoneStateMachine* aStateMachine,
|
|
50 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
51 |
MPhoneCustomization* aCustomization );
|
|
52 |
|
|
53 |
IMPORT_C virtual void HandleKeyMessageL(
|
|
54 |
TPhoneKeyEventMessages aMessage,
|
|
55 |
TKeyCode aCode );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* A message handling function for Phone Engine messages
|
|
59 |
* @param aMessage Message from Phone Engine
|
|
60 |
* @param aCallId Call id the message concerns
|
|
61 |
*/
|
|
62 |
IMPORT_C virtual void HandlePhoneEngineMessageL(
|
|
63 |
const TInt aMessage,
|
|
64 |
TInt aCallId );
|
|
65 |
|
|
66 |
IMPORT_C virtual TBool HandleCommandL( TInt aCommand );
|
|
67 |
|
|
68 |
protected:
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Handle state-specific behaviour when number entry is cleared
|
|
72 |
*/
|
|
73 |
IMPORT_C virtual void HandleNumberEntryClearedL();
|
|
74 |
|
|
75 |
/**
|
|
76 |
* By default EPOC constructor is private.
|
|
77 |
*/
|
|
78 |
IMPORT_C CPhoneStateInCall(
|
|
79 |
MPhoneStateMachine* aStateMachine,
|
|
80 |
MPhoneViewCommandHandle* aViewCommandHandle,
|
|
81 |
MPhoneCustomization* aPhoneCustomization );
|
|
82 |
|
|
83 |
/**
|
|
84 |
* ConstructL()
|
|
85 |
*/
|
|
86 |
IMPORT_C virtual void ConstructL();
|
|
87 |
|
|
88 |
/**
|
|
89 |
* Open menu bar
|
|
90 |
*/
|
|
91 |
IMPORT_C virtual void OpenMenuBarL();
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Launch the New call phone number query
|
|
95 |
*/
|
|
96 |
IMPORT_C void LaunchNewCallQueryL();
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Call number fetched from New call dialog
|
|
100 |
* @param aFetchedNumber number fetched from the diaog
|
|
101 |
*/
|
|
102 |
IMPORT_C virtual void CallFetchedNumberL(
|
|
103 |
const TDesC& aFetchedNumber );
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Handle EPEMessageIdle
|
|
107 |
*/
|
|
108 |
IMPORT_C void HandleIdleL( TInt aCallId );
|
|
109 |
|
|
110 |
/**
|
|
111 |
* Method for quering is video call active.
|
|
112 |
* @return ETrue if active otherwise EFalse
|
|
113 |
*/
|
|
114 |
IMPORT_C virtual TBool IsVideoCallActiveL();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Method for quering is video call ringing.
|
|
118 |
* @return ETrue if ringing otherwise EFalse
|
|
119 |
*/
|
|
120 |
IMPORT_C virtual TBool IsVideoCallRingingL();
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Method for quering ringing call .
|
|
124 |
* @return call id otherwise KErrNotFound
|
|
125 |
*/
|
|
126 |
IMPORT_C virtual TBool GetRingingCallL();
|
|
127 |
/**
|
|
128 |
* Search and release outgoingcall
|
|
129 |
*/
|
|
130 |
IMPORT_C void DisconnectOutgoingCallL();
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Upadated CBAs Incall case
|
|
134 |
*/
|
|
135 |
IMPORT_C virtual void UpdateInCallCbaL();
|
|
136 |
|
|
137 |
|
|
138 |
/**
|
|
139 |
* Upadated CBAs
|
|
140 |
*/
|
|
141 |
IMPORT_C virtual void UpdateCbaL( TInt aResource );
|
|
142 |
|
|
143 |
/**
|
|
144 |
* Close all dtmf dialogs
|
|
145 |
*/
|
|
146 |
IMPORT_C void CloseDtmfQueryL();
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Creates number entry.
|
|
150 |
*/
|
|
151 |
IMPORT_C void CreateNumberEntryL();
|
|
152 |
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Concludes does the engine have information of the
|
|
156 |
* phone number. This information is then send to the view.
|
|
157 |
* @param aCallId - Call Id.
|
|
158 |
*/
|
|
159 |
IMPORT_C void PhoneNumberAvailableInPhoneEngineL( TInt aCallId );
|
|
160 |
|
|
161 |
private: // New functions
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Handle EPEMessageAudioMuteChanged
|
|
165 |
*/
|
|
166 |
void HandleAudioMuteChangedL();
|
|
167 |
|
|
168 |
/**
|
|
169 |
* Handle EPEMessageAudioOutputChanged
|
|
170 |
*/
|
|
171 |
void HandleAudioOutputChangedL();
|
|
172 |
|
|
173 |
/**
|
|
174 |
* Handle EPEMessageAudioVolumeChanged
|
|
175 |
*/
|
|
176 |
void HandleAudioVolumeChangedL();
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Handle EPEMessageSendingDTMF
|
|
180 |
*/
|
|
181 |
void HandleSendingDTMFL();
|
|
182 |
|
|
183 |
/**
|
|
184 |
* Handle EPEMessageStoppedDTMF
|
|
185 |
*/
|
|
186 |
void HandleStoppedDTMFL();
|
|
187 |
|
|
188 |
/**
|
|
189 |
* Handles EPEMessageDTMFSent
|
|
190 |
* EPEMessageDTMFSendingAborted
|
|
191 |
*/
|
|
192 |
void CancelDTMFSendingL();
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Handle EPEMessagePromptSpeedDial
|
|
196 |
*/
|
|
197 |
void HandleDTMFPromptSpeedDialL();
|
|
198 |
|
|
199 |
/**
|
|
200 |
* Sends DTMF sequence to Phone Engine
|
|
201 |
*/
|
|
202 |
void SendDtmfL();
|
|
203 |
|
|
204 |
/**
|
|
205 |
* Sends DTMF speed dial number sequence to Phone Engine
|
|
206 |
*/
|
|
207 |
void SendDtmfSpeedDialNumberL();
|
|
208 |
|
|
209 |
/**
|
|
210 |
* Sends command to view for launching manual DTMF entry
|
|
211 |
*/
|
|
212 |
void LaunchDtmfManualQueryL();
|
|
213 |
|
|
214 |
/**
|
|
215 |
* Sends command to view for launching DTMF list query
|
|
216 |
*/
|
|
217 |
void LaunchDtmfListQueryL();
|
|
218 |
|
|
219 |
/**
|
|
220 |
* Launch DTMF Single Item fetch dialog
|
|
221 |
*/
|
|
222 |
void LaunchDtmfSearchDialogL();
|
|
223 |
|
|
224 |
/**
|
|
225 |
* Launch DTMF Single Item fetch for DTMF List query usage
|
|
226 |
*/
|
|
227 |
void LaunchDtmfListViewSearchDialogL();
|
|
228 |
|
|
229 |
/**
|
|
230 |
* Launch New call fetch dialog
|
|
231 |
*/
|
|
232 |
void LaunchNewCallSearchDialogL();
|
|
233 |
|
|
234 |
/**
|
|
235 |
* Sends command to view for 'Lock keypad'
|
|
236 |
*/
|
|
237 |
void LockKeypadL();
|
|
238 |
|
|
239 |
/**
|
|
240 |
* Handle successful single item fetch.
|
|
241 |
*/
|
|
242 |
void HandleSuccessFetchedNumberL();
|
|
243 |
|
|
244 |
/**
|
|
245 |
* Handle failed single item fetch.
|
|
246 |
*/
|
|
247 |
void HandleFailedFetchedNumberL();
|
|
248 |
|
|
249 |
/**
|
|
250 |
* Update remote data and label to the call header.
|
|
251 |
* @param aCallId - Call Id.
|
|
252 |
* @param aCallHeaderData - Call header parameters where modifications
|
|
253 |
* are made.
|
|
254 |
*/
|
|
255 |
void UpdateRemoteInfoDataAndLabelL(
|
|
256 |
TInt aCallId,
|
|
257 |
TPhoneCmdParamCallHeaderData aCallHeaderParam );
|
|
258 |
|
|
259 |
/**
|
|
260 |
* Show dtmf text query
|
|
261 |
* @param aDialogResourceId dialog's resource id
|
|
262 |
* @param aDefaultCbaResourceId default CBA's resource id
|
|
263 |
* @param aContentCbaResourceId content CBA's resource id
|
|
264 |
* @param aDataText pointer to data text
|
|
265 |
* @param aSendKeyEnabled send key enabled status for the query
|
|
266 |
*/
|
|
267 |
void ShowDtmfTextQueryL(
|
|
268 |
TInt aDialogResourceId,
|
|
269 |
TInt aDefaultCbaResourceId,
|
|
270 |
TInt aContentCbaResourceId,
|
|
271 |
TDes* aDataText,
|
|
272 |
TBool aSendKeyEnabled = EFalse );
|
|
273 |
|
|
274 |
/**
|
|
275 |
* Handles End key pressing (long/short).
|
|
276 |
* @param aMessage - Key event from AVKON
|
|
277 |
*/
|
|
278 |
void HandleEndKeyPressL( TPhoneKeyEventMessages aMessage );
|
|
279 |
|
|
280 |
/**
|
|
281 |
* Handles Voice key pressing.
|
|
282 |
* @param aMessage - Key event from AVKON
|
|
283 |
*/
|
|
284 |
void HandleVoiceKeyPressL( TPhoneKeyEventMessages aMessage );
|
|
285 |
|
|
286 |
private:
|
|
287 |
|
|
288 |
/**
|
|
289 |
* Special timer for preventing recursive calls
|
|
290 |
* which would otherwise occur with multiple
|
|
291 |
* wait characters in a DTMF string.
|
|
292 |
*/
|
|
293 |
CPhoneDtmfWaitCharTimer* iDtmfWaitCharTimer;
|
|
294 |
|
|
295 |
|
|
296 |
};
|
|
297 |
|
|
298 |
#endif // CPHONESTATEINCALL
|
|
299 |
|
|
300 |
// End of File
|