1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2005-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 "CSatNotifyGetInputTraces.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 "CSatNotifyGetInput.h" // Tsy class header |
25 #include "CSatNotifyGetInput.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 CSatNotifyGetInput* CSatNotifyGetInput::NewL |
40 CSatNotifyGetInput* CSatNotifyGetInput::NewL |
46 ( |
41 ( |
47 CSatNotificationsTsy* aNotificationsTsy |
42 CSatNotificationsTsy* aNotificationsTsy |
48 ) |
43 ) |
49 { |
44 { |
50 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_NEWL_1, "CSAT: CSatNotifyGetInput::NewL"); |
45 TFLOGSTRING("CSAT: CSatNotifyGetInput::NewL"); |
51 CSatNotifyGetInput* const satNotifyGetInput = |
46 CSatNotifyGetInput* const satNotifyGetInput = |
52 new ( ELeave ) CSatNotifyGetInput( aNotificationsTsy ); |
47 new ( ELeave ) CSatNotifyGetInput( aNotificationsTsy ); |
53 CleanupStack::PushL( satNotifyGetInput ); |
48 CleanupStack::PushL( satNotifyGetInput ); |
54 satNotifyGetInput->ConstructL(); |
49 satNotifyGetInput->ConstructL(); |
55 CleanupStack::Pop( satNotifyGetInput ); |
50 CleanupStack::Pop( satNotifyGetInput ); |
56 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_NEWL_2, "CSAT: CSatNotifyGetInput::NewL, end of method"); |
51 TFLOGSTRING("CSAT: CSatNotifyGetInput::NewL, end of method"); |
57 return satNotifyGetInput; |
52 return satNotifyGetInput; |
58 } |
53 } |
59 |
54 |
60 // ----------------------------------------------------------------------------- |
55 // ----------------------------------------------------------------------------- |
61 // CSatNotifyGetInput::~CSatNotifyGetInput |
56 // CSatNotifyGetInput::~CSatNotifyGetInput |
65 CSatNotifyGetInput::~CSatNotifyGetInput |
60 CSatNotifyGetInput::~CSatNotifyGetInput |
66 ( |
61 ( |
67 // None |
62 // None |
68 ) |
63 ) |
69 { |
64 { |
70 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_DTOR_1, "CSAT: CSatNotifyGetInput::~CSatNotifyGetInput"); |
65 TFLOGSTRING("CSAT: CSatNotifyGetInput::~CSatNotifyGetInput"); |
71 } |
66 } |
72 |
67 |
73 // ----------------------------------------------------------------------------- |
68 // ----------------------------------------------------------------------------- |
74 // CSatNotifyGetInput::CSatNotifyGetInput |
69 // CSatNotifyGetInput::CSatNotifyGetInput |
75 // Default C++ constructor |
70 // Default C++ constructor |
91 void CSatNotifyGetInput::ConstructL |
86 void CSatNotifyGetInput::ConstructL |
92 ( |
87 ( |
93 // None |
88 // None |
94 ) |
89 ) |
95 { |
90 { |
96 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CONSTRUCTL_1, "CSAT: CSatNotifyGetInput::ConstructL"); |
91 TFLOGSTRING("CSAT: CSatNotifyGetInput::ConstructL"); |
97 } |
92 } |
98 |
93 |
99 // ----------------------------------------------------------------------------- |
94 // ----------------------------------------------------------------------------- |
100 // CSatNotifyGetInput::Notify |
95 // CSatNotifyGetInput::Notify |
101 // Save the request handle type for notification requested by ETel server |
96 // Save the request handle type for notification requested by ETel server |
105 ( |
100 ( |
106 const TTsyReqHandle aTsyReqHandle, |
101 const TTsyReqHandle aTsyReqHandle, |
107 const TDataPackage& aPackage |
102 const TDataPackage& aPackage |
108 ) |
103 ) |
109 { |
104 { |
110 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_NOTIFY_1, "CSAT: CSatNotifyGetInput::Notify"); |
105 TFLOGSTRING("CSAT: CSatNotifyGetInput::Notify"); |
111 // Save data pointer to client side for completion |
106 // Save data pointer to client side for completion |
112 iGetInputV1Pckg = reinterpret_cast<RSat::TGetInputV1Pckg*>( |
107 iGetInputV1Pckg = reinterpret_cast<RSat::TGetInputV1Pckg*>( |
113 aPackage.Des1n() ); |
108 aPackage.Des1n() ); |
114 // Save the request handle |
109 // Save the request handle |
115 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
110 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
128 TInt CSatNotifyGetInput::CancelNotification |
123 TInt CSatNotifyGetInput::CancelNotification |
129 ( |
124 ( |
130 const TTsyReqHandle aTsyReqHandle |
125 const TTsyReqHandle aTsyReqHandle |
131 ) |
126 ) |
132 { |
127 { |
133 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CANCELNOTIFICATION_1, "CSAT: CSatNotifyGetInput::CancelNotification"); |
128 TFLOGSTRING("CSAT: CSatNotifyGetInput::CancelNotification"); |
134 // Reset the request handle |
129 // Reset the request handle |
135 TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> |
130 TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> |
136 ResetTsyReqHandle( |
131 ResetTsyReqHandle( |
137 CSatTsy::ESatNotifyGetInputPCmdReqType ); |
132 CSatTsy::ESatNotifyGetInputPCmdReqType ); |
138 // Reset the data pointer |
133 // Reset the data pointer |
151 ( |
146 ( |
152 CSatDataPackage* aDataPackage, |
147 CSatDataPackage* aDataPackage, |
153 TInt aErrorCode |
148 TInt aErrorCode |
154 ) |
149 ) |
155 { |
150 { |
156 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_1, "CSAT: CSatNotifyGetInput::CompleteNotifyL"); |
151 TFLOGSTRING("CSAT: CSatNotifyGetInput::CompleteNotifyL"); |
157 TInt returnValue( KErrNone ); |
152 TInt returnValue( KErrNone ); |
158 TInt ret( KErrNone ); |
153 TInt ret( KErrNone ); |
159 // Unpack parameters |
154 // Unpack parameters |
160 TPtrC8* data; |
155 TPtrC8* data; |
161 aDataPackage->UnPackData( &data ); |
156 aDataPackage->UnPackData( &data ); |
242 // Help information available |
237 // Help information available |
243 getInputV1.iHelp = RSat::EHelpAvailable; |
238 getInputV1.iHelp = RSat::EHelpAvailable; |
244 } |
239 } |
245 else |
240 else |
246 { |
241 { |
247 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_2, "CSAT: CSatNotifyGetInput::CompleteNotifyL, No Help available"); |
242 TFLOGSTRING("CSAT: CSatNotifyGetInput::CompleteNotifyL,\ |
|
243 No Help available"); |
248 // No help |
244 // No help |
249 getInputV1.iHelp = RSat::ENoHelpAvailable; |
245 getInputV1.iHelp = RSat::ENoHelpAvailable; |
250 } |
246 } |
251 |
247 |
252 |
248 |
260 // Convert and set text |
256 // Convert and set text |
261 TSatUtility::SetText( textString, getInputV1.iText ); |
257 TSatUtility::SetText( textString, getInputV1.iText ); |
262 } |
258 } |
263 else |
259 else |
264 { |
260 { |
265 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_3, "CSAT: CSatNotifyGetInput::CompleteNotifyL, Input text missing"); |
261 TFLOGSTRING("CSAT: CSatNotifyGetInput::CompleteNotifyL,\ |
|
262 Input text missing"); |
266 additionalInfo.Zero(); |
263 additionalInfo.Zero(); |
267 additionalInfo.Append( KNoCause ); |
264 additionalInfo.Append( KNoCause ); |
268 CreateTerminalRespL( pCmdNumber, |
265 CreateTerminalRespL( pCmdNumber, |
269 RSat::KErrorRequiredValuesMissing, additionalInfo, |
266 RSat::KErrorRequiredValuesMissing, additionalInfo, |
270 emptyText, RSat::ESmsDefaultAlphabetUnpacked ); |
267 emptyText, RSat::ESmsDefaultAlphabetUnpacked ); |
271 ret = KErrCorrupt; |
268 ret = KErrCorrupt; |
272 } |
269 } |
273 |
270 |
274 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_4, "CSAT: GetInput, text: %S", getInputV1.iText ); |
271 TFLOGSTRING2("CSAT: GetInput, text: %S", &getInputV1.iText ); |
275 |
272 |
276 // Response length expected |
273 // Response length expected |
277 CTlv responseLength; |
274 CTlv responseLength; |
278 returnValue = berTlv.TlvByTagValue( &responseLength, |
275 returnValue = berTlv.TlvByTagValue( &responseLength, |
279 KTlvResponseLengthTag ); |
276 KTlvResponseLengthTag ); |
285 responseLength.GetShortInfo( ETLV_MinimumLengthOfResponse ); |
282 responseLength.GetShortInfo( ETLV_MinimumLengthOfResponse ); |
286 |
283 |
287 if ( RSat::KGetInputTextMaxSize < |
284 if ( RSat::KGetInputTextMaxSize < |
288 getInputV1.iRspLength.iMinRspLength ) |
285 getInputV1.iRspLength.iMinRspLength ) |
289 { |
286 { |
290 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_5, "CSAT: CSatNotifyGetInput::CompleteNotifyL, Input text length exceeded"); |
287 TFLOGSTRING("CSAT: CSatNotifyGetInput::CompleteNotifyL,\ |
|
288 Input text length exceeded"); |
291 additionalInfo.Zero(); |
289 additionalInfo.Zero(); |
292 additionalInfo.Append( KNoCause ); |
290 additionalInfo.Append( KNoCause ); |
293 CreateTerminalRespL( pCmdNumber, |
291 CreateTerminalRespL( pCmdNumber, |
294 RSat::KCmdDataNotUnderstood, additionalInfo, |
292 RSat::KCmdDataNotUnderstood, additionalInfo, |
295 emptyText, RSat::ESmsDefaultAlphabetUnpacked ); |
293 emptyText, RSat::ESmsDefaultAlphabetUnpacked ); |
300 getInputV1.iRspLength.iMaxRspLength = |
298 getInputV1.iRspLength.iMaxRspLength = |
301 responseLength.GetShortInfo( ETLV_MaximumLengthOfResponse ); |
299 responseLength.GetShortInfo( ETLV_MaximumLengthOfResponse ); |
302 } |
300 } |
303 else |
301 else |
304 { |
302 { |
305 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_6, "CSAT: CSatNotifyGetInput::CompleteNotifyL, Response length TLV missing"); |
303 TFLOGSTRING("CSAT: CSatNotifyGetInput::CompleteNotifyL,\ |
|
304 Response length TLV missing"); |
306 // Mandatory reponse length tlv is missing |
305 // Mandatory reponse length tlv is missing |
307 additionalInfo.Zero(); |
306 additionalInfo.Zero(); |
308 additionalInfo.Append( KNoCause ); |
307 additionalInfo.Append( KNoCause ); |
309 CreateTerminalRespL( pCmdNumber, |
308 CreateTerminalRespL( pCmdNumber, |
310 RSat::KErrorRequiredValuesMissing, additionalInfo, |
309 RSat::KErrorRequiredValuesMissing, additionalInfo, |
333 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
332 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
334 } |
333 } |
335 |
334 |
336 else |
335 else |
337 { |
336 { |
338 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_COMPLETENOTIFYL_7, "CSAT: CSatNotifyGetInput::CompleteNotifyL, Request not ongoing"); |
337 TFLOGSTRING("CSAT: CSatNotifyGetInput::CompleteNotifyL,\ |
|
338 Request not ongoing"); |
339 // Request not on, returning response immediately |
339 // Request not on, returning response immediately |
340 additionalInfo.Zero(); |
340 additionalInfo.Zero(); |
341 additionalInfo.Append( KNoCause ); |
341 additionalInfo.Append( KNoCause ); |
342 CreateTerminalRespL( pCmdNumber, |
342 CreateTerminalRespL( pCmdNumber, |
343 RSat::KMeUnableToProcessCmd, additionalInfo, |
343 RSat::KMeUnableToProcessCmd, additionalInfo, |
356 TInt CSatNotifyGetInput::TerminalResponseL |
356 TInt CSatNotifyGetInput::TerminalResponseL |
357 ( |
357 ( |
358 TDes8* aRsp |
358 TDes8* aRsp |
359 ) |
359 ) |
360 { |
360 { |
361 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_TERMINALRESPONSEL_1, "CSAT: CSatNotifyGetInput::TerminalResponseL"); |
361 TFLOGSTRING("CSAT: CSatNotifyGetInput::TerminalResponseL"); |
362 |
362 |
363 TInt returnValue( KErrNone ); |
363 TInt returnValue( KErrNone ); |
364 TBuf<1>additionalInfo; |
364 TBuf<1>additionalInfo; |
365 |
365 |
366 RSat::TGetInputRspV1Pckg* aRspPckg = |
366 RSat::TGetInputRspV1Pckg* aRspPckg = |
367 reinterpret_cast<RSat::TGetInputRspV1Pckg*>( aRsp ); |
367 reinterpret_cast<RSat::TGetInputRspV1Pckg*>( aRsp ); |
368 RSat::TGetInputRspV1& rspV1 = ( *aRspPckg ) (); |
368 RSat::TGetInputRspV1& rspV1 = ( *aRspPckg ) (); |
369 |
369 |
370 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_TERMINALRESPONSEL_2, "CSAT: CSatNotifyGetInput::TerminalResponseL, iAdditionalInfo: %S, iInfoType: %u", rspV1.iAdditionalInfo, rspV1.iInfoType); |
370 TFLOGSTRING3("CSAT: CSatNotifyGetInput::TerminalResponseL, \ |
371 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_TERMINALRESPONSEL_3, "CSAT:CSatNotifyGetInput::TerminalResponseL, iGeneralResult: 0x%02x", (TUint)rspV1.iGeneralResult); |
371 iAdditionalInfo: %S, iInfoType: %d", |
|
372 &rspV1.iAdditionalInfo, rspV1.iInfoType); |
|
373 TFLOGSTRING2("CSAT:CSatNotifyGetInput::TerminalResponseL, \ |
|
374 iGeneralResult: %d", rspV1.iGeneralResult); |
372 |
375 |
373 // Get Proactive command number |
376 // Get Proactive command number |
374 TUint8 pCmdNumber( rspV1.PCmdNumber() ); |
377 TUint8 pCmdNumber( rspV1.PCmdNumber() ); |
375 |
378 |
376 // Checking that the response type is valid |
379 // Checking that the response type is valid |
386 && ( RSat::KNoResponseFromUser != rspV1.iGeneralResult ) |
389 && ( RSat::KNoResponseFromUser != rspV1.iGeneralResult ) |
387 && ( RSat::KHelpRequestedByUser != rspV1.iGeneralResult ) |
390 && ( RSat::KHelpRequestedByUser != rspV1.iGeneralResult ) |
388 && ( RSat::KMeUnableToProcessCmd != rspV1.iGeneralResult ) |
391 && ( RSat::KMeUnableToProcessCmd != rspV1.iGeneralResult ) |
389 && ( RSat::KCmdBeyondMeCapabilities != rspV1.iGeneralResult )) |
392 && ( RSat::KCmdBeyondMeCapabilities != rspV1.iGeneralResult )) |
390 { |
393 { |
391 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_TERMINALRESPONSEL_4, "CSAT: CSatNotifyGetInput::TerminalResponseL, Invalid General Result"); |
394 TFLOGSTRING("CSAT: CSatNotifyGetInput::TerminalResponseL,\ |
|
395 Invalid General Result"); |
392 // Invalid general result |
396 // Invalid general result |
393 returnValue = KErrCorrupt; |
397 returnValue = KErrCorrupt; |
394 } |
398 } |
395 |
399 |
396 // If there is Me (Mobile Entity) error, additional info is needed |
400 // If there is Me (Mobile Entity) error, additional info is needed |
402 additionalInfo.Zero(); |
406 additionalInfo.Zero(); |
403 additionalInfo.Append( rspV1.iAdditionalInfo[0] ); |
407 additionalInfo.Append( rspV1.iAdditionalInfo[0] ); |
404 } |
408 } |
405 else |
409 else |
406 { |
410 { |
407 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_TERMINALRESPONSEL_5, "CSAT: CSatNotifyGetInput::TerminalResponseL, Invalid Additional Info"); |
411 TFLOGSTRING("CSAT: CSatNotifyGetInput::TerminalResponseL,\ |
|
412 Invalid Additional Info"); |
408 // Invalid additional info field |
413 // Invalid additional info field |
409 returnValue = KErrCorrupt; |
414 returnValue = KErrCorrupt; |
410 } |
415 } |
411 } |
416 } |
412 |
417 |
430 TDesC16& aAdditionalInfo, |
435 TDesC16& aAdditionalInfo, |
431 TDesC16& aTextString, |
436 TDesC16& aTextString, |
432 TUint8 aDcs |
437 TUint8 aDcs |
433 ) |
438 ) |
434 { |
439 { |
435 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CREATETERMINALRESPL_1, "CSAT: CSatNotifyGetInput::CreateTerminalRespL"); |
440 TFLOGSTRING("CSAT: CSatNotifyGetInput::CreateTerminalRespL"); |
436 TTlv tlvSpecificData; |
441 TTlv tlvSpecificData; |
437 TBuf8<KGetInputStringMaxSize> string; |
442 TBuf8<KGetInputStringMaxSize> string; |
438 |
443 |
439 tlvSpecificData.AddTag( KTlvResultTag ); |
444 tlvSpecificData.AddTag( KTlvResultTag ); |
440 //General result |
445 //General result |
454 tlvSpecificData.AddTag( KTlvTextStringTag ); |
459 tlvSpecificData.AddTag( KTlvTextStringTag ); |
455 |
460 |
456 |
461 |
457 if ( aTextString.Length() ) |
462 if ( aTextString.Length() ) |
458 { |
463 { |
459 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CREATETERMINALRESPL_2, "CSAT: CSatNotifyGetInput::CreateTerminalRespL aTextString: %S", aTextString); |
464 TFLOGSTRING2("CSAT: CSatNotifyGetInput::CreateTerminalRespL \ |
|
465 aTextString: %S", &aTextString); |
460 switch ( aDcs ) |
466 switch ( aDcs ) |
461 { |
467 { |
462 case RSat::EUcs2Alphabet: |
468 case RSat::EUcs2Alphabet: |
463 { |
469 { |
464 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CREATETERMINALRESPL_3, "CSAT: CSatNotifyGetInput::CreateTerminalRespL EUcs2Alphabet"); |
470 TFLOGSTRING("CSAT: CSatNotifyGetInput::CreateTerminalRespL \ |
|
471 EUcs2Alphabet"); |
465 // Data coding scheme UCS2 (16-bit) |
472 // Data coding scheme UCS2 (16-bit) |
466 tlvSpecificData.AddByte( KUCS2DCS ); |
473 tlvSpecificData.AddByte( KUCS2DCS ); |
467 |
474 |
468 if ( aTextString.Length() ) |
475 if ( aTextString.Length() ) |
469 { |
476 { |
474 } |
481 } |
475 |
482 |
476 case RSat::EDigitOnlyPacked: |
483 case RSat::EDigitOnlyPacked: |
477 case RSat::ESmsDefaultAlphabetPacked: |
484 case RSat::ESmsDefaultAlphabetPacked: |
478 { |
485 { |
479 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CREATETERMINALRESPL_4, "CSAT: CSatNotifyGetInput::CreateTerminalRespL EDigitOnlyPacked/ESmsDefaultAlphabetPacked"); |
486 TFLOGSTRING("CSAT: CSatNotifyGetInput::CreateTerminalRespL \ |
|
487 EDigitOnlyPacked/ESmsDefaultAlphabetPacked"); |
480 // Data coding scheme 7-bit default sms |
488 // Data coding scheme 7-bit default sms |
481 tlvSpecificData.AddByte( K7BitDefaultSmsDCS ); |
489 tlvSpecificData.AddByte( K7BitDefaultSmsDCS ); |
482 TSatUtility::UCSToPacked7( aTextString, string ); |
490 TSatUtility::UCSToPacked7( aTextString, string ); |
483 tlvSpecificData.AddData( string ); |
491 tlvSpecificData.AddData( string ); |
484 break; |
492 break; |
485 } |
493 } |
486 |
494 |
487 case RSat::EDigitOnlyUnpacked: |
495 case RSat::EDigitOnlyUnpacked: |
488 case RSat::ESmsDefaultAlphabetUnpacked: |
496 case RSat::ESmsDefaultAlphabetUnpacked: |
489 { |
497 { |
490 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CREATETERMINALRESPL_5, "CSAT: CSatNotifyGetInput::CreateTerminalRespL EDigitOnlyUnpacked/ESmsDefaultAlphabetUnpacked"); |
498 TFLOGSTRING("CSAT: CSatNotifyGetInput::CreateTerminalRespL \ |
|
499 EDigitOnlyUnpacked/ESmsDefaultAlphabetUnpacked"); |
491 // Data coding scheme 8-bit |
500 // Data coding scheme 8-bit |
492 tlvSpecificData.AddByte( K8BitDCS ); |
501 tlvSpecificData.AddByte( K8BitDCS ); |
493 TSatUtility::ConvertUnicode16To7Bit( aTextString, string ); |
502 TSatUtility::ConvertUnicode16To7Bit( aTextString, string ); |
494 tlvSpecificData.AddData( string ); |
503 tlvSpecificData.AddData( string ); |
495 break; |
504 break; |
497 default: |
506 default: |
498 // do nothing |
507 // do nothing |
499 break; |
508 break; |
500 } |
509 } |
501 |
510 |
502 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYGETINPUT_CREATETERMINALRESPL_6, "CSAT: CSatNotifyGetInput::CreateTerminalRespL string: %s", string); |
511 TFLOGSTRING2("CSAT: CSatNotifyGetInput::CreateTerminalRespL \ |
|
512 string: %S", &string); |
503 } |
513 } |
504 } |
514 } |
505 // Prepare data |
515 // Prepare data |
506 iNotificationsTsy->iTerminalRespData.iPCmdNumber = aPCmdNumber; |
516 iNotificationsTsy->iTerminalRespData.iPCmdNumber = aPCmdNumber; |
507 TPtrC8 data = tlvSpecificData.GetDataWithoutTopLevelTag(); |
517 TPtrC8 data = tlvSpecificData.GetDataWithoutTopLevelTag(); |