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