|
1 /* |
|
2 * Copyright (c) 2005-2007 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 CPhoneMenuController class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "cphonemenucontroller.h" |
|
21 #include "tphonecommandparam.h" |
|
22 #include "tphonecmdparaminteger.h" |
|
23 #include "tphonecmdparamdynmenu.h" |
|
24 #include "tphonecmdparamboolean.h" |
|
25 #include "phoneconstants.h" |
|
26 #include "phonelogger.h" |
|
27 #include "tphonecmdparamincallindicatordata.h" |
|
28 #include "cphonepubsubproxy.h" |
|
29 #include "cphonecenrepproxy.h" |
|
30 |
|
31 |
|
32 #include <eikenv.h> |
|
33 #include <eikappui.h> |
|
34 #include <eikapp.h> |
|
35 #include <eikmenub.h> |
|
36 #include <eikspane.h> |
|
37 #include <featmgr.h> |
|
38 #include <ctsydomainpskeys.h> |
|
39 #include "phoneui.hrh" |
|
40 #include <phoneappvoipcommands.hrh> |
|
41 #include <phoneui.rsg> |
|
42 #include <telephonyvariant.hrh> |
|
43 #include <AvkonInternalCRKeys.h> |
|
44 #include <hwrmdomainpskeys.h> |
|
45 |
|
46 #include <AiwServiceHandler.h> |
|
47 |
|
48 // ================= MEMBER FUNCTIONS ======================= |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CPhoneMenuController::CPhoneMenuController |
|
52 // C++ default constructor can NOT contain any code, that |
|
53 // might leave. |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 CPhoneMenuController::CPhoneMenuController( CEikonEnv& aEikEnv ): |
|
57 iMenuResourceId( 0 ), |
|
58 iOkMenuResourceId( 0 ), |
|
59 iSecurityMode( ETrue ), |
|
60 iEikEnv( aEikEnv ) |
|
61 { |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CPhoneMenuController::ConstructL |
|
66 // Symbian 2nd phase constructor can leave. |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 void CPhoneMenuController::ConstructL() |
|
70 { |
|
71 iMenu = iEikEnv.AppUiFactory()->MenuBar(); |
|
72 |
|
73 if ( FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing ) ) |
|
74 { |
|
75 __PHONELOG( EBasic, EPhoneUIView, "CPhoneViewController::CPhoneMenuController -> Going to instantiate CAiwServiceHandler"); |
|
76 //If multimedia sharing is supported, initialise instance to AIW handler |
|
77 //and attach menu interest. |
|
78 iServiceHandler = CAiwServiceHandler::NewL(); |
|
79 |
|
80 // Attach menu service interests to AIW framework. |
|
81 iServiceHandler->AttachMenuL( R_PHONEUI_CALLHANDLING_INCALL_OPTIONS_MENU, |
|
82 R_PHONEUI_AIWSHARE_INTEREST ); |
|
83 __PHONELOG( EBasic, EPhoneUIView, "CPhoneViewController::CPhoneMenuController -> AIW Menu attached"); |
|
84 } |
|
85 |
|
86 CPhonePubSubProxy::Instance()->NotifyChangeL( |
|
87 KPSUidHWRM, KHWRMGripStatus, this ); |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CPhoneMenuController::NewL |
|
92 // Two-phased constructor. |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 CPhoneMenuController* CPhoneMenuController::NewL( CEikonEnv& aEikEnv ) |
|
96 { |
|
97 CPhoneMenuController* self = new( ELeave ) CPhoneMenuController( aEikEnv ); |
|
98 |
|
99 CleanupStack::PushL( self ); |
|
100 self->ConstructL(); |
|
101 CleanupStack::Pop( self ); |
|
102 |
|
103 return self; |
|
104 } |
|
105 |
|
106 // Destructor |
|
107 CPhoneMenuController::~CPhoneMenuController() |
|
108 { |
|
109 delete iServiceHandler; |
|
110 } |
|
111 |
|
112 // --------------------------------------------------------- |
|
113 // CPhoneMenuController::CloseMenuBar() |
|
114 // --------------------------------------------------------- |
|
115 // |
|
116 void CPhoneMenuController::CloseMenuBar() |
|
117 { |
|
118 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::CloseMenuBar()" ); |
|
119 iMenu->StopDisplayingMenuBar(); |
|
120 } |
|
121 |
|
122 // --------------------------------------------------------- |
|
123 // CPhoneMenuController::OpenMenuBar() |
|
124 // --------------------------------------------------------- |
|
125 // |
|
126 void CPhoneMenuController::OpenMenuBarL() |
|
127 { |
|
128 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::OpenMenuBarL()" ); |
|
129 iMenu->SetMenuTitleResourceId( iMenuResourceId ); |
|
130 iMenu->TryDisplayMenuBarL(); |
|
131 } |
|
132 |
|
133 // --------------------------------------------------------- |
|
134 // CPhoneMenuController::SetMenubarL |
|
135 // Set the Menubar to the specified setting |
|
136 // (other items were commented in a header). |
|
137 // --------------------------------------------------------- |
|
138 // |
|
139 void CPhoneMenuController::OpenMenuBarL( TPhoneCommandParam* aCommandParam ) |
|
140 { |
|
141 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::OpenMenuBarL()" ); |
|
142 // Check is the given parameter valid |
|
143 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdInteger ) |
|
144 { |
|
145 TPhoneCmdParamInteger* menuResource = |
|
146 static_cast<TPhoneCmdParamInteger*>( aCommandParam ); |
|
147 |
|
148 iMenuResourceId = menuResource->Integer(); |
|
149 ShowTaskSwapper( iMenuResourceId ); |
|
150 |
|
151 iMenu->SetMenuTitleResourceId( iMenuResourceId ); |
|
152 iMenu->TryDisplayMenuBarL(); |
|
153 } |
|
154 } |
|
155 |
|
156 // ----------------------------------------------------------------------------- |
|
157 // CPhoneMenuController::IsSwivelClosed |
|
158 // This function checks from PubSubProxy that is |
|
159 // Swivel closed or not in product. |
|
160 // |
|
161 // ----------------------------------------------------------------------------- |
|
162 // |
|
163 TBool CPhoneMenuController::IsSwivelClosed() const |
|
164 { |
|
165 if( CPhoneCenRepProxy::Instance()-> |
|
166 IsTelephonyFeatureSupported( KTelephonyLVFlagSwivelInDevice )) |
|
167 { |
|
168 return CPhonePubSubProxy::Instance()->Value( |
|
169 KPSUidHWRM, KHWRMGripStatus ) == EPSHWRMGripClosed; |
|
170 } |
|
171 else |
|
172 { |
|
173 return EFalse; |
|
174 } |
|
175 |
|
176 } |
|
177 |
|
178 // ----------------------------------------------------------------------------- |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 TBool CPhoneMenuController::IsQwertyMode() const |
|
182 { |
|
183 return CPhonePubSubProxy::Instance()->Value( |
|
184 KCRUidAvkon, |
|
185 KAknQwertyInputModeActive ); |
|
186 } |
|
187 // --------------------------------------------------------- |
|
188 // CPhoneMenuController::DynInitMenuBar |
|
189 // --------------------------------------------------------- |
|
190 // |
|
191 void CPhoneMenuController::DynInitMenuBar( |
|
192 TPhoneCommandParam* /*aCommandParam*/ ) |
|
193 { |
|
194 } |
|
195 |
|
196 // --------------------------------------------------------- |
|
197 // CPhoneMenuController::DynInitMenuPaneL |
|
198 // --------------------------------------------------------- |
|
199 // |
|
200 void CPhoneMenuController::DynInitMenuPaneL( TPhoneCommandParam* aCommandParam ) |
|
201 { |
|
202 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::DynInitMenuPaneL()" ); |
|
203 TPhoneCmdParamDynMenu* menu = |
|
204 static_cast<TPhoneCmdParamDynMenu*>( aCommandParam ); |
|
205 |
|
206 TInt resourceId = menu->ResourceId(); |
|
207 |
|
208 __PHONELOG1( |
|
209 EBasic, |
|
210 EPhonePhoneapp, |
|
211 "CPhoneMenuController::DynInitMenuPaneL() - ResourceId = %d)", |
|
212 resourceId ); |
|
213 |
|
214 CEikMenuPane* menuPane= |
|
215 reinterpret_cast<CEikMenuPane*>( menu->DynMenu() ); |
|
216 |
|
217 RArray<TInt> menuItemArray; |
|
218 CleanupClosePushL( menuItemArray ); |
|
219 |
|
220 TInt menuItemCount = menuPane->NumberOfItemsInPane(); |
|
221 __PHONELOG1( |
|
222 EBasic, |
|
223 EPhonePhoneapp, |
|
224 "CPhoneMenuController::DynInitMenuPaneL() - MenuItemCount = %d)", |
|
225 menuItemCount ); |
|
226 |
|
227 // Menu items to array |
|
228 for ( TInt i( 0 ); i < menuItemCount; i++ ) |
|
229 { |
|
230 menuItemArray.Append( menuPane->MenuItemCommandId( i ) ); |
|
231 } |
|
232 TBool onScreenDialer = FeatureManager::FeatureSupported( |
|
233 KFeatureIdOnScreenDialer ); |
|
234 |
|
235 // Menu items to be deleted |
|
236 for ( TInt i( 0 ); i < menuItemArray.Count(); i++ ) |
|
237 { |
|
238 switch( menuItemArray[ i ] ) |
|
239 { |
|
240 case EPhoneInCallCmdAnswer: |
|
241 if ( iConferenceAndWaitingVideoFlag ) |
|
242 { |
|
243 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
244 } |
|
245 break; |
|
246 case EPhoneInCallCmdDialer: |
|
247 if ( !onScreenDialer ) |
|
248 { |
|
249 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
250 } |
|
251 break; |
|
252 case EPhoneInCallCmdLockKeypad: |
|
253 if ( onScreenDialer || iHoldFlag ) |
|
254 { |
|
255 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
256 } |
|
257 break; |
|
258 case EPhoneInCallCmdLockScreen: |
|
259 if ( !onScreenDialer || iHoldFlag ) |
|
260 { |
|
261 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
262 } |
|
263 break; |
|
264 case EPhoneNumberAcqCmdCall: |
|
265 if ( onScreenDialer && iNumberEntryEmpty ) |
|
266 { |
|
267 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
268 } |
|
269 else if ( iServiceCodeFlag ) |
|
270 { |
|
271 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
272 } |
|
273 else if ( iInvalidCsPhoneNumber ) |
|
274 { |
|
275 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
276 } |
|
277 break; |
|
278 |
|
279 case EPhoneNumberAcqCmdVideoCall: |
|
280 if ( onScreenDialer && iNumberEntryEmpty ) |
|
281 { |
|
282 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
283 } |
|
284 else if ( iServiceCodeFlag ) |
|
285 { |
|
286 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
287 } |
|
288 else if( !( FeatureManager::FeatureSupported( |
|
289 KFeatureIdCsVideoTelephony ) ) ) |
|
290 { |
|
291 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
292 } |
|
293 else if ( iInvalidCsPhoneNumber ) |
|
294 { |
|
295 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
296 } |
|
297 break; |
|
298 |
|
299 case EPhoneNumberAcqCmdSendMessage: |
|
300 if ( iNumberEntryEmpty || iInvalidCsPhoneNumber || iSecurityMode ) |
|
301 { |
|
302 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
303 } |
|
304 break; |
|
305 |
|
306 case EPhoneNumberAcqCmdSendCommand: |
|
307 if ( !iServiceCodeFlag || iNumberEntryEmpty || iInvalidCsPhoneNumber ) |
|
308 { |
|
309 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
310 } |
|
311 break; |
|
312 |
|
313 case EPhoneNumberAcqCmdToggleNeAlphaMode: |
|
314 if ( iAlphaMode || iSecurityMode ) |
|
315 { |
|
316 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
317 } |
|
318 break; |
|
319 |
|
320 case EPhoneNumberAcqCmdToggleNeNumericMode: |
|
321 if ( !iAlphaMode || iSecurityMode ) |
|
322 { |
|
323 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
324 } |
|
325 break; |
|
326 |
|
327 |
|
328 case EPhoneInCallCmdGoToIdle: |
|
329 if ( iNEVisible || iSecurityMode ) |
|
330 { |
|
331 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
332 } |
|
333 break; |
|
334 |
|
335 case EPhoneInCallCmdMute: |
|
336 if ( iMuteFlag ) |
|
337 { |
|
338 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
339 } |
|
340 break; |
|
341 |
|
342 case EPhoneInCallCmdUnmute: |
|
343 if ( !iMuteFlag ) |
|
344 { |
|
345 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
346 } |
|
347 break; |
|
348 |
|
349 case EPhoneInCallCmdHold: // fall through |
|
350 case EPhoneInCallCmdConferenceHold: |
|
351 if ( iHoldFlag && !iConferenceAndSingleFlag ) |
|
352 { |
|
353 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
354 } |
|
355 break; |
|
356 |
|
357 case EPhoneInCallCmdDtmfListQuery: |
|
358 if ( ( iHoldFlag && !iAllowDtmfOptionsFlag ) || iHideVideoCallDTMFVisibility |
|
359 || iHideVoipCallDTMFVisibility ) |
|
360 { |
|
361 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
362 } |
|
363 break; |
|
364 |
|
365 case EPhoneInCallCmdSwitchToVideo: |
|
366 if( !iPhoneNumberAvailableInPhoneEngine || |
|
367 !( FeatureManager::FeatureSupported( |
|
368 KFeatureIdCsVideoTelephony ) ) ) |
|
369 { |
|
370 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
371 } |
|
372 break; |
|
373 case EPhoneInCallCmdSwitchToVoice: |
|
374 if( !iPhoneNumberAvailableInPhoneEngine ) |
|
375 { |
|
376 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
377 } |
|
378 break; |
|
379 |
|
380 case EPhoneCallComingCmdSoftReject: |
|
381 if ( !iSoftRejectFlag || iSecurityMode ) |
|
382 { |
|
383 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
384 } |
|
385 break; |
|
386 |
|
387 case EPhoneCallComingCmdAnswerHandPortableVideo: |
|
388 if ( iWiredAccAvailableFlag || IsSwivelClosed() ) |
|
389 { |
|
390 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
391 } |
|
392 break; |
|
393 |
|
394 case EPhoneCallComingCmdAnswerHandPortable: |
|
395 if ( !iBTAccAvailableFlag ) |
|
396 { |
|
397 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
398 } |
|
399 break; |
|
400 |
|
401 case EPhoneInCallCmdConferenceUnhold: // fall through |
|
402 case EPhoneInCallCmdUnhold: |
|
403 if ( !iHoldFlag ) |
|
404 { |
|
405 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
406 } |
|
407 break; |
|
408 |
|
409 case EPhoneInCallCmdCreateConference: |
|
410 // Remove conference submenu item if: |
|
411 // 1. Specific flag is set (calls are different type) OR |
|
412 // 2. We are in Conference And Single state where the conference call is on hold and there |
|
413 // are maximum amount of participants in conference call (can't add single to the conference) OR |
|
414 // 3. Conference call is on hold and we are in some other conference state than Conference And Single |
|
415 if ( iRemoveConfrenceOptionsFlag || ( iHoldFlag && iConferenceAndSingleFlag && iMaxConfMembersFlag ) || |
|
416 ( iHoldFlag && !iConferenceAndSingleFlag ) ) |
|
417 { |
|
418 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
419 } |
|
420 break; |
|
421 |
|
422 case EPhoneInCallCmdJoin: |
|
423 if( iMaxConfMembersFlag || iRemoveConfrenceOptionsFlag ) |
|
424 { |
|
425 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
426 } |
|
427 break; |
|
428 |
|
429 case EPhoneInCallCmdReplace: |
|
430 if ( !iReplace ) |
|
431 { |
|
432 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
433 } |
|
434 break; |
|
435 |
|
436 case EPhoneInCallCmdActivateIhf: |
|
437 if ( iWiredAccFlag || iIhfFlag ) |
|
438 { |
|
439 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
440 } |
|
441 break; |
|
442 |
|
443 case EPhoneInCallCmdDeactivateIhf: |
|
444 if ( iWiredAccFlag || !iIhfFlag || IsSwivelClosed() ) |
|
445 { |
|
446 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
|
447 } |
|
448 break; |
|
449 |
|
450 case EPhoneInCallCmdBtHandsfree: |
|
451 if ( iBTAccTmpUnFlag && !iWiredAccFlag ) |
|
452 { |
|
453 // None |
|
454 } |
|
455 else |
|
456 { |
|
457 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
458 } |
|
459 break; |
|
460 |
|
461 case EPhoneInCallCmdHandset: |
|
462 if ( iBTAccFlag && !iWiredAccFlag ) |
|
463 { |
|
464 if ( IsSwivelClosed() ) |
|
465 { |
|
466 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
467 } |
|
468 } |
|
469 else |
|
470 { |
|
471 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
472 } |
|
473 break; |
|
474 |
|
475 case EPhoneDialerCallHandling: |
|
476 { |
|
477 // no active call or security mode |
|
478 if ( ( onScreenDialer && !iCallInProgress ) || iSecurityMode ) |
|
479 { |
|
480 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
481 } |
|
482 } |
|
483 break; |
|
484 case EPhoneDialerCmdLog: |
|
485 { |
|
486 if ( ( onScreenDialer && !iNumberEntryEmpty ) || iSecurityMode ) |
|
487 { |
|
488 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
489 } |
|
490 } |
|
491 break; |
|
492 case EPhoneDialerCmdContacts: |
|
493 { |
|
494 if ( ( onScreenDialer && !iNumberEntryEmpty ) || iSecurityMode ) |
|
495 { |
|
496 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
497 } |
|
498 } |
|
499 break; |
|
500 |
|
501 case EPhoneNumberAcqCmdAddToContacts: |
|
502 { |
|
503 if ( ( onScreenDialer && iNumberEntryEmpty ) || iSecurityMode ) |
|
504 { |
|
505 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
506 } |
|
507 } |
|
508 break; |
|
509 case EPhoneDialerCmdSpeedDial: |
|
510 { |
|
511 if ( ( onScreenDialer && !iNumberEntryEmpty ) || iSecurityMode ) |
|
512 { |
|
513 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
514 } |
|
515 } |
|
516 break; |
|
517 case EPhoneCmdDtmfOk: |
|
518 { |
|
519 if ( ( onScreenDialer && iNumberEntryEmpty ) || iSecurityMode ) |
|
520 { |
|
521 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
522 } |
|
523 } |
|
524 break; |
|
525 case EPhoneInCallCmdPrivate: |
|
526 { |
|
527 if ( FeatureManager::FeatureSupported( KFeatureIdTouchCallHandling ) && |
|
528 iHoldFlag && |
|
529 iConferenceParticipantsListOpenFlag ) |
|
530 { |
|
531 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
532 } |
|
533 } |
|
534 break; |
|
535 case EPhoneDialerCmdTouchInput: |
|
536 { |
|
537 if ( !FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) || |
|
538 IsQwertyMode() ) |
|
539 { |
|
540 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
541 } |
|
542 } |
|
543 break; |
|
544 case EPhoneVideoSharing: |
|
545 { |
|
546 if( !FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing ) ) |
|
547 { |
|
548 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
549 } |
|
550 } |
|
551 break; |
|
552 |
|
553 case EEasyDialingSettingsItemPlaceHolder: |
|
554 { |
|
555 if( !FeatureManager::FeatureSupported( KFeatureIdProductIncludesHomeScreenEasyDialing ) ) |
|
556 { |
|
557 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
558 } |
|
559 } |
|
560 break; |
|
561 |
|
562 case EPhoneDialerCallSettings: // Fall through |
|
563 case EPhoneInCallCmdSendToCallerMenu: // Fall through |
|
564 case EAknCmdEditItemPlaceHolder: // Fall through |
|
565 case EPhoneDialerCmdHelp: // Fall through |
|
566 case EPhoneDialerCmdHelpDtmf: // Fall through |
|
567 case EPhoneInCallCmdHelp: |
|
568 if ( iSecurityMode ) |
|
569 { |
|
570 menuPane->DeleteMenuItem( menuItemArray[i] ); |
|
571 } |
|
572 break; |
|
573 |
|
574 default: |
|
575 break; |
|
576 |
|
577 } |
|
578 } |
|
579 |
|
580 CleanupStack::PopAndDestroy(); // CleanupClosePushL |
|
581 |
|
582 if ( FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing ) ) |
|
583 { |
|
584 if( iServiceHandler->HandleSubmenuL( *menuPane ) ) |
|
585 { |
|
586 // AIW handled this |
|
587 __PHONELOG( EBasic, EPhoneUIView, "CPhoneViewController::CPhoneMenuController -> AIW handled this sub menu"); |
|
588 return; |
|
589 } |
|
590 |
|
591 if( iServiceHandler->IsAiwMenu( resourceId ) ) |
|
592 { |
|
593 __PHONELOG( EBasic, EPhoneUIView, "CPhoneViewController::CPhoneMenuController -> Resource is in AIW menu"); |
|
594 iServiceHandler->InitializeMenuPaneL( |
|
595 *menuPane, |
|
596 resourceId, |
|
597 EPhoneVideoSharing, |
|
598 iServiceHandler->InParamListL() ); |
|
599 __PHONELOG( EBasic, EPhoneUIView, "CPhoneViewController::CPhoneMenuController -> AIW menu initialized"); |
|
600 } |
|
601 } |
|
602 } |
|
603 |
|
604 // --------------------------------------------------------- |
|
605 // CPhoneMenuController::AddMenuPaneL |
|
606 // --------------------------------------------------------- |
|
607 // |
|
608 void CPhoneMenuController::AddMenuPaneL( |
|
609 TInt /*aPaneResourceId*/, |
|
610 CEikMenuPane* /*aMenuPane*/, |
|
611 TBool /*aAddSeparator*/ ) |
|
612 { |
|
613 } |
|
614 |
|
615 // --------------------------------------------------------- |
|
616 // CPhoneMenuController::SetMuteFlag |
|
617 // --------------------------------------------------------- |
|
618 // |
|
619 void CPhoneMenuController::SetMuteFlag( TPhoneCommandParam* aCommandParam ) |
|
620 { |
|
621 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetMuteFlag()" ); |
|
622 // Check is the given parameter valid |
|
623 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
624 { |
|
625 TPhoneCmdParamBoolean* muteFlag = |
|
626 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
627 |
|
628 iMuteFlag = muteFlag->Boolean(); |
|
629 } |
|
630 } |
|
631 |
|
632 // --------------------------------------------------------- |
|
633 // CPhoneMenuController::SetIhfFlag |
|
634 // --------------------------------------------------------- |
|
635 // |
|
636 void CPhoneMenuController::SetIhfFlag( TPhoneCommandParam* aCommandParam ) |
|
637 { |
|
638 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetIhfFlag()" ); |
|
639 // Check is the given parameter valid |
|
640 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
641 { |
|
642 TPhoneCmdParamBoolean* ihfFlag = |
|
643 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
644 |
|
645 iIhfFlag = ihfFlag->Boolean(); |
|
646 } |
|
647 } |
|
648 |
|
649 // --------------------------------------------------------- |
|
650 // CPhoneMenuController::SetHoldFlag |
|
651 // --------------------------------------------------------- |
|
652 // |
|
653 void CPhoneMenuController::SetHoldFlag( TPhoneCommandParam* aCommandParam ) |
|
654 { |
|
655 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetHoldFlag()" ); |
|
656 // Check is the given parameter valid |
|
657 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
658 { |
|
659 TPhoneCmdParamBoolean* holdFlag = |
|
660 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
661 |
|
662 iHoldFlag = holdFlag->Boolean(); |
|
663 } |
|
664 } |
|
665 |
|
666 // --------------------------------------------------------- |
|
667 // CPhoneMenuController::GetHoldFlag |
|
668 // --------------------------------------------------------- |
|
669 // |
|
670 void CPhoneMenuController::GetHoldFlag( |
|
671 TPhoneCommandParam* aCommandParam ) |
|
672 { |
|
673 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::GetHoldFlag()" ); |
|
674 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
675 { |
|
676 TPhoneCmdParamBoolean* booleanValue = |
|
677 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
678 booleanValue->SetBoolean( iHoldFlag ); |
|
679 } |
|
680 } |
|
681 |
|
682 // --------------------------------------------------------- |
|
683 // CPhoneMenuController::SetConferenceAndSingleFlag |
|
684 // --------------------------------------------------------- |
|
685 // |
|
686 void CPhoneMenuController::SetConferenceAndSingleFlag( TPhoneCommandParam* aCommandParam ) |
|
687 { |
|
688 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetConferenceAndSingleFlag()" ); |
|
689 // Check is the given parameter valid |
|
690 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
691 { |
|
692 TPhoneCmdParamBoolean* conferenceAndSingleFlag = |
|
693 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
694 |
|
695 iConferenceAndSingleFlag = conferenceAndSingleFlag->Boolean(); |
|
696 } |
|
697 } |
|
698 |
|
699 // --------------------------------------------------------- |
|
700 // CPhoneMenuController::GetConferenceAndSingleFlag |
|
701 // --------------------------------------------------------- |
|
702 // |
|
703 void CPhoneMenuController::GetConferenceAndSingleFlag( |
|
704 TPhoneCommandParam* aCommandParam ) |
|
705 { |
|
706 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::GetConferenceAndSingleFlag()" ); |
|
707 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
708 { |
|
709 TPhoneCmdParamBoolean* booleanValue = |
|
710 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
711 booleanValue->SetBoolean( iConferenceAndSingleFlag ); |
|
712 } |
|
713 } |
|
714 |
|
715 // --------------------------------------------------------- |
|
716 // CPhoneMenuController::SetConferenceAndWaitingVideoFlag |
|
717 // --------------------------------------------------------- |
|
718 // |
|
719 void CPhoneMenuController::SetConferenceAndWaitingVideoFlag( TBool aIsConfAndWaitingVideo ) |
|
720 { |
|
721 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetConferenceAndWaitingVideoFlag" ); |
|
722 iConferenceAndWaitingVideoFlag = aIsConfAndWaitingVideo; |
|
723 } |
|
724 |
|
725 // --------------------------------------------------------- |
|
726 // CPhoneMenuController::SetSoftRejectFlag |
|
727 // --------------------------------------------------------- |
|
728 // |
|
729 void CPhoneMenuController::SetSoftRejectFlag( |
|
730 TPhoneCommandParam* aCommandParam ) |
|
731 { |
|
732 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetSoftRejectFlag()" ); |
|
733 // Check is the given parameter valid |
|
734 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
735 { |
|
736 TPhoneCmdParamBoolean* softRejectFlag = |
|
737 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
738 |
|
739 iSoftRejectFlag = softRejectFlag->Boolean(); |
|
740 } |
|
741 } |
|
742 |
|
743 // --------------------------------------------------------- |
|
744 // CPhoneMenuController::GetSoftRejectFlag |
|
745 // --------------------------------------------------------- |
|
746 // |
|
747 void CPhoneMenuController::GetSoftRejectFlag( |
|
748 TPhoneCommandParam* aCommandParam ) |
|
749 { |
|
750 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::GetSoftRejectFlag()" ); |
|
751 // Check is the given parameter valid |
|
752 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
753 { |
|
754 TPhoneCmdParamBoolean* softRejectFlag = |
|
755 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
756 |
|
757 softRejectFlag->SetBoolean( iSoftRejectFlag ); |
|
758 } |
|
759 } |
|
760 |
|
761 // --------------------------------------------------------- |
|
762 // CPhoneMenuController::SetServiceCodeFlag |
|
763 // --------------------------------------------------------- |
|
764 // |
|
765 void CPhoneMenuController::SetServiceCodeFlag( |
|
766 TPhoneCommandParam* aCommandParam ) |
|
767 { |
|
768 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetServiceCodeFlag()" ); |
|
769 // Check is the given parameter valid |
|
770 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
771 { |
|
772 TPhoneCmdParamBoolean* serviceCodeFlag = |
|
773 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
774 |
|
775 iServiceCodeFlag = serviceCodeFlag->Boolean(); |
|
776 } |
|
777 } |
|
778 |
|
779 // --------------------------------------------------------- |
|
780 // CPhoneMenuController::SetWiredAccFlag |
|
781 // --------------------------------------------------------- |
|
782 // |
|
783 void CPhoneMenuController::SetWiredAccFlag( TPhoneCommandParam* aCommandParam ) |
|
784 { |
|
785 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetWiredAccFlag()" ); |
|
786 // Check is the given parameter valid |
|
787 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
788 { |
|
789 TPhoneCmdParamBoolean* accFlag = |
|
790 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
791 |
|
792 iWiredAccFlag = accFlag->Boolean(); |
|
793 } |
|
794 } |
|
795 |
|
796 // --------------------------------------------------------- |
|
797 // CPhoneMenuController::SetWiredAccAvailableFlag |
|
798 // --------------------------------------------------------- |
|
799 // |
|
800 void CPhoneMenuController::SetWiredAccAvailableFlag( TPhoneCommandParam* aCommandParam ) |
|
801 { |
|
802 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetWiredAccAvailableFlag()" ); |
|
803 // Check is the given parameter valid |
|
804 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
805 { |
|
806 TPhoneCmdParamBoolean* accFlag = |
|
807 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
808 |
|
809 iWiredAccAvailableFlag = accFlag->Boolean(); |
|
810 |
|
811 } |
|
812 } |
|
813 |
|
814 // --------------------------------------------------------- |
|
815 // CPhoneMenuController::SetMaxConfMembersFlag |
|
816 // --------------------------------------------------------- |
|
817 // |
|
818 void CPhoneMenuController::SetMaxConfMembersFlag( TBool aIsMaxConfMembers ) |
|
819 { |
|
820 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetMaxConfMembersFlag()" ); |
|
821 iMaxConfMembersFlag = aIsMaxConfMembers; |
|
822 } |
|
823 |
|
824 // --------------------------------------------------------- |
|
825 // CPhoneMenuController::SetBTAccFlag |
|
826 // --------------------------------------------------------- |
|
827 // |
|
828 void CPhoneMenuController::SetBTAccFlag( TPhoneCommandParam* aCommandParam ) |
|
829 { |
|
830 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetBTAccFlag()" ); |
|
831 // Check is the given parameter valid |
|
832 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
833 { |
|
834 TPhoneCmdParamBoolean* accFlag = |
|
835 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
836 |
|
837 iBTAccFlag = accFlag->Boolean(); |
|
838 iBTAccTmpUnFlag = iBTAccAvailableFlag && !iBTAccFlag; |
|
839 } |
|
840 } |
|
841 |
|
842 // --------------------------------------------------------- |
|
843 // CPhoneMenuController::SetBTAccAvailableFlag |
|
844 // --------------------------------------------------------- |
|
845 // |
|
846 void CPhoneMenuController::SetBTAccAvailableFlag( TPhoneCommandParam* aCommandParam ) |
|
847 { |
|
848 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetBTAccAvailableFlag()" ); |
|
849 // Check is the given parameter valid |
|
850 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
851 { |
|
852 TPhoneCmdParamBoolean* accFlag = |
|
853 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
854 |
|
855 iBTAccAvailableFlag = accFlag->Boolean(); |
|
856 iBTAccTmpUnFlag = iBTAccAvailableFlag && !iBTAccFlag; |
|
857 } |
|
858 } |
|
859 |
|
860 // --------------------------------------------------------- |
|
861 // CPhoneMenuController::SetNEVisibleFlag |
|
862 // --------------------------------------------------------- |
|
863 // |
|
864 void CPhoneMenuController::SetNEVisibleFlag( TBool aVisible ) |
|
865 { |
|
866 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetNEVisibleFlag()" ); |
|
867 iNEVisible = aVisible; |
|
868 } |
|
869 |
|
870 // --------------------------------------------------------- |
|
871 // CPhoneMenuController::SetReplaceFlag |
|
872 // --------------------------------------------------------- |
|
873 // |
|
874 void CPhoneMenuController::SetReplaceFlag( TBool aReplace ) |
|
875 { |
|
876 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetReplaceFlag()" ); |
|
877 iReplace = aReplace; |
|
878 } |
|
879 |
|
880 // --------------------------------------------------------- |
|
881 // CPhoneMenuController::SetPhoneNumberAvailableInPhoneEngine |
|
882 // --------------------------------------------------------- |
|
883 // |
|
884 void CPhoneMenuController::SetPhoneNumberAvailableInPhoneEngine( |
|
885 TPhoneCommandParam* aCommandParam ) |
|
886 { |
|
887 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetPhoneNumberAvailableInPhoneEngine()" ); |
|
888 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
889 { |
|
890 TPhoneCmdParamBoolean* phoneNumberAvailable = |
|
891 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
892 |
|
893 iPhoneNumberAvailableInPhoneEngine = phoneNumberAvailable->Boolean(); |
|
894 } |
|
895 } |
|
896 |
|
897 // ----------------------------------------------------------------------------- |
|
898 // CPhoneMenuController::ShowTaskSwapper |
|
899 // |
|
900 // Decide if TaskSwapper is to be shown in menu. |
|
901 // ----------------------------------------------------------------------------- |
|
902 // |
|
903 void CPhoneMenuController::ShowTaskSwapper( TInt aResourceId ) const |
|
904 { |
|
905 if ( aResourceId == R_PHONEUI_NUMBERACQ_OK_MENUBAR || |
|
906 aResourceId == R_PHONEUI_INCOMINGVIDEOCALL_MENUBAR || |
|
907 aResourceId == R_PHONEUI_INCOMINGCALL_MENUBAR || |
|
908 aResourceId == R_PHONEUI_INCOMINGCALL_MENUBAR_WITH_NUMBERENTRY || |
|
909 aResourceId == R_PHONEUI_INCOMINGVIDEOCALL_MENUBAR_WITH_NUMBERENTRY || |
|
910 aResourceId == R_PHONEUI_WAITING_LOCK_MENUBAR || |
|
911 aResourceId == R_PHONEUI_TWOSINGLES_WAITING_LOCK_MENUBAR || |
|
912 iSecurityMode ) |
|
913 { |
|
914 iMenu->SetMenuType( CEikMenuBar::EMenuOptionsNoTaskSwapper ); |
|
915 } |
|
916 else |
|
917 { |
|
918 iMenu->SetMenuType( CEikMenuBar::EMenuOptions ); |
|
919 } |
|
920 } |
|
921 |
|
922 // --------------------------------------------------------- |
|
923 // CPhoneMenuController::SendAiwCommandL |
|
924 // --------------------------------------------------------- |
|
925 // |
|
926 void CPhoneMenuController::SendAiwCommandL( TPhoneCommandParam* aCommandParam ) |
|
927 { |
|
928 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SendAiwCommandL()" ); |
|
929 if( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdInteger ) |
|
930 { |
|
931 TPhoneCmdParamInteger* command = |
|
932 static_cast<TPhoneCmdParamInteger*>( aCommandParam ); |
|
933 CAiwGenericParamList& in = iServiceHandler->InParamListL(); |
|
934 iServiceHandler->ExecuteMenuCmdL( command->Integer(), |
|
935 in, |
|
936 iServiceHandler->OutParamListL() ); |
|
937 } |
|
938 } |
|
939 |
|
940 |
|
941 // --------------------------------------------------------------------------- |
|
942 // CPhoneMenuController::SetContextMenu |
|
943 // --------------------------------------------------------------------------- |
|
944 // |
|
945 void CPhoneMenuController::SetContextMenu( TPhoneCommandParam* aCommandParam ) |
|
946 { |
|
947 __LOGMETHODSTARTEND( EPhoneUIView, |
|
948 "CPhoneMenuController::SetContextMenu" ); |
|
949 if( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdInteger ) |
|
950 { |
|
951 TPhoneCmdParamInteger* command = |
|
952 static_cast<TPhoneCmdParamInteger*>( aCommandParam ); |
|
953 iMenu->SetContextMenuTitleResourceId( command->Integer() ); |
|
954 |
|
955 } |
|
956 |
|
957 } |
|
958 |
|
959 // --------------------------------------------------------- |
|
960 // CPhoneMenuController::SetRemoveConfrenceOptionsFlag |
|
961 // --------------------------------------------------------- |
|
962 // |
|
963 void CPhoneMenuController::SetRemoveConfrenceOptionsFlag( TBool aRemoveConfrenceOptions ) |
|
964 { |
|
965 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetRemoveConfrenceOptionsFlag()" ); |
|
966 iRemoveConfrenceOptionsFlag = aRemoveConfrenceOptions; |
|
967 } |
|
968 |
|
969 // --------------------------------------------------------- |
|
970 // CPhoneMenuController::SetNumberEntryEmptyFlag |
|
971 // --------------------------------------------------------- |
|
972 // |
|
973 void CPhoneMenuController::SetNumberEntryEmptyFlag( TBool aNumberEntryEmpty ) |
|
974 { |
|
975 iNumberEntryEmpty = aNumberEntryEmpty; |
|
976 } |
|
977 |
|
978 // --------------------------------------------------------- |
|
979 // CPhoneMenuController::SetCallInProgressFlag |
|
980 // --------------------------------------------------------- |
|
981 // |
|
982 void CPhoneMenuController::SetCallInProgressFlag( TPhoneCommandParam* aCommandParam ) |
|
983 { |
|
984 TPhoneCmdParamIncallIndicatorData* param = |
|
985 static_cast<TPhoneCmdParamIncallIndicatorData*>( aCommandParam ); |
|
986 |
|
987 TInt callState = param->CallState(); |
|
988 switch ( callState ) |
|
989 { |
|
990 case EPSCTsyCallStateAlerting: |
|
991 case EPSCTsyCallStateRinging: |
|
992 case EPSCTsyCallStateDialling: |
|
993 case EPSCTsyCallStateAnswering: |
|
994 case EPSCTsyCallStateConnected: |
|
995 case EPSCTsyCallStateHold: |
|
996 { |
|
997 //call in progress |
|
998 iCallInProgress = ETrue; |
|
999 break; |
|
1000 } |
|
1001 default: |
|
1002 { |
|
1003 iCallInProgress = EFalse; |
|
1004 //call not in progress |
|
1005 break; |
|
1006 } |
|
1007 } |
|
1008 } |
|
1009 |
|
1010 // --------------------------------------------------------- |
|
1011 // CPhoneMenuController::IsMenuBarVisible() |
|
1012 // --------------------------------------------------------- |
|
1013 // |
|
1014 TBool CPhoneMenuController::IsMenuBarVisible() |
|
1015 { |
|
1016 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::IsMenuBarVisible()" ); |
|
1017 return iMenu->IsDisplayed(); |
|
1018 } |
|
1019 |
|
1020 // --------------------------------------------------------- |
|
1021 // CPhoneMenuController::SetConferenceParticipantsListVisibleFlag() |
|
1022 // --------------------------------------------------------- |
|
1023 // |
|
1024 void CPhoneMenuController::SetConferenceParticipantsListVisibleFlag( |
|
1025 TPhoneCommandParam* aCommandParam ) |
|
1026 { |
|
1027 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
1028 { |
|
1029 TPhoneCmdParamBoolean* participantsListOpenFlag = |
|
1030 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
1031 iConferenceParticipantsListOpenFlag = participantsListOpenFlag->Boolean(); |
|
1032 } |
|
1033 } |
|
1034 |
|
1035 //------------------------------------------------------------------------------- |
|
1036 // CPhoneMenuController::GetConferenceParticipantsListVisibleFlag |
|
1037 //------------------------------------------------------------------------------- |
|
1038 void CPhoneMenuController::GetConferenceParticipantsListVisibleFlag( |
|
1039 TPhoneCommandParam* aCommandParam ) |
|
1040 { |
|
1041 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
1042 { |
|
1043 TPhoneCmdParamBoolean* participantsListOpenFlag = |
|
1044 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
1045 participantsListOpenFlag->SetBoolean( iConferenceParticipantsListOpenFlag ); |
|
1046 } |
|
1047 } |
|
1048 |
|
1049 // --------------------------------------------------------- |
|
1050 // CPhoneMenuController::SetAlphaModeFlag |
|
1051 // --------------------------------------------------------- |
|
1052 // |
|
1053 void CPhoneMenuController::SetAlphaModeFlag( TBool aMode ) |
|
1054 { |
|
1055 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetAlphaModeFlag()" ); |
|
1056 iAlphaMode = aMode; |
|
1057 } |
|
1058 |
|
1059 // --------------------------------------------------------- |
|
1060 // CPhoneMenuController::SetAllowDtmfOptionsFlag |
|
1061 // --------------------------------------------------------- |
|
1062 // |
|
1063 void CPhoneMenuController::SetAllowDtmfOptionsFlag( TBool aMode ) |
|
1064 { |
|
1065 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetAllowDtmfOptionsFlag()" ); |
|
1066 iAllowDtmfOptionsFlag = aMode; |
|
1067 } |
|
1068 |
|
1069 // --------------------------------------------------------- |
|
1070 // CPhoneMenuController::SetHideVideoCallDTMFVisibility |
|
1071 // --------------------------------------------------------- |
|
1072 // |
|
1073 void CPhoneMenuController::SetHideVoipCallDTMFVisibilityFlag( TBool aHideVoipCallDTMFVisibility ) |
|
1074 { |
|
1075 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetHideVoipCallDTMFVisibilityFlag()" ); |
|
1076 iHideVoipCallDTMFVisibility = aHideVoipCallDTMFVisibility; |
|
1077 } |
|
1078 // CPhoneMenuController::SetHideVideoCallDTMFVisibility |
|
1079 // --------------------------------------------------------- |
|
1080 // |
|
1081 void CPhoneMenuController::SetHideVideoCallDTMFVisibilityFlag( TBool aHideVideoCallDTMFVisibility ) |
|
1082 { |
|
1083 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetHideVideocallDTMFVisibility()" ); |
|
1084 iHideVideoCallDTMFVisibility = aHideVideoCallDTMFVisibility; |
|
1085 } |
|
1086 |
|
1087 // --------------------------------------------------------- |
|
1088 // CPhoneMenuController::SetVoipEnabledFlag |
|
1089 // --------------------------------------------------------- |
|
1090 // |
|
1091 void CPhoneMenuController::SetVoipEnabledFlag( |
|
1092 TPhoneCommandParam* aCommandParam ) |
|
1093 { |
|
1094 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetVoipEnabledFlag()" ); |
|
1095 |
|
1096 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
1097 { |
|
1098 TPhoneCmdParamBoolean* voipEnabled = |
|
1099 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
1100 iVoipEnabledFlag = voipEnabled->Boolean(); |
|
1101 } |
|
1102 } |
|
1103 |
|
1104 // --------------------------------------------------------- |
|
1105 // CPhoneMenuController::HandlePropertyChangedL |
|
1106 // --------------------------------------------------------- |
|
1107 // |
|
1108 void CPhoneMenuController::SetSecurityMode( TBool aIsEnabled ) |
|
1109 { |
|
1110 __PHONELOG1( EBasic, EPhoneUIView, "CPhoneViewController::SetSecurityMode %d ", aIsEnabled ); |
|
1111 iSecurityMode = aIsEnabled; |
|
1112 } |
|
1113 |
|
1114 // --------------------------------------------------------- |
|
1115 // CPhoneMenuController::HandlePropertyChangedL |
|
1116 // --------------------------------------------------------- |
|
1117 // |
|
1118 void CPhoneMenuController::HandlePropertyChangedL( |
|
1119 const TUid& aCategory, |
|
1120 const TUint aKey, |
|
1121 const TInt aValue ) |
|
1122 { |
|
1123 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::HandlePropertyChangedL()" ); |
|
1124 __PHONELOG1( EBasic, EPhoneUIView, |
|
1125 "CPhoneMenuController::HandlePropertyChangedL - aCategory= %d", aCategory ); |
|
1126 __PHONELOG1( EBasic, EPhoneUIView, |
|
1127 "CPhoneMenuController::HandlePropertyChangedL - aKey= %d", aKey ); |
|
1128 __PHONELOG1( EBasic, EPhoneUIView, |
|
1129 "CPhoneMenuController::HandlePropertyChangedL - aValue= %d", aValue ); |
|
1130 if ( aCategory == KPSUidHWRM && |
|
1131 aKey == KHWRMGripStatus && |
|
1132 aValue != EPSHWRMGripStatusUninitialized && |
|
1133 iMenu->IsDisplayed() ) |
|
1134 { |
|
1135 CloseMenuBar(); |
|
1136 } |
|
1137 } |
|
1138 |
|
1139 // --------------------------------------------------------- |
|
1140 // CPhoneMenuController::SetInvalidCsPhoneNumberFlag |
|
1141 // --------------------------------------------------------- |
|
1142 // |
|
1143 void CPhoneMenuController::SetInvalidCsPhoneNumberFlag( TPhoneCommandParam* aCommandParam ) |
|
1144 { |
|
1145 __LOGMETHODSTARTEND( EPhoneUIView, "CPhoneMenuController::SetInvalidCsPhoneNumberFlag()" ); |
|
1146 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
1147 { |
|
1148 TPhoneCmdParamBoolean* boolParam = |
|
1149 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
1150 |
|
1151 __PHONELOG1( |
|
1152 EBasic, |
|
1153 EPhonePhoneapp, |
|
1154 "CPhoneMenuController::SetInvalidCsPhoneNumberFlag() - Boolean parameter = %d)", |
|
1155 boolParam->Boolean() ); |
|
1156 |
|
1157 iInvalidCsPhoneNumber = boolParam->Boolean(); |
|
1158 } |
|
1159 } |
|
1160 |
|
1161 // --------------------------------------------------------- |
|
1162 // CPhoneMenuController::GetInvalidCsPhoneNumberFlag |
|
1163 // --------------------------------------------------------- |
|
1164 // |
|
1165 void CPhoneMenuController::GetInvalidCsPhoneNumberFlag( |
|
1166 TPhoneCommandParam* aCommandParam ) |
|
1167 { |
|
1168 __LOGMETHODSTARTEND( |
|
1169 EPhoneUIView, |
|
1170 "CPhoneMenuController::GetInvalidCsPhoneNumberFlag()" ); |
|
1171 |
|
1172 if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdBoolean ) |
|
1173 { |
|
1174 TPhoneCmdParamBoolean* boolParam = |
|
1175 static_cast<TPhoneCmdParamBoolean*>( aCommandParam ); |
|
1176 |
|
1177 __PHONELOG1( |
|
1178 EBasic, |
|
1179 EPhonePhoneapp, |
|
1180 "CPhoneMenuController::GetInvalidCsPhoneNumberFlag() - Boolean return value = %d)", |
|
1181 boolParam->Boolean() ); |
|
1182 |
|
1183 boolParam->SetBoolean( iInvalidCsPhoneNumber ); |
|
1184 } |
|
1185 } |
|
1186 |
|
1187 // End of File |