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 // <-- QT PHONE START --> |
26 #include <phoneui.rsg> |
26 //#include <bmbubblemanager.h> |
|
27 // <-- QT PHONE END --> |
|
28 // <-- QT PHONE START --> |
|
29 //#include <phoneui.rsg> |
|
30 #include "phoneresourceids.h" |
|
31 //#include <phoneui.rsg> |
|
32 //#include <phoneuivoip.rsg> |
|
33 // <-- QT PHONE END --> |
27 #include <avkon.rsg> |
34 #include <avkon.rsg> |
28 #include <phoneuivoip.rsg> |
|
29 #include <StringLoader.h> |
35 #include <StringLoader.h> |
30 #include <featmgr.h> |
36 #include <featmgr.h> |
31 |
37 |
32 #include "cphonecustomizationvoip.h" |
38 #include "cphonecustomizationvoip.h" |
33 #include "tphonecmdparaminteger.h" |
39 #include "tphonecmdparaminteger.h" |
53 #include "cphoneviewcustomizationvoip.h" |
59 #include "cphoneviewcustomizationvoip.h" |
54 #include "cphonestateutilsvoip.h" |
60 #include "cphonestateutilsvoip.h" |
55 #include "cphoneunattendedtransfercmdhandler.h" |
61 #include "cphoneunattendedtransfercmdhandler.h" |
56 #include "tphonecmdparampointer.h" |
62 #include "tphonecmdparampointer.h" |
57 #include "cphonenewcallcmdhandler.h" |
63 #include "cphonenewcallcmdhandler.h" |
58 #include "cphonevcchandler.h" |
64 // <-- QT PHONE START --> |
|
65 //#include "cphonevcchandler.h" |
|
66 // <-- QT PHONE END --> |
59 #include "cphonecallforwardqueryhandler.h" |
67 #include "cphonecallforwardqueryhandler.h" |
60 #include "cphonekeys.h" |
68 #include "cphonekeys.h" |
61 |
69 |
62 // CONSTANTS |
70 // CONSTANTS |
63 const TInt KMaxLengthForSIPURIFirstLine = 15; |
71 const TInt KMaxLengthForSIPURIFirstLine = 15; |
126 iTransferCmdHandler = CPhoneUnattendedTransferCmdHandler::NewL( |
136 iTransferCmdHandler = CPhoneUnattendedTransferCmdHandler::NewL( |
127 iStateMachine, iViewCommandHandle ); |
137 iStateMachine, iViewCommandHandle ); |
128 |
138 |
129 iNewCallCmdHandler = CPhoneNewCallCmdHandler::NewL( |
139 iNewCallCmdHandler = CPhoneNewCallCmdHandler::NewL( |
130 iStateMachine, iViewCommandHandle ); |
140 iStateMachine, iViewCommandHandle ); |
131 |
141 |
132 if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) ) |
142 // <-- QT PHONE START --> |
|
143 /*if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) ) |
133 { |
144 { |
134 iVccHandler = CPhoneVccHandler::NewL( iStateMachine, iViewCommandHandle ); |
145 iVccHandler = CPhoneVccHandler::NewL( iStateMachine, iViewCommandHandle ); |
135 } |
146 }*/ |
|
147 // <-- QT PHONE END --> |
136 |
148 |
137 iCallForwardHandler = CPhoneCallForwardQueryHandler::NewL( |
149 iCallForwardHandler = CPhoneCallForwardQueryHandler::NewL( |
138 iStateMachine, iViewCommandHandle ); |
150 iStateMachine, iViewCommandHandle ); |
139 } |
151 } |
140 |
152 |
288 // placed as a first line and CNAP-field is placed as a second line. |
300 // placed as a first line and CNAP-field is placed as a second line. |
289 // ----------------------------------------------------------- |
301 // ----------------------------------------------------------- |
290 // |
302 // |
291 void CPhoneCustomizationVoip::ModifyCallHeaderTexts( TInt aCallId, |
303 void CPhoneCustomizationVoip::ModifyCallHeaderTexts( TInt aCallId, |
292 TPhoneCmdParamCallHeaderData* aCommandParam, |
304 TPhoneCmdParamCallHeaderData* aCommandParam, |
293 const TDesC& /*aInCallNumberText*/ ) |
305 const TDesC& aInCallNumberText ) |
294 { |
306 { |
295 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
307 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
296 "CPhoneCustomizationVoip::ModifyCallHeaderTexts" ); |
308 "CPhoneCustomizationVoip::ModifyCallHeaderTexts" ); |
297 |
309 |
298 MPEEngineInfo& engineInfo = *iStateMachine.PhoneEngineInfo(); |
310 MPEEngineInfo& engineInfo = *iStateMachine.PhoneEngineInfo(); |
301 { |
313 { |
302 const TBool contactInfoAvailable = |
314 const TBool contactInfoAvailable = |
303 engineInfo.RemoteName( aCallId ).Length() || |
315 engineInfo.RemoteName( aCallId ).Length() || |
304 engineInfo.RemoteCompanyName( aCallId ).Length(); |
316 engineInfo.RemoteCompanyName( aCallId ).Length(); |
305 |
317 |
306 if ( EPEStateRinging == aCommandParam->CallState() && |
318 if ( !contactInfoAvailable ) |
307 !contactInfoAvailable ) |
319 { |
308 { |
320 if ( EPEStateRinging == aCommandParam->CallState() ) |
309 if ( KNullDesC() != engineInfo.RemotePartyName( aCallId ) ) |
|
310 { |
321 { |
311 // Telephone UI specification, 4.2.1 Call identification: |
322 if ( KNullDesC() != engineInfo.RemotePartyName( aCallId ) ) |
312 // display name is used as the CLI if available. |
323 { |
313 aCommandParam->SetCLIText( |
324 // Telephone UI specification, 4.2.1 Call identification: |
314 engineInfo.RemotePartyName( aCallId ), |
325 // display name is used as the CLI if available. |
315 CBubbleManager::ERight ); |
326 // <-- QT PHONE START --> |
316 // use line reserved for CNAP to show SIP URI |
327 aCommandParam->SetCLIText( |
317 aCommandParam->SetCNAPText( |
328 engineInfo.RemotePartyName( aCallId ), |
318 engineInfo.RemotePhoneNumber( aCallId ), |
329 TPhoneCmdParamCallHeaderData::ERight ); |
319 CBubbleManager::ERight ); |
330 // <-- QT PHONE END --> |
320 } |
331 // use line reserved for CNAP to show SIP URI |
321 else if( KNullDesC() != engineInfo.RemotePhoneNumber( aCallId ) ) |
332 aCommandParam->SetCNAPText( |
322 { |
333 engineInfo.RemotePhoneNumber( aCallId ), |
323 // Fit address to two rows if it doesnt fit to one |
334 // <-- QT PHONE START --> |
324 TBuf<KMaxLengthForSIPURI> sipURI; |
335 // CBubbleManager::ERight |
325 TBuf<KMaxLengthForSIPURI> sipURIDomainPart; |
336 TPhoneCmdParamCallHeaderData::ERight |
326 HandleURIFittingToCallBubble( |
337 // <-- QT PHONE END --> |
327 aCommandParam->CLIText(), |
338 ); |
328 sipURI, |
339 } |
329 sipURIDomainPart ); |
340 else |
330 |
341 { |
331 aCommandParam->SetCLIText( sipURI, CBubbleManager::ERight ); |
342 TBuf<KMaxLengthForSIPURI> sipURI; |
332 aCommandParam->SetCNAPText( |
343 TBuf<KMaxLengthForSIPURI> sipURIDomainPart; |
333 sipURIDomainPart, |
344 HandleURIFittingToCallBubble( |
334 CBubbleManager::ERight ); |
345 aCommandParam->CLIText(), |
|
346 sipURI, |
|
347 sipURIDomainPart ); |
|
348 |
|
349 // <-- QT PHONE START --> |
|
350 aCommandParam->SetCLIText( sipURI, TPhoneCmdParamCallHeaderData::ERight ); |
|
351 // <-- QT PHONE END --> |
|
352 aCommandParam->SetCNAPText( sipURIDomainPart, |
|
353 // <-- QT PHONE START --> |
|
354 // CBubbleManager::ERight ); |
|
355 TPhoneCmdParamCallHeaderData::ERight ); |
|
356 // <-- QT PHONE END --> |
|
357 } |
335 } |
358 } |
336 else |
359 else |
337 { |
360 { |
338 // No address or display name specified |
361 if ( KNullDesC() == engineInfo.RemotePartyName( aCallId ) ) |
339 // Do nothing |
362 { |
|
363 // Display name not available, set incall number text as a |
|
364 // CLI text. Text could be 'Call 1', 'Call 2', ... |
|
365 // <-- QT PHONE START --> |
|
366 aCommandParam->SetCLIText( aInCallNumberText, |
|
367 TPhoneCmdParamCallHeaderData::ERight ); |
|
368 // <-- QT PHONE END --> |
|
369 // change clipping direction of CNAP text |
|
370 aCommandParam->SetCNAPText( |
|
371 aCommandParam->CNAPText(), |
|
372 // <-- QT PHONE START --> |
|
373 // CBubbleManager::ERight ); |
|
374 TPhoneCmdParamCallHeaderData::ERight ); |
|
375 // <-- QT PHONE END --> |
|
376 } |
340 } |
377 } |
341 } |
|
342 else |
|
343 { |
|
344 // Change clipping direction |
|
345 aCommandParam->SetCLIText( |
|
346 aCommandParam->CLIText(), |
|
347 CBubbleManager::ERight ); |
|
348 |
|
349 // Change clipping direction |
|
350 aCommandParam->SetCNAPText( |
|
351 aCommandParam->CNAPText(), |
|
352 CBubbleManager::ERight ); |
|
353 } |
378 } |
354 } |
379 } |
355 } |
380 } |
356 |
381 |
357 |
382 |
622 // ----------------------------------------------------------- |
651 // ----------------------------------------------------------- |
623 // From class MPhoneButtonCustomization. |
652 // From class MPhoneButtonCustomization. |
624 // CPhoneCustomizationVoip::CustomizeTouchPaneButtons |
653 // CPhoneCustomizationVoip::CustomizeTouchPaneButtons |
625 // ----------------------------------------------------------- |
654 // ----------------------------------------------------------- |
626 // |
655 // |
|
656 // <-- QT PHONE START --> |
627 void CPhoneCustomizationVoip::CustomizeTouchPaneButtons( |
657 void CPhoneCustomizationVoip::CustomizeTouchPaneButtons( |
628 MBubbleTouchPaneInterface& aTouchPane ) |
658 /*MBubbleTouchPaneInterface& aTouchPane*/ ) |
629 { |
659 { |
630 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
660 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
631 "CPhoneCustomizationVoip::CustomizeTouchPaneButtons" ); |
661 "CPhoneCustomizationVoip::CustomizeTouchPaneButtons" ); |
632 |
662 |
633 TRAPD( err, CustomizeTouchPaneUsingExtensionL( aTouchPane ) ); |
663 /*TRAPD( err, CustomizeTouchPaneUsingExtensionL( aTouchPane ) ); |
634 |
664 |
635 if ( KErrNone != err ) |
665 if ( KErrNone != err ) |
636 { |
666 { |
637 // Extension plugin didn't handle touch pane dimming. |
667 // Extension plugin didn't handle touch pane dimming. |
638 TInt buttonCount = aTouchPane.NumberOfButtonsInPane(); |
668 TInt buttonCount = aTouchPane.NumberOfButtonsInPane(); |
1168 EPhoneVoIPEnablingServiceWaitNoteText ), serviceName ) ); |
1199 EPhoneVoIPEnablingServiceWaitNoteText ), serviceName ) ); |
1169 |
1200 |
1170 queryParam.SetDataText( ¬eText ); |
1201 queryParam.SetDataText( ¬eText ); |
1171 queryParam.SetDefaultCba( R_AVKON_SOFTKEYS_CANCEL ); |
1202 queryParam.SetDefaultCba( R_AVKON_SOFTKEYS_CANCEL ); |
1172 |
1203 |
1173 const TInt KEnableServiceTimeOutInSecs = 60; |
1204 // <-- QT PHONE START --> |
1174 queryParam.SetTimeOut( KEnableServiceTimeOutInSecs ); |
1205 const TInt KEnableServiceTimeOutInMilliSecs = 60000; |
|
1206 queryParam.SetTimeOut( KEnableServiceTimeOutInMilliSecs ); |
|
1207 // <-- QT PHONE END --> |
1175 // configure custom command mappings for user responses |
1208 // configure custom command mappings for user responses |
1176 queryParam.SetCbaCommandMapping( |
1209 queryParam.SetCbaCommandMapping( |
1177 EAknSoftkeyCancel, EPhoneCmdCancelServiceEnabling ); |
1210 EAknSoftkeyCancel, EPhoneCmdCancelServiceEnabling ); |
1178 queryParam.SetCbaCommandMapping( |
1211 queryParam.SetCbaCommandMapping( |
1179 KErrCancel, EPhoneCmdCancelServiceEnabling ); |
1212 KErrCancel, EPhoneCmdCancelServiceEnabling ); |
1194 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1227 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1195 "CPhoneCustomizationVoip::SendGlobalErrorNoteL" ); |
1228 "CPhoneCustomizationVoip::SendGlobalErrorNoteL" ); |
1196 |
1229 |
1197 __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
1230 __ASSERT_DEBUG( aResourceId, Panic( EPhoneCtrlParameterNotInitialized ) ); |
1198 |
1231 |
1199 CPhoneState* phoneState = |
1232 CPhoneState* phoneState = |
1200 static_cast< CPhoneState* >( iStateMachine.State() ); |
1233 static_cast< CPhoneState* >( iStateMachine.State() ); |
1201 |
1234 |
1202 phoneState->SendGlobalErrorNoteL( aResourceId ); |
1235 phoneState->SendGlobalErrorNoteL( aResourceId ); |
1203 } |
1236 } |
1204 |
1237 |
1205 |
1238 |
1206 // --------------------------------------------------------- |
1239 // --------------------------------------------------------- |
1207 // CPhoneCustomizationVoip::SendGlobalInfoNoteL |
1240 // CPhoneCustomizationVoip::SendGlobalInfoNoteL |
1371 |
1404 |
1372 // ----------------------------------------------------------- |
1405 // ----------------------------------------------------------- |
1373 // CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL |
1406 // CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL |
1374 // ----------------------------------------------------------- |
1407 // ----------------------------------------------------------- |
1375 // |
1408 // |
1376 void CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL( TInt aResourceId, |
1409 void CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL( TInt /*aResourceId*/, |
1377 CEikMenuPane& aMenuPane ) |
1410 CEikMenuPane& /*aMenuPane*/ ) |
1378 { |
1411 { |
1379 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1412 __LOGMETHODSTARTEND( PhoneUIVoIPExtension, |
1380 "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" ); |
1413 "CPhoneCustomizationVoip::AddHandoverMenuItemIfNeededL" ); |
1381 |
1414 |
1382 // Menu items to be added |
1415 // Menu items to be added |
1383 if ( iVccHandler && AllowAlphaNumericMode() && |
1416 // <-- QT PHONE START --> |
|
1417 /*if ( iVccHandler && AllowAlphaNumericMode() && |
1384 ( aResourceId == R_PHONEUI_CALLHANDLING_INCALL_OPTIONS_MENU || |
1418 ( aResourceId == R_PHONEUI_CALLHANDLING_INCALL_OPTIONS_MENU || |
1385 aResourceId == R_PHONEUI_CALLWAITING_OPTIONS_MENU || |
1419 aResourceId == R_PHONEUI_CALLWAITING_OPTIONS_MENU || |
1386 aResourceId == R_PHONEUI_ACTIVEANDHELDCALL_OPTIONS_MENU || |
1420 aResourceId == R_PHONEUI_ACTIVEANDHELDCALL_OPTIONS_MENU || |
1387 aResourceId == R_PHONEUI_ACTIVEANDHELDCONFCALL_OPTIONS_MENU || |
1421 aResourceId == R_PHONEUI_ACTIVEANDHELDCONFCALL_OPTIONS_MENU || |
1388 aResourceId == R_PHONEUI_CALLACTIVEHELDANDWAITING_OPTIONS_MENU |
1422 aResourceId == R_PHONEUI_CALLACTIVEHELDANDWAITING_OPTIONS_MENU |
1392 CleanupClosePushL( array ); |
1426 CleanupClosePushL( array ); |
1393 GetActiveCallArrayL( array ); |
1427 GetActiveCallArrayL( array ); |
1394 |
1428 |
1395 iVccHandler->AddHandoverMenuItemL( array, aResourceId, aMenuPane ); |
1429 iVccHandler->AddHandoverMenuItemL( array, aResourceId, aMenuPane ); |
1396 CleanupStack::PopAndDestroy( &array ); |
1430 CleanupStack::PopAndDestroy( &array ); |
1397 } |
1431 }*/ |
1398 } |
1432 // <-- QT PHONE END --> |
1399 |
1433 } |
1400 |
1434 |
1401 // ----------------------------------------------------------- |
1435 // ----------------------------------------------------------- |
1402 // CPhoneCustomizationVoip::GetVoIPServiceIdsL |
1436 // CPhoneCustomizationVoip::GetVoIPServiceIdsL |
1403 // ----------------------------------------------------------- |
1437 // ----------------------------------------------------------- |
1404 // |
1438 // |
1405 void CPhoneCustomizationVoip::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const |
1439 void CPhoneCustomizationVoip::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const |