1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
14 // |
14 // |
15 |
15 |
16 |
16 |
17 |
17 |
18 //INCLUDES |
18 //INCLUDES |
19 |
|
20 #include "OstTraceDefinitions.h" |
|
21 #ifdef OST_TRACE_COMPILER_IN_USE |
|
22 #include "cmmvoicelinetsyTraces.h" |
|
23 #endif |
|
24 |
|
25 #include "cmmvoicelinetsy.h" |
19 #include "cmmvoicelinetsy.h" |
26 #include "cmmphonetsy.h" |
20 #include "cmmphonetsy.h" |
27 #include "cmmvoicecalltsy.h" |
21 #include "cmmvoicecalltsy.h" |
28 #include "cmmcallextinterface.h" |
22 #include "cmmcallextinterface.h" |
29 #include "cmmlinelist.h" |
23 #include "cmmlinelist.h" |
38 { |
32 { |
39 } |
33 } |
40 |
34 |
41 void CMmVoiceLineTsy::ConstructL() |
35 void CMmVoiceLineTsy::ConstructL() |
42 { |
36 { |
43 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_CONSTRUCTL_1, "TSY: CMmVoiceLineTsy::ConstructL"); |
37 TFLOGSTRING("TSY: CMmVoiceLineTsy::ConstructL"); |
44 CMmLineTsy::ConstructL(); |
38 CMmLineTsy::ConstructL(); |
45 } |
39 } |
46 |
40 |
47 CMmVoiceLineTsy* CMmVoiceLineTsy::NewL( |
41 CMmVoiceLineTsy* CMmVoiceLineTsy::NewL( |
48 CMmPhoneTsy* aMmPhone, |
42 CMmPhoneTsy* aMmPhone, |
49 RMobilePhone::TMobileService aMode, |
43 RMobilePhone::TMobileService aMode, |
50 const TDesC& aName, |
44 const TDesC& aName, |
51 CMmMessageManagerBase* aMessageManager, |
45 CMmMessageManagerBase* aMessageManager, |
52 MTelephonyAudioControl* aTelephonyAudioControl ) |
46 MTelephonyAudioControl* aTelephonyAudioControl ) |
53 { |
47 { |
54 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_NEWL_1, "TSY: CMmVoiceLineTsy::NewL, Voice line %S created", aName); |
48 TFLOGSTRING2("TSY: CMmVoiceLineTsy::NewL, Voice line %S created", &aName); |
55 CMmVoiceLineTsy* mmLineTsy = NULL; |
49 CMmVoiceLineTsy* mmLineTsy = NULL; |
56 |
50 |
57 if ( aMmPhone != NULL && ( aMode == RMobilePhone::EVoiceService |
51 if ( aMmPhone != NULL && ( aMode == RMobilePhone::EVoiceService |
58 || aMode == RMobilePhone::EAuxVoiceService ) ) |
52 || aMode == RMobilePhone::EAuxVoiceService ) ) |
59 { |
53 { |
70 return mmLineTsy; |
64 return mmLineTsy; |
71 } |
65 } |
72 |
66 |
73 CMmVoiceLineTsy::~CMmVoiceLineTsy() |
67 CMmVoiceLineTsy::~CMmVoiceLineTsy() |
74 { |
68 { |
75 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_DTOR_1, "TSY: CMmVoiceLineTsy::~CMmVoiceLineTsy. Line name: %S", iLineName); |
69 TFLOGSTRING2("TSY: CMmVoiceLineTsy::~CMmVoiceLineTsy. Line name: %S", \ |
|
70 &iLineName); |
76 } |
71 } |
77 |
72 |
78 // --------------------------------------------------------------------------- |
73 // --------------------------------------------------------------------------- |
79 // CMmVoiceLineTsy::OpenNewObjectL |
74 // CMmVoiceLineTsy::OpenNewObjectL |
80 // This method creates a new name for a call and opens a new call. This method |
75 // This method creates a new name for a call and opens a new call. This method |
260 CCallDataPackage* callDataPackage = |
255 CCallDataPackage* callDataPackage = |
261 reinterpret_cast<CCallDataPackage*>(aDataPackage); |
256 reinterpret_cast<CCallDataPackage*>(aDataPackage); |
262 |
257 |
263 callDataPackage->GetCallIdAndMode( callId, callMode ); |
258 callDataPackage->GetCallIdAndMode( callId, callMode ); |
264 |
259 |
265 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYINCOMINGCALL_1, "TSY: CMmVoiceLineTsy::CompleteNotifyIncomingCall - Line \name: %S, Call id: %d", iLineName, callId ); |
260 TFLOGSTRING3("TSY: CMmVoiceLineTsy::CompleteNotifyIncomingCall - Line \ |
|
261 name: %S, Call id: %d", &iLineName, callId ); |
266 |
262 |
267 //reset req handle. Returns the deleted req handle |
263 //reset req handle. Returns the deleted req handle |
268 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
264 TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( |
269 EMultimodeLineNotifyIncomingCall ); |
265 EMultimodeLineNotifyIncomingCall ); |
270 |
266 |
338 // --------------------------------------------------------------------------- |
334 // --------------------------------------------------------------------------- |
339 // |
335 // |
340 void CMmVoiceLineTsy::CompleteNotifyDiallingStatus( |
336 void CMmVoiceLineTsy::CompleteNotifyDiallingStatus( |
341 CMmDataPackage* aDataPackage ) |
337 CMmDataPackage* aDataPackage ) |
342 { |
338 { |
343 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_1, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus"); |
339 TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus"); |
344 TInt callId( -1 ); |
340 TInt callId( -1 ); |
345 TBool ghostCall( EFalse ); |
341 TBool ghostCall( EFalse ); |
346 RMobilePhone::TMobileService callMode( RMobilePhone::EVoiceService ); |
342 RMobilePhone::TMobileService callMode( RMobilePhone::EVoiceService ); |
347 |
343 |
348 CCallDataPackage* callData = |
344 CCallDataPackage* callData = |
353 CMmVoiceCallTsy* mmCall = reinterpret_cast<CMmVoiceCallTsy*>( |
349 CMmVoiceCallTsy* mmCall = reinterpret_cast<CMmVoiceCallTsy*>( |
354 iMmPhone->CallList()->GetMmCallByMode( callMode ) ); |
350 iMmPhone->CallList()->GetMmCallByMode( callMode ) ); |
355 |
351 |
356 if ( NULL == mmCall ) |
352 if ( NULL == mmCall ) |
357 { |
353 { |
358 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_2, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \GhostCall"); |
354 TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \ |
|
355 GhostCall"); |
359 ghostCall = ETrue; |
356 ghostCall = ETrue; |
360 } |
357 } |
361 else |
358 else |
362 { |
359 { |
363 TBool result( EFalse ); |
360 TBool result( EFalse ); |
381 CMmCallTsy::EMultimodeMobileCallDialEmergencyCall ); |
378 CMmCallTsy::EMultimodeMobileCallDialEmergencyCall ); |
382 } |
379 } |
383 |
380 |
384 if ( result || resultNoFdnCheck || resultISV ) |
381 if ( result || resultNoFdnCheck || resultISV ) |
385 { |
382 { |
386 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_3, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - Not Emergency call"); |
383 TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - Not Emergency call"); |
387 for ( TInt i = 0; i < iMmPhone->CallList()->GetNumberOfObjects(); |
384 for ( TInt i = 0; i < iMmPhone->CallList()->GetNumberOfObjects(); |
388 i++ ) |
385 i++ ) |
389 { |
386 { |
390 mmCall = reinterpret_cast<CMmVoiceCallTsy*>( |
387 mmCall = reinterpret_cast<CMmVoiceCallTsy*>( |
391 iMmPhone->CallList()->GetMmCallByIndex(i) ); |
388 iMmPhone->CallList()->GetMmCallByIndex(i) ); |
398 CMmCallTsy::EMultimodeCallDialISV ) ) |
395 CMmCallTsy::EMultimodeCallDialISV ) ) |
399 || ( mmCall->ServiceRequested( |
396 || ( mmCall->ServiceRequested( |
400 CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) ) ) |
397 CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) ) ) |
401 { |
398 { |
402 mmCall->SetCallId( callId ); |
399 mmCall->SetCallId( callId ); |
403 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_4, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId); |
400 TFLOGSTRING2("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId); |
404 mmCall->CompleteNotifyMobileCallInfoChange( |
401 mmCall->CompleteNotifyMobileCallInfoChange( |
405 aDataPackage ); |
402 aDataPackage ); |
406 break; |
403 break; |
407 } |
404 } |
408 } |
405 } |
409 } |
406 } |
410 else |
407 else |
411 { |
408 { |
412 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_5, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \Dial not found"); |
409 TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \ |
|
410 Dial not found"); |
413 ghostCall = ETrue; |
411 ghostCall = ETrue; |
414 } |
412 } |
415 } |
413 } |
416 //Ghost call handling starts here |
414 //Ghost call handling starts here |
417 if ( ghostCall ) |
415 if ( ghostCall ) |