author | hgs |
Fri, 03 Sep 2010 13:33:36 +0300 | |
changeset 65 | 2a5d4ab426d3 |
parent 50 | 377c906a8701 |
child 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 CPhoneConference class. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include <eikmenub.h> |
|
21 |
#include <eikenv.h> |
|
22 |
#include <StringLoader.h> |
|
23 |
#include <pevirtualengine.h> |
|
24 |
#include <mpeengineinfo.h> |
|
25 |
#include <cpephonemodelif.h> |
|
26 |
#include <featmgr.h> |
|
27 |
#include "cphoneconference.h" |
|
28 |
#include "mphonestatemachine.h" |
|
29 |
#include "phoneviewcommanddefinitions.h" |
|
30 |
#include "phoneui.hrh" |
|
31 |
#include "cphonemainresourceresolver.h" |
|
32 |
#include "phonerssbase.h" |
|
33 |
#include "tphonecmdparaminteger.h" |
|
34 |
#include "tphonecmdparamboolean.h" |
|
35 |
#include "tphonecmdparamstring.h" |
|
36 |
#include "tphonecmdparamcallheaderdata.h" |
|
37 |
#include "tphonecmdparamkeyevent.h" |
|
38 |
#include "phonestatedefinitions.h" |
|
39 |
#include "tphonecmdparamglobalnote.h" |
|
40 |
#include "phonestatedefinitionsgsm.h" |
|
41 |
#include "tphonecmdparamcallstatedata.h" |
|
42 |
#include "cphonekeys.h" |
|
43 |
#include "phonelogger.h" |
|
44 |
||
45 |
// ================= MEMBER FUNCTIONS ======================= |
|
46 |
||
47 |
// C++ default constructor can NOT contain any code, that |
|
48 |
// might leave. |
|
49 |
// |
|
50 |
CPhoneConference::CPhoneConference( |
|
51 |
MPhoneStateMachine* aStateMachine, |
|
52 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
53 |
MPhoneCustomization* aPhoneCustomization ) : |
|
54 |
CPhoneGsmInCall( aStateMachine, aViewCommandHandle, aPhoneCustomization ) |
|
55 |
{ |
|
56 |
} |
|
57 |
||
58 |
// ----------------------------------------------------------- |
|
59 |
// CPhoneConference::~CPhoneConference() |
|
60 |
// Destructor |
|
61 |
// (other items were commented in a header). |
|
62 |
// ----------------------------------------------------------- |
|
63 |
// |
|
64 |
CPhoneConference::~CPhoneConference() |
|
65 |
{ |
|
66 |
} |
|
67 |
||
68 |
// ----------------------------------------------------------- |
|
69 |
// CPhoneConference::ConstructL() |
|
70 |
// Constructor |
|
71 |
// (other items were commented in a header). |
|
72 |
// ----------------------------------------------------------- |
|
73 |
// |
|
74 |
void CPhoneConference::ConstructL() |
|
75 |
{ |
|
76 |
CPhoneGsmInCall::ConstructL(); |
|
77 |
||
78 |
// Re-enable global notes |
|
79 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
80 |
globalNotifierParam.SetBoolean( EFalse ); |
|
81 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
82 |
&globalNotifierParam ); |
|
83 |
||
84 |
} |
|
85 |
||
86 |
// ----------------------------------------------------------- |
|
87 |
// CPhoneConference::NewL() |
|
88 |
// Constructor |
|
89 |
// (other items were commented in a header). |
|
90 |
// ----------------------------------------------------------- |
|
91 |
// |
|
92 |
CPhoneConference* CPhoneConference::NewL( |
|
93 |
MPhoneStateMachine* aStateMachine, |
|
94 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
95 |
MPhoneCustomization* aPhoneCustomization ) |
|
96 |
{ |
|
97 |
CPhoneConference* self = new( ELeave ) CPhoneConference( |
|
98 |
aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
99 |
||
100 |
CleanupStack::PushL( self ); |
|
101 |
self->ConstructL(); |
|
102 |
CleanupStack::Pop( self ); |
|
103 |
||
104 |
return self; |
|
105 |
} |
|
106 |
||
107 |
// ----------------------------------------------------------- |
|
108 |
// CPhoneConference::HandlePhoneEngineMessageL |
|
109 |
// ----------------------------------------------------------- |
|
110 |
// |
|
111 |
void CPhoneConference::HandlePhoneEngineMessageL( |
|
112 |
const TInt aMessage, |
|
113 |
TInt aCallId ) |
|
114 |
{ |
|
115 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
116 |
"CPhoneConference::HandlePhoneEngineMessageL()"); |
|
117 |
switch ( aMessage ) |
|
118 |
{ |
|
119 |
case MEngineMonitor::EPEMessageIdle: |
|
120 |
HandleIdleL( aCallId ); |
|
121 |
break; |
|
122 |
||
123 |
case MEngineMonitor::EPEMessageConferenceIdle: |
|
124 |
HandleConferenceIdleL(); |
|
125 |
break; |
|
126 |
||
127 |
case MEngineMonitor::EPEMessageHeldConference: |
|
128 |
HandleHeldConferenceL( aCallId ); |
|
129 |
break; |
|
130 |
||
131 |
case MEngineMonitor::EPEMessageConnectedConference: |
|
132 |
HandleConnectedConferenceL(); |
|
133 |
break; |
|
134 |
||
135 |
case MEngineMonitor::EPEMessageAddedConferenceMember: |
|
136 |
UpdateConferenceSecurityStatusL( aCallId ); |
|
137 |
break; |
|
138 |
||
139 |
case MEngineMonitor::EPEMessageWentOneToOne: |
|
140 |
HandleWentOneToOneL( aCallId ); |
|
141 |
break; |
|
142 |
||
143 |
case MEngineMonitor::EPEMessageHeld: |
|
144 |
{ |
|
145 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
146 |
callHeaderParam.SetCallState( EPEStateHeld ); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
147 |
TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
148 |
TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
149 |
ResolveResourceID( EPhoneCallOnHold ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
150 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
151 |
StringLoader::Load( labelText, callLabelId, CCoeEnv::Static() ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
152 |
callHeaderParam.SetLabelText( labelText ); |
37 | 153 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
154 |
&callHeaderParam ); |
|
155 |
} |
|
156 |
break; |
|
157 |
||
158 |
case MEngineMonitor::EPEMessageConnected: |
|
159 |
{ |
|
160 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
161 |
callHeaderParam.SetCallState( EPEStateConnected ); |
|
162 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
163 |
&callHeaderParam ); |
|
164 |
} |
|
165 |
break; |
|
166 |
||
167 |
case MEngineMonitor::EPEMessageDialing: |
|
168 |
HandleDiallingL( aCallId ); |
|
169 |
break; |
|
170 |
||
171 |
case MEngineMonitor::EPEMessageIncoming: |
|
172 |
HandleIncomingL( aCallId ); |
|
173 |
break; |
|
174 |
||
175 |
default: |
|
176 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
177 |
break; |
|
178 |
} |
|
179 |
} |
|
180 |
||
181 |
// ----------------------------------------------------------- |
|
182 |
// CPhoneConference:HandleCommandL |
|
183 |
// ----------------------------------------------------------- |
|
184 |
// |
|
185 |
TBool CPhoneConference::HandleCommandL( TInt aCommand ) |
|
186 |
{ |
|
187 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
188 |
"CPhoneConference::HandleCommandL()"); |
|
189 |
TBool commandStatus = ETrue; |
|
190 |
switch( aCommand ) |
|
191 |
{ |
|
192 |
case EAknSoftkeyCancel: |
|
193 |
BeginUiUpdateLC(); |
|
194 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
65 | 195 |
EndUiUpdate(); |
37 | 196 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
197 |
break; |
|
198 |
||
199 |
case EPhoneInCallCmdHold: |
|
200 |
case EPhoneInCallCmdConferenceHold: |
|
201 |
iStateMachine->SendPhoneEngineMessage( |
|
202 |
CPEPhoneModelIF::EPEMessageHoldConference ); |
|
203 |
break; |
|
204 |
||
205 |
case EPhoneInCallCmdUnhold: |
|
206 |
case EPhoneInCallCmdConferenceUnhold: |
|
207 |
iStateMachine->SendPhoneEngineMessage( |
|
208 |
CPEPhoneModelIF::EPEMessageResumeConference ); |
|
209 |
break; |
|
210 |
||
211 |
case EPhoneInCallCmdDrop: |
|
212 |
DropSelectedParticipantL(); |
|
213 |
break; |
|
214 |
||
215 |
case EPhoneInCallCmdPrivate: |
|
216 |
PrivateSelectedParticipantL(); |
|
217 |
break; |
|
65 | 218 |
|
219 |
case EPhoneInCallCmdPrivateSelection: |
|
220 |
case EPhoneInCallCmdDropSelection: |
|
37 | 221 |
case EPhoneInCallCmdNewCall: |
222 |
case EPhoneInCallCmdNewCallCall: |
|
65 | 223 |
case EPhoneInCallCmdParticipants: |
37 | 224 |
break; |
225 |
||
226 |
default: |
|
227 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
228 |
break; |
|
229 |
} |
|
230 |
return commandStatus; |
|
231 |
} |
|
232 |
||
233 |
// ----------------------------------------------------------- |
|
234 |
// CPhoneConference::UpdateInCallCbaL |
|
235 |
// ----------------------------------------------------------- |
|
236 |
// |
|
237 |
void CPhoneConference::UpdateInCallCbaL() |
|
238 |
{ |
|
239 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
240 |
} |
|
241 |
||
242 |
// ----------------------------------------------------------- |
|
243 |
// CPhoneConference::HandleKeyEventL |
|
244 |
// ----------------------------------------------------------- |
|
245 |
// |
|
246 |
void CPhoneConference::HandleKeyEventL( |
|
247 |
const TKeyEvent& aKeyEvent, |
|
248 |
TEventCode aEventCode ) |
|
249 |
{ |
|
250 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
251 |
"CPhoneConference::HandleKeyEventL()"); |
|
65 | 252 |
if ( !CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) ) |
37 | 253 |
{ |
65 | 254 |
// Handle other key events than numeric key events. |
50 | 255 |
CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ); |
37 | 256 |
} |
257 |
} |
|
258 |
||
259 |
// -------------------------------------------------------------- |
|
260 |
// CPhoneConference::HandleKeyMessageL |
|
261 |
// -------------------------------------------------------------- |
|
262 |
// |
|
263 |
void CPhoneConference::HandleKeyMessageL( |
|
264 |
TPhoneKeyEventMessages aMessage, |
|
265 |
TKeyCode aCode ) |
|
266 |
{ |
|
267 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
268 |
"CPhoneConference::HandleKeyMessageL()"); |
|
269 |
switch ( aCode ) |
|
270 |
{ |
|
65 | 271 |
case EKeyYes: // send-key |
37 | 272 |
if( IsNumberEntryVisibleL() ) |
273 |
{ |
|
65 | 274 |
CallFromNumberEntryL(); |
37 | 275 |
} |
276 |
else |
|
277 |
{ |
|
278 |
ToggleHoldL(); |
|
279 |
} |
|
280 |
break; |
|
281 |
||
282 |
default: |
|
283 |
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode ); |
|
284 |
break; |
|
285 |
} |
|
286 |
} |
|
287 |
||
288 |
// ----------------------------------------------------------- |
|
289 |
// CPhoneConference::HandleNumberEntryClearedL |
|
290 |
// ----------------------------------------------------------- |
|
291 |
// |
|
292 |
void CPhoneConference::HandleNumberEntryClearedL() |
|
293 |
{ |
|
294 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
295 |
"CPhoneConference::HandleNumberEntryClearedL()"); |
|
296 |
UpdateInCallCbaL(); |
|
297 |
} |
|
298 |
||
299 |
// ----------------------------------------------------------- |
|
300 |
// CPhoneConference:HandleIdleL |
|
301 |
// ----------------------------------------------------------- |
|
302 |
// |
|
303 |
void CPhoneConference::HandleIdleL( TInt aCallId ) |
|
304 |
{ |
|
305 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
306 |
"CPhoneConference::HandleIdleL()"); |
|
307 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
308 |
globalNotifierParam.SetBoolean( EFalse ); |
|
309 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
310 |
&globalNotifierParam ); |
|
311 |
||
312 |
// If conference bubble still exists then we have conference and |
|
313 |
// single call |
|
314 |
TPhoneCmdParamBoolean conferenceBubbleExists; |
|
315 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
|
316 |
&conferenceBubbleExists ); |
|
317 |
||
318 |
if( conferenceBubbleExists.Boolean() ) |
|
319 |
{ |
|
320 |
iViewCommandHandle->ExecuteCommandL( |
|
321 |
EPhoneViewRemoveFromConference, aCallId ); |
|
322 |
} |
|
323 |
else |
|
324 |
{ |
|
325 |
iViewCommandHandle->ExecuteCommandL( |
|
65 | 326 |
EPhoneViewRemoveCallHeader, aCallId ); |
37 | 327 |
} |
328 |
} |
|
329 |
||
330 |
// ----------------------------------------------------------- |
|
331 |
// CPhoneConference:HandleConferenceIdleL |
|
332 |
// ----------------------------------------------------------- |
|
333 |
// |
|
334 |
void CPhoneConference::HandleConferenceIdleL() |
|
335 |
{ |
|
336 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
337 |
"CPhoneConference::HandleConferenceIdleL()"); |
|
338 |
BeginUiUpdateLC(); |
|
339 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
|
340 |
||
341 |
TPhoneCmdParamInteger activeCallCount; |
|
342 |
iViewCommandHandle->ExecuteCommandL( |
|
343 |
EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
|
344 |
||
345 |
switch( activeCallCount.Integer() ) |
|
346 |
{ |
|
347 |
case ENoActiveCalls: |
|
348 |
MakeStateTransitionToIdleL(); |
|
349 |
break; |
|
350 |
||
351 |
case EOneActiveCall: |
|
352 |
{ |
|
353 |
TPhoneCmdParamCallStateData callStateData; |
|
354 |
callStateData.SetCallState( EPEStateRinging ); |
|
355 |
iViewCommandHandle->HandleCommandL( |
|
356 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
357 |
||
358 |
if( callStateData.CallId() > KErrNotFound ) |
|
359 |
{ |
|
360 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
361 |
iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
362 |
} |
|
363 |
else |
|
364 |
{ |
|
65 | 365 |
MakeStateTransitionToSingleL(); |
37 | 366 |
} |
367 |
} |
|
368 |
break; |
|
369 |
||
370 |
case ETwoActiveCalls: |
|
371 |
MakeStateTransitionToTwoSinglesL(); |
|
372 |
break; |
|
373 |
||
374 |
default: |
|
375 |
MakeStateTransitionToTwoSinglesL(); |
|
376 |
break; |
|
377 |
} |
|
50 | 378 |
EndUiUpdate(); |
37 | 379 |
} |
380 |
||
381 |
// ----------------------------------------------------------- |
|
382 |
// CPhoneConference::HandleHeldConferenceL |
|
383 |
// ----------------------------------------------------------- |
|
384 |
// |
|
385 |
void CPhoneConference::HandleHeldConferenceL( TInt aCallId ) |
|
386 |
{ |
|
387 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
388 |
"CPhoneConference::HandleHeldConferenceL()"); |
|
389 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
390 |
callHeaderParam.SetCallState( EPEStateHeldConference ); |
|
391 |
||
392 |
TInt callLabelId; |
|
393 |
TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
|
394 |
callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
395 |
ResolveResourceID( EPhoneCallOnHold ); |
|
396 |
StringLoader::Load( |
|
397 |
labelText, |
|
398 |
callLabelId, |
|
65 | 399 |
CCoeEnv::Static() ); |
37 | 400 |
callHeaderParam.SetLabelText( labelText ); |
401 |
||
402 |
iViewCommandHandle->ExecuteCommandL( |
|
403 |
EPhoneViewUpdateBubble, aCallId, &callHeaderParam ); |
|
404 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
405 |
UpdateInCallCbaL(); |
|
406 |
} |
|
407 |
||
408 |
// ----------------------------------------------------------- |
|
409 |
// CPhoneConference::HandleConnectedConferenceL |
|
410 |
// ----------------------------------------------------------- |
|
411 |
// |
|
412 |
void CPhoneConference::HandleConnectedConferenceL() |
|
413 |
{ |
|
414 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
415 |
"CPhoneConference::HandleConnectedConferenceL()"); |
|
416 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
417 |
callHeaderParam.SetCallState( EPEStateConnectedConference ); |
|
418 |
||
419 |
TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC ); |
|
420 |
TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
421 |
ResolveResourceID( EPhoneCLIConferenceCall ); |
|
422 |
||
423 |
StringLoader::Load( |
|
424 |
conferenceText, |
|
425 |
callLabelId, |
|
426 |
CCoeEnv::Static() ); |
|
427 |
callHeaderParam.SetLabelText( conferenceText ); |
|
428 |
||
429 |
iViewCommandHandle->ExecuteCommandL( |
|
430 |
EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam ); |
|
431 |
||
432 |
// Set Hold flag to view |
|
433 |
TPhoneCmdParamBoolean holdFlag; |
|
434 |
holdFlag.SetBoolean( EFalse ); |
|
435 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
436 |
||
437 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
438 |
UpdateInCallCbaL(); |
|
439 |
} |
|
440 |
||
441 |
// ----------------------------------------------------------- |
|
442 |
// CPhoneConference::DropSelectedParticipantL |
|
443 |
// ----------------------------------------------------------- |
|
444 |
// |
|
445 |
void CPhoneConference::DropSelectedParticipantL() |
|
446 |
{ |
|
447 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
448 |
"CPhoneConference::DropSelectedParticipantL()"); |
|
449 |
TPhoneViewResponseId response; |
|
450 |
TPhoneCmdParamInteger callId; |
|
451 |
response = iViewCommandHandle->HandleCommandL( |
|
452 |
EPhoneViewSelectedConfMember, &callId ); |
|
453 |
||
454 |
if( response == EPhoneViewResponseSuccess ) |
|
455 |
{ |
|
456 |
iStateMachine->SetCallId( callId.Integer() ); |
|
457 |
iStateMachine->SendPhoneEngineMessage( |
|
65 | 458 |
CPEPhoneModelIF::EPEMessageDropConferenceMember ); |
37 | 459 |
} |
460 |
} |
|
461 |
||
462 |
// ----------------------------------------------------------- |
|
463 |
// CPhoneConference::PrivateSelectedParticipantL |
|
464 |
// ----------------------------------------------------------- |
|
465 |
// |
|
466 |
void CPhoneConference::PrivateSelectedParticipantL() |
|
467 |
{ |
|
468 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
469 |
"CPhoneConference::PrivateSelectedParticipantL()"); |
|
470 |
TPhoneViewResponseId response; |
|
471 |
TPhoneCmdParamInteger callId; |
|
472 |
response = iViewCommandHandle->HandleCommandL( |
|
473 |
EPhoneViewSelectedConfMember, &callId ); |
|
474 |
||
475 |
if( response == EPhoneViewResponseSuccess ) |
|
476 |
{ |
|
477 |
iStateMachine->SetCallId( callId.Integer() ); |
|
478 |
iStateMachine->SendPhoneEngineMessage( |
|
479 |
CPEPhoneModelIF::EPEMessageGoOneToOne ); |
|
480 |
BeginUiUpdateLC(); |
|
481 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
65 | 482 |
EndUiUpdate(); |
483 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
37 | 484 |
} |
485 |
} |
|
486 |
||
487 |
// ----------------------------------------------------------- |
|
488 |
// CPhoneConference::MakeStateTransitionToIdleL |
|
489 |
// ----------------------------------------------------------- |
|
490 |
// |
|
491 |
void CPhoneConference::MakeStateTransitionToIdleL() |
|
492 |
{ |
|
493 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
494 |
"CPhoneConference::MakeStateTransitionToIdleL()"); |
|
495 |
SetDefaultFlagsL(); |
|
496 |
||
497 |
if ( IsNumberEntryUsedL() ) |
|
498 |
{ |
|
65 | 499 |
SetNumberEntryVisibilityL(ETrue); |
37 | 500 |
} |
501 |
else if ( !TopAppIsDisplayedL() ) |
|
502 |
{ |
|
503 |
||
504 |
// Continue displaying current app but set up the |
|
505 |
// idle screen in the background |
|
506 |
SetupIdleScreenInBackgroundL(); |
|
507 |
} |
|
508 |
else |
|
509 |
{ |
|
510 |
DisplayIdleScreenL(); |
|
511 |
} |
|
512 |
DisplayCallTerminationNoteL(); |
|
513 |
UpdateCbaL( EPhoneEmptyCBA ); |
|
514 |
iStateMachine->ChangeState( EPhoneStateIdle ); |
|
515 |
} |
|
516 |
||
517 |
// ----------------------------------------------------------- |
|
518 |
// CPhoneConference::MakeStateTransitionToSingleL |
|
519 |
// ----------------------------------------------------------- |
|
520 |
// |
|
521 |
void CPhoneConference::MakeStateTransitionToSingleL() |
|
522 |
{ |
|
523 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
524 |
"CPhoneConference::MakeStateTransitionToSingleL()"); |
|
525 |
if ( IsNumberEntryUsedL() ) |
|
526 |
{ |
|
527 |
SetNumberEntryVisibilityL(ETrue); |
|
528 |
} |
|
65 | 529 |
SetTouchPaneButtons( EPhoneIncallButtons ); |
37 | 530 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
65 | 531 |
iStateMachine->ChangeState( EPhoneStateSingle ); |
37 | 532 |
} |
533 |
||
534 |
// ----------------------------------------------------------- |
|
535 |
// CPhoneConference::MakeTransitionToTwoSinglesL |
|
536 |
// ----------------------------------------------------------- |
|
537 |
// |
|
538 |
void CPhoneConference::MakeStateTransitionToTwoSinglesL() |
|
539 |
{ |
|
540 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
541 |
"CPhoneConference::MakeStateTransitionToTwoSinglesL()"); |
|
542 |
if ( IsNumberEntryUsedL() ) |
|
543 |
{ |
|
544 |
SetNumberEntryVisibilityL(ETrue); |
|
545 |
} |
|
546 |
||
65 | 547 |
SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
37 | 548 |
UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
65 | 549 |
iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
37 | 550 |
} |
551 |
||
552 |
// ----------------------------------------------------------- |
|
553 |
// CPhoneConference::ToggleHold |
|
554 |
// ----------------------------------------------------------- |
|
555 |
// |
|
556 |
void CPhoneConference::ToggleHoldL() |
|
557 |
{ |
|
558 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
559 |
"CPhoneConference::ToggleHoldL()"); |
|
65 | 560 |
|
561 |
iStateMachine->SetCallId( KConferenceCallId ); |
|
562 |
iStateMachine->SendPhoneEngineMessage( |
|
563 |
CPEPhoneModelIF::EPEMessageSwapConference ); |
|
37 | 564 |
} |
565 |
||
566 |
// ----------------------------------------------------------- |
|
567 |
// CPhoneConference::HandleDiallingL |
|
568 |
// ----------------------------------------------------------- |
|
569 |
// |
|
570 |
void CPhoneConference::HandleDiallingL( TInt aCallId ) |
|
571 |
{ |
|
572 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
573 |
"CPhoneConference::HandleDiallingL()"); |
|
574 |
BeginUiUpdateLC(); |
|
575 |
SetNumberEntryVisibilityL(EFalse); |
|
576 |
DisplayCallSetupL( aCallId ); |
|
65 | 577 |
SetTouchPaneButtons(EPhoneCallSetupAndSingleButtons); |
37 | 578 |
EndUiUpdate(); |
579 |
UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
580 |
iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
|
581 |
} |
|
582 |
||
583 |
// ----------------------------------------------------------- |
|
584 |
// CPhoneConference::DisplayCallSetupL |
|
585 |
// ----------------------------------------------------------- |
|
586 |
// |
|
587 |
void CPhoneConference::DisplayCallSetupL( TInt aCallId ) |
|
588 |
{ |
|
589 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
590 |
"CPhoneConference::DisplayCallSetupL()"); |
|
591 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
592 |
TPhoneCmdParamInteger uidParam; |
|
593 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
594 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
595 |
&uidParam ); |
|
596 |
DisplayHeaderForOutgoingCallL( aCallId ); |
|
597 |
} |
|
598 |
||
599 |
// ----------------------------------------------------------- |
|
600 |
// CPhoneConference::HandleIncomingL |
|
601 |
// ----------------------------------------------------------- |
|
602 |
// |
|
603 |
void CPhoneConference::HandleIncomingL( TInt aCallId ) |
|
604 |
{ |
|
605 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
606 |
"CPhoneConference::HandleIncomingL()"); |
|
607 |
BeginUiUpdateLC(); |
|
608 |
TPhoneCmdParamBoolean dialerParam; |
|
609 |
dialerParam.SetBoolean( ETrue ); |
|
610 |
||
611 |
// Get allow waiting call header param value. |
|
612 |
AllowShowingOfWaitingCallHeaderL( dialerParam ); |
|
613 |
// Close fast swap window if it's displayed |
|
614 |
CEikonEnv::Static()->DismissTaskList(); |
|
615 |
||
616 |
CheckDisableHWKeysAndCallUIL(); |
|
617 |
DisplayIncomingCallL( aCallId, dialerParam ); |
|
618 |
SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
619 |
EndUiUpdate(); |
|
620 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
65 | 621 |
iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
37 | 622 |
} |
623 |
||
624 |
// ----------------------------------------------------------- |
|
625 |
// CPhoneConference::DisplayIncomingCallL |
|
626 |
// ----------------------------------------------------------- |
|
627 |
// |
|
628 |
void CPhoneConference::DisplayIncomingCallL( |
|
629 |
TInt aCallId, |
|
630 |
const TPhoneCmdParamBoolean aCommandParam ) |
|
631 |
{ |
|
632 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
633 |
"CPhoneConference::DisplayIncomingCallL()"); |
|
634 |
// Cannot delete active note, e.g. New call query, |
|
635 |
// but show waiting note with or without caller name |
|
65 | 636 |
if ( IsAnyQueryActiveL() || !aCommandParam.Boolean() ) |
37 | 637 |
{ |
65 | 638 |
CallWaitingNoteL( aCallId ); |
37 | 639 |
} |
640 |
else |
|
641 |
{ |
|
642 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
643 |
} |
|
644 |
// Indicate that the Phone needs to be sent to the background if |
|
645 |
// an application other than the top application is in the foreground |
|
646 |
TPhoneCmdParamBoolean booleanParam; |
|
647 |
booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
648 |
iViewCommandHandle->ExecuteCommandL( |
|
649 |
EPhoneViewSetNeedToSendToBackgroundStatus, |
|
650 |
&booleanParam ); |
|
651 |
||
652 |
TPhoneCmdParamInteger uidParam; |
|
653 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
654 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
655 |
&uidParam ); |
|
656 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
|
657 |
&uidParam ); |
|
658 |
DisplayHeaderForCallComingInL( aCallId, ETrue ); // waiting call |
|
65 | 659 |
} |
37 | 660 |
|
661 |
// ----------------------------------------------------------- |
|
662 |
// CPhoneConference::HandleWentOneToOneL |
|
663 |
// ----------------------------------------------------------- |
|
664 |
// |
|
665 |
void CPhoneConference::HandleWentOneToOneL( TInt aCallId ) |
|
666 |
{ |
|
667 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
668 |
"CPhoneConference::HandleWentOneToOneL()"); |
|
669 |
BeginUiUpdateLC(); |
|
670 |
iViewCommandHandle->ExecuteCommandL( |
|
671 |
EPhoneViewPrivateFromConference, aCallId ); |
|
672 |
||
673 |
// If conference bubble still exists then we have conference and |
|
674 |
// single call |
|
675 |
TPhoneCmdParamBoolean conferenceBubbleExists; |
|
676 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
|
65 | 677 |
&conferenceBubbleExists ); |
37 | 678 |
if( conferenceBubbleExists.Boolean() ) |
679 |
{ |
|
680 |
UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
65 | 681 |
iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
37 | 682 |
SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
683 |
} |
|
684 |
else |
|
65 | 685 |
{ |
37 | 686 |
SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
65 | 687 |
} |
37 | 688 |
EndUiUpdate(); |
689 |
} |
|
690 |
||
691 |
// ----------------------------------------------------------- |
|
692 |
// CPhoneConference::UpdateConferenceSecurityStatusL |
|
693 |
// ----------------------------------------------------------- |
|
694 |
// |
|
695 |
void CPhoneConference::UpdateConferenceSecurityStatusL( TInt aCallId ) |
|
696 |
{ |
|
697 |
__PHONELOG1( EBasic, EPhoneUIStates, |
|
698 |
"CPhoneConference::UpdateConferenceSecurityStatusL() - callId = %d", aCallId ); |
|
699 |
if( !iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) && |
|
700 |
iStateMachine->PhoneEngineInfo()->IsSecureCall( KPEConferenceCallID ) ) |
|
701 |
{ |
|
702 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
703 |
callHeaderParam.SetCiphering( EFalse ); |
|
704 |
callHeaderParam.SetCipheringIndicatorAllowed( |
|
705 |
iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
|
706 |
iViewCommandHandle->ExecuteCommandL( |
|
707 |
EPhoneViewCipheringInfoChange, |
|
708 |
KPEConferenceCallID, |
|
709 |
&callHeaderParam ); |
|
710 |
} |
|
711 |
} |
|
712 |
||
713 |
// End of File |