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". |
18 // |
18 // |
19 |
19 |
20 |
20 |
21 |
21 |
22 //INCLUDES |
22 //INCLUDES |
23 |
|
24 #include "OstTraceDefinitions.h" |
|
25 #ifdef OST_TRACE_COMPILER_IN_USE |
|
26 #include "CSatNotifySetUpCallTraces.h" |
|
27 #endif |
|
28 |
|
29 #include <satcs.h> // Etel SAT IPC definitions |
23 #include <satcs.h> // Etel SAT IPC definitions |
30 #include "CSatTsy.h" // Tsy class header |
24 #include "CSatTsy.h" // Tsy class header |
31 #include "CSatNotifySetUpCall.h" // Tsy class header |
25 #include "CSatNotifySetUpCall.h" // Tsy class header |
32 #include "CSatNotificationsTsy.h" // Class header |
26 #include "CSatNotificationsTsy.h" // Class header |
33 #include "CBerTlv.h" // Ber Tlv data handling |
27 #include "CBerTlv.h" // Ber Tlv data handling |
34 #include "TTlv.h" // TTlv class |
28 #include "TTlv.h" // TTlv class |
35 #include "CSatDataPackage.h" // Parameter packing |
29 #include "CSatDataPackage.h" // Parameter packing |
|
30 #include "TfLogger.h" // For TFLOGSTRING |
36 #include "TSatUtility.h" // Utilities |
31 #include "TSatUtility.h" // Utilities |
37 #include "CSatTsyReqHandleStore.h" // Request handle class |
32 #include "CSatTsyReqHandleStore.h" // Request handle class |
38 #include "cmmmessagemanagerbase.h" // Message manager class for forwarding req. |
33 #include "cmmmessagemanagerbase.h" // Message manager class for forwarding req. |
39 |
34 |
40 // ----------------------------------------------------------------------------- |
35 // ----------------------------------------------------------------------------- |
45 CSatNotifySetUpCall* CSatNotifySetUpCall::NewL |
40 CSatNotifySetUpCall* CSatNotifySetUpCall::NewL |
46 ( |
41 ( |
47 CSatNotificationsTsy* aNotificationsTsy |
42 CSatNotificationsTsy* aNotificationsTsy |
48 ) |
43 ) |
49 { |
44 { |
50 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NEWL_1, "CSAT: CSatNotifySetupCall::NewL"); |
45 TFLOGSTRING("CSAT: CSatNotifySetupCall::NewL"); |
51 CSatNotifySetUpCall* const satNotifySetUpCall = |
46 CSatNotifySetUpCall* const satNotifySetUpCall = |
52 new ( ELeave ) CSatNotifySetUpCall( aNotificationsTsy ); |
47 new ( ELeave ) CSatNotifySetUpCall( aNotificationsTsy ); |
53 CleanupStack::PushL( satNotifySetUpCall ); |
48 CleanupStack::PushL( satNotifySetUpCall ); |
54 satNotifySetUpCall->ConstructL(); |
49 satNotifySetUpCall->ConstructL(); |
55 CleanupStack::Pop( satNotifySetUpCall ); |
50 CleanupStack::Pop( satNotifySetUpCall ); |
56 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NEWL_2, "CSAT: CSatNotifySetupCall::NewL, end of method"); |
51 TFLOGSTRING("CSAT: CSatNotifySetupCall::NewL, end of method"); |
57 return satNotifySetUpCall; |
52 return satNotifySetUpCall; |
58 } |
53 } |
59 |
54 |
60 // ----------------------------------------------------------------------------- |
55 // ----------------------------------------------------------------------------- |
61 // CSatNotifySetupCall::~CSatNotifySetupCall |
56 // CSatNotifySetupCall::~CSatNotifySetupCall |
65 CSatNotifySetUpCall::~CSatNotifySetUpCall |
60 CSatNotifySetUpCall::~CSatNotifySetUpCall |
66 ( |
61 ( |
67 // None |
62 // None |
68 ) |
63 ) |
69 { |
64 { |
70 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_DTOR_1, "CSAT: CSatNotifySetupCall::~CSatNotifySetUpCall"); |
65 TFLOGSTRING("CSAT: CSatNotifySetupCall::~CSatNotifySetUpCall"); |
71 } |
66 } |
72 |
67 |
73 // ----------------------------------------------------------------------------- |
68 // ----------------------------------------------------------------------------- |
74 // CSatNotifySetupCall::CSatNotifySetupCall |
69 // CSatNotifySetupCall::CSatNotifySetupCall |
75 // Constructor |
70 // Constructor |
91 void CSatNotifySetUpCall::ConstructL |
86 void CSatNotifySetUpCall::ConstructL |
92 ( |
87 ( |
93 // None |
88 // None |
94 ) |
89 ) |
95 { |
90 { |
96 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CONSTRUCTL_1, "CSAT: CSatNotifySetupCall::ConstructL"); |
91 TFLOGSTRING("CSAT: CSatNotifySetupCall::ConstructL"); |
97 iCallConnectedEvent.Zero(); |
92 iCallConnectedEvent.Zero(); |
98 } |
93 } |
99 |
94 |
100 // ----------------------------------------------------------------------------- |
95 // ----------------------------------------------------------------------------- |
101 // CSatNotifySetupCall::Notify |
96 // CSatNotifySetupCall::Notify |
106 ( |
101 ( |
107 const TTsyReqHandle aTsyReqHandle, |
102 const TTsyReqHandle aTsyReqHandle, |
108 const TDataPackage& aPackage |
103 const TDataPackage& aPackage |
109 ) |
104 ) |
110 { |
105 { |
111 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NOTIFY_1, "CSAT: CSatNotifySetupCall::Notify"); |
106 TFLOGSTRING("CSAT: CSatNotifySetupCall::Notify"); |
112 // Save data pointer to client side for completion |
107 // Save data pointer to client side for completion |
113 iSetUpCallV1Pckg = reinterpret_cast<RSat::TSetUpCallV1Pckg*>( |
108 iSetUpCallV1Pckg = reinterpret_cast<RSat::TSetUpCallV1Pckg*>( |
114 aPackage.Des1n() ); |
109 aPackage.Des1n() ); |
115 // Save the request handle |
110 // Save the request handle |
116 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
111 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
117 CSatTsy::ESatNotifySetUpCallPCmdReqType ); |
112 CSatTsy::ESatNotifySetUpCallPCmdReqType ); |
118 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NOTIFY_2, "CSAT: CSatNotifySetUpCall::Notify\t Handle:%d",aTsyReqHandle); |
113 TFLOGSTRING2("CSAT: CSatNotifySetUpCall::Notify\t Handle:%d", |
|
114 aTsyReqHandle); |
119 // Check if requested notification is already pending |
115 // Check if requested notification is already pending |
120 iNotificationsTsy->NotifySatReadyForNotification( KSetUpCall ); |
116 iNotificationsTsy->NotifySatReadyForNotification( KSetUpCall ); |
121 |
117 |
122 return KErrNone; |
118 return KErrNone; |
123 } |
119 } |
133 TInt CSatNotifySetUpCall::CancelNotification |
129 TInt CSatNotifySetUpCall::CancelNotification |
134 ( |
130 ( |
135 const TTsyReqHandle aTsyReqHandle |
131 const TTsyReqHandle aTsyReqHandle |
136 ) |
132 ) |
137 { |
133 { |
138 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CANCELNOTIFICATION_1, "CSAT: CSatNotifySetUpCall::CancelNotification"); |
134 TFLOGSTRING("CSAT: CSatNotifySetUpCall::CancelNotification"); |
139 // Reset the request handle |
135 // Reset the request handle |
140 iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( |
136 iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( |
141 CSatTsy::ESatNotifySetUpCallPCmdReqType ); |
137 CSatTsy::ESatNotifySetUpCallPCmdReqType ); |
142 // Reset the data pointer |
138 // Reset the data pointer |
143 iSetUpCallV1Pckg = NULL; |
139 iSetUpCallV1Pckg = NULL; |
157 ( |
153 ( |
158 CSatDataPackage* aDataPackage, |
154 CSatDataPackage* aDataPackage, |
159 TInt aErrorCode |
155 TInt aErrorCode |
160 ) |
156 ) |
161 { |
157 { |
162 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_1, "CSAT: CSatNotifySetupCall::CompleteNotifyL"); |
158 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL"); |
163 TInt returnValue( KErrNone ); |
159 TInt returnValue( KErrNone ); |
164 TInt ret( KErrNone ); |
160 TInt ret( KErrNone ); |
165 iCCResult = 0; |
161 iCCResult = 0; |
166 // Unpack parameters |
162 // Unpack parameters |
167 TPtrC8* data; |
163 TPtrC8* data; |
183 iNotificationsTsy->iTerminalRespData.iCommandDetails.Copy( |
179 iNotificationsTsy->iTerminalRespData.iCommandDetails.Copy( |
184 commandDetails.Data() ); |
180 commandDetails.Data() ); |
185 |
181 |
186 TUint8 pCmdNumber( commandDetails.GetShortInfo( ETLV_CommandNumber ) ); |
182 TUint8 pCmdNumber( commandDetails.GetShortInfo( ETLV_CommandNumber ) ); |
187 |
183 |
188 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_2, "CSAT: CSatNotifySetUpCall::CompleteNotifyL\t Handle:%d",reqHandle); |
184 TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL\t Handle:%d", |
|
185 reqHandle); |
189 // In case the request was ongoing, continue.. |
186 // In case the request was ongoing, continue.. |
190 if ( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
187 if ( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
191 { |
188 { |
192 // Complete right away if error has occured, otherwise continue.. |
189 // Complete right away if error has occured, otherwise continue.. |
193 if ( KErrNone == aErrorCode ) |
190 if ( KErrNone == aErrorCode ) |
196 RSat::TSetUpCallV1& setUpCallV1 = ( *iSetUpCallV1Pckg )(); |
193 RSat::TSetUpCallV1& setUpCallV1 = ( *iSetUpCallV1Pckg )(); |
197 |
194 |
198 // Transaction ID |
195 // Transaction ID |
199 setUpCallV1.SetPCmdNumber( pCmdNumber ); |
196 setUpCallV1.SetPCmdNumber( pCmdNumber ); |
200 |
197 |
201 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_3, "CSAT: CSatNotifySetupCall::CompleteNotifyL CommandQualifier %d", iNotificationsTsy->iTerminalRespData.iCommandDetails[ KCommandQualifier ]); |
198 TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL \ |
|
199 CommandQualifier %d", iNotificationsTsy->iTerminalRespData. |
|
200 iCommandDetails[ KCommandQualifier ]); |
202 |
201 |
203 switch ( iNotificationsTsy->iTerminalRespData. |
202 switch ( iNotificationsTsy->iTerminalRespData. |
204 iCommandDetails[ KCommandQualifier ] ) |
203 iCommandDetails[ KCommandQualifier ] ) |
205 { |
204 { |
206 case KOnlyIfNotBusy: |
205 case KOnlyIfNotBusy: |
273 RSat::EAlphaIdProvided; |
273 RSat::EAlphaIdProvided; |
274 |
274 |
275 // Get alpha id string |
275 // Get alpha id string |
276 sourceString.Set( alphaIdentifier.GetData( |
276 sourceString.Set( alphaIdentifier.GetData( |
277 ETLV_AlphaIdentifier ) ); |
277 ETLV_AlphaIdentifier ) ); |
278 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_5, "CSAT: CSatNotifySetupCall::CompleteNotifyL User confirmation phase: sourceString %s", sourceString ); |
278 TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL User \ |
|
279 confirmation phase: sourceString %s", |
|
280 &sourceString ); |
279 // Convert and set the alpha id |
281 // Convert and set the alpha id |
280 TSatUtility::SetAlphaId( sourceString , |
282 TSatUtility::SetAlphaId( sourceString , |
281 setUpCallV1.iAlphaIdConfirmationPhase.iAlphaId ); |
283 setUpCallV1.iAlphaIdConfirmationPhase.iAlphaId ); |
282 |
284 |
283 } |
285 } |
284 // Alpha id found for user confirmation phase, but length |
286 // Alpha id found for user confirmation phase, but length |
285 // is zero |
287 // is zero |
286 else |
288 else |
287 { |
289 { |
288 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_6, "CSAT: CSatNotifySetupCall::CompleteNotifyL User confirmation phase: Alpha Id missing"); |
290 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL \ |
|
291 User confirmation phase: Alpha Id missing"); |
289 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = |
292 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = |
290 RSat::EAlphaIdNull; |
293 RSat::EAlphaIdNull; |
291 } |
294 } |
292 } |
295 } |
293 // No alpha id for user confirmation phase |
296 // No alpha id for user confirmation phase |
294 else |
297 else |
295 { |
298 { |
296 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_7, "CSAT: CSatNotifySetupCall::CompleteNotifyL, User confirmation phase: Alpha ID not present"); |
299 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\ |
|
300 User confirmation phase: Alpha ID not present"); |
297 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = |
301 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = |
298 RSat::EAlphaIdNotPresent; |
302 RSat::EAlphaIdNotPresent; |
299 } |
303 } |
300 |
304 |
301 // Get alpha identifier for call set up phase |
305 // Get alpha identifier for call set up phase |
311 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = |
315 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = |
312 RSat::EAlphaIdProvided; |
316 RSat::EAlphaIdProvided; |
313 // Get alpha id string |
317 // Get alpha id string |
314 sourceString.Set( alphaIdentifier.GetData( |
318 sourceString.Set( alphaIdentifier.GetData( |
315 ETLV_AlphaIdentifier ) ); |
319 ETLV_AlphaIdentifier ) ); |
316 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_8, "CSAT: CSatNotifySetupCall::CompleteNotifyL Call Set Up phase: sourceString %s",sourceString ); |
320 TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL \ |
|
321 Call Set Up phase: sourceString %s", |
|
322 &sourceString ); |
317 // Convert and set the alpha id |
323 // Convert and set the alpha id |
318 TSatUtility::SetAlphaId( sourceString, |
324 TSatUtility::SetAlphaId( sourceString, |
319 setUpCallV1.iAlphaIdCallSetUpPhase.iAlphaId ); |
325 setUpCallV1.iAlphaIdCallSetUpPhase.iAlphaId ); |
320 |
326 |
321 } |
327 } |
322 // Alpha id found for set up call phase, but length is zero |
328 // Alpha id found for set up call phase, but length is zero |
323 else |
329 else |
324 { |
330 { |
325 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_9, "CSAT: CSatNotifySetupCall::CompleteNotifyL Call Set Up phase: Alpha Id is NULL"); |
331 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL \ |
|
332 Call Set Up phase: Alpha Id is NULL"); |
326 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = |
333 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = |
327 RSat::EAlphaIdNull; |
334 RSat::EAlphaIdNull; |
328 } |
335 } |
329 } |
336 } |
330 |
337 |
331 // No alpha id set up call phase |
338 // No alpha id set up call phase |
332 else |
339 else |
333 { |
340 { |
334 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_10, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Alpha ID not present"); |
341 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\ |
|
342 Alpha ID not present"); |
335 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = |
343 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = |
336 RSat::EAlphaIdNotPresent; |
344 RSat::EAlphaIdNotPresent; |
337 } |
345 } |
338 |
346 |
339 // First icon for user confirmation phase |
347 // First icon for user confirmation phase |
399 TSatUtility::RemoveWildAndExpansionDigit( sourceString, |
407 TSatUtility::RemoveWildAndExpansionDigit( sourceString, |
400 tempNumber ); |
408 tempNumber ); |
401 // Set actual number |
409 // Set actual number |
402 setUpCallV1.iAddress.iTelNumber.Copy( tempNumber ); |
410 setUpCallV1.iAddress.iTelNumber.Copy( tempNumber ); |
403 |
411 |
404 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_11, "CSAT: CSatNotifySetUpCall::CompleteNotifyL, TelNumber: %S", setUpCallV1.iAddress.iTelNumber ); |
412 TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL, \ |
|
413 TelNumber: %S", &setUpCallV1.iAddress.iTelNumber ); |
405 |
414 |
406 iNotificationsTsy->iSatTsy->StoreProactiveAddress( |
415 iNotificationsTsy->iSatTsy->StoreProactiveAddress( |
407 &tempNumber ); |
416 &tempNumber ); |
408 } |
417 } |
409 } |
418 } |
410 else |
419 else |
411 { |
420 { |
412 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_12, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Request not ongoing"); |
421 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\ |
|
422 Request not ongoing"); |
413 additionalInfo.Zero(); |
423 additionalInfo.Zero(); |
414 additionalInfo.Append( KNoCause ); |
424 additionalInfo.Append( KNoCause ); |
415 // Request not on, returning response immediately |
425 // Request not on, returning response immediately |
416 CreateTerminalRespL( pCmdNumber, RSat::KCmdDataNotUnderstood, |
426 CreateTerminalRespL( pCmdNumber, RSat::KCmdDataNotUnderstood, |
417 additionalInfo ); |
427 additionalInfo ); |
429 { |
439 { |
430 // iCapabilityConfigParams is 8-bit string |
440 // iCapabilityConfigParams is 8-bit string |
431 setUpCallV1.iCapabilityConfigParams.Append( capabilityConfig. |
441 setUpCallV1.iCapabilityConfigParams.Append( capabilityConfig. |
432 GetData( ETLV_CapabilityConfigurationParameters ) ); |
442 GetData( ETLV_CapabilityConfigurationParameters ) ); |
433 |
443 |
434 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_13, "CSAT: CSatNotifySetUpCall::CompleteNotifyL, CapabilityParams: %s", setUpCallV1.iCapabilityConfigParams ); |
444 TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL, \ |
|
445 CapabilityParams: %s", &setUpCallV1.iCapabilityConfigParams ); |
435 } |
446 } |
436 |
447 |
437 // Called Party SubAddress |
448 // Called Party SubAddress |
438 setUpCallV1.iSubAddress.Zero(); |
449 setUpCallV1.iSubAddress.Zero(); |
439 CTlv subAddress; |
450 CTlv subAddress; |
466 |
477 |
467 TSatUtility::Copy8to16LE( sourceString, |
478 TSatUtility::Copy8to16LE( sourceString, |
468 setUpCallV1.iSubAddress ); |
479 setUpCallV1.iSubAddress ); |
469 } |
480 } |
470 |
481 |
471 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_14, "CSAT: CSatNotifySetUpCall, SubAddress: %S", setUpCallV1.iSubAddress ); |
482 TFLOGSTRING2("CSAT: CSatNotifySetUpCall, SubAddress: %S", |
|
483 &setUpCallV1.iSubAddress ); |
472 } |
484 } |
473 |
485 |
474 // Duration ( optional, maximum duration for the redial mechanism ) |
486 // Duration ( optional, maximum duration for the redial mechanism ) |
475 CTlv callDuration; |
487 CTlv callDuration; |
476 returnValue = berTlv.TlvByTagValue( &callDuration, |
488 returnValue = berTlv.TlvByTagValue( &callDuration, |
497 RSat::ETenthsOfSeconds; |
509 RSat::ETenthsOfSeconds; |
498 break; |
510 break; |
499 } |
511 } |
500 default: |
512 default: |
501 { |
513 { |
502 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_15, "CSAT: CSatNotifySetupCall::CompleteNotifyL, time unit not set"); |
514 TFLOGSTRING("CSAT: CSatNotifySetupCall::\ |
|
515 CompleteNotifyL, time unit not set"); |
503 setUpCallV1.iDuration.iTimeUnit = |
516 setUpCallV1.iDuration.iTimeUnit = |
504 RSat::ETimeUnitNotSet; |
517 RSat::ETimeUnitNotSet; |
505 break; |
518 break; |
506 } |
519 } |
507 } |
520 } |
508 |
521 |
509 // Time interval, valid range 1-255 (0x01 - 0xFF) |
522 // Time interval, valid range 1-255 (0x01 - 0xFF) |
510 setUpCallV1.iDuration.iNumOfUnits = |
523 setUpCallV1.iDuration.iNumOfUnits = |
511 callDuration.GetShortInfo( ETLV_TimeInterval ); |
524 callDuration.GetShortInfo( ETLV_TimeInterval ); |
512 |
525 |
513 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_16, "CSAT: CSatNotifySetUpCall::CompleteNotifyL Max Duration for the Redial Mechanism" ); |
526 TFLOGSTRING("CSAT: CSatNotifySetUpCall::CompleteNotifyL Max \ |
|
527 Duration for the Redial Mechanism" ); |
514 |
528 |
515 // Check that Time interval value is not invalid |
529 // Check that Time interval value is not invalid |
516 if ( NULL == setUpCallV1.iDuration.iNumOfUnits ) |
530 if ( NULL == setUpCallV1.iDuration.iNumOfUnits ) |
517 { |
531 { |
518 // Set value to valid range |
532 // Set value to valid range |
533 } |
547 } |
534 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
548 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
535 } |
549 } |
536 else |
550 else |
537 { |
551 { |
538 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_17, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Request not ongoing"); |
552 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\ |
|
553 Request not ongoing"); |
539 additionalInfo.Zero(); |
554 additionalInfo.Zero(); |
540 additionalInfo.Append( KNoCause ); |
555 additionalInfo.Append( KNoCause ); |
541 // Request not on, returning response immediately |
556 // Request not on, returning response immediately |
542 CreateTerminalRespL( pCmdNumber, |
557 CreateTerminalRespL( pCmdNumber, |
543 RSat::KMeUnableToProcessCmd, |
558 RSat::KMeUnableToProcessCmd, |
554 TInt CSatNotifySetUpCall::TerminalResponseL |
569 TInt CSatNotifySetUpCall::TerminalResponseL |
555 ( |
570 ( |
556 TDes8* aRsp |
571 TDes8* aRsp |
557 ) |
572 ) |
558 { |
573 { |
559 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_1, "CSAT:CSatNotifySetUpCall::TerminalResponseL"); |
574 TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL"); |
560 |
575 |
561 TInt ret( KErrNone ); |
576 TInt ret( KErrNone ); |
562 TBuf<1> additionalInfo; |
577 TBuf<1> additionalInfo; |
563 |
578 |
564 RSat::TSetUpCallRspV2Pckg* aRspPckg = |
579 RSat::TSetUpCallRspV2Pckg* aRspPckg = |
580 && ( RSat::KCmdBeyondMeCapabilities != rspV2.iGeneralResult ) |
595 && ( RSat::KCmdBeyondMeCapabilities != rspV2.iGeneralResult ) |
581 && ( RSat::KSsReturnError != rspV2.iGeneralResult ) |
596 && ( RSat::KSsReturnError != rspV2.iGeneralResult ) |
582 && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult ) |
597 && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult ) |
583 && ( RSat::KInteractionWithCCPermanentError != rspV2.iGeneralResult) ) |
598 && ( RSat::KInteractionWithCCPermanentError != rspV2.iGeneralResult) ) |
584 { |
599 { |
585 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_2, "CSAT:CSatNotifySetUpCall::TerminalResponseL, Invalid General Result"); |
600 TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL,\ |
|
601 Invalid General Result"); |
586 // Invalid general result |
602 // Invalid general result |
587 ret = KErrCorrupt; |
603 ret = KErrCorrupt; |
588 } |
604 } |
589 |
605 |
590 // If there is Me (Mobile Entity) error or network error, |
606 // If there is Me (Mobile Entity) error or network error, |
599 additionalInfo.Append( static_cast<TUint8>( |
615 additionalInfo.Append( static_cast<TUint8>( |
600 rspV2.iAdditionalInfo[0] ) ); |
616 rspV2.iAdditionalInfo[0] ) ); |
601 } |
617 } |
602 else |
618 else |
603 { |
619 { |
604 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_3, "CSAT:CSatNotifySetUpCall::TerminalResponseL, Invalid Additional Info"); |
620 TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL,\ |
|
621 Invalid Additional Info"); |
605 ret = KErrCorrupt; |
622 ret = KErrCorrupt; |
606 } |
623 } |
607 } |
624 } |
608 |
625 |
609 iNotificationsTsy->iSatTsy->StoreProactiveAddress( NULL ); |
626 iNotificationsTsy->iSatTsy->StoreProactiveAddress( NULL ); |
648 TUint8 aPCmdNumber, |
665 TUint8 aPCmdNumber, |
649 TUint8 aGeneralResult, |
666 TUint8 aGeneralResult, |
650 TDesC16& aAdditionalInfo |
667 TDesC16& aAdditionalInfo |
651 ) |
668 ) |
652 { |
669 { |
653 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CREATETERMINALRESPL_1, "CSAT: CSatNotifySetUpCall::CreateTerminalRespL"); |
670 TFLOGSTRING("CSAT: CSatNotifySetUpCall::CreateTerminalRespL"); |
654 // Create and append response data |
671 // Create and append response data |
655 TTlv tlvSpecificData; |
672 TTlv tlvSpecificData; |
656 tlvSpecificData.AddTag( KTlvResultTag ); |
673 tlvSpecificData.AddTag( KTlvResultTag ); |
657 // Result |
674 // Result |
658 tlvSpecificData.AddByte( aGeneralResult ); |
675 tlvSpecificData.AddByte( aGeneralResult ); |
666 { |
683 { |
667 tlvSpecificData.AddByte( static_cast<TUint8>( aAdditionalInfo[0] ) ); |
684 tlvSpecificData.AddByte( static_cast<TUint8>( aAdditionalInfo[0] ) ); |
668 } |
685 } |
669 else |
686 else |
670 { |
687 { |
671 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CREATETERMINALRESPL_2, "CSAT: CSatNotifySetUpCall::CreateTerminalRespL aAdditionalInfo.Length() == 0" ); |
688 TFLOGSTRING( "CSAT: CSatNotifySetUpCall::CreateTerminalRespL \ |
|
689 aAdditionalInfo.Length() == 0" ); |
672 } |
690 } |
673 } |
691 } |
674 |
692 |
675 // Prepare data |
693 // Prepare data |
676 iNotificationsTsy->iTerminalRespData.iPCmdNumber = aPCmdNumber; |
694 iNotificationsTsy->iTerminalRespData.iPCmdNumber = aPCmdNumber; |
694 void CSatNotifySetUpCall::StoreCallConnectedEvent |
712 void CSatNotifySetUpCall::StoreCallConnectedEvent |
695 ( |
713 ( |
696 const TDesC8& aEnvelope |
714 const TDesC8& aEnvelope |
697 ) |
715 ) |
698 { |
716 { |
699 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_STORECALLCONNECTEDEVENT_1, "CSAT: CSatNotifySetUpCall::StoreCallConnectedEvent"); |
717 TFLOGSTRING("CSAT: CSatNotifySetUpCall::StoreCallConnectedEvent"); |
700 // Store it to the buffer |
718 // Store it to the buffer |
701 iCallConnectedEvent = aEnvelope; |
719 iCallConnectedEvent = aEnvelope; |
702 } |
720 } |
703 |
721 |
704 // End of file |
722 // End of file |