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 <bmbubblemanager.h> |
25 #include "phoneresourceids.h" |
26 #include <phoneui.rsg> |
|
27 #include <avkon.rsg> |
26 #include <avkon.rsg> |
28 #include <phoneuivoip.rsg> |
|
29 #include <StringLoader.h> |
27 #include <StringLoader.h> |
30 #include <featmgr.h> |
28 #include <featmgr.h> |
31 #include <centralrepository.h> |
|
32 #include <easydialingcrkeys.h> |
|
33 |
29 |
34 #include "cphonecustomizationvoip.h" |
30 #include "cphonecustomizationvoip.h" |
35 #include "tphonecmdparaminteger.h" |
31 #include "tphonecmdparaminteger.h" |
36 #include "tphonecmdparamboolean.h" |
32 #include "tphonecmdparamboolean.h" |
37 #include "tphonecmdparamstring.h" |
33 #include "tphonecmdparamstring.h" |
38 #include "cphonemainresourceresolver.h" |
34 #include "cphonemainresourceresolver.h" |
39 #include "mphonestatemachine.h" |
35 #include "mphonestatemachine.h" |
40 #include "mphonesecuritymodeobserver.h" |
|
41 #include "cphonelogger.h" |
36 #include "cphonelogger.h" |
42 #include "cphonecenrepproxy.h" |
37 #include "cphonecenrepproxy.h" |
43 #include "phoneui.pan" |
38 #include "phoneui.pan" |
44 #include "mphoneviewcommandhandle.h" |
39 #include "mphoneviewcommandhandle.h" |
45 #include "tphonecmdparamdynmenu.h" |
40 #include "tphonecmdparamdynmenu.h" |
56 #include "cphoneviewcustomizationvoip.h" |
51 #include "cphoneviewcustomizationvoip.h" |
57 #include "cphonestateutilsvoip.h" |
52 #include "cphonestateutilsvoip.h" |
58 #include "cphoneunattendedtransfercmdhandler.h" |
53 #include "cphoneunattendedtransfercmdhandler.h" |
59 #include "tphonecmdparampointer.h" |
54 #include "tphonecmdparampointer.h" |
60 #include "cphonenewcallcmdhandler.h" |
55 #include "cphonenewcallcmdhandler.h" |
61 #include "cphonevcchandler.h" |
|
62 #include "cphonecallforwardqueryhandler.h" |
56 #include "cphonecallforwardqueryhandler.h" |
63 #include "cphonekeys.h" |
57 #include "cphonekeys.h" |
64 #include "phoneui.hrh" |
|
65 |
58 |
66 // CONSTANTS |
59 // CONSTANTS |
67 const TInt KMaxLengthForSIPURIFirstLine = 15; |
60 const TInt KMaxLengthForSIPURIFirstLine = 15; |
68 const TInt KMaxLengthForSIPURITwoLines = 30; |
61 const TInt KMaxLengthForSIPURITwoLines = 30; |
69 const TInt KMaxLengthForSIPURI = 256; |
62 const TInt KMaxLengthForSIPURI = 256; |
130 iTransferCmdHandler = CPhoneUnattendedTransferCmdHandler::NewL( |
122 iTransferCmdHandler = CPhoneUnattendedTransferCmdHandler::NewL( |
131 iStateMachine, iViewCommandHandle ); |
123 iStateMachine, iViewCommandHandle ); |
132 |
124 |
133 iNewCallCmdHandler = CPhoneNewCallCmdHandler::NewL( |
125 iNewCallCmdHandler = CPhoneNewCallCmdHandler::NewL( |
134 iStateMachine, iViewCommandHandle ); |
126 iStateMachine, iViewCommandHandle ); |
135 |
127 |
136 if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) ) |
|
137 { |
|
138 iVccHandler = CPhoneVccHandler::NewL( iStateMachine, iViewCommandHandle ); |
|
139 } |
|
140 |
|
141 iCallForwardHandler = CPhoneCallForwardQueryHandler::NewL( |
128 iCallForwardHandler = CPhoneCallForwardQueryHandler::NewL( |
142 iStateMachine, iViewCommandHandle ); |
129 iStateMachine, iViewCommandHandle ); |
143 } |
130 } |
144 |
131 |
145 |
132 |
199 |
186 |
200 // Menu items to array |
187 // Menu items to array |
201 TInt menuItemCount = menuPane->NumberOfItemsInPane(); |
188 TInt menuItemCount = menuPane->NumberOfItemsInPane(); |
202 for ( TInt i( 0 ); i < menuItemCount; i++ ) |
189 for ( TInt i( 0 ); i < menuItemCount; i++ ) |
203 { |
190 { |
204 menuItemArray.Append( menuPane->MenuItemCommandId( i ) ); |
191 menuItemArray.AppendL( menuPane->MenuItemCommandId( i ) ); |
205 } |
192 } |
206 |
193 |
207 // Menu items to be deleted |
194 // Menu items to be deleted |
208 for ( TInt i( 0 ); i < menuItemArray.Count(); i++ ) |
195 for ( TInt i( 0 ); i < menuItemArray.Count(); i++ ) |
209 { |
196 { |
210 switch( menuItemArray[ i ] ) |
197 switch( menuItemArray[ i ] ) |
211 { |
198 { |
212 case EPhoneDialerCmdTouchInput: |
199 case EPhoneDialerCmdTouchInput: |
213 { |
200 { |
214 if ( !VoIPSupportedL() || iStateMachine.SecurityMode()->IsSecurityMode() ) |
201 if ( !AllowAlphaNumericMode() ) |
215 { |
202 { |
216 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
203 menuPane->DeleteMenuItem( menuItemArray[ i ] ); |
217 } |
204 } |
218 break; |
205 break; |
219 } |
206 } |
292 // placed as a first line and CNAP-field is placed as a second line. |
279 // placed as a first line and CNAP-field is placed as a second line. |
293 // ----------------------------------------------------------- |
280 // ----------------------------------------------------------- |
294 // |
281 // |
295 void CPhoneCustomizationVoip::ModifyCallHeaderTexts( TInt aCallId, |
282 void CPhoneCustomizationVoip::ModifyCallHeaderTexts( TInt aCallId, |
296 TPhoneCmdParamCallHeaderData* aCommandParam, |
283 TPhoneCmdParamCallHeaderData* aCommandParam, |
297 const TDesC& /*aInCallNumberText*/ ) |
284 const TDesC& aInCallNumberText ) |
298 { |
285 { |
299 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
286 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
300 "CPhoneCustomizationVoip::ModifyCallHeaderTexts" ); |
287 "CPhoneCustomizationVoip::ModifyCallHeaderTexts" ); |
301 |
288 |
302 MPEEngineInfo& engineInfo = *iStateMachine.PhoneEngineInfo(); |
289 MPEEngineInfo& engineInfo = *iStateMachine.PhoneEngineInfo(); |
305 { |
292 { |
306 const TBool contactInfoAvailable = |
293 const TBool contactInfoAvailable = |
307 engineInfo.RemoteName( aCallId ).Length() || |
294 engineInfo.RemoteName( aCallId ).Length() || |
308 engineInfo.RemoteCompanyName( aCallId ).Length(); |
295 engineInfo.RemoteCompanyName( aCallId ).Length(); |
309 |
296 |
310 if ( EPEStateRinging == aCommandParam->CallState() && |
297 if ( !contactInfoAvailable ) |
311 !contactInfoAvailable ) |
298 { |
312 { |
299 if ( EPEStateRinging == aCommandParam->CallState() ) |
313 if ( KNullDesC() != engineInfo.RemotePartyName( aCallId ) ) |
|
314 { |
300 { |
315 // Telephone UI specification, 4.2.1 Call identification: |
301 if ( KNullDesC() != engineInfo.RemotePartyName( aCallId ) ) |
316 // display name is used as the CLI if available. |
302 { |
317 aCommandParam->SetCLIText( |
303 // Telephone UI specification, 4.2.1 Call identification: |
318 engineInfo.RemotePartyName( aCallId ), |
304 // display name is used as the CLI if available. |
319 CBubbleManager::ERight ); |
305 aCommandParam->SetCLIText( |
320 // use line reserved for CNAP to show SIP URI |
306 engineInfo.RemotePartyName( aCallId ), |
321 aCommandParam->SetCNAPText( |
307 TPhoneCmdParamCallHeaderData::ERight ); |
322 engineInfo.RemotePhoneNumber( aCallId ), |
308 // use line reserved for CNAP to show SIP URI |
323 CBubbleManager::ERight ); |
309 aCommandParam->SetCNAPText( |
324 } |
310 engineInfo.RemotePhoneNumber( aCallId ), |
325 else if( KNullDesC() != engineInfo.RemotePhoneNumber( aCallId ) ) |
311 TPhoneCmdParamCallHeaderData::ERight |
326 { |
312 ); |
327 // Fit address to two rows if it doesnt fit to one |
313 } |
328 TBuf<KMaxLengthForSIPURI> sipURI; |
314 else |
329 TBuf<KMaxLengthForSIPURI> sipURIDomainPart; |
315 { |
330 HandleURIFittingToCallBubble( |
316 TBuf<KMaxLengthForSIPURI> sipURI; |
331 aCommandParam->CLIText(), |
317 TBuf<KMaxLengthForSIPURI> sipURIDomainPart; |
332 sipURI, |
318 HandleURIFittingToCallBubble( |
333 sipURIDomainPart ); |
319 aCommandParam->CLIText(), |
334 |
320 sipURI, |
335 aCommandParam->SetCLIText( sipURI, CBubbleManager::ERight ); |
321 sipURIDomainPart ); |
336 aCommandParam->SetCNAPText( |
322 |
337 sipURIDomainPart, |
323 aCommandParam->SetCLIText( sipURI, TPhoneCmdParamCallHeaderData::ERight ); |
338 CBubbleManager::ERight ); |
324 aCommandParam->SetCNAPText( sipURIDomainPart, |
|
325 TPhoneCmdParamCallHeaderData::ERight ); |
|
326 } |
339 } |
327 } |
340 else |
328 else |
341 { |
329 { |
342 // No address or display name specified |
330 if ( KNullDesC() == engineInfo.RemotePartyName( aCallId ) ) |
343 // Do nothing |
331 { |
|
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 } |
344 } |
340 } |
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 ); |
|
357 } |
341 } |
358 } |
342 } |
359 } |
343 } |
360 |
344 |
361 |
345 |
385 { |
369 { |
386 iNewCallCmdHandler->HandleCommandL( aCommand ); |
370 iNewCallCmdHandler->HandleCommandL( aCommand ); |
387 handled = ETrue; |
371 handled = ETrue; |
388 } |
372 } |
389 break; |
373 break; |
390 case EPhoneCmdUnattendedTransferCallBackCancel: |
|
391 if ( NeedToRestoreKeyLock() ) |
|
392 { |
|
393 SetKeyLockEnabledL( ETrue ); |
|
394 SetNeedToRestoreKeyLock( EFalse ); |
|
395 } |
|
396 // intended fall-through |
|
397 case EPhoneInCallCmdUnattendedTransfer: |
374 case EPhoneInCallCmdUnattendedTransfer: |
398 case EPhoneCmdTransferDialerOk: |
375 case EPhoneCmdTransferDialerOk: |
399 case EPhoneCmdTransferDialerExit: |
376 case EPhoneCmdTransferDialerExit: |
400 case EPhoneCmdTransferDialerSearch: |
377 case EPhoneCmdTransferDialerSearch: |
401 case EPhoneCmdTransferDialerContactFetch: |
378 case EPhoneCmdTransferDialerContactFetch: |
402 case EPhoneCmdUnattendedTransferCallBackOk: |
|
403 // intended fall-through |
379 // intended fall-through |
404 iTransferCmdHandler->HandleCommandL( aCommand ); |
380 iTransferCmdHandler->HandleCommandL( aCommand ); |
405 handled = ETrue; |
381 handled = ETrue; |
406 break; |
382 break; |
407 case EPhoneCmdCancelServiceEnabling: |
383 case EPhoneCmdCancelServiceEnabling: |
613 break; |
573 break; |
614 } |
574 } |
615 case MEngineMonitor::EPEMessageTransferring: |
575 case MEngineMonitor::EPEMessageTransferring: |
616 { |
576 { |
617 iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
577 iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
618 break; |
|
619 } |
|
620 case MEngineMonitor::EPEMessageTransferDone: |
|
621 { |
|
622 iViewCommandHandle.ExecuteCommandL( EPhoneViewRemoveGlobalNote ); |
|
623 SendGlobalInfoNoteL( EPhoneInCallTransferred ); |
578 SendGlobalInfoNoteL( EPhoneInCallTransferred ); |
624 break; |
579 break; |
625 } |
580 } |
626 case MEngineMonitor::EPEMessageRemoteForwarding: |
581 case MEngineMonitor::EPEMessageRemoteForwarding: |
627 { |
582 { |
628 SendGlobalErrorNoteL( EPhoneRemoteForwarding ); |
583 SendGlobalErrorNoteL( EPhoneRemoteForwarding ); |
629 break; |
584 break; |
630 } |
585 } |
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 } |
|
655 default: |
586 default: |
656 handled = EFalse; |
587 handled = EFalse; |
657 break; |
588 break; |
658 } |
589 } |
659 return handled; |
590 return handled; |
675 // ----------------------------------------------------------- |
606 // ----------------------------------------------------------- |
676 // From class MPhoneButtonCustomization. |
607 // From class MPhoneButtonCustomization. |
677 // CPhoneCustomizationVoip::CustomizeTouchPaneButtons |
608 // CPhoneCustomizationVoip::CustomizeTouchPaneButtons |
678 // ----------------------------------------------------------- |
609 // ----------------------------------------------------------- |
679 // |
610 // |
680 void CPhoneCustomizationVoip::CustomizeTouchPaneButtons( |
611 void CPhoneCustomizationVoip::CustomizeTouchPaneButtons() |
681 MBubbleTouchPaneInterface& aTouchPane ) |
|
682 { |
612 { |
683 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
613 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
684 "CPhoneCustomizationVoip::CustomizeTouchPaneButtons" ); |
614 "CPhoneCustomizationVoip::CustomizeTouchPaneButtons" ); |
685 |
615 } |
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 |
|
716 |
616 |
717 // ----------------------------------------------------------- |
617 // ----------------------------------------------------------- |
718 // CPhoneCustomizationVoip::VoIPSupportedL |
618 // CPhoneCustomizationVoip::VoIPSupportedL |
719 // ----------------------------------------------------------- |
619 // ----------------------------------------------------------- |
720 // |
620 // |
731 delete serviceProviderSettings; |
631 delete serviceProviderSettings; |
732 |
632 |
733 return voipSupported; |
633 return voipSupported; |
734 } |
634 } |
735 |
635 |
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 } |
|
760 |
636 |
761 // ----------------------------------------------------------- |
637 // ----------------------------------------------------------- |
762 // CPhoneCustomizationVoip::ModifyInCallMenuL |
638 // CPhoneCustomizationVoip::ModifyInCallMenuL |
763 // ----------------------------------------------------------- |
639 // ----------------------------------------------------------- |
764 // |
640 // |
821 // ----------------------------------------------------------- |
699 // ----------------------------------------------------------- |
822 // CPhoneCustomizationVoip::InsertInternetCallMenuItemL |
700 // CPhoneCustomizationVoip::InsertInternetCallMenuItemL |
823 // ----------------------------------------------------------- |
701 // ----------------------------------------------------------- |
824 // |
702 // |
825 void CPhoneCustomizationVoip::InsertInternetCallMenuItemL( |
703 void CPhoneCustomizationVoip::InsertInternetCallMenuItemL( |
826 TInt /* aResourceId */, CEikMenuPane& aMenuPane ) |
704 TInt aResourceId, CEikMenuPane& aMenuPane ) |
827 { |
705 { |
828 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
706 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
829 "CPhoneCustomizationVoip::InsertInternetCallMenuItemL" ); |
707 "CPhoneCustomizationVoip::InsertInternetCallMenuItemL" ); |
830 |
708 |
831 // get VoIP services |
709 // get VoIP services |
849 ResolveResourceID( EPhoneVoIPCallTypeInternet ) ); |
727 ResolveResourceID( EPhoneVoIPCallTypeInternet ) ); |
850 } |
728 } |
851 |
729 |
852 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
730 HBufC* phoneNumber = PhoneNumberFromEntryLC(); |
853 |
731 |
854 TInt index(KErrNotFound); |
732 if ( aResourceId == R_PHONEUI_NUMBERACQ_OPTIONS_CALL_MENU ) |
855 |
733 { |
856 // If number entry is empty don't add internet call option |
734 if ( !CPhoneKeys::Validate( phoneNumber->Des() ) ) |
857 if ( phoneNumber->Length() ) |
735 { |
858 { |
736 TInt index(KErrNotFound); |
|
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 |
859 aMenuPane.AddMenuItemL( voipMenuItem->iData ); |
748 aMenuPane.AddMenuItemL( voipMenuItem->iData ); |
860 } |
749 } |
|
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 } |
861 |
763 |
862 CleanupStack::PopAndDestroy( 3, &voipServices ); |
764 CleanupStack::PopAndDestroy( 3, &voipServices ); |
863 } |
765 } |
864 |
766 |
865 |
767 |
866 // ----------------------------------------------------------- |
768 // ----------------------------------------------------------- |
867 // CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL |
769 // CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL |
868 // ----------------------------------------------------------- |
770 // ----------------------------------------------------------- |
869 // |
771 // |
870 void CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL( |
772 void CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL( |
871 CEikMenuPane& aMenuPane ) |
773 CEikMenuPane& /*aMenuPane*/ ) |
872 { |
774 { |
873 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
775 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
874 "CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL" ); |
776 "CPhoneCustomizationVoip::InsertTextInputModeChangeMenuItemL" ); |
875 |
777 |
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 ); |
|
908 } |
778 } |
909 |
779 |
910 |
780 |
911 // ----------------------------------------------------------- |
781 // ----------------------------------------------------------- |
912 // CPhoneCustomizationVoip::GetActiveCallArrayL |
782 // CPhoneCustomizationVoip::GetActiveCallArrayL |
1138 for( TInt i = 0; i < array.Count(); i++ ) |
1008 for( TInt i = 0; i < array.Count(); i++ ) |
1139 { |
1009 { |
1140 if( array[i].iCallState == CTelMenuExtension::EOutgoing || |
1010 if( array[i].iCallState == CTelMenuExtension::EOutgoing || |
1141 array[i].iCallState == CTelMenuExtension::EActive || |
1011 array[i].iCallState == CTelMenuExtension::EActive || |
1142 array[i].iCallState == CTelMenuExtension::EOnHold ) |
1012 array[i].iCallState == CTelMenuExtension::EOnHold ) |
1143 { |
1013 { |
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 |
|
1153 if( firstCallType == CTelMenuExtension::EUninitialized ) |
1014 if( firstCallType == CTelMenuExtension::EUninitialized ) |
1154 { |
1015 { |
1155 // Memorize first found call type |
1016 // Memorize first found call type |
1156 firstCallType = array[i].iCallType; |
1017 firstCallType = array[i].iCallType; |
1157 } |
1018 } |
1168 CleanupStack::PopAndDestroy( &array ); |
1029 CleanupStack::PopAndDestroy( &array ); |
1169 |
1030 |
1170 return supported; |
1031 return supported; |
1171 } |
1032 } |
1172 |
1033 |
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 |
|
1202 // ----------------------------------------------------------- |
1034 // ----------------------------------------------------------- |
1203 // CPhoneCustomizationVoip::LaunchEnablingServiceNoteL |
1035 // CPhoneCustomizationVoip::LaunchEnablingServiceNoteL |
1204 // ----------------------------------------------------------- |
1036 // ----------------------------------------------------------- |
1205 // |
1037 // |
1206 void CPhoneCustomizationVoip::LaunchEnablingServiceNoteL() |
1038 void CPhoneCustomizationVoip::LaunchEnablingServiceNoteL() |
1228 EPhoneVoIPEnablingServiceWaitNoteText ), serviceName ) ); |
1060 EPhoneVoIPEnablingServiceWaitNoteText ), serviceName ) ); |
1229 |
1061 |
1230 queryParam.SetDataText( ¬eText ); |
1062 queryParam.SetDataText( ¬eText ); |
1231 queryParam.SetDefaultCba( R_AVKON_SOFTKEYS_CANCEL ); |
1063 queryParam.SetDefaultCba( R_AVKON_SOFTKEYS_CANCEL ); |
1232 |
1064 |
1233 const TInt KEnableServiceTimeOutInSecs = 60; |
1065 const TInt KEnableServiceTimeOutInMilliSecs = 60000; |
1234 queryParam.SetTimeOut( KEnableServiceTimeOutInSecs ); |
1066 queryParam.SetTimeOut( KEnableServiceTimeOutInMilliSecs ); |
|
1067 |
1235 // configure custom command mappings for user responses |
1068 // configure custom command mappings for user responses |
1236 queryParam.SetCbaCommandMapping( |
1069 queryParam.SetCbaCommandMapping( |
1237 EAknSoftkeyCancel, EPhoneCmdCancelServiceEnabling ); |
1070 EAknSoftkeyCancel, EPhoneCmdCancelServiceEnabling ); |
1238 queryParam.SetCbaCommandMapping( |
1071 queryParam.SetCbaCommandMapping( |
1239 KErrCancel, EPhoneCmdCancelServiceEnabling ); |
1072 KErrCancel, EPhoneCmdCancelServiceEnabling ); |
1254 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1087 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1255 "CPhoneCustomizationVoip::SendGlobalErrorNoteL" ); |
1088 "CPhoneCustomizationVoip::SendGlobalErrorNoteL" ); |
1256 |
1089 |
1257 __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
1090 __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
1258 |
1091 |
1259 CPhoneState* phoneState = |
1092 CPhoneState* phoneState = |
1260 static_cast< CPhoneState* >( iStateMachine.State() ); |
1093 static_cast< CPhoneState* >( iStateMachine.State() ); |
1261 |
1094 |
1262 phoneState->SendGlobalErrorNoteL( aResourceId ); |
1095 phoneState->SendGlobalErrorNoteL( aResourceId ); |
1263 } |
1096 } |
1264 |
1097 |
1265 |
1098 |
1266 // --------------------------------------------------------- |
1099 // --------------------------------------------------------- |
1267 // CPhoneCustomizationVoip::SendGlobalInfoNoteL |
1100 // CPhoneCustomizationVoip::SendGlobalInfoNoteL |
1431 |
1264 |
1432 // ----------------------------------------------------------- |
1265 // ----------------------------------------------------------- |
1433 // CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL |
1266 // CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL |
1434 // ----------------------------------------------------------- |
1267 // ----------------------------------------------------------- |
1435 // |
1268 // |
1436 void CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL( TInt aResourceId, |
1269 void CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL( TInt /*aResourceId*/, |
1437 CEikMenuPane& aMenuPane ) |
1270 CEikMenuPane& /*aMenuPane*/ ) |
1438 { |
1271 { |
1439 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1272 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1440 "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" ); |
1273 "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" ); |
1441 |
1274 } |
1442 // Menu items to be added |
1275 |
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 |
|
1461 // ----------------------------------------------------------- |
1276 // ----------------------------------------------------------- |
1462 // CPhoneCustomizationVoip::GetVoIPServiceIdsL |
1277 // CPhoneCustomizationVoip::GetVoIPServiceIdsL |
1463 // ----------------------------------------------------------- |
1278 // ----------------------------------------------------------- |
1464 // |
1279 // |
1465 void CPhoneCustomizationVoip::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const |
1280 void CPhoneCustomizationVoip::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const |
1540 &stringParam ); |
1354 &stringParam ); |
1541 |
1355 |
1542 return phoneNumber; |
1356 return phoneNumber; |
1543 } |
1357 } |
1544 |
1358 |
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 |
|
1591 // End of File |
1359 // End of File |