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