20 #include <eikmenup.h> |
20 #include <eikmenup.h> |
21 #include <spsettings.h> |
21 #include <spsettings.h> |
22 #include <spentry.h> |
22 #include <spentry.h> |
23 #include <spproperty.h> |
23 #include <spproperty.h> |
24 #include <mpeengineinfo.h> |
24 #include <mpeengineinfo.h> |
25 #include "phoneresourceids.h" |
25 #include <bmbubblemanager.h> |
|
26 #include <phoneui.rsg> |
26 #include <avkon.rsg> |
27 #include <avkon.rsg> |
|
28 #include <phoneuivoip.rsg> |
27 #include <StringLoader.h> |
29 #include <StringLoader.h> |
28 #include <featmgr.h> |
30 #include <featmgr.h> |
|
31 #include <centralrepository.h> |
|
32 #include <easydialingcrkeys.h> |
29 |
33 |
30 #include "cphonecustomizationvoip.h" |
34 #include "cphonecustomizationvoip.h" |
31 #include "tphonecmdparaminteger.h" |
35 #include "tphonecmdparaminteger.h" |
32 #include "tphonecmdparamboolean.h" |
36 #include "tphonecmdparamboolean.h" |
33 #include "tphonecmdparamstring.h" |
37 #include "tphonecmdparamstring.h" |
34 #include "cphonemainresourceresolver.h" |
38 #include "cphonemainresourceresolver.h" |
35 #include "mphonestatemachine.h" |
39 #include "mphonestatemachine.h" |
|
40 #include "mphonesecuritymodeobserver.h" |
36 #include "cphonelogger.h" |
41 #include "cphonelogger.h" |
37 #include "cphonecenrepproxy.h" |
42 #include "cphonecenrepproxy.h" |
38 #include "phoneui.pan" |
43 #include "phoneui.pan" |
39 #include "mphoneviewcommandhandle.h" |
44 #include "mphoneviewcommandhandle.h" |
40 #include "tphonecmdparamdynmenu.h" |
45 #include "tphonecmdparamdynmenu.h" |
51 #include "cphoneviewcustomizationvoip.h" |
56 #include "cphoneviewcustomizationvoip.h" |
52 #include "cphonestateutilsvoip.h" |
57 #include "cphonestateutilsvoip.h" |
53 #include "cphoneunattendedtransfercmdhandler.h" |
58 #include "cphoneunattendedtransfercmdhandler.h" |
54 #include "tphonecmdparampointer.h" |
59 #include "tphonecmdparampointer.h" |
55 #include "cphonenewcallcmdhandler.h" |
60 #include "cphonenewcallcmdhandler.h" |
|
61 #include "cphonevcchandler.h" |
56 #include "cphonecallforwardqueryhandler.h" |
62 #include "cphonecallforwardqueryhandler.h" |
57 #include "cphonekeys.h" |
63 #include "cphonekeys.h" |
|
64 #include "phoneui.hrh" |
58 |
65 |
59 // CONSTANTS |
66 // CONSTANTS |
60 const TInt KMaxLengthForSIPURIFirstLine = 15; |
67 const TInt KMaxLengthForSIPURIFirstLine = 15; |
61 const TInt KMaxLengthForSIPURITwoLines = 30; |
68 const TInt KMaxLengthForSIPURITwoLines = 30; |
62 const TInt KMaxLengthForSIPURI = 256; |
69 const TInt KMaxLengthForSIPURI = 256; |
122 iTransferCmdHandler = CPhoneUnattendedTransferCmdHandler::NewL( |
130 iTransferCmdHandler = CPhoneUnattendedTransferCmdHandler::NewL( |
123 iStateMachine, iViewCommandHandle ); |
131 iStateMachine, iViewCommandHandle ); |
124 |
132 |
125 iNewCallCmdHandler = CPhoneNewCallCmdHandler::NewL( |
133 iNewCallCmdHandler = CPhoneNewCallCmdHandler::NewL( |
126 iStateMachine, iViewCommandHandle ); |
134 iStateMachine, iViewCommandHandle ); |
127 |
135 |
|
136 if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) ) |
|
137 { |
|
138 iVccHandler = CPhoneVccHandler::NewL( iStateMachine, iViewCommandHandle ); |
|
139 } |
|
140 |
128 iCallForwardHandler = CPhoneCallForwardQueryHandler::NewL( |
141 iCallForwardHandler = CPhoneCallForwardQueryHandler::NewL( |
129 iStateMachine, iViewCommandHandle ); |
142 iStateMachine, iViewCommandHandle ); |
130 } |
143 } |
131 |
144 |
132 |
145 |
186 |
199 |
187 // Menu items to array |
200 // Menu items to array |
188 TInt menuItemCount = menuPane->NumberOfItemsInPane(); |
201 TInt menuItemCount = menuPane->NumberOfItemsInPane(); |
189 for ( TInt i( 0 ); i < menuItemCount; i++ ) |
202 for ( TInt i( 0 ); i < menuItemCount; i++ ) |
190 { |
203 { |
191 menuItemArray.AppendL( menuPane->MenuItemCommandId( i ) ); |
204 menuItemArray.Append( menuPane->MenuItemCommandId( i ) ); |
192 } |
205 } |
193 |
206 |
194 // Menu items to be deleted |
207 // Menu items to be deleted |
195 for ( TInt i( 0 ); i < menuItemArray.Count(); i++ ) |
208 for ( TInt i( 0 ); i < menuItemArray.Count(); i++ ) |
196 { |
209 { |
197 switch( menuItemArray[ i ] ) |
210 switch( menuItemArray[ i ] ) |
198 { |
211 { |
199 case EPhoneDialerCmdTouchInput: |
212 case EPhoneDialerCmdTouchInput: |
200 { |
213 { |
201 if ( !AllowAlphaNumericMode() ) |
214 if ( !VoIPSupportedL() || iStateMachine.SecurityMode()->IsSecurityMode() ) |
202 { |
215 { |
203 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
216 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
204 } |
217 } |
205 break; |
218 break; |
206 } |
219 } |
279 // placed as a first line and CNAP-field is placed as a second line. |
292 // placed as a first line and CNAP-field is placed as a second line. |
280 // ----------------------------------------------------------- |
293 // ----------------------------------------------------------- |
281 // |
294 // |
282 void CPhoneCustomizationVoip::ModifyCallHeaderTexts( TInt aCallId, |
295 void CPhoneCustomizationVoip::ModifyCallHeaderTexts( TInt aCallId, |
283 TPhoneCmdParamCallHeaderData* aCommandParam, |
296 TPhoneCmdParamCallHeaderData* aCommandParam, |
284 const TDesC& aInCallNumberText ) |
297 const TDesC& /*aInCallNumberText*/ ) |
285 { |
298 { |
286 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
299 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
287 "CPhoneCustomizationVoip::ModifyCallHeaderTexts" ); |
300 "CPhoneCustomizationVoip::ModifyCallHeaderTexts" ); |
288 |
301 |
289 MPEEngineInfo& engineInfo = *iStateMachine.PhoneEngineInfo(); |
302 MPEEngineInfo& engineInfo = *iStateMachine.PhoneEngineInfo(); |
292 { |
305 { |
293 const TBool contactInfoAvailable = |
306 const TBool contactInfoAvailable = |
294 engineInfo.RemoteName( aCallId ).Length() || |
307 engineInfo.RemoteName( aCallId ).Length() || |
295 engineInfo.RemoteCompanyName( aCallId ).Length(); |
308 engineInfo.RemoteCompanyName( aCallId ).Length(); |
296 |
309 |
297 if ( !contactInfoAvailable ) |
310 if ( EPEStateRinging == aCommandParam->CallState() && |
298 { |
311 !contactInfoAvailable ) |
299 if ( EPEStateRinging == aCommandParam->CallState() ) |
312 { |
|
313 if ( KNullDesC() != engineInfo.RemotePartyName( aCallId ) ) |
300 { |
314 { |
301 if ( KNullDesC() != engineInfo.RemotePartyName( aCallId ) ) |
315 // Telephone UI specification, 4.2.1 Call identification: |
302 { |
316 // display name is used as the CLI if available. |
303 // Telephone UI specification, 4.2.1 Call identification: |
317 aCommandParam->SetCLIText( |
304 // display name is used as the CLI if available. |
318 engineInfo.RemotePartyName( aCallId ), |
305 aCommandParam->SetCLIText( |
319 CBubbleManager::ERight ); |
306 engineInfo.RemotePartyName( aCallId ), |
320 // use line reserved for CNAP to show SIP URI |
307 TPhoneCmdParamCallHeaderData::ERight ); |
321 aCommandParam->SetCNAPText( |
308 // use line reserved for CNAP to show SIP URI |
322 engineInfo.RemotePhoneNumber( aCallId ), |
309 aCommandParam->SetCNAPText( |
323 CBubbleManager::ERight ); |
310 engineInfo.RemotePhoneNumber( aCallId ), |
324 } |
311 TPhoneCmdParamCallHeaderData::ERight |
325 else if( KNullDesC() != engineInfo.RemotePhoneNumber( aCallId ) ) |
312 ); |
326 { |
313 } |
327 // Fit address to two rows if it doesnt fit to one |
314 else |
328 TBuf<KMaxLengthForSIPURI> sipURI; |
315 { |
329 TBuf<KMaxLengthForSIPURI> sipURIDomainPart; |
316 TBuf<KMaxLengthForSIPURI> sipURI; |
330 HandleURIFittingToCallBubble( |
317 TBuf<KMaxLengthForSIPURI> sipURIDomainPart; |
331 aCommandParam->CLIText(), |
318 HandleURIFittingToCallBubble( |
332 sipURI, |
319 aCommandParam->CLIText(), |
333 sipURIDomainPart ); |
320 sipURI, |
334 |
321 sipURIDomainPart ); |
335 aCommandParam->SetCLIText( sipURI, CBubbleManager::ERight ); |
322 |
336 aCommandParam->SetCNAPText( |
323 aCommandParam->SetCLIText( sipURI, TPhoneCmdParamCallHeaderData::ERight ); |
337 sipURIDomainPart, |
324 aCommandParam->SetCNAPText( sipURIDomainPart, |
338 CBubbleManager::ERight ); |
325 TPhoneCmdParamCallHeaderData::ERight ); |
|
326 } |
|
327 } |
339 } |
328 else |
340 else |
329 { |
341 { |
330 if ( KNullDesC() == engineInfo.RemotePartyName( aCallId ) ) |
342 // No address or display name specified |
331 { |
343 // Do nothing |
332 // Display name not available, set incall number text as a |
|
333 // CLI text. Text could be 'Call 1', 'Call 2', ... |
|
334 aCommandParam->SetCLIText( aInCallNumberText, |
|
335 TPhoneCmdParamCallHeaderData::ERight ); |
|
336 aCommandParam->SetCNAPText( |
|
337 aCommandParam->CNAPText(), |
|
338 TPhoneCmdParamCallHeaderData::ERight ); |
|
339 } |
|
340 } |
344 } |
|
345 } |
|
346 else |
|
347 { |
|
348 // Change clipping direction |
|
349 aCommandParam->SetCLIText( |
|
350 aCommandParam->CLIText(), |
|
351 CBubbleManager::ERight ); |
|
352 |
|
353 // Change clipping direction |
|
354 aCommandParam->SetCNAPText( |
|
355 aCommandParam->CNAPText(), |
|
356 CBubbleManager::ERight ); |
341 } |
357 } |
342 } |
358 } |
343 } |
359 } |
344 |
360 |
345 |
361 |
369 { |
385 { |
370 iNewCallCmdHandler->HandleCommandL( aCommand ); |
386 iNewCallCmdHandler->HandleCommandL( aCommand ); |
371 handled = ETrue; |
387 handled = ETrue; |
372 } |
388 } |
373 break; |
389 break; |
|
390 case EPhoneCmdUnattendedTransferCallBackCancel: |
|
391 if ( NeedToRestoreKeyLock() ) |
|
392 { |
|
393 SetKeyLockEnabledL( ETrue ); |
|
394 SetNeedToRestoreKeyLock( EFalse ); |
|
395 } |
|
396 // intended fall-through |
374 case EPhoneInCallCmdUnattendedTransfer: |
397 case EPhoneInCallCmdUnattendedTransfer: |
375 case EPhoneCmdTransferDialerOk: |
398 case EPhoneCmdTransferDialerOk: |
376 case EPhoneCmdTransferDialerExit: |
399 case EPhoneCmdTransferDialerExit: |
377 case EPhoneCmdTransferDialerSearch: |
400 case EPhoneCmdTransferDialerSearch: |
378 case EPhoneCmdTransferDialerContactFetch: |
401 case EPhoneCmdTransferDialerContactFetch: |
|
402 case EPhoneCmdUnattendedTransferCallBackOk: |
379 // intended fall-through |
403 // intended fall-through |
380 iTransferCmdHandler->HandleCommandL( aCommand ); |
404 iTransferCmdHandler->HandleCommandL( aCommand ); |
381 handled = ETrue; |
405 handled = ETrue; |
382 break; |
406 break; |
383 case EPhoneCmdCancelServiceEnabling: |
407 case EPhoneCmdCancelServiceEnabling: |
573 break; |
613 break; |
574 } |
614 } |
575 case MEngineMonitor::EPEMessageTransferring: |
615 case MEngineMonitor::EPEMessageTransferring: |
576 { |
616 { |
577 iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
617 iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
|
618 break; |
|
619 } |
|
620 case MEngineMonitor::EPEMessageTransferDone: |
|
621 { |
|
622 iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
578 SendGlobalInfoNoteL( EPhoneInCallTransferred ); |
623 SendGlobalInfoNoteL( EPhoneInCallTransferred ); |
579 break; |
624 break; |
580 } |
625 } |
581 case MEngineMonitor::EPEMessageRemoteForwarding: |
626 case MEngineMonitor::EPEMessageRemoteForwarding: |
582 { |
627 { |
583 SendGlobalErrorNoteL( EPhoneRemoteForwarding ); |
628 SendGlobalErrorNoteL( EPhoneRemoteForwarding ); |
584 break; |
629 break; |
585 } |
630 } |
|
631 case MEngineMonitor::EPEMessageTransferCallBackRequest: |
|
632 { |
|
633 if ( iStateMachine.State()->IsKeyLockOn() ) |
|
634 { |
|
635 SetNeedToRestoreKeyLock( ETrue ); |
|
636 SetKeyLockEnabledL( EFalse ); |
|
637 } |
|
638 iTransferCmdHandler->LaunchCallBackQueryL(); |
|
639 break; |
|
640 } |
|
641 case MEngineMonitor::EPEMessageIdle: |
|
642 { |
|
643 TPhoneCmdParamInteger activeCallCount; |
|
644 iViewCommandHandle.ExecuteCommandL( |
|
645 EPhoneViewGetCountOfActiveCalls, &activeCallCount ); |
|
646 |
|
647 if ( ENoActiveCalls == activeCallCount.Integer() |
|
648 && NeedToRestoreKeyLock() ) |
|
649 { |
|
650 SetKeyLockEnabledL( ETrue ); |
|
651 SetNeedToRestoreKeyLock( EFalse ); |
|
652 } |
|
653 break; |
|
654 } |
586 default: |
655 default: |
587 handled = EFalse; |
656 handled = EFalse; |
588 break; |
657 break; |
589 } |
658 } |
590 return handled; |
659 return handled; |
606 // ----------------------------------------------------------- |
675 // ----------------------------------------------------------- |
607 // From class MPhoneButtonCustomization. |
676 // From class MPhoneButtonCustomization. |
608 // CPhoneCustomizationVoip::CustomizeTouchPaneButtons |
677 // CPhoneCustomizationVoip::CustomizeTouchPaneButtons |
609 // ----------------------------------------------------------- |
678 // ----------------------------------------------------------- |
610 // |
679 // |
611 void CPhoneCustomizationVoip::CustomizeTouchPaneButtons() |
680 void CPhoneCustomizationVoip::CustomizeTouchPaneButtons( |
|
681 MBubbleTouchPaneInterface& aTouchPane ) |
612 { |
682 { |
613 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
683 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
614 "CPhoneCustomizationVoip::CustomizeTouchPaneButtons" ); |
684 "CPhoneCustomizationVoip::CustomizeTouchPaneButtons" ); |
615 } |
685 |
|
686 TRAPD( err, CustomizeTouchPaneUsingExtensionL( aTouchPane ) ); |
|
687 |
|
688 if ( KErrNone != err ) |
|
689 { |
|
690 // Extension plugin didn't handle touch pane dimming. |
|
691 TInt buttonCount = aTouchPane.NumberOfButtonsInPane(); |
|
692 |
|
693 for ( TInt i=0; i < buttonCount; i++ ) |
|
694 { |
|
695 TInt commandId = aTouchPane.ButtonCommandId( i ); |
|
696 |
|
697 switch ( commandId ) |
|
698 { |
|
699 case EPhoneInCallCmdCreateConference: |
|
700 case EPhoneInCallCmdJoin: |
|
701 { |
|
702 if ( !IsFeatureSupported( EFeatureConference ) ) |
|
703 { |
|
704 // Conference not supported -> set item dimmed |
|
705 aTouchPane.SetButtonDimmed( commandId, ETrue ); |
|
706 } |
|
707 break; |
|
708 } |
|
709 default: |
|
710 break; |
|
711 } // switch |
|
712 } // for |
|
713 } |
|
714 } |
|
715 |
616 |
716 |
617 // ----------------------------------------------------------- |
717 // ----------------------------------------------------------- |
618 // CPhoneCustomizationVoip::VoIPSupportedL |
718 // CPhoneCustomizationVoip::VoIPSupportedL |
619 // ----------------------------------------------------------- |
719 // ----------------------------------------------------------- |
620 // |
720 // |
631 delete serviceProviderSettings; |
731 delete serviceProviderSettings; |
632 |
732 |
633 return voipSupported; |
733 return voipSupported; |
634 } |
734 } |
635 |
735 |
|
736 // ----------------------------------------------------------- |
|
737 // CPhoneCustomizationVoip::EasyDialingEnabled |
|
738 // ----------------------------------------------------------- |
|
739 // |
|
740 TBool CPhoneCustomizationVoip::EasyDialingEnabled() |
|
741 { |
|
742 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
743 "CPhoneCustomizationVoip::EasyDialingEnabled" ); |
|
744 |
|
745 TBool easyDialingEnabled( EFalse ); |
|
746 if ( FeatureManager::FeatureSupported( KFeatureIdProductIncludesHomeScreenEasyDialing ) ) |
|
747 { |
|
748 TInt easyDialingSetting; |
|
749 TInt err = CPhoneCenRepProxy::Instance()->GetInt( |
|
750 KCRUidEasyDialSettings, |
|
751 KEasyDialing, |
|
752 easyDialingSetting); |
|
753 if ( !err && easyDialingSetting ) |
|
754 { |
|
755 easyDialingEnabled = ETrue; |
|
756 } |
|
757 } |
|
758 return easyDialingEnabled; |
|
759 } |
636 |
760 |
637 // ----------------------------------------------------------- |
761 // ----------------------------------------------------------- |
638 // CPhoneCustomizationVoip::ModifyInCallMenuL |
762 // CPhoneCustomizationVoip::ModifyInCallMenuL |
639 // ----------------------------------------------------------- |
763 // ----------------------------------------------------------- |
640 // |
764 // |
699 // ----------------------------------------------------------- |
821 // ----------------------------------------------------------- |
700 // CPhoneCustomizationVoip::InsertInternetCallMenuItemL |
822 // CPhoneCustomizationVoip::InsertInternetCallMenuItemL |
701 // ----------------------------------------------------------- |
823 // ----------------------------------------------------------- |
702 // |
824 // |
703 void CPhoneCustomizationVoip::InsertInternetCallMenuItemL( |
825 void CPhoneCustomizationVoip::InsertInternetCallMenuItemL( |
704 TInt aResourceId, CEikMenuPane& aMenuPane ) |
826 TInt /* aResourceId */, CEikMenuPane& aMenuPane ) |
705 { |
827 { |
706 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
828 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
707 "CPhoneCustomizationVoip::InsertInternetCallMenuItemL" ); |
829 "CPhoneCustomizationVoip::InsertInternetCallMenuItemL" ); |
708 |
830 |
709 // get VoIP services |
831 // get VoIP services |
727 ResolveResourceID( EPhoneVoIPCallTypeInternet ) ); |
849 ResolveResourceID( EPhoneVoIPCallTypeInternet ) ); |
728 } |
850 } |
729 |
851 |
730 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
852 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
731 |
853 |
732 if ( aResourceId == R_PHONEUI_NUMBERACQ_OPTIONS_CALL_MENU ) |
854 TInt index(KErrNotFound); |
733 { |
855 |
734 if ( !CPhoneKeys::Validate( phoneNumber->Des() ) ) |
856 // If number entry is empty don't add internet call option |
735 { |
857 if ( phoneNumber->Length() ) |
736 TInt index(KErrNotFound); |
858 { |
737 if ( aMenuPane.MenuItemExists( EPhoneNumberAcqCmdCall, index ) ) |
|
738 { |
|
739 aMenuPane.DeleteMenuItem( EPhoneNumberAcqCmdCall ); |
|
740 } |
|
741 |
|
742 if ( aMenuPane.MenuItemExists( EPhoneNumberAcqCmdVideoCall, index ) ) |
|
743 { |
|
744 aMenuPane.DeleteMenuItem( EPhoneNumberAcqCmdVideoCall ); |
|
745 } |
|
746 } |
|
747 |
|
748 aMenuPane.AddMenuItemL( voipMenuItem->iData ); |
859 aMenuPane.AddMenuItemL( voipMenuItem->iData ); |
749 } |
860 } |
750 else if ( iStateMachine.PhoneEngineInfo()->PhoneNumberIsServiceCode() ) |
|
751 { |
|
752 // When user writes string recognized as service code (eg.*#31# -> clir off) |
|
753 // call menu is not visible. Internet call must still be possible so |
|
754 // internet call option is added here to the menu. |
|
755 |
|
756 // If number entry is empty don't add internet call option |
|
757 if ( phoneNumber->Length() ) |
|
758 { |
|
759 // Internet call item must be on the top of the menu |
|
760 aMenuPane.InsertMenuItemL( voipMenuItem->iData, 0 ); |
|
761 } |
|
762 } |
|
763 |
861 |
764 CleanupStack::PopAndDestroy( 3, &voipServices ); |
862 CleanupStack::PopAndDestroy( 3, &voipServices ); |
765 } |
863 } |
766 |
864 |
767 |
865 |
768 // ----------------------------------------------------------- |
866 // ----------------------------------------------------------- |
769 // CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL |
867 // CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL |
770 // ----------------------------------------------------------- |
868 // ----------------------------------------------------------- |
771 // |
869 // |
772 void CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL( |
870 void CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL( |
773 CEikMenuPane& /*aMenuPane*/ ) |
871 CEikMenuPane& aMenuPane ) |
774 { |
872 { |
775 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
873 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
776 "CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL" ); |
874 "CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL" ); |
777 |
875 |
|
876 TInt modeChangeOptionIndex = KErrNotFound; |
|
877 if ( aMenuPane.MenuItemExists( |
|
878 EPhoneNumberAcqCmdToggleNeAlphaMode, modeChangeOptionIndex ) || |
|
879 aMenuPane.MenuItemExists( |
|
880 EPhoneNumberAcqCmdToggleNeNumericMode, modeChangeOptionIndex ) ) |
|
881 { |
|
882 __PHONELOG( EBasic, PhoneUIVoIPExtension, |
|
883 "InsertTextInputModeChangeMenuItemL, MENU ITEM ALREADY EXISTS" ); |
|
884 __ASSERT_DEBUG( EFalse, Panic( EPhoneCtrlInvariant ) ); |
|
885 } |
|
886 |
|
887 CEikMenuPaneItem* menuItem = NULL; |
|
888 TBool numberEntryInNumericMode = iViewCommandHandle.HandleCommandL( |
|
889 EPhoneViewIsNumberEntryNumericMode ) == EPhoneViewResponseSuccess; |
|
890 if ( numberEntryInNumericMode ) |
|
891 { |
|
892 menuItem = CreateMenuPaneItemLC( |
|
893 EPhoneNumberAcqCmdToggleNeAlphaMode, |
|
894 R_PHONEUI_NUMBERACQ_OPTIONS_MENU_ITEM_ALPHA_MODE ); |
|
895 } |
|
896 else |
|
897 { |
|
898 menuItem = CreateMenuPaneItemLC( |
|
899 EPhoneNumberAcqCmdToggleNeNumericMode, |
|
900 R_PHONEUI_NUMBERACQ_OPTIONS_MENU_ITEM_NUMERIC_MODE ); |
|
901 } |
|
902 |
|
903 // alpha/numeric mode option is always second item in number entry menu |
|
904 const TInt KTextInputModeChangeMenuItemIndex = 1; |
|
905 aMenuPane.InsertMenuItemL( |
|
906 menuItem->iData, KTextInputModeChangeMenuItemIndex ); |
|
907 CleanupStack::PopAndDestroy( menuItem ); |
778 } |
908 } |
779 |
909 |
780 |
910 |
781 // ----------------------------------------------------------- |
911 // ----------------------------------------------------------- |
782 // CPhoneCustomizationVoip::GetActiveCallArrayL |
912 // CPhoneCustomizationVoip::GetActiveCallArrayL |
1008 for( TInt i = 0; i < array.Count(); i++ ) |
1138 for( TInt i = 0; i < array.Count(); i++ ) |
1009 { |
1139 { |
1010 if( array[i].iCallState == CTelMenuExtension::EOutgoing || |
1140 if( array[i].iCallState == CTelMenuExtension::EOutgoing || |
1011 array[i].iCallState == CTelMenuExtension::EActive || |
1141 array[i].iCallState == CTelMenuExtension::EActive || |
1012 array[i].iCallState == CTelMenuExtension::EOnHold ) |
1142 array[i].iCallState == CTelMenuExtension::EOnHold ) |
1013 { |
1143 { |
|
1144 if( aFeature == EFeatureTransfer && |
|
1145 array[i].iCallState == CTelMenuExtension::EOutgoing && |
|
1146 array[i].iCallType == CTelMenuExtension::EPsVoice ) |
|
1147 { |
|
1148 // If there is outgoing VoIP call then transfer is not supported |
|
1149 supported = EFalse; |
|
1150 break; |
|
1151 } |
|
1152 |
1014 if( firstCallType == CTelMenuExtension::EUninitialized ) |
1153 if( firstCallType == CTelMenuExtension::EUninitialized ) |
1015 { |
1154 { |
1016 // Memorize first found call type |
1155 // Memorize first found call type |
1017 firstCallType = array[i].iCallType; |
1156 firstCallType = array[i].iCallType; |
1018 } |
1157 } |
1029 CleanupStack::PopAndDestroy( &array ); |
1168 CleanupStack::PopAndDestroy( &array ); |
1030 |
1169 |
1031 return supported; |
1170 return supported; |
1032 } |
1171 } |
1033 |
1172 |
|
1173 |
|
1174 // ----------------------------------------------------------- |
|
1175 // CPhoneCustomizationVoip::CustomizeTouchPaneUsingExtensionL |
|
1176 // ----------------------------------------------------------- |
|
1177 // |
|
1178 void CPhoneCustomizationVoip::CustomizeTouchPaneUsingExtensionL( |
|
1179 MBubbleTouchPaneInterface& aTouchPane ) |
|
1180 { |
|
1181 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
1182 "CPhoneCustomizationVoip::CustomizeTouchPaneUsingExtensionL" ); |
|
1183 |
|
1184 RArray<CTelMenuExtension::TCallInfo> array; |
|
1185 CleanupClosePushL( array ); |
|
1186 |
|
1187 GetActiveCallArrayL( array ); |
|
1188 |
|
1189 // Use extensions for touch pane buttons dimming |
|
1190 iExtensionHandler->CustomizeTouchPaneButtonsL( |
|
1191 ServiceIdForActivestCallL( array ), |
|
1192 array, |
|
1193 aTouchPane ); |
|
1194 |
|
1195 __PHONELOG( EBasic, PhoneUIVoIPExtension, |
|
1196 "CPhoneCustomizationVoip::ModifyInCallMenuL() plugin exists" ); |
|
1197 |
|
1198 CleanupStack::PopAndDestroy( &array ); |
|
1199 } |
|
1200 |
|
1201 |
1034 // ----------------------------------------------------------- |
1202 // ----------------------------------------------------------- |
1035 // CPhoneCustomizationVoip::LaunchEnablingServiceNoteL |
1203 // CPhoneCustomizationVoip::LaunchEnablingServiceNoteL |
1036 // ----------------------------------------------------------- |
1204 // ----------------------------------------------------------- |
1037 // |
1205 // |
1038 void CPhoneCustomizationVoip::LaunchEnablingServiceNoteL() |
1206 void CPhoneCustomizationVoip::LaunchEnablingServiceNoteL() |
1060 EPhoneVoIPEnablingServiceWaitNoteText ), serviceName ) ); |
1228 EPhoneVoIPEnablingServiceWaitNoteText ), serviceName ) ); |
1061 |
1229 |
1062 queryParam.SetDataText( ¬eText ); |
1230 queryParam.SetDataText( ¬eText ); |
1063 queryParam.SetDefaultCba( R_AVKON_SOFTKEYS_CANCEL ); |
1231 queryParam.SetDefaultCba( R_AVKON_SOFTKEYS_CANCEL ); |
1064 |
1232 |
1065 const TInt KEnableServiceTimeOutInMilliSecs = 60000; |
1233 const TInt KEnableServiceTimeOutInSecs = 60; |
1066 queryParam.SetTimeOut( KEnableServiceTimeOutInMilliSecs ); |
1234 queryParam.SetTimeOut( KEnableServiceTimeOutInSecs ); |
1067 |
|
1068 // configure custom command mappings for user responses |
1235 // configure custom command mappings for user responses |
1069 queryParam.SetCbaCommandMapping( |
1236 queryParam.SetCbaCommandMapping( |
1070 EAknSoftkeyCancel, EPhoneCmdCancelServiceEnabling ); |
1237 EAknSoftkeyCancel, EPhoneCmdCancelServiceEnabling ); |
1071 queryParam.SetCbaCommandMapping( |
1238 queryParam.SetCbaCommandMapping( |
1072 KErrCancel, EPhoneCmdCancelServiceEnabling ); |
1239 KErrCancel, EPhoneCmdCancelServiceEnabling ); |
1087 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1254 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1088 "CPhoneCustomizationVoip::SendGlobalErrorNoteL" ); |
1255 "CPhoneCustomizationVoip::SendGlobalErrorNoteL" ); |
1089 |
1256 |
1090 __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
1257 __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
1091 |
1258 |
1092 CPhoneState* phoneState = |
1259 CPhoneState* phoneState = |
1093 static_cast< CPhoneState* >( iStateMachine.State() ); |
1260 static_cast< CPhoneState* >( iStateMachine.State() ); |
1094 |
1261 |
1095 phoneState->SendGlobalErrorNoteL( aResourceId ); |
1262 phoneState->SendGlobalErrorNoteL( aResourceId ); |
1096 } |
1263 } |
1097 |
1264 |
1098 |
1265 |
1099 // --------------------------------------------------------- |
1266 // --------------------------------------------------------- |
1100 // CPhoneCustomizationVoip::SendGlobalInfoNoteL |
1267 // CPhoneCustomizationVoip::SendGlobalInfoNoteL |
1264 |
1431 |
1265 // ----------------------------------------------------------- |
1432 // ----------------------------------------------------------- |
1266 // CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL |
1433 // CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL |
1267 // ----------------------------------------------------------- |
1434 // ----------------------------------------------------------- |
1268 // |
1435 // |
1269 void CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL( TInt /*aResourceId*/, |
1436 void CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL( TInt aResourceId, |
1270 CEikMenuPane& /*aMenuPane*/ ) |
1437 CEikMenuPane& aMenuPane ) |
1271 { |
1438 { |
1272 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1439 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1273 "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" ); |
1440 "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" ); |
1274 } |
1441 |
1275 |
1442 // Menu items to be added |
|
1443 if ( iVccHandler && VoIPSupportedL() && |
|
1444 ( aResourceId == R_PHONEUI_CALLHANDLING_INCALL_OPTIONS_MENU || |
|
1445 aResourceId == R_PHONEUI_CALLWAITING_OPTIONS_MENU || |
|
1446 aResourceId == R_PHONEUI_ACTIVEANDHELDCALL_OPTIONS_MENU || |
|
1447 aResourceId == R_PHONEUI_ACTIVEANDHELDCONFCALL_OPTIONS_MENU || |
|
1448 aResourceId == R_PHONEUI_CALLACTIVEHELDANDWAITING_OPTIONS_MENU |
|
1449 )) |
|
1450 { |
|
1451 RArray<CTelMenuExtension::TCallInfo> array; |
|
1452 CleanupClosePushL( array ); |
|
1453 GetActiveCallArrayL( array ); |
|
1454 |
|
1455 iVccHandler->AddHandoverMenuItemL( array, aResourceId, aMenuPane ); |
|
1456 CleanupStack::PopAndDestroy( &array ); |
|
1457 } |
|
1458 } |
|
1459 |
|
1460 |
1276 // ----------------------------------------------------------- |
1461 // ----------------------------------------------------------- |
1277 // CPhoneCustomizationVoip::GetVoIPServiceIdsL |
1462 // CPhoneCustomizationVoip::GetVoIPServiceIdsL |
1278 // ----------------------------------------------------------- |
1463 // ----------------------------------------------------------- |
1279 // |
1464 // |
1280 void CPhoneCustomizationVoip::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const |
1465 void CPhoneCustomizationVoip::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const |
1354 &stringParam ); |
1540 &stringParam ); |
1355 |
1541 |
1356 return phoneNumber; |
1542 return phoneNumber; |
1357 } |
1543 } |
1358 |
1544 |
|
1545 // --------------------------------------------------------------------------- |
|
1546 // CPhoneCustomizationVoip::SetKeyLockEnabledL |
|
1547 // --------------------------------------------------------------------------- |
|
1548 // |
|
1549 void CPhoneCustomizationVoip::SetKeyLockEnabledL( TBool aEnabled ) |
|
1550 { |
|
1551 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
1552 "CPhoneCustomizationVoip::CPhoneCustomizationVoip::SetKeyLockEnabledL" ); |
|
1553 if ( aEnabled ) |
|
1554 { |
|
1555 iViewCommandHandle.ExecuteCommandL( |
|
1556 EPhoneViewEnableKeyLock ); |
|
1557 } |
|
1558 else |
|
1559 { |
|
1560 iViewCommandHandle.ExecuteCommandL( |
|
1561 EPhoneViewDisableKeyLockWithoutNote ); |
|
1562 } |
|
1563 } |
|
1564 |
|
1565 // --------------------------------------------------------------------------- |
|
1566 // CPhoneCustomizationVoip::SetNeedToRestoreKeyLock |
|
1567 // --------------------------------------------------------------------------- |
|
1568 // |
|
1569 void CPhoneCustomizationVoip::SetNeedToRestoreKeyLock( TBool aRestore ) |
|
1570 { |
|
1571 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
1572 "CPhoneCustomizationVoip::CPhoneCustomizationVoip::SetNeedToRestoreKeyLock" ); |
|
1573 __PHONELOG1( EBasic, PhoneUIVoIPExtension, |
|
1574 "CPhoneCustomizationVoip::AwrNeedToRestoreKeyLock:%d", aRestore ); |
|
1575 iNeedToRestoreKeyLock = aRestore; |
|
1576 } |
|
1577 |
|
1578 // ----------------------------------------------------------- |
|
1579 // CPhoneCustomizationVoip::NeedToRestoreKeyLock |
|
1580 // ----------------------------------------------------------- |
|
1581 // |
|
1582 TBool CPhoneCustomizationVoip::NeedToRestoreKeyLock() const |
|
1583 { |
|
1584 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
|
1585 "CPhoneCustomizationVoip::CPhoneCustomizationVoip::NeedToRestoreKeyLock" ); |
|
1586 __PHONELOG1( EBasic, PhoneUIVoIPExtension, |
|
1587 "CPhoneCustomizationVoip::NeedToRestoreKeyLock:%d", iNeedToRestoreKeyLock ); |
|
1588 return iNeedToRestoreKeyLock; |
|
1589 } |
|
1590 |
1359 // End of File |
1591 // End of File |