author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 14:15:47 +0300 | |
changeset 46 | bc5a64e5bc3c |
parent 37 | ba76fc04e6c2 |
child 50 | 377c906a8701 |
child 51 | f39ed5e045e0 |
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 |
DefineAndSetHoldFlagL(); |
|
86 |
||
87 |
} |
|
88 |
||
89 |
// ----------------------------------------------------------- |
|
90 |
// CPhoneConference::NewL() |
|
91 |
// Constructor |
|
92 |
// (other items were commented in a header). |
|
93 |
// ----------------------------------------------------------- |
|
94 |
// |
|
95 |
CPhoneConference* CPhoneConference::NewL( |
|
96 |
MPhoneStateMachine* aStateMachine, |
|
97 |
MPhoneViewCommandHandle* aViewCommandHandle, |
|
98 |
MPhoneCustomization* aPhoneCustomization ) |
|
99 |
{ |
|
100 |
CPhoneConference* self = new( ELeave ) CPhoneConference( |
|
101 |
aStateMachine, aViewCommandHandle, aPhoneCustomization ); |
|
102 |
||
103 |
CleanupStack::PushL( self ); |
|
104 |
self->ConstructL(); |
|
105 |
CleanupStack::Pop( self ); |
|
106 |
||
107 |
return self; |
|
108 |
} |
|
109 |
||
110 |
// ----------------------------------------------------------- |
|
111 |
// CPhoneConference::HandlePhoneEngineMessageL |
|
112 |
// ----------------------------------------------------------- |
|
113 |
// |
|
114 |
void CPhoneConference::HandlePhoneEngineMessageL( |
|
115 |
const TInt aMessage, |
|
116 |
TInt aCallId ) |
|
117 |
{ |
|
118 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
119 |
"CPhoneConference::HandlePhoneEngineMessageL()"); |
|
120 |
switch ( aMessage ) |
|
121 |
{ |
|
122 |
case MEngineMonitor::EPEMessageIdle: |
|
123 |
HandleIdleL( aCallId ); |
|
124 |
break; |
|
125 |
||
126 |
case MEngineMonitor::EPEMessageConferenceIdle: |
|
127 |
HandleConferenceIdleL(); |
|
128 |
break; |
|
129 |
||
130 |
case MEngineMonitor::EPEMessageHeldConference: |
|
131 |
HandleHeldConferenceL( aCallId ); |
|
132 |
break; |
|
133 |
||
134 |
case MEngineMonitor::EPEMessageConnectedConference: |
|
135 |
HandleConnectedConferenceL(); |
|
136 |
break; |
|
137 |
||
138 |
case MEngineMonitor::EPEMessageAddedConferenceMember: |
|
139 |
UpdateConferenceSecurityStatusL( aCallId ); |
|
140 |
break; |
|
141 |
||
142 |
case MEngineMonitor::EPEMessageWentOneToOne: |
|
143 |
HandleWentOneToOneL( aCallId ); |
|
144 |
break; |
|
145 |
||
146 |
case MEngineMonitor::EPEMessageHeld: |
|
147 |
{ |
|
148 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
149 |
callHeaderParam.SetCallState( EPEStateHeld ); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
150 |
TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
151 |
TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
152 |
ResolveResourceID( EPhoneCallOnHold ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
153 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
154 |
StringLoader::Load( labelText, callLabelId, CCoeEnv::Static() ); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
155 |
callHeaderParam.SetLabelText( labelText ); |
37 | 156 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
157 |
&callHeaderParam ); |
|
158 |
} |
|
159 |
break; |
|
160 |
||
161 |
case MEngineMonitor::EPEMessageConnected: |
|
162 |
{ |
|
163 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
164 |
callHeaderParam.SetCallState( EPEStateConnected ); |
|
165 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewUpdateBubble, aCallId, |
|
166 |
&callHeaderParam ); |
|
167 |
} |
|
168 |
break; |
|
169 |
||
170 |
case MEngineMonitor::EPEMessageDialing: |
|
171 |
HandleDiallingL( aCallId ); |
|
172 |
break; |
|
173 |
||
174 |
case MEngineMonitor::EPEMessageIncoming: |
|
175 |
HandleIncomingL( aCallId ); |
|
176 |
break; |
|
177 |
||
178 |
default: |
|
179 |
CPhoneGsmInCall::HandlePhoneEngineMessageL( aMessage, aCallId ); |
|
180 |
break; |
|
181 |
} |
|
182 |
} |
|
183 |
||
184 |
// ----------------------------------------------------------- |
|
185 |
// CPhoneConference:HandleCommandL |
|
186 |
// ----------------------------------------------------------- |
|
187 |
// |
|
188 |
TBool CPhoneConference::HandleCommandL( TInt aCommand ) |
|
189 |
{ |
|
190 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
191 |
"CPhoneConference::HandleCommandL()"); |
|
192 |
TBool commandStatus = ETrue; |
|
193 |
||
194 |
switch( aCommand ) |
|
195 |
{ |
|
196 |
case EAknSoftkeyCancel: |
|
197 |
BeginUiUpdateLC(); |
|
198 |
CloseSelectionListL(); |
|
199 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
200 |
EndUiUpdate(); |
|
201 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
202 |
break; |
|
203 |
||
204 |
case EPhoneInCallCmdHold: |
|
205 |
case EPhoneInCallCmdConferenceHold: |
|
206 |
iStateMachine->SendPhoneEngineMessage( |
|
207 |
CPEPhoneModelIF::EPEMessageHoldConference ); |
|
208 |
break; |
|
209 |
||
210 |
case EPhoneInCallCmdUnhold: |
|
211 |
case EPhoneInCallCmdConferenceUnhold: |
|
212 |
iStateMachine->SendPhoneEngineMessage( |
|
213 |
CPEPhoneModelIF::EPEMessageResumeConference ); |
|
214 |
break; |
|
215 |
||
216 |
// Conference -> Drop participant |
|
217 |
case EPhoneInCallCmdDropSelection: |
|
218 |
OpenDropParticipantSelectionL(); |
|
219 |
break; |
|
220 |
||
221 |
// Drop CBA |
|
222 |
case EPhoneInCallCmdDrop: |
|
223 |
DropSelectedParticipantL(); |
|
224 |
break; |
|
225 |
||
226 |
case EPhoneInCallCmdPrivateSelection: |
|
227 |
OpenPrivateSelectionL(); |
|
228 |
break; |
|
229 |
||
230 |
case EPhoneInCallCmdPrivate: |
|
231 |
PrivateSelectedParticipantL(); |
|
232 |
break; |
|
233 |
||
234 |
case EPhoneInCallCmdNewCall: |
|
235 |
LaunchNewCallQueryL(); |
|
236 |
break; |
|
237 |
||
238 |
case EPhoneInCallCmdNewCallCall: |
|
239 |
CallFromNewCallQueryL(); |
|
240 |
break; |
|
241 |
||
242 |
case EPhoneInCallCmdParticipants: |
|
243 |
OpenParticipantsListL(); |
|
244 |
break; |
|
245 |
||
246 |
case EPhoneViewOpenNumberEntry: |
|
247 |
if ( IsConferenceBubbleInSelectionMode() ) |
|
248 |
{ |
|
249 |
CloseSelectionListL(); |
|
250 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
251 |
} |
|
252 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
253 |
break; |
|
254 |
||
255 |
default: |
|
256 |
commandStatus = CPhoneGsmInCall::HandleCommandL( aCommand ); |
|
257 |
break; |
|
258 |
} |
|
259 |
||
260 |
return commandStatus; |
|
261 |
} |
|
262 |
||
263 |
// ----------------------------------------------------------- |
|
264 |
// CPhoneConference::UpdateInCallCbaL |
|
265 |
// ----------------------------------------------------------- |
|
266 |
// |
|
267 |
void CPhoneConference::UpdateInCallCbaL() |
|
268 |
{ |
|
269 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
270 |
} |
|
271 |
||
272 |
// ----------------------------------------------------------- |
|
273 |
// CPhoneConference::OpenMenuBarL |
|
274 |
// ----------------------------------------------------------- |
|
275 |
// |
|
276 |
void CPhoneConference::OpenMenuBarL() |
|
277 |
{ |
|
278 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
279 |
"CPhoneConference::OpenMenuBarL()"); |
|
280 |
TInt resourceId; |
|
281 |
||
282 |
if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
283 |
{ |
|
284 |
resourceId = EPhoneDtmfDialerMenubar; |
|
285 |
} |
|
286 |
else if ( IsNumberEntryVisibleL() ) |
|
287 |
{ |
|
288 |
resourceId = EPhoneConfCallMenubarWithNumberEntry; |
|
289 |
} |
|
290 |
else if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) |
|
291 |
&& IsConferenceBubbleInSelectionMode() ) |
|
292 |
{ |
|
293 |
resourceId = EPhoneConfCallParticipantsMenubar; |
|
294 |
} |
|
295 |
else |
|
296 |
{ |
|
297 |
resourceId = EPhoneConfCallMenubar; |
|
298 |
} |
|
299 |
||
300 |
TPhoneCmdParamInteger integerParam; |
|
301 |
integerParam.SetInteger( |
|
302 |
CPhoneMainResourceResolver::Instance()-> |
|
303 |
ResolveResourceID( resourceId ) ); |
|
304 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarOpen, |
|
305 |
&integerParam ); |
|
306 |
} |
|
307 |
||
308 |
// ----------------------------------------------------------- |
|
309 |
// CPhoneConference::HandleKeyEventL |
|
310 |
// ----------------------------------------------------------- |
|
311 |
// |
|
312 |
void CPhoneConference::HandleKeyEventL( |
|
313 |
const TKeyEvent& aKeyEvent, |
|
314 |
TEventCode aEventCode ) |
|
315 |
{ |
|
316 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
317 |
"CPhoneConference::HandleKeyEventL()"); |
|
318 |
if ( IsConferenceBubbleInSelectionMode() ) |
|
319 |
{ |
|
320 |
if ( aKeyEvent.iCode == EKeyUpArrow || |
|
321 |
aKeyEvent.iCode == EKeyDownArrow ) |
|
322 |
{ |
|
323 |
TPhoneCmdParamKeyEvent keyEventParam; |
|
324 |
keyEventParam.SetKeyEvent( aKeyEvent ); |
|
325 |
keyEventParam.SetEventCode( aEventCode ); |
|
326 |
||
327 |
iViewCommandHandle->ExecuteCommandL( |
|
328 |
EPhoneViewMoveHighLightInList, &keyEventParam ); |
|
329 |
} |
|
330 |
} |
|
331 |
else |
|
332 |
{ |
|
333 |
if ( CPhoneKeys::IsNumericKey( aKeyEvent, aEventCode ) ) |
|
334 |
{ |
|
335 |
// Handle numeric keys when key events are received |
|
336 |
// in conference state. |
|
337 |
CPhoneGsmInCall::HandleNumericKeyEventL( aKeyEvent, aEventCode ); |
|
338 |
} |
|
339 |
else |
|
340 |
{ |
|
341 |
// Handle other key events. |
|
342 |
CPhoneState::HandleKeyEventL( aKeyEvent, aEventCode ); |
|
343 |
} |
|
344 |
} |
|
345 |
} |
|
346 |
||
347 |
// -------------------------------------------------------------- |
|
348 |
// CPhoneConference::HandleKeyMessageL |
|
349 |
// -------------------------------------------------------------- |
|
350 |
// |
|
351 |
void CPhoneConference::HandleKeyMessageL( |
|
352 |
TPhoneKeyEventMessages aMessage, |
|
353 |
TKeyCode aCode ) |
|
354 |
{ |
|
355 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
356 |
"CPhoneConference::HandleKeyMessageL()"); |
|
357 |
||
358 |
switch ( aCode ) |
|
359 |
{ |
|
360 |
// send-key |
|
361 |
case EKeyYes: |
|
362 |
if( IsNumberEntryVisibleL() ) |
|
363 |
{ |
|
364 |
CallFromNumberEntryL(); |
|
365 |
} |
|
366 |
else |
|
367 |
{ |
|
368 |
ToggleHoldL(); |
|
369 |
} |
|
370 |
break; |
|
371 |
||
372 |
default: |
|
373 |
// do base operation |
|
374 |
CPhoneGsmInCall::HandleKeyMessageL( aMessage, aCode ); |
|
375 |
break; |
|
376 |
} |
|
377 |
} |
|
378 |
||
379 |
// ----------------------------------------------------------- |
|
380 |
// CPhoneConference::HandleNumberEntryClearedL |
|
381 |
// ----------------------------------------------------------- |
|
382 |
// |
|
383 |
void CPhoneConference::HandleNumberEntryClearedL() |
|
384 |
{ |
|
385 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
386 |
"CPhoneConference::HandleNumberEntryClearedL()"); |
|
387 |
// Update CBA when number entry is cleared |
|
388 |
UpdateInCallCbaL(); |
|
389 |
} |
|
390 |
||
391 |
// ----------------------------------------------------------- |
|
392 |
// CPhoneConference:HandleIdleL |
|
393 |
// ----------------------------------------------------------- |
|
394 |
// |
|
395 |
void CPhoneConference::HandleIdleL( TInt aCallId ) |
|
396 |
{ |
|
397 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
398 |
"CPhoneConference::HandleIdleL()"); |
|
399 |
// Re-enable global notes |
|
400 |
TPhoneCmdParamBoolean globalNotifierParam; |
|
401 |
globalNotifierParam.SetBoolean( EFalse ); |
|
402 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetGlobalNotifiersDisabled, |
|
403 |
&globalNotifierParam ); |
|
404 |
||
405 |
// Stop capturing keys |
|
406 |
CaptureKeysDuringCallNotificationL( EFalse ); |
|
407 |
||
408 |
// If dialler is not open then close menu bar. |
|
409 |
if ( !IsNumberEntryUsedL() ) |
|
410 |
{ |
|
411 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
412 |
} |
|
413 |
||
414 |
// If conference bubble still exists then we have conference and |
|
415 |
// single call |
|
416 |
TPhoneCmdParamBoolean conferenceBubbleExists; |
|
417 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
|
418 |
&conferenceBubbleExists ); |
|
419 |
||
420 |
if( conferenceBubbleExists.Boolean() ) |
|
421 |
{ |
|
422 |
// Go to Conference And Single state |
|
423 |
iViewCommandHandle->ExecuteCommandL( |
|
424 |
EPhoneViewRemoveFromConference, aCallId ); |
|
425 |
} |
|
426 |
else |
|
427 |
{ |
|
428 |
// Remove call header |
|
429 |
iViewCommandHandle->ExecuteCommandL( |
|
430 |
EPhoneViewRemoveCallHeader, aCallId ); |
|
431 |
} |
|
432 |
} |
|
433 |
||
434 |
// ----------------------------------------------------------- |
|
435 |
// CPhoneConference:HandleConferenceIdleL |
|
436 |
// ----------------------------------------------------------- |
|
437 |
// |
|
438 |
void CPhoneConference::HandleConferenceIdleL() |
|
439 |
{ |
|
440 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
441 |
"CPhoneConference::HandleConferenceIdleL()"); |
|
442 |
||
443 |
BeginTransEffectLC( ENumberEntryOpen ); |
|
444 |
BeginUiUpdateLC(); |
|
445 |
||
446 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemoveConferenceBubble ); |
|
447 |
||
448 |
TPhoneCmdParamInteger activeCallCount; |
|
449 |
iViewCommandHandle->ExecuteCommandL( |
|
450 |
EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
|
451 |
||
452 |
switch( activeCallCount.Integer() ) |
|
453 |
{ |
|
454 |
case ENoActiveCalls: |
|
455 |
MakeStateTransitionToIdleL(); |
|
456 |
break; |
|
457 |
||
458 |
case EOneActiveCall: |
|
459 |
{ |
|
460 |
// Fetch ringing call's id from view |
|
461 |
TPhoneCmdParamCallStateData callStateData; |
|
462 |
callStateData.SetCallState( EPEStateRinging ); |
|
463 |
iViewCommandHandle->HandleCommandL( |
|
464 |
EPhoneViewGetCallIdByState, &callStateData ); |
|
465 |
||
466 |
if( callStateData.CallId() > KErrNotFound ) |
|
467 |
{ |
|
468 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
469 |
iStateMachine->ChangeState( EPhoneStateWaitingInSingle ); |
|
470 |
} |
|
471 |
else |
|
472 |
{ |
|
473 |
MakeStateTransitionToSingleL(); |
|
474 |
} |
|
475 |
} |
|
476 |
break; |
|
477 |
||
478 |
case ETwoActiveCalls: |
|
479 |
MakeStateTransitionToTwoSinglesL(); |
|
480 |
break; |
|
481 |
||
482 |
default: |
|
483 |
MakeStateTransitionToTwoSinglesL(); |
|
484 |
break; |
|
485 |
} |
|
486 |
||
487 |
EndUiUpdate(); |
|
488 |
EndTransEffect(); |
|
489 |
} |
|
490 |
||
491 |
// ----------------------------------------------------------- |
|
492 |
// CPhoneConference::HandleHeldConferenceL |
|
493 |
// ----------------------------------------------------------- |
|
494 |
// |
|
495 |
void CPhoneConference::HandleHeldConferenceL( TInt aCallId ) |
|
496 |
{ |
|
497 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
498 |
"CPhoneConference::HandleHeldConferenceL()"); |
|
499 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
500 |
callHeaderParam.SetCallState( EPEStateHeldConference ); |
|
501 |
||
502 |
TInt callLabelId; |
|
503 |
TBuf<KPhoneCallHeaderLabelMaxLength> labelText( KNullDesC ); |
|
504 |
callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
505 |
ResolveResourceID( EPhoneCallOnHold ); |
|
506 |
||
507 |
StringLoader::Load( |
|
508 |
labelText, |
|
509 |
callLabelId, |
|
510 |
CCoeEnv::Static() ); |
|
511 |
callHeaderParam.SetLabelText( labelText ); |
|
512 |
||
513 |
iViewCommandHandle->ExecuteCommandL( |
|
514 |
EPhoneViewUpdateBubble, aCallId, &callHeaderParam ); |
|
515 |
||
516 |
// Set Hold flag to view |
|
517 |
SetHoldFlagL(); |
|
518 |
||
519 |
if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
|
520 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
521 |
SendGlobalInfoNoteL( EPhoneInformationConferenceOnHold, ETrue ); |
37 | 522 |
} |
523 |
||
524 |
SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
525 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
526 |
UpdateInCallCbaL(); |
|
527 |
} |
|
528 |
||
529 |
||
530 |
// ----------------------------------------------------------- |
|
531 |
// CPhoneConference::DefineAndSetHoldFlagL |
|
532 |
// ----------------------------------------------------------- |
|
533 |
// |
|
534 |
void CPhoneConference::DefineAndSetHoldFlagL() |
|
535 |
{ |
|
536 |
// Find out is conference held or not |
|
537 |
TPhoneCmdParamCallStateData callStateData; |
|
538 |
callStateData.SetCallId( KConferenceCallId ); |
|
539 |
iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState, |
|
540 |
&callStateData ); |
|
541 |
||
542 |
// Set Hold flag to view |
|
543 |
TPhoneCmdParamBoolean holdFlag; |
|
544 |
||
545 |
if( callStateData.CallState() == EPEStateHeld ) |
|
546 |
{ |
|
547 |
holdFlag.SetBoolean( ETrue ); |
|
548 |
} |
|
549 |
else |
|
550 |
{ |
|
551 |
holdFlag.SetBoolean( EFalse ); |
|
552 |
} |
|
553 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
554 |
||
555 |
} |
|
556 |
||
557 |
// ----------------------------------------------------------- |
|
558 |
// CPhoneConference::SetHoldFlagL |
|
559 |
// ----------------------------------------------------------- |
|
560 |
// |
|
561 |
void CPhoneConference::SetHoldFlagL() |
|
562 |
{ |
|
563 |
// Set Hold flag to view |
|
564 |
TPhoneCmdParamBoolean holdFlag; |
|
565 |
holdFlag.SetBoolean( ETrue ); |
|
566 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
567 |
||
568 |
} |
|
569 |
||
570 |
// ----------------------------------------------------------- |
|
571 |
// CPhoneConference::HandleConnectedConferenceL |
|
572 |
// ----------------------------------------------------------- |
|
573 |
// |
|
574 |
void CPhoneConference::HandleConnectedConferenceL() |
|
575 |
{ |
|
576 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
577 |
"CPhoneConference::HandleConnectedConferenceL()"); |
|
578 |
// Update call state |
|
579 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
580 |
callHeaderParam.SetCallState( EPEStateConnectedConference ); |
|
581 |
||
582 |
TBuf<KPhoneCallHeaderLabelMaxLength> conferenceText( KNullDesC ); |
|
583 |
TInt callLabelId = CPhoneMainResourceResolver::Instance()-> |
|
584 |
ResolveResourceID( EPhoneCLIConferenceCall ); |
|
585 |
||
586 |
StringLoader::Load( |
|
587 |
conferenceText, |
|
588 |
callLabelId, |
|
589 |
CCoeEnv::Static() ); |
|
590 |
callHeaderParam.SetLabelText( conferenceText ); |
|
591 |
||
592 |
iViewCommandHandle->ExecuteCommandL( |
|
593 |
EPhoneViewUpdateBubble, KConferenceCallId, &callHeaderParam ); |
|
594 |
||
595 |
// Set Hold flag to view |
|
596 |
TPhoneCmdParamBoolean holdFlag; |
|
597 |
holdFlag.SetBoolean( EFalse ); |
|
598 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetHoldFlag, &holdFlag ); |
|
599 |
||
600 |
if ( !FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) ) |
|
601 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
602 |
SendGlobalInfoNoteL( EPhoneInformationConferenceActiveted, ETrue ); |
37 | 603 |
} |
604 |
||
605 |
SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
|
606 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
607 |
||
608 |
UpdateInCallCbaL(); |
|
609 |
} |
|
610 |
||
611 |
// ----------------------------------------------------------- |
|
612 |
// CPhoneConference::OpenDropParticipantSelectionL |
|
613 |
// ----------------------------------------------------------- |
|
614 |
// |
|
615 |
void CPhoneConference::OpenDropParticipantSelectionL() |
|
616 |
{ |
|
617 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
618 |
"CPhoneConference::OpenDropParticipantSelectionL()"); |
|
619 |
TPhoneCmdParamBoolean booleanParam; |
|
620 |
booleanParam.SetBoolean( ETrue ); |
|
621 |
iViewCommandHandle->ExecuteCommandL( |
|
622 |
EPhoneViewOpenConferenceList, &booleanParam ); |
|
623 |
||
624 |
iCbaManager->SetCbaL( EPhoneDropParticipantCBA ); |
|
625 |
} |
|
626 |
||
627 |
// ----------------------------------------------------------- |
|
628 |
// CPhoneConference::DropSelectedParticipantL |
|
629 |
// ----------------------------------------------------------- |
|
630 |
// |
|
631 |
void CPhoneConference::DropSelectedParticipantL() |
|
632 |
{ |
|
633 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
634 |
"CPhoneConference::DropSelectedParticipantL()"); |
|
635 |
// First fetch the call id matching the selected item |
|
636 |
TPhoneViewResponseId response; |
|
637 |
TPhoneCmdParamInteger callId; |
|
638 |
response = iViewCommandHandle->HandleCommandL( |
|
639 |
EPhoneViewSelectedConfMember, &callId ); |
|
640 |
||
641 |
if( response == EPhoneViewResponseSuccess ) |
|
642 |
{ |
|
643 |
// Drop the call from conference |
|
644 |
iStateMachine->SetCallId( callId.Integer() ); |
|
645 |
iStateMachine->SendPhoneEngineMessage( |
|
646 |
CPEPhoneModelIF::EPEMessageDropConferenceMember ); |
|
647 |
} |
|
648 |
} |
|
649 |
||
650 |
// ----------------------------------------------------------- |
|
651 |
// CPhoneConference::OpenPrivateSelectionL |
|
652 |
// ----------------------------------------------------------- |
|
653 |
// |
|
654 |
void CPhoneConference::OpenPrivateSelectionL() |
|
655 |
{ |
|
656 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
657 |
"CPhoneConference::OpenPrivateSelectionL()"); |
|
658 |
TPhoneCmdParamBoolean booleanParam; |
|
659 |
booleanParam.SetBoolean( ETrue ); |
|
660 |
iViewCommandHandle->ExecuteCommandL( |
|
661 |
EPhoneViewOpenConferenceList, &booleanParam ); |
|
662 |
||
663 |
iCbaManager->SetCbaL( EPhonePrivateParticipantCBA ); |
|
664 |
} |
|
665 |
||
666 |
// ----------------------------------------------------------- |
|
667 |
// CPhoneConference::PrivateSelectedParticipantL |
|
668 |
// ----------------------------------------------------------- |
|
669 |
// |
|
670 |
void CPhoneConference::PrivateSelectedParticipantL() |
|
671 |
{ |
|
672 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
673 |
"CPhoneConference::PrivateSelectedParticipantL()"); |
|
674 |
// First fetch the call id matching the selected item |
|
675 |
TPhoneViewResponseId response; |
|
676 |
TPhoneCmdParamInteger callId; |
|
677 |
response = iViewCommandHandle->HandleCommandL( |
|
678 |
EPhoneViewSelectedConfMember, &callId ); |
|
679 |
||
680 |
if( response == EPhoneViewResponseSuccess ) |
|
681 |
{ |
|
682 |
// Drop the call from conference |
|
683 |
iStateMachine->SetCallId( callId.Integer() ); |
|
684 |
iStateMachine->SendPhoneEngineMessage( |
|
685 |
CPEPhoneModelIF::EPEMessageGoOneToOne ); |
|
686 |
||
687 |
// Update call view |
|
688 |
BeginUiUpdateLC(); |
|
689 |
CloseSelectionListL(); |
|
690 |
SetTouchPaneButtons( EPhoneConferenceButtons ); |
|
691 |
EndUiUpdate(); |
|
692 |
||
693 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
694 |
} |
|
695 |
} |
|
696 |
||
697 |
// ----------------------------------------------------------- |
|
698 |
// CPhoneConference::MakeStateTransitionToIdleL |
|
699 |
// ----------------------------------------------------------- |
|
700 |
// |
|
701 |
void CPhoneConference::MakeStateTransitionToIdleL() |
|
702 |
{ |
|
703 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
704 |
"CPhoneConference::MakeStateTransitionToIdleL()"); |
|
705 |
||
706 |
SetDefaultFlagsL(); |
|
707 |
||
708 |
if ( IsNumberEntryUsedL() ) |
|
709 |
{ |
|
710 |
// Show the number entry if it exists |
|
711 |
SetNumberEntryVisibilityL(ETrue); |
|
712 |
||
713 |
// Close dtmf dialer when call is disconnected. |
|
714 |
if ( iOnScreenDialer && IsDTMFEditorVisibleL() ) |
|
715 |
{ |
|
716 |
CloseDTMFEditorL(); |
|
717 |
// Display idle screen and update CBAs |
|
718 |
DisplayIdleScreenL(); |
|
719 |
} |
|
720 |
} |
|
721 |
else if ( !TopAppIsDisplayedL() ) |
|
722 |
{ |
|
723 |
// Close menu bar, if it is displayed |
|
724 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
725 |
||
726 |
// Continue displaying current app but set up the |
|
727 |
// idle screen in the background |
|
728 |
SetupIdleScreenInBackgroundL(); |
|
729 |
} |
|
730 |
else |
|
731 |
{ |
|
732 |
// Close menu bar, if it is displayed |
|
733 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
734 |
||
735 |
// Display idle screen |
|
736 |
DisplayIdleScreenL(); |
|
737 |
} |
|
738 |
||
739 |
// Display call termination note, if necessary |
|
740 |
DisplayCallTerminationNoteL(); |
|
741 |
||
742 |
UpdateCbaL( EPhoneEmptyCBA ); |
|
743 |
// Go to idle state |
|
744 |
iStateMachine->ChangeState( EPhoneStateIdle ); |
|
745 |
} |
|
746 |
||
747 |
// ----------------------------------------------------------- |
|
748 |
// CPhoneConference::MakeStateTransitionToSingleL |
|
749 |
// ----------------------------------------------------------- |
|
750 |
// |
|
751 |
void CPhoneConference::MakeStateTransitionToSingleL() |
|
752 |
{ |
|
753 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
754 |
"CPhoneConference::MakeStateTransitionToSingleL()"); |
|
755 |
// Close menu bar, if it is displayed |
|
756 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
757 |
||
758 |
if ( IsNumberEntryUsedL() ) |
|
759 |
{ |
|
760 |
// Show the number entry if it exists |
|
761 |
SetNumberEntryVisibilityL(ETrue); |
|
762 |
} |
|
763 |
SetTouchPaneButtons( EPhoneIncallButtons ); |
|
764 |
||
765 |
// Go to single state |
|
766 |
UpdateCbaL( EPhoneCallHandlingInCallCBA ); |
|
767 |
iStateMachine->ChangeState( EPhoneStateSingle ); |
|
768 |
} |
|
769 |
||
770 |
// ----------------------------------------------------------- |
|
771 |
// CPhoneConference::MakeTransitionToTwoSinglesL |
|
772 |
// ----------------------------------------------------------- |
|
773 |
// |
|
774 |
void CPhoneConference::MakeStateTransitionToTwoSinglesL() |
|
775 |
{ |
|
776 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
777 |
"CPhoneConference::MakeStateTransitionToTwoSinglesL()"); |
|
778 |
// Close menu bar, if it is displayed |
|
779 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
780 |
||
781 |
if ( IsNumberEntryUsedL() ) |
|
782 |
{ |
|
783 |
// Show the number entry if it exists |
|
784 |
SetNumberEntryVisibilityL(ETrue); |
|
785 |
} |
|
786 |
||
787 |
SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
|
788 |
||
789 |
// Set Two singles softkeys |
|
790 |
UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
791 |
||
792 |
// Go to two singles state |
|
793 |
iStateMachine->ChangeState( EPhoneStateTwoSingles ); |
|
794 |
} |
|
795 |
||
796 |
// ----------------------------------------------------------- |
|
797 |
// CPhoneConference::CloseSelectionListL |
|
798 |
// ----------------------------------------------------------- |
|
799 |
// |
|
800 |
void CPhoneConference::CloseSelectionListL() |
|
801 |
{ |
|
802 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
803 |
"CPhoneConference::CloseSelectionListL()"); |
|
804 |
// Close conference list |
|
805 |
TPhoneCmdParamBoolean booleanParam; |
|
806 |
booleanParam.SetBoolean( EFalse ); |
|
807 |
iViewCommandHandle->ExecuteCommandL( |
|
808 |
EPhoneViewOpenConferenceList, &booleanParam ); |
|
809 |
} |
|
810 |
||
811 |
// ----------------------------------------------------------- |
|
812 |
// CPhoneConference::ToggleHold |
|
813 |
// ----------------------------------------------------------- |
|
814 |
// |
|
815 |
void CPhoneConference::ToggleHoldL() |
|
816 |
{ |
|
817 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
818 |
"CPhoneConference::ToggleHoldL()"); |
|
819 |
TPhoneCmdParamBoolean hold; |
|
820 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetHoldFlag, &hold ); |
|
821 |
||
822 |
if( hold.Boolean() ) |
|
823 |
{ |
|
824 |
iStateMachine->SendPhoneEngineMessage( |
|
825 |
CPEPhoneModelIF::EPEMessageResumeConference ); |
|
826 |
} |
|
827 |
else |
|
828 |
{ |
|
829 |
iStateMachine->SendPhoneEngineMessage( |
|
830 |
CPEPhoneModelIF::EPEMessageHoldConference ); |
|
831 |
} |
|
832 |
} |
|
833 |
||
834 |
// ----------------------------------------------------------- |
|
835 |
// CPhoneConference::HandleDiallingL |
|
836 |
// ----------------------------------------------------------- |
|
837 |
// |
|
838 |
void CPhoneConference::HandleDiallingL( TInt aCallId ) |
|
839 |
{ |
|
840 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
841 |
"CPhoneConference::HandleDiallingL()"); |
|
842 |
||
843 |
BeginTransEffectLC( ENumberEntryClose ); |
|
844 |
BeginUiUpdateLC(); |
|
845 |
||
846 |
CloseSelectionListL(); |
|
847 |
||
848 |
SetNumberEntryVisibilityL(EFalse); |
|
849 |
||
850 |
// Display call setup |
|
851 |
DisplayCallSetupL( aCallId ); |
|
852 |
||
853 |
// Conference is understood as single call in buttons enumerations. |
|
854 |
SetTouchPaneButtons(EPhoneCallSetupAndSingleButtons); |
|
855 |
||
856 |
EndUiUpdate(); |
|
857 |
||
858 |
EndTransEffect(); |
|
859 |
||
860 |
// Set Call Setup CBA |
|
861 |
UpdateCbaL( EPhoneCallHandlingCallSetupCBA ); |
|
862 |
||
863 |
// Go to conference and call setup state |
|
864 |
iStateMachine->ChangeState( EPhoneStateConferenceAndCallSetup ); |
|
865 |
} |
|
866 |
||
867 |
// ----------------------------------------------------------- |
|
868 |
// CPhoneConference::DisplayCallSetupL |
|
869 |
// ----------------------------------------------------------- |
|
870 |
// |
|
871 |
void CPhoneConference::DisplayCallSetupL( TInt aCallId ) |
|
872 |
{ |
|
873 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
874 |
"CPhoneConference::DisplayCallSetupL()"); |
|
875 |
// Close menu bar, if it is displayed |
|
876 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
877 |
||
878 |
// Remove dialogs if necessary |
|
879 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
880 |
||
881 |
// Capture keys when the phone is dialling |
|
882 |
CaptureKeysDuringCallNotificationL( ETrue ); |
|
883 |
||
884 |
// Bring Phone app in the foreground |
|
885 |
TPhoneCmdParamInteger uidParam; |
|
886 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
887 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
888 |
&uidParam ); |
|
889 |
||
890 |
// Display call setup header |
|
891 |
DisplayHeaderForOutgoingCallL( aCallId ); |
|
892 |
} |
|
893 |
||
894 |
// --------------------------------------------------------- |
|
895 |
// CPhoneConference::CallFromNewCallQueryL |
|
896 |
// --------------------------------------------------------- |
|
897 |
// |
|
898 |
void CPhoneConference::CallFromNewCallQueryL() |
|
899 |
{ |
|
900 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
901 |
"CPhoneConference::CallFromNewCallQueryL()"); |
|
902 |
// First get the phone number from the dialog |
|
903 |
TPhoneCmdParamString phoneNumberParam; |
|
904 |
HBufC *content = HBufC::NewLC( KPhoneNumberEntryBufferSize ); |
|
905 |
TPtr ptr( content->Des() ); |
|
906 |
phoneNumberParam.SetString( &ptr ); |
|
907 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetTextQueryContent, |
|
908 |
&phoneNumberParam ); |
|
909 |
||
910 |
// Store the phone number |
|
911 |
iStateMachine->PhoneEngineInfo()->SetPhoneNumber( ptr ); |
|
912 |
||
913 |
// clean up stack |
|
914 |
CleanupStack::PopAndDestroy( content ); |
|
915 |
||
916 |
// Dial number |
|
917 |
DialVoiceCallL(); |
|
918 |
} |
|
919 |
||
920 |
// ----------------------------------------------------------- |
|
921 |
// CPhoneConference::HandleIncomingL |
|
922 |
// ----------------------------------------------------------- |
|
923 |
// |
|
924 |
void CPhoneConference::HandleIncomingL( TInt aCallId ) |
|
925 |
{ |
|
926 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
927 |
"CPhoneConference::HandleIncomingL()"); |
|
928 |
||
929 |
BeginUiUpdateLC(); |
|
930 |
||
931 |
TPhoneCmdParamBoolean dialerParam; |
|
932 |
dialerParam.SetBoolean( ETrue ); |
|
933 |
||
934 |
// Get allow waiting call header param value. |
|
935 |
AllowShowingOfWaitingCallHeaderL( dialerParam ); |
|
936 |
||
937 |
CloseSelectionListL(); |
|
938 |
||
939 |
// Close fast swap window if it's displayed |
|
940 |
CEikonEnv::Static()->DismissTaskList(); |
|
941 |
||
942 |
// Check if HW Keys or Call UI should be disabled |
|
943 |
CheckDisableHWKeysAndCallUIL(); |
|
944 |
||
945 |
// Display incoming call |
|
946 |
DisplayIncomingCallL( aCallId, dialerParam ); |
|
947 |
||
948 |
SetTouchPaneButtons( EPhoneWaitingCallButtons ); |
|
949 |
||
950 |
EndUiUpdate(); |
|
951 |
||
952 |
// Go to incoming state |
|
953 |
UpdateCbaL( EPhoneCallHandlingCallWaitingCBA ); |
|
954 |
iStateMachine->ChangeState( EPhoneStateConferenceAndWaiting ); |
|
955 |
} |
|
956 |
||
957 |
// ----------------------------------------------------------- |
|
958 |
// CPhoneConference::DisplayIncomingCallL |
|
959 |
// ----------------------------------------------------------- |
|
960 |
// |
|
961 |
void CPhoneConference::DisplayIncomingCallL( |
|
962 |
TInt aCallId, |
|
963 |
const TPhoneCmdParamBoolean aCommandParam ) |
|
964 |
{ |
|
965 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
966 |
"CPhoneConference::DisplayIncomingCallL()"); |
|
967 |
// Close menu bar, if it is displayed |
|
968 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose ); |
|
969 |
||
970 |
// Cannot delete active note, e.g. New call query, |
|
971 |
// but show waiting note with or without caller name |
|
972 |
if ( IsAnyQueryActiveL() || |
|
973 |
( !aCommandParam.Boolean() && iOnScreenDialer ) ) |
|
974 |
{ |
|
975 |
CallWaitingNoteL( aCallId ); |
|
976 |
} |
|
977 |
else |
|
978 |
{ |
|
979 |
// Remove any phone dialogs if they are displayed |
|
980 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewRemovePhoneDialogs ); |
|
981 |
} |
|
982 |
||
983 |
// Indicate that the Phone needs to be sent to the background if |
|
984 |
// an application other than the top application is in the foreground |
|
985 |
TPhoneCmdParamBoolean booleanParam; |
|
986 |
booleanParam.SetBoolean( !TopAppIsDisplayedL() ); |
|
987 |
iViewCommandHandle->ExecuteCommandL( |
|
988 |
EPhoneViewSetNeedToSendToBackgroundStatus, |
|
989 |
&booleanParam ); |
|
990 |
||
991 |
// Bring Phone app in the foreground |
|
992 |
TPhoneCmdParamInteger uidParam; |
|
993 |
uidParam.SetInteger( KUidPhoneApplication.iUid ); |
|
994 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewBringAppToForeground, |
|
995 |
&uidParam ); |
|
996 |
||
997 |
// Set Phone as the top application |
|
998 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewSetTopApplication, |
|
999 |
&uidParam ); |
|
1000 |
||
1001 |
DisplayHeaderForCallComingInL( aCallId, ETrue ); // waiting call |
|
1002 |
} |
|
1003 |
||
1004 |
// ----------------------------------------------------------- |
|
1005 |
// CPhoneConference::HandleWentOneToOneL |
|
1006 |
// ----------------------------------------------------------- |
|
1007 |
// |
|
1008 |
void CPhoneConference::HandleWentOneToOneL( TInt aCallId ) |
|
1009 |
{ |
|
1010 |
__LOGMETHODSTARTEND( EPhoneUIStates, |
|
1011 |
"CPhoneConference::HandleWentOneToOneL()"); |
|
1012 |
||
1013 |
BeginUiUpdateLC(); |
|
1014 |
||
1015 |
// Update conference bubble |
|
1016 |
iViewCommandHandle->ExecuteCommandL( |
|
1017 |
EPhoneViewPrivateFromConference, aCallId ); |
|
1018 |
||
1019 |
// If conference bubble still exists then we have conference and |
|
1020 |
// single call |
|
1021 |
TPhoneCmdParamBoolean conferenceBubbleExists; |
|
1022 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewGetIsConference, |
|
1023 |
&conferenceBubbleExists ); |
|
1024 |
if( conferenceBubbleExists.Boolean() ) |
|
1025 |
{ |
|
1026 |
// Go to Conference And Single state |
|
1027 |
||
1028 |
UpdateCbaL( EPhoneCallHandlingNewCallSwapCBA ); |
|
1029 |
iStateMachine->ChangeState( EPhoneStateConferenceAndSingle ); |
|
1030 |
SetTouchPaneButtons( EPhoneConferenceAndSingleButtons ); |
|
1031 |
SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
1032 |
} |
|
1033 |
else |
|
1034 |
{ |
|
1035 |
SetTouchPaneButtons( EPhoneTwoSinglesButtons ); |
|
1036 |
} |
|
1037 |
EndUiUpdate(); |
|
1038 |
} |
|
1039 |
||
1040 |
// ----------------------------------------------------------- |
|
1041 |
// CPhoneConference::OpenParticipantsListL |
|
1042 |
// ----------------------------------------------------------- |
|
1043 |
// |
|
1044 |
void CPhoneConference::OpenParticipantsListL() |
|
1045 |
{ |
|
1046 |
BeginUiUpdateLC(); |
|
1047 |
||
1048 |
TPhoneCmdParamBoolean booleanParam; |
|
1049 |
booleanParam.SetBoolean( ETrue ); |
|
1050 |
||
1051 |
iViewCommandHandle->ExecuteCommandL( EPhoneViewOpenConferenceList, |
|
1052 |
&booleanParam ); |
|
1053 |
||
1054 |
SetTouchPaneButtons( EPhoneParticipantListButtons ); |
|
1055 |
||
1056 |
EndUiUpdate(); |
|
1057 |
||
1058 |
iCbaManager->SetCbaL( EPhoneParticipantListCBA ); |
|
1059 |
||
1060 |
// Find out is conference held or not |
|
1061 |
TPhoneCmdParamCallStateData callStateData; |
|
1062 |
callStateData.SetCallId( KConferenceCallId ); |
|
1063 |
iViewCommandHandle->HandleCommandL( EPhoneViewGetCallState, |
|
1064 |
&callStateData ); |
|
1065 |
||
1066 |
if( callStateData.CallState() == EPEStateHeld ) |
|
1067 |
{ |
|
1068 |
//set Private button to Dimmed. |
|
1069 |
SetTouchPaneButtonDisabled( EPhoneInCallCmdPrivate ); |
|
1070 |
} |
|
1071 |
else |
|
1072 |
{ |
|
1073 |
//set Private button to UnDimmed. |
|
1074 |
SetTouchPaneButtonEnabled( EPhoneInCallCmdPrivate ); |
|
1075 |
} |
|
1076 |
||
1077 |
} |
|
1078 |
||
1079 |
// ----------------------------------------------------------- |
|
1080 |
// CPhoneConference::IsConferenceBubbleInSelectionMode |
|
1081 |
// ----------------------------------------------------------- |
|
1082 |
// |
|
1083 |
TBool CPhoneConference::IsConferenceBubbleInSelectionMode() const |
|
1084 |
{ |
|
1085 |
TPhoneCmdParamBoolean booleanParam; |
|
1086 |
||
1087 |
iViewCommandHandle->ExecuteCommand( |
|
1088 |
EPhoneViewGetIsConferenceInSelectionMode, &booleanParam ); |
|
1089 |
||
1090 |
return booleanParam.Boolean(); |
|
1091 |
} |
|
1092 |
||
1093 |
// --------------------------------------------------------- |
|
1094 |
// CPhoneState::HandleCreateNumberEntryL |
|
1095 |
// --------------------------------------------------------- |
|
1096 |
// |
|
1097 |
void CPhoneConference::HandleCreateNumberEntryL( const TKeyEvent& aKeyEvent, |
|
1098 |
TEventCode aEventCode ) |
|
1099 |
{ |
|
1100 |
__LOGMETHODSTARTEND( EPhoneControl, "CPhoneConference::HandleCreateNumberEntryL() "); |
|
1101 |
if ( !IsConferenceBubbleInSelectionMode() ) |
|
1102 |
{ |
|
1103 |
CPhoneGsmInCall::HandleCreateNumberEntryL( aKeyEvent,aEventCode ); |
|
1104 |
} |
|
1105 |
} |
|
1106 |
||
1107 |
// ----------------------------------------------------------- |
|
1108 |
// CPhoneConference::UpdateConferenceSecurityStatusL |
|
1109 |
// ----------------------------------------------------------- |
|
1110 |
// |
|
1111 |
void CPhoneConference::UpdateConferenceSecurityStatusL( TInt aCallId ) |
|
1112 |
{ |
|
1113 |
__PHONELOG1( EBasic, EPhoneUIStates, |
|
1114 |
"CPhoneConference::UpdateConferenceSecurityStatusL() - callId = %d", aCallId ); |
|
1115 |
||
1116 |
if( !iStateMachine->PhoneEngineInfo()->IsSecureCall( aCallId ) && |
|
1117 |
iStateMachine->PhoneEngineInfo()->IsSecureCall( KPEConferenceCallID ) ) |
|
1118 |
{ |
|
1119 |
TPhoneCmdParamCallHeaderData callHeaderParam; |
|
1120 |
||
1121 |
callHeaderParam.SetCiphering( EFalse ); |
|
1122 |
callHeaderParam.SetCipheringIndicatorAllowed( |
|
1123 |
iStateMachine->PhoneEngineInfo()->SecureSpecified() ); |
|
1124 |
||
1125 |
iViewCommandHandle->ExecuteCommandL( |
|
1126 |
EPhoneViewCipheringInfoChange, |
|
1127 |
KPEConferenceCallID, |
|
1128 |
&callHeaderParam ); |
|
1129 |
} |
|
1130 |
} |
|
1131 |
||
1132 |
// End of File |