author | hgs |
Fri, 15 Oct 2010 12:58:46 +0300 | |
changeset 78 | baacf668fe89 |
parent 74 | d1c62c765e48 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2005-2008 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: Implementation of CPhoneStateCallSetup class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include <featmgr.h> |
|
21 |
#include <StringLoader.h> |
|
22 |
#include <mpeengineinfo.h> |
|
23 |
#include <mpeclientinformation.h> |
|
24 |
||
25 |
#include "cphonepubsubproxy.h" |
|
26 |
#include "cphonestatecallsetup.h" |
|
27 |
#include "cphonestateincall.h" |
|
28 |
#include "mphonestatemachine.h" |
|
29 |
#include "tphonecmdparamboolean.h" |
|
30 |
#include "tphonecmdparaminteger.h" |
|
31 |
#include "tphonecmdparamcallheaderdata.h" |
|
32 |
#include "tphonecmdparamglobalnote.h" |
|
33 |
#include "tphonecmdparamstring.h" |
|
34 |
#include "tphonecmdparamkeyevent.h" |
|
35 |
#include "tphonecmdparamnote.h" |
|
36 |
#include "tphonecmdparamquery.h" |
|
37 |
#include "phonestatedefinitions.h" |
|
38 |
#include "phoneui.hrh" |
|
39 |
#include "phonerssbase.h" |
|
40 |
#include "cphonemainresourceresolver.h" |
|
41 |
#include "phonelogger.h" |
|
42 |
#include "phoneui.pan" |
|
43 |
#include "cphonedtmfwaitchartimer.h" |
|
44 |
#include "tphonecmdparamaudiooutput.h" |
|
45 |
#include "cphonekeys.h" |
|
46 |
||
47 |
// ================= MEMBER FUNCTIONS ======================= |
|
48 |
||
49 |
// C++ default constructor can NOT contain any code, that |
|
50 |
// might leave. |
|
51 |
// |
|
52 |
EXPORT_C CPhoneStateCallSetup::CPhoneStateCallSetup( |
|
53 |
MPhoneStateMachine* aStateMachine, |
|
54 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
55 |
MPhoneCustomization* aCustomization ) : |
|
56 |
CPhoneState( aStateMachine, aViewCommandHandle, aCustomization ) |
|
57 |
{ |
|
58 |
} |
|
59 |
||
60 |
// ----------------------------------------------------------- |
|
61 |
// CPhoneStateCallSetup::~CPhoneStateCallSetup() |
|
62 |
// Destructor |
|
63 |
// (other items were commented in a header). |
|
64 |
// ----------------------------------------------------------- |
|
65 |
// |
|
66 |
EXPORT_C CPhoneStateCallSetup::~CPhoneStateCallSetup() |
|
67 |
{ |
|
68 |
delete iDtmfWaitCharTimer; |
|
69 |
} |
|
70 |
||
71 |
// ----------------------------------------------------------- |
|
72 |
// CPhoneStateCallSetup::ConstructL() |
|
73 |
// Constructor |
|
74 |
// (other items were commented in a header). |
|
75 |
// ----------------------------------------------------------- |
|
76 |
// |
|
77 |
EXPORT_C void CPhoneStateCallSetup::ConstructL() |
|
78 |
{ |
|
79 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
80 |
Panic( EPhoneCtrlInvariant ) ); |
|
81 |
||
82 |
CPhoneState::BaseConstructL(); |
|
50 | 83 |
|
37 | 84 |
HandleAudioOutputChangedL(); |
85 |
} |
|
86 |
||
87 |
// ----------------------------------------------------------- |
|
88 |
// CPhoneStateCallSetup::NewL() |
|
89 |
// Constructor |
|
90 |
// (other items were commented in a header). |
|
91 |
// ----------------------------------------------------------- |
|
92 |
// |
|
93 |
CPhoneStateCallSetup* CPhoneStateCallSetup::NewL( |
|
94 |
MPhoneStateMachine* aStateMachine, |
|
95 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
96 |
MPhoneCustomization* aPhoneCustomization ) |
|
97 |
{ |
|
98 |
CPhoneStateCallSetup* self = new (ELeave) CPhoneStateCallSetup( |
|
99 |
aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
100 |
||
101 |
CleanupStack::PushL( self ); |
|
102 |
self->ConstructL(); |
|
103 |
CleanupStack::Pop( self ); |
|
104 |
||
105 |
return self; |
|
106 |
} |
|
107 |
||
108 |
// ----------------------------------------------------------- |
|
109 |
// CPhoneStateCallSetup::HandleCommandL() |
|
110 |
// ----------------------------------------------------------- |
|
111 |
// |
|
112 |
EXPORT_C TBool CPhoneStateCallSetup::HandleCommandL( TInt aCommand ) |
|
113 |
{ |
|
114 |
__LOGMETHODSTARTEND( EPhoneControl, |
|
115 |
"CPhoneStateCallSetup::HandleCommandL()" ); |
|
116 |
TBool commandStatus = ETrue; |
|
117 |
||
118 |
switch( aCommand ) |
|
119 |
{ |
|
120 |
case EPhoneInCallCmdDialer: |
|
121 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenDialer ); |
|
122 |
break; |
|
123 |
||
124 |
case EPhoneNumberAcqCmdAddToContacts: |
|
125 |
{ |
|
126 |
// If call setup is ongoing then add to contacts query should |
|
127 |
// not be opened -> do nothing here. |
|
128 |
} |
|
129 |
break; |
|
130 |
||
131 |
// DTMF entry - Ok |
|
132 |
case EPhoneCmdDtmfOk: |
|
133 |
SendDtmfL(); |
|
134 |
break; |
|
135 |
||
136 |
// DTMF sending - Cancel |
|
137 |
case EPhoneInCallCmdCancelSendingDtmfString: |
|
138 |
// Stop the asynchronous sending operation the |
|
139 |
// PhoneEngine may be performing. |
|
140 |
iStateMachine->SendPhoneEngineMessage( |
|
141 |
MPEPhoneModel::EPEMessageStopDTMFSending ); |
|
142 |
// Remove DTMF sending from screen |
|
143 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
|
144 |
break; |
|
145 |
||
146 |
// DTMF wait - Ok |
|
147 |
case EPhoneInCallCmdContinueSendingDtmfString: |
|
148 |
// Continue sending the DTMF string |
|
149 |
if( !iDtmfWaitCharTimer ) |
|
150 |
{ |
|
151 |
iDtmfWaitCharTimer = CPhoneDtmfWaitCharTimer::NewL( |
|
152 |
iStateMachine ); |
|
153 |
} |
|
154 |
iDtmfWaitCharTimer->ButtonPressedL(); |
|
155 |
break; |
|
50 | 156 |
|
37 | 157 |
|
158 |
case EPhoneCmdOptions: |
|
159 |
break; |
|
160 |
||
161 |
case EPhoneInCallCmdDtmfManualQuery: |
|
162 |
break; |
|
163 |
||
164 |
case EPhoneDtmfDialerExit: // fall through |
|
165 |
case EPhoneDtmfDialerCancel: |
|
166 |
break; |
|
167 |
||
168 |
case EPhoneInCallCmdMute: // fall through |
|
169 |
case EPhoneInCallCmdUnmute: |
|
170 |
iStateMachine->PhoneEngineInfo()->SetAudioMuteCommand( |
|
171 |
( aCommand == EPhoneInCallCmdMute ) ); |
|
172 |
iStateMachine->SendPhoneEngineMessage( |
|
173 |
MPEPhoneModel::EPEMessageSetAudioMute ); |
|
174 |
break; |
|
175 |
||
176 |
default: |
|
177 |
commandStatus = CPhoneState::HandleCommandL( aCommand ); |
|
178 |
break; |
|
179 |
} |
|
180 |
||
181 |
return commandStatus; |
|
182 |
} |
|
183 |
||
184 |
||
185 |
// ----------------------------------------------------------- |
|
186 |
// CPhoneStateCallSetup::HandleNumberEntryClearedL() |
|
187 |
// ----------------------------------------------------------- |
|
188 |
// |
|
189 |
EXPORT_C void CPhoneStateCallSetup::HandleNumberEntryClearedL() |
|
190 |
{ |
|
65 | 191 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandleNumberEntryClearedL()" ); |
74 | 192 |
UpdateUiCommands(); |
37 | 193 |
} |
194 |
||
195 |
// ----------------------------------------------------------- |
|
196 |
// CPhoneStateCallSetup::HandleKeyEventL |
|
197 |
// ----------------------------------------------------------- |
|
198 |
// |
|
199 |
EXPORT_C void CPhoneStateCallSetup::HandleKeyEventL( |
|
65 | 200 |
const TKeyEvent& aKeyEvent, TEventCode aEventCode ) |
37 | 201 |
{ |
202 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandleKeyEventL( ) "); |
|
74 | 203 |
if ( !iNumberEntryManager->IsNumberEntryVisibleL() ) |
37 | 204 |
{ |
205 |
// Send the key events to the phone engine |
|
206 |
switch( aEventCode ) |
|
207 |
{ |
|
208 |
case EEventKey: |
|
209 |
{ |
|
210 |
PlayKeySpecificDTMF( aKeyEvent.iCode ); |
|
211 |
if ( aKeyEvent.iScanCode == EStdKeyUpArrow && |
|
212 |
!OnlySideVolumeKeySupported() ) |
|
213 |
{ |
|
65 | 214 |
CPhoneState::IncreaseAudioVolumeL(); |
37 | 215 |
} |
216 |
else if ( aKeyEvent.iScanCode == EStdKeyDownArrow && |
|
217 |
!OnlySideVolumeKeySupported() ) |
|
218 |
{ |
|
65 | 219 |
CPhoneState::DecreaseAudioVolumeL(); |
37 | 220 |
} |
221 |
} |
|
222 |
break; |
|
223 |
||
224 |
case EEventKeyUp: |
|
225 |
// Send a key up event for the last key code sent to |
|
226 |
// the phone engine |
|
227 |
iStateMachine->SendPhoneEngineMessage( |
|
228 |
MPEPhoneModel::EPEMessageEndDTMF ); |
|
229 |
break; |
|
230 |
||
231 |
default: |
|
232 |
break; |
|
233 |
} |
|
234 |
} |
|
235 |
} |
|
236 |
||
237 |
// ----------------------------------------------------------- |
|
238 |
// CPhoneStateCallSetup::PlayKeySpecificDTMF |
|
239 |
// ----------------------------------------------------------- |
|
240 |
// |
|
241 |
void CPhoneStateCallSetup::PlayKeySpecificDTMF( const TUint aCode ) |
|
242 |
{ |
|
243 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::PlayKeySpecificDTMF( ) "); |
|
244 |
TBuf<1> buffer; // one character |
|
245 |
buffer.Append( aCode ); |
|
246 |
__PHONELOG1( EBasic, EPhoneControl, "HandleKeyEventL(%S)", &buffer ); |
|
247 |
// Convert key code to western. |
|
248 |
TLex code( buffer ); |
|
249 |
// Send the key press to the phone engine, if applicable |
|
250 |
iStateMachine->PhoneEngineInfo()->SetKeyCode( code.Peek() ); |
|
65 | 251 |
iStateMachine->SendPhoneEngineMessage( MPEPhoneModel::EPEMessagePlayDTMF ); |
37 | 252 |
} |
253 |
||
254 |
// ----------------------------------------------------------- |
|
255 |
// CPhoneStateCallSetup::HandleKeyMessageL |
|
256 |
// ----------------------------------------------------------- |
|
257 |
// |
|
258 |
EXPORT_C void CPhoneStateCallSetup::HandleKeyMessageL( |
|
259 |
TPhoneKeyEventMessages aMessage, |
|
260 |
TKeyCode aCode ) |
|
261 |
{ |
|
262 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandleKeyMessageL()"); |
|
263 |
switch ( aCode ) |
|
264 |
{ |
|
265 |
// end-key |
|
266 |
case EKeyNo: |
|
267 |
if ( aMessage == EPhoneKeyLongPress ) |
|
268 |
{ |
|
269 |
// Close all connections |
|
270 |
iStateMachine->SendPhoneEngineMessage( |
|
271 |
MPEPhoneModel::EPEMessageTerminateAllConnections ); |
|
272 |
||
273 |
// Remove number entry if long press |
|
74 | 274 |
if ( iNumberEntryManager->IsNumberEntryUsedL() ) |
37 | 275 |
{ |
50 | 276 |
iViewCommandHandle->ExecuteCommandL( |
277 |
EPhoneViewRemoveNumberEntry ); |
|
37 | 278 |
} |
279 |
} |
|
280 |
else |
|
65 | 281 |
{ |
282 |
CPhoneState::DisconnectCallL(); |
|
37 | 283 |
} |
284 |
break; |
|
65 | 285 |
|
37 | 286 |
// Voice key |
287 |
case EKeyDevice6: |
|
288 |
if ( aMessage == EPhoneKeyShortPress ) |
|
289 |
{ |
|
290 |
const TBool handsfreeMode = |
|
291 |
iStateMachine->PhoneEngineInfo()->AudioOutput() == |
|
292 |
EPELoudspeaker; |
|
293 |
CPhoneState::SetHandsfreeModeL( !handsfreeMode ); |
|
294 |
} |
|
295 |
else // aMessage == EPhoneKeyLongPress |
|
296 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
297 |
CPhoneState::SendGlobalInfoNoteL( EPhoneCallInProgress, ETrue ); |
37 | 298 |
} |
299 |
break; |
|
300 |
||
301 |
default: |
|
302 |
break; |
|
303 |
} |
|
304 |
} |
|
305 |
||
306 |
// ----------------------------------------------------------- |
|
307 |
// CPhoneStateCallSetup::HandlePhoneEngineMessageL |
|
308 |
// ----------------------------------------------------------- |
|
309 |
// |
|
310 |
EXPORT_C void CPhoneStateCallSetup::HandlePhoneEngineMessageL( |
|
311 |
const TInt aMessage, |
|
312 |
TInt aCallId ) |
|
313 |
{ |
|
314 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandlePhoneEngineMessageL()"); |
|
315 |
switch ( aMessage ) |
|
316 |
{ |
|
317 |
case MEngineMonitor::EPEMessageConnected: |
|
318 |
HandleConnectedL( aCallId ); |
|
319 |
break; |
|
320 |
||
321 |
case MEngineMonitor::EPEMessageRemoteTerminated: |
|
322 |
break; |
|
323 |
||
324 |
case MEngineMonitor::EPEMessageIdle: |
|
325 |
HandleIdleL( aCallId ); |
|
326 |
break; |
|
327 |
||
328 |
case MEngineMonitor::EPEMessageAudioOutputChanged: |
|
329 |
HandleAudioOutputChangedL(); |
|
330 |
break; |
|
331 |
||
332 |
case MEngineMonitor::EPEMessageSendingDTMF: // fall through |
|
333 |
case MEngineMonitor::EPEMessageContinuingDTMFSending: |
|
334 |
HandleSendingDTMFL(); |
|
335 |
break; |
|
336 |
||
337 |
case MEngineMonitor::EPEMessageStoppedDTMF: |
|
338 |
HandleStoppedDTMFL(); |
|
339 |
break; |
|
340 |
||
341 |
case MEngineMonitor::EPEMessageSentDTMF: // fall through |
|
342 |
case MEngineMonitor::EPEMessageDTMFSendingAborted: |
|
343 |
CancelDTMFSendingL(); |
|
344 |
break; |
|
345 |
||
346 |
default: |
|
347 |
CPhoneState::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
348 |
break; |
|
349 |
} |
|
350 |
} |
|
351 |
||
352 |
// ----------------------------------------------------------- |
|
353 |
// CPhoneStateCallSetup::HandleSendingDTMFL |
|
354 |
// ----------------------------------------------------------- |
|
355 |
// |
|
356 |
void CPhoneStateCallSetup::HandleSendingDTMFL() |
|
357 |
{ |
|
358 |
__LOGMETHODSTARTEND(EPhoneControl, |
|
359 |
"CPhoneStateCallSetup::HandleSendingDTMFL()" ); |
|
360 |
TPhoneCmdParamNote noteParam; |
|
361 |
noteParam.SetType( EPhoneNoteDtmfSending ); |
|
362 |
noteParam.SetResourceId( CPhoneMainResourceResolver::Instance()-> |
|
363 |
ResolveResourceID( EPhoneSendingDtmfWaitNote ) ); |
|
364 |
||
365 |
// Show the "Sending..." Wait Note, and pre-populate it |
|
366 |
// with the PhoneEngine's current DTMF String. |
|
367 |
// Set the text for the wait-note. |
|
368 |
TPEDtmfString dtmfString = iStateMachine->PhoneEngineInfo()->DtmfString(); |
|
369 |
HBufC* noteText = StringLoader::LoadLC( |
|
370 |
CPhoneMainResourceResolver::Instance()-> |
|
371 |
ResolveResourceID( EPhoneSendingDtmfWaitNoteText ), |
|
372 |
dtmfString ); |
|
373 |
noteParam.SetText( *noteText ); |
|
374 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewShowNote, ¬eParam ); |
|
375 |
CleanupStack::PopAndDestroy( noteText ); |
|
376 |
} |
|
377 |
||
378 |
// ----------------------------------------------------------- |
|
379 |
// CPhoneStateCallSetup::HandleStoppedDTMFL |
|
380 |
// ----------------------------------------------------------- |
|
381 |
// |
|
382 |
void CPhoneStateCallSetup::HandleStoppedDTMFL() |
|
383 |
{ |
|
65 | 384 |
__LOGMETHODSTARTEND(EPhoneControl, |
385 |
"CPhoneStateCallSetup::HandleStoppedDTMFL()" ); |
|
37 | 386 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNote ); |
387 |
||
388 |
// Fetch the remaining (unparsed) portion of the DTMF String |
|
389 |
// from PhoneEngine |
|
390 |
TPEDtmfString dtmfString = iStateMachine->PhoneEngineInfo()->DtmfString(); |
|
391 |
if ( dtmfString.Length() ) |
|
392 |
{ |
|
393 |
// Show the DTMF Wait Character confirmation query |
|
394 |
TPhoneCmdParamQuery queryParam; |
|
395 |
queryParam.SetQueryType( EPhoneQueryDialog ); |
|
396 |
queryParam.SetQueryResourceId( |
|
397 |
CPhoneMainResourceResolver::Instance()->ResolveResourceID( |
|
398 |
EPhoneDtmfWaitCharacterConfirmationQuery ) ); |
|
399 |
||
400 |
// Append the PhoneEngine's current DTMF String to the query's prompt |
|
401 |
HBufC* queryPrompt = StringLoader::LoadLC( |
|
402 |
CPhoneMainResourceResolver::Instance()->ResolveResourceID( |
|
403 |
EPhoneDtmfWaitCharacterConfirmationQueryText ), |
|
404 |
dtmfString ); |
|
405 |
queryParam.SetQueryPrompt( *queryPrompt ); |
|
65 | 406 |
iViewCommandHandle->ExecuteCommandL( |
407 |
EPhoneViewShowQuery, |
|
408 |
&queryParam ); |
|
37 | 409 |
CleanupStack::PopAndDestroy( queryPrompt ); |
410 |
} |
|
411 |
else |
|
412 |
{ |
|
413 |
// Stop the asynchronous sending operation the |
|
414 |
// PhoneEngine may be performing. |
|
415 |
iStateMachine->SendPhoneEngineMessage( |
|
416 |
MPEPhoneModel::EPEMessageStopDTMFSending ); |
|
417 |
||
418 |
// Prompt for more characters by showing DTMF query with empty string |
|
419 |
HBufC* emptyString = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
420 |
TPtr ptr( emptyString->Des() ); |
|
421 |
CPhoneState::ShowTextQueryL( |
|
422 |
CPhoneMainResourceResolver::Instance()-> |
|
423 |
ResolveResourceID( EPhoneDtmfNumberQuery ), |
|
424 |
CPhoneMainResourceResolver::Instance()-> |
|
425 |
ResolveResourceID( EPhoneSendDtmfEmptyEditBoxCBA ), |
|
426 |
CPhoneMainResourceResolver::Instance()-> |
|
427 |
ResolveResourceID( EPhoneSendDtmfNormalEditBoxCBA ), |
|
428 |
&ptr ); |
|
429 |
CleanupStack::PopAndDestroy( emptyString ); |
|
430 |
} |
|
431 |
} |
|
432 |
||
433 |
// ----------------------------------------------------------- |
|
434 |
// CPhoneStateCallSetup::CancelDTMFSendingL |
|
435 |
// ----------------------------------------------------------- |
|
436 |
// |
|
437 |
void CPhoneStateCallSetup::CancelDTMFSendingL() |
|
438 |
{ |
|
65 | 439 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::CancelDTMFSendingL()" ); |
37 | 440 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveDtmfNote ); |
441 |
} |
|
442 |
||
443 |
// ----------------------------------------------------------- |
|
444 |
// CPhoneStateCallSetup::HandleConnectedL |
|
445 |
// ----------------------------------------------------------- |
|
446 |
// |
|
447 |
void CPhoneStateCallSetup::HandleConnectedL( TInt aCallId ) |
|
448 |
{ |
|
449 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandleConnectedL()"); |
|
450 |
BeginUiUpdateLC(); |
|
451 |
CPhoneState::UpdateSingleActiveCallL( aCallId ); |
|
74 | 452 |
UpdateUiCommands(); |
37 | 453 |
EndUiUpdate(); |
454 |
iStateMachine->ChangeState( EPhoneStateSingle ); |
|
455 |
} |
|
456 |
||
457 |
// ----------------------------------------------------------- |
|
458 |
// CPhoneStateCallSetup::HandleIdleL |
|
459 |
// ----------------------------------------------------------- |
|
460 |
// |
|
461 |
void CPhoneStateCallSetup::HandleIdleL( TInt aCallId ) |
|
462 |
{ |
|
463 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandleIdleL()"); |
|
65 | 464 |
HBufC *phoneNumber = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
465 |
TPtr ptr( phoneNumber->Des() ); |
|
466 |
TPhoneCmdParamString stringParam; |
|
467 |
stringParam.SetString( &ptr ); |
|
37 | 468 |
|
469 |
BeginUiUpdateLC (); |
|
470 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewHideNaviPaneAudioVolume ); |
|
471 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveCallHeader, aCallId ); |
|
472 |
SetDefaultFlagsL(); |
|
65 | 473 |
|
74 | 474 |
if ( iNumberEntryManager->IsNumberEntryUsedL() ) |
37 | 475 |
{ |
65 | 476 |
iViewCommandHandle->ExecuteCommand( |
477 |
EPhoneViewGetNumberFromEntry, |
|
478 |
&stringParam ); |
|
479 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewLaunchLogs, &stringParam ); |
|
37 | 480 |
} |
481 |
else |
|
482 |
{ |
|
74 | 483 |
RemoveDialogsAndSendPhoneToBackgroundL(); |
37 | 484 |
} |
78 | 485 |
|
486 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveNumberEntry ); |
|
37 | 487 |
EndUiUpdate(); |
65 | 488 |
CleanupStack::PopAndDestroy( phoneNumber ); |
37 | 489 |
iStateMachine->ChangeState( EPhoneStateIdle ); |
490 |
} |
|
491 |
||
492 |
// ----------------------------------------------------------------------------- |
|
493 |
// CPhoneStateCallSetup::HandleAudioOutputChangedL |
|
494 |
// ----------------------------------------------------------------------------- |
|
495 |
// |
|
496 |
void CPhoneStateCallSetup::HandleAudioOutputChangedL() |
|
497 |
{ |
|
498 |
__LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateCallSetup::HandleAudioOutputChangedL( ) "); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
499 |
CPhoneState::HandleAudioOutputChangedL(); |
37 | 500 |
// Update the call setup CBA |
74 | 501 |
UpdateUiCommands(); |
37 | 502 |
} |
503 |
||
504 |
// ----------------------------------------------------------- |
|
505 |
// CPhoneStateCallSetup::SendDtmfL |
|
506 |
// ----------------------------------------------------------- |
|
507 |
// |
|
508 |
void CPhoneStateCallSetup::SendDtmfL() |
|
509 |
{ |
|
510 |
__LOGMETHODSTARTEND(EPhoneControl, |
|
511 |
"CPhoneStateCallSetup::SendDtmfL()" ); |
|
512 |
__ASSERT_DEBUG( iStateMachine->PhoneEngineInfo(), |
|
513 |
Panic( EPhoneCtrlInvariant ) ); |
|
514 |
||
515 |
// First get the DTMF sequence from dialog |
|
516 |
TPhoneCmdParamString dtmfSequence; |
|
517 |
HBufC *content = HBufC::NewLC( KPEDtmfMaxLength ); |
|
518 |
TPtr ptr( content->Des() ); |
|
519 |
dtmfSequence.SetString( &ptr ); |
|
520 |
||
65 | 521 |
iViewCommandHandle->ExecuteCommand( |
522 |
EPhoneViewGetNumberFromEntry, |
|
523 |
&dtmfSequence ); |
|
37 | 524 |
|
525 |
// Send the DTMF |
|
526 |
if ( ptr.Length() ) |
|
527 |
{ |
|
528 |
iStateMachine->PhoneEngineInfo()->SetDtmfStringCommand( ptr ); |
|
529 |
iStateMachine->SendPhoneEngineMessage( |
|
530 |
MPEPhoneModel::EPEMessageSendDTMF ); |
|
531 |
} |
|
532 |
||
533 |
CleanupStack::PopAndDestroy( content ); |
|
534 |
} |
|
535 |
||
536 |
// End of File |