branch | RCL_3 |
changeset 66 | 07a122eea281 |
parent 65 | 630d2f34d719 |
65:630d2f34d719 | 66:07a122eea281 |
---|---|
1 // Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2003-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". |
17 |
17 |
18 /** |
18 /** |
19 @file |
19 @file |
20 */ |
20 */ |
21 |
21 |
22 |
|
23 #include "OstTraceDefinitions.h" |
|
24 #ifdef OST_TRACE_COMPILER_IN_USE |
|
25 #include "gsmupduTraces.h" |
|
26 #endif |
|
27 |
|
28 #include <etelmm.h> |
22 #include <etelmm.h> |
29 #include "gsmuNmspaceMobMsg.h" |
23 #include "gsmuNmspaceMobMsg.h" |
30 #include "gsmuetel.h" |
24 #include "gsmuetel.h" |
31 #include <exterror.h> |
25 #include <exterror.h> |
32 #include <e32uid.h> |
26 #include <e32uid.h> |
47 * @return Newly constructed CSmsPDU-derived object restored from aStream |
41 * @return Newly constructed CSmsPDU-derived object restored from aStream |
48 * @capability None |
42 * @capability None |
49 */ |
43 */ |
50 EXPORT_C CSmsPDU* CSmsPDU::NewL(RReadStream& aStream,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
44 EXPORT_C CSmsPDU* CSmsPDU::NewL(RReadStream& aStream,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
51 { |
45 { |
52 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NEWL_1, "CSmsPDU::NewL()"); |
46 LOGGSMU1("CSmsPDU::NewL()"); |
53 |
47 |
54 TInt type=aStream.ReadUint8L(); |
48 TInt type=aStream.ReadUint8L(); |
55 CSmsPDU* smspdu=NULL; |
49 CSmsPDU* smspdu=NULL; |
56 switch (type) |
50 switch (type) |
57 { |
51 { |
115 * @return Newly constructed CSmsPDU-derived object restored from aGsmSms |
109 * @return Newly constructed CSmsPDU-derived object restored from aGsmSms |
116 * @capability None |
110 * @capability None |
117 */ |
111 */ |
118 EXPORT_C CSmsPDU* CSmsPDU::NewL(const TGsmSms& aGsmSms,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs, TBool aIsRPError,TBool aIsMobileTerminated) |
112 EXPORT_C CSmsPDU* CSmsPDU::NewL(const TGsmSms& aGsmSms,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs, TBool aIsRPError,TBool aIsMobileTerminated) |
119 { |
113 { |
120 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NEWL1_1, "CSmsPDU::NewL(): aIsRPError=%d, aIsMobileTerminated=%d",aIsRPError, aIsMobileTerminated); |
114 LOGGSMU3("CSmsPDU::NewL(): aIsRPError=%d, aIsMobileTerminated=%d", |
115 aIsRPError, aIsMobileTerminated); |
|
121 |
116 |
122 const TUint8* ptr1=aGsmSms.Pdu().Ptr(); |
117 const TUint8* ptr1=aGsmSms.Pdu().Ptr(); |
123 |
118 |
124 TInt mti=*ptr1 & TSmsFirstOctet::ESmsMTIMask; // mask first two bits |
119 TInt mti=*ptr1 & TSmsFirstOctet::ESmsMTIMask; // mask first two bits |
125 CSmsPDU* smspdu=NULL; |
120 CSmsPDU* smspdu=NULL; |
179 * @return Newly constructed CSmsPDU-derived object |
174 * @return Newly constructed CSmsPDU-derived object |
180 * @capability None |
175 * @capability None |
181 */ |
176 */ |
182 EXPORT_C CSmsPDU* CSmsPDU::NewL(TSmsPDUType aType,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TBool aIsRPError) |
177 EXPORT_C CSmsPDU* CSmsPDU::NewL(TSmsPDUType aType,CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs,TBool aIsRPError) |
183 { |
178 { |
184 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NEWL2_1, "CSmsPDU::NewL(): aIsRPError=%d", aIsRPError); |
179 LOGGSMU2("CSmsPDU::NewL(): aIsRPError=%d", aIsRPError); |
185 |
180 |
186 CSmsPDU* smspdu=NULL; |
181 CSmsPDU* smspdu=NULL; |
187 switch (aType) |
182 switch (aType) |
188 { |
183 { |
189 case ESmsDeliver: |
184 case ESmsDeliver: |
232 * @return Newly constructed CSmsPDU-derived object |
227 * @return Newly constructed CSmsPDU-derived object |
233 * @capability None |
228 * @capability None |
234 */ |
229 */ |
235 EXPORT_C CSmsPDU* CSmsPDU::DuplicateL() const |
230 EXPORT_C CSmsPDU* CSmsPDU::DuplicateL() const |
236 { |
231 { |
237 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_DUPLICATEL_1, "CSmsPDU::DuplicateL()"); |
232 LOGGSMU1("CSmsPDU::DuplicateL()"); |
238 |
233 |
239 CSmsPDU* smsPDU = NULL; |
234 CSmsPDU* smsPDU = NULL; |
240 |
235 |
241 switch (Type()) |
236 switch (Type()) |
242 { |
237 { |
306 * @param aGsmSms On return, encoded GSM SMS PDU |
301 * @param aGsmSms On return, encoded GSM SMS PDU |
307 * @capability None |
302 * @capability None |
308 */ |
303 */ |
309 EXPORT_C void CSmsPDU::EncodeMessagePDUL(TGsmSms& aGsmSms) const |
304 EXPORT_C void CSmsPDU::EncodeMessagePDUL(TGsmSms& aGsmSms) const |
310 { |
305 { |
311 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_ENCODEMESSAGEPDUL_1, "CSmsPDU::EncodeMessagePDUL()"); |
306 LOGGSMU1("CSmsPDU::EncodeMessagePDUL()"); |
312 |
307 |
313 NMobileSmsMessaging::TMobileSmsGsmTpdu pdu; |
308 NMobileSmsMessaging::TMobileSmsGsmTpdu pdu; |
314 pdu.SetLength(NMobileSmsMessaging::KGsmTpduSize); |
309 pdu.SetLength(NMobileSmsMessaging::KGsmTpduSize); |
315 TUint8 *ptr1=(TUint8*) pdu.Ptr(); |
310 TUint8 *ptr1=(TUint8*) pdu.Ptr(); |
316 TUint8 *ptr2=ptr1; |
311 TUint8 *ptr2=ptr1; |
324 aGsmSms.SetPdu(pdu); |
319 aGsmSms.SetPdu(pdu); |
325 } // CSmsPDU::EncodeMessagePDUL |
320 } // CSmsPDU::EncodeMessagePDUL |
326 |
321 |
327 void CSmsPDU::EncodeMessagePDUL(TGsmSms& aGsmSms, const TEncodeParams* aEncodeParams) const |
322 void CSmsPDU::EncodeMessagePDUL(TGsmSms& aGsmSms, const TEncodeParams* aEncodeParams) const |
328 { |
323 { |
329 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_ENCODEMESSAGEPDUL1_1, "CSmsPDU::EncodeMessagePDUL()"); |
324 LOGGSMU1("CSmsPDU::EncodeMessagePDUL()"); |
330 |
325 |
331 NMobileSmsMessaging::TMobileSmsGsmTpdu pdu; |
326 NMobileSmsMessaging::TMobileSmsGsmTpdu pdu; |
332 pdu.SetLength(NMobileSmsMessaging::KGsmTpduSize); |
327 pdu.SetLength(NMobileSmsMessaging::KGsmTpduSize); |
333 TUint8 *ptr1=(TUint8*) pdu.Ptr(); |
328 TUint8 *ptr1=(TUint8*) pdu.Ptr(); |
334 TUint8 *ptr2=ptr1; |
329 TUint8 *ptr2=ptr1; |
351 * @return Service center address |
346 * @return Service center address |
352 * @capability None |
347 * @capability None |
353 */ |
348 */ |
354 EXPORT_C TPtrC CSmsPDU::ServiceCenterAddress() const |
349 EXPORT_C TPtrC CSmsPDU::ServiceCenterAddress() const |
355 { |
350 { |
356 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SERVICECENTERADDRESS_1, "CSmsPDU::ServiceCenterAddress()"); |
351 LOGGSMU1("CSmsPDU::ServiceCenterAddress()"); |
357 |
352 |
358 return iServiceCenterAddress->Address(); |
353 return iServiceCenterAddress->Address(); |
359 } // CSmsPDU::ServiceCenterAddress |
354 } // CSmsPDU::ServiceCenterAddress |
360 |
355 |
361 |
356 |
367 * @param aAddress Service center address |
362 * @param aAddress Service center address |
368 * @capability None |
363 * @capability None |
369 */ |
364 */ |
370 EXPORT_C void CSmsPDU::SetServiceCenterAddressL(const TDesC& aAddress) |
365 EXPORT_C void CSmsPDU::SetServiceCenterAddressL(const TDesC& aAddress) |
371 { |
366 { |
372 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETSERVICECENTERADDRESSL_1, "CSmsPDU::SetServiceCenterAddressL()"); |
367 LOGGSMU1("CSmsPDU::SetServiceCenterAddressL()"); |
373 |
368 |
374 iServiceCenterAddress->SetAddressL(aAddress); |
369 iServiceCenterAddress->SetAddressL(aAddress); |
375 } // CSmsPDU::SetServiceCenterAddressL |
370 } // CSmsPDU::SetServiceCenterAddressL |
376 |
371 |
377 |
372 |
383 * @param aParsedAddress Service center address |
378 * @param aParsedAddress Service center address |
384 * @capability None |
379 * @capability None |
385 */ |
380 */ |
386 EXPORT_C void CSmsPDU::ParsedServiceCenterAddress(TGsmSmsTelNumber& aParsedAddress) const |
381 EXPORT_C void CSmsPDU::ParsedServiceCenterAddress(TGsmSmsTelNumber& aParsedAddress) const |
387 { |
382 { |
388 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_PARSEDSERVICECENTERADDRESS_1, "CSmsPDU::ParsedServiceCenterAddress()"); |
383 LOGGSMU1("CSmsPDU::ParsedServiceCenterAddress()"); |
389 |
384 |
390 iServiceCenterAddress->ParsedAddress(aParsedAddress); |
385 iServiceCenterAddress->ParsedAddress(aParsedAddress); |
391 } // CSmsPDU::ParsedServiceCenterAddress |
386 } // CSmsPDU::ParsedServiceCenterAddress |
392 |
387 |
393 |
388 |
399 * @param aParsedAddress Service center address |
394 * @param aParsedAddress Service center address |
400 * @capability None |
395 * @capability None |
401 */ |
396 */ |
402 EXPORT_C void CSmsPDU::SetParsedServiceCenterAddressL(const TGsmSmsTelNumber& aParsedAddress) |
397 EXPORT_C void CSmsPDU::SetParsedServiceCenterAddressL(const TGsmSmsTelNumber& aParsedAddress) |
403 { |
398 { |
404 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETPARSEDSERVICECENTERADDRESSL_1, "CSmsPDU::SetParsedServiceCenterAddressL()"); |
399 LOGGSMU1("CSmsPDU::SetParsedServiceCenterAddressL()"); |
405 |
400 |
406 iServiceCenterAddress->SetParsedAddressL(aParsedAddress); |
401 iServiceCenterAddress->SetParsedAddressL(aParsedAddress); |
407 } // CSmsPDU::SetParsedServiceCenterAddressL |
402 } // CSmsPDU::SetParsedServiceCenterAddressL |
408 |
403 |
409 |
404 |
424 * @return The destination or sender address |
419 * @return The destination or sender address |
425 * @capability None |
420 * @capability None |
426 */ |
421 */ |
427 EXPORT_C TPtrC CSmsPDU::ToFromAddress() const |
422 EXPORT_C TPtrC CSmsPDU::ToFromAddress() const |
428 { |
423 { |
429 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_TOFROMADDRESS_1, "CSmsPDU::SetParsedServiceCenterAddressL()"); |
424 LOGGSMU1("CSmsPDU::SetParsedServiceCenterAddressL()"); |
430 |
425 |
431 if (ToFromAddressPtr() == NULL) |
426 if (ToFromAddressPtr() == NULL) |
432 { |
427 { |
433 return TPtrC(KNullDesC16); |
428 return TPtrC(KNullDesC16); |
434 } |
429 } |
448 * @param aAddress The destination or sender address |
443 * @param aAddress The destination or sender address |
449 * @capability None |
444 * @capability None |
450 */ |
445 */ |
451 EXPORT_C void CSmsPDU::SetToFromAddressL(const TDesC& aAddress) |
446 EXPORT_C void CSmsPDU::SetToFromAddressL(const TDesC& aAddress) |
452 { |
447 { |
453 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETTOFROMADDRESSL_1, "CSmsPDU::SetToFromAddressL()"); |
448 LOGGSMU1("CSmsPDU::SetToFromAddressL()"); |
454 |
449 |
455 __ASSERT_DEBUG(ToFromAddressPtr()!=NULL,Panic(KGsmuPanicToFromAddressNotPresent)); |
450 __ASSERT_DEBUG(ToFromAddressPtr()!=NULL,Panic(KGsmuPanicToFromAddressNotPresent)); |
456 CSmsAddress* tofromaddress=(CSmsAddress*) ToFromAddressPtr(); |
451 CSmsAddress* tofromaddress=(CSmsAddress*) ToFromAddressPtr(); |
457 tofromaddress->SetAddressL(aAddress); |
452 tofromaddress->SetAddressL(aAddress); |
458 } // CSmsPDU::SetToFromAddressL |
453 } // CSmsPDU::SetToFromAddressL |
466 * @param aParsedAddress The destination or sender address |
461 * @param aParsedAddress The destination or sender address |
467 * @capability None |
462 * @capability None |
468 */ |
463 */ |
469 EXPORT_C void CSmsPDU::ParsedToFromAddress(TGsmSmsTelNumber& aParsedAddress) const |
464 EXPORT_C void CSmsPDU::ParsedToFromAddress(TGsmSmsTelNumber& aParsedAddress) const |
470 { |
465 { |
471 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_PARSEDTOFROMADDRESS_1, "CSmsPDU::ParsedToFromAddress()"); |
466 LOGGSMU1("CSmsPDU::ParsedToFromAddress()"); |
472 |
467 |
473 __ASSERT_DEBUG(ToFromAddressPtr()!=NULL,Panic(KGsmuPanicToFromAddressNotPresent)); |
468 __ASSERT_DEBUG(ToFromAddressPtr()!=NULL,Panic(KGsmuPanicToFromAddressNotPresent)); |
474 ToFromAddressPtr()->ParsedAddress(aParsedAddress); |
469 ToFromAddressPtr()->ParsedAddress(aParsedAddress); |
475 } // CSmsPDU::ParsedToFromAddress |
470 } // CSmsPDU::ParsedToFromAddress |
476 |
471 |
481 * @param aParsedAddress The destination or sender address |
476 * @param aParsedAddress The destination or sender address |
482 * @capability None |
477 * @capability None |
483 */ |
478 */ |
484 EXPORT_C void CSmsPDU::SetParsedToFromAddressL(const TGsmSmsTelNumber& aParsedAddress) |
479 EXPORT_C void CSmsPDU::SetParsedToFromAddressL(const TGsmSmsTelNumber& aParsedAddress) |
485 { |
480 { |
486 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETPARSEDTOFROMADDRESSL_1, "CSmsPDU::SetParsedToFromAddressL()"); |
481 LOGGSMU1("CSmsPDU::SetParsedToFromAddressL()"); |
487 |
482 |
488 __ASSERT_DEBUG(ToFromAddressPtr()!=NULL,Panic(KGsmuPanicToFromAddressNotPresent)); |
483 __ASSERT_DEBUG(ToFromAddressPtr()!=NULL,Panic(KGsmuPanicToFromAddressNotPresent)); |
489 CSmsAddress* tofromaddress=(CSmsAddress*) ToFromAddressPtr(); |
484 CSmsAddress* tofromaddress=(CSmsAddress*) ToFromAddressPtr(); |
490 tofromaddress->SetParsedAddressL(aParsedAddress); |
485 tofromaddress->SetParsedAddressL(aParsedAddress); |
491 } // CSmsPDU::SetParsedToFromAddressL |
486 } // CSmsPDU::SetParsedToFromAddressL |
500 * @param aPduIndex Current PDU number. |
495 * @param aPduIndex Current PDU number. |
501 * @param aMaxPdu Total PDU number. |
496 * @param aMaxPdu Total PDU number. |
502 */ |
497 */ |
503 void CSmsPDU::UpdateConcatenationDataL(TInt aRef, TInt aPduIndex, TInt aMaxPdu) |
498 void CSmsPDU::UpdateConcatenationDataL(TInt aRef, TInt aPduIndex, TInt aMaxPdu) |
504 { |
499 { |
505 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_UPDATECONCATENATIONDATAL_1, "CSmsPDU::UpdateConcatenationDataL()"); |
500 LOGGSMU1("CSmsPDU::UpdateConcatenationDataL()"); |
506 |
501 |
507 SetConcatenatedMessageReference(aRef); |
502 SetConcatenatedMessageReference(aRef); |
508 SetConcatenatedMessagePDUIndex(aPduIndex); |
503 SetConcatenatedMessagePDUIndex(aPduIndex); |
509 SetNumConcatenatedMessagePDUs(aMaxPdu); |
504 SetNumConcatenatedMessagePDUs(aMaxPdu); |
510 } // CSmsPDU::UpdateConcatenationDataL |
505 } // CSmsPDU::UpdateConcatenationDataL |
515 * |
510 * |
516 * @param aEmailOverallHeaderLength Length of the email header. |
511 * @param aEmailOverallHeaderLength Length of the email header. |
517 */ |
512 */ |
518 void CSmsPDU::UpdateEmailHeaderDataL(TInt& aEmailOverallHeaderLength) |
513 void CSmsPDU::UpdateEmailHeaderDataL(TInt& aEmailOverallHeaderLength) |
519 { |
514 { |
520 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_UPDATEEMAILHEADERDATAL_1, "CSmsPDU::UpdateEmailHeaderDataL()"); |
515 LOGGSMU1("CSmsPDU::UpdateEmailHeaderDataL()"); |
521 |
516 |
522 TInt emailIndex(0); |
517 TInt emailIndex(0); |
523 TInt udLength=0; |
518 TInt udLength=0; |
524 TInt headerPortionLength=0; |
519 TInt headerPortionLength=0; |
525 if(UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIRFC822EmailHeader,emailIndex)) |
520 if(UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIRFC822EmailHeader,emailIndex)) |
613 } // CSmsPDU::UpdateTPSRRL |
608 } // CSmsPDU::UpdateTPSRRL |
614 |
609 |
615 |
610 |
616 EXPORT_C TSmsEncoding CSmsPDU::NationalLanguageEncoding() const |
611 EXPORT_C TSmsEncoding CSmsPDU::NationalLanguageEncoding() const |
617 { |
612 { |
618 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NATIONALLANGUAGEENCODING_1, "CSmsPDU::NationalLanguageEncoding()"); |
613 LOGGSMU1("CSmsPDU::NationalLanguageEncoding()"); |
619 |
614 |
620 TSmsEncoding encodingUsed = ESmsEncodingNone; |
615 TSmsEncoding encodingUsed = ESmsEncodingNone; |
621 |
616 |
622 // |
617 // |
623 // Only valid in 7bit... |
618 // Only valid in 7bit... |
723 // |
718 // |
724 } |
719 } |
725 }; |
720 }; |
726 } |
721 } |
727 |
722 |
728 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NATIONALLANGUAGEENCODING_2, "CSmsPDU::NationalLanguageEncoding(): lockingShift=%d", lockingShiftValue); |
723 LOGGSMU2("CSmsPDU::NationalLanguageEncoding(): lockingShift=%d", lockingShiftValue); |
729 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NATIONALLANGUAGEENCODING_3, "CSmsPDU::NationalLanguageEncoding(): singleShift=%d", singleShiftValue); |
724 LOGGSMU2("CSmsPDU::NationalLanguageEncoding(): singleShift=%d", singleShiftValue); |
730 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NATIONALLANGUAGEENCODING_4, "CSmsPDU::NationalLanguageEncoding(): encodingUsed=%d", encodingUsed); |
725 LOGGSMU2("CSmsPDU::NationalLanguageEncoding(): encodingUsed=%d", encodingUsed); |
731 |
726 |
732 return encodingUsed; |
727 return encodingUsed; |
733 } // CSmsPDU::NationalLanguageEncoding |
728 } // CSmsPDU::NationalLanguageEncoding |
734 |
729 |
735 |
730 |
736 EXPORT_C void CSmsPDU::SetNationalLanguageEncodingL(TSmsEncoding aEncoding) |
731 EXPORT_C void CSmsPDU::SetNationalLanguageEncodingL(TSmsEncoding aEncoding) |
737 { |
732 { |
738 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETNATIONALLANGUAGEENCODINGL_1, "CSmsPDU::SetNationalLanguageEncodingL(): aEncoding=%d", aEncoding); |
733 LOGGSMU2("CSmsPDU::SetNationalLanguageEncodingL(): aEncoding=%d", aEncoding); |
739 |
734 |
740 // |
735 // |
741 // Convert the encoding enum into two parts: Single Shift and Locking Shift |
736 // Convert the encoding enum into two parts: Single Shift and Locking Shift |
742 // |
737 // |
743 TSmsNationalLanguageIdentifier lockingShiftValue = (TSmsNationalLanguageIdentifier) 0; |
738 TSmsNationalLanguageIdentifier lockingShiftValue = (TSmsNationalLanguageIdentifier) 0; |
813 // |
808 // |
814 User::Leave(KErrArgument); |
809 User::Leave(KErrArgument); |
815 } |
810 } |
816 }; |
811 }; |
817 |
812 |
818 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETNATIONALLANGUAGEENCODINGL_2, "CSmsPDU::SetNationalLanguageEncodingL(): lockingShift=%d", lockingShiftValue); |
813 LOGGSMU2("CSmsPDU::SetNationalLanguageEncodingL(): lockingShift=%d", lockingShiftValue); |
819 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETNATIONALLANGUAGEENCODINGL_3, "CSmsPDU::SetNationalLanguageEncodingL(): singleShift=%d", singleShiftValue); |
814 LOGGSMU2("CSmsPDU::SetNationalLanguageEncodingL(): singleShift=%d", singleShiftValue); |
820 |
815 |
821 // |
816 // |
822 // Update the locking shift setting... |
817 // Update the locking shift setting... |
823 // |
818 // |
824 TInt lockingIndex = 0; |
819 TInt lockingIndex = 0; |
902 * @return Bits 7 to 4 |
897 * @return Bits 7 to 4 |
903 * @capability None |
898 * @capability None |
904 */ |
899 */ |
905 EXPORT_C TSmsDataCodingScheme::TSmsDCSBits7To4 CSmsPDU::Bits7To4() const |
900 EXPORT_C TSmsDataCodingScheme::TSmsDCSBits7To4 CSmsPDU::Bits7To4() const |
906 { |
901 { |
907 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_BITS7TO4_1, "CSmsPDU::Bits7To4()"); |
902 LOGGSMU1("CSmsPDU::Bits7To4()"); |
908 |
903 |
909 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
904 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
910 |
905 |
911 return DataCodingScheme()->Bits7To4(); |
906 return DataCodingScheme()->Bits7To4(); |
912 } // TSmsDataCodingScheme::TSmsDCSBits7To4 |
907 } // TSmsDataCodingScheme::TSmsDCSBits7To4 |
924 * @param aBits7To4 Bits 7 to 4 |
919 * @param aBits7To4 Bits 7 to 4 |
925 * @capability None |
920 * @capability None |
926 */ |
921 */ |
927 EXPORT_C void CSmsPDU::SetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4 aBits7To4) |
922 EXPORT_C void CSmsPDU::SetBits7To4(TSmsDataCodingScheme::TSmsDCSBits7To4 aBits7To4) |
928 { |
923 { |
929 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETBITS7TO4_1, "CSmsPDU::SetBits7To4()"); |
924 LOGGSMU1("CSmsPDU::SetBits7To4()"); |
930 |
925 |
931 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
926 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
932 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
927 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
933 datacodingscheme->SetBits7To4(aBits7To4); |
928 datacodingscheme->SetBits7To4(aBits7To4); |
934 } // CSmsPDU::SetBits7To4 |
929 } // CSmsPDU::SetBits7To4 |
942 * @return Alphabet |
937 * @return Alphabet |
943 * @capability None |
938 * @capability None |
944 */ |
939 */ |
945 EXPORT_C TSmsDataCodingScheme::TSmsAlphabet CSmsPDU::Alphabet() const |
940 EXPORT_C TSmsDataCodingScheme::TSmsAlphabet CSmsPDU::Alphabet() const |
946 { |
941 { |
947 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_ALPHABET_1, "CSmsPDU::Alphabet()"); |
942 LOGGSMU1("CSmsPDU::Alphabet()"); |
948 |
943 |
949 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
944 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
950 return DataCodingScheme()->Alphabet(); |
945 return DataCodingScheme()->Alphabet(); |
951 } // TSmsDataCodingScheme::TSmsAlphabet |
946 } // TSmsDataCodingScheme::TSmsAlphabet |
952 |
947 |
959 * @param aAlphabet Alphabet |
954 * @param aAlphabet Alphabet |
960 * @capability None |
955 * @capability None |
961 */ |
956 */ |
962 EXPORT_C void CSmsPDU::SetAlphabet(TSmsDataCodingScheme::TSmsAlphabet aAlphabet) |
957 EXPORT_C void CSmsPDU::SetAlphabet(TSmsDataCodingScheme::TSmsAlphabet aAlphabet) |
963 { |
958 { |
964 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETALPHABET_1, "CSmsPDU::SetAlphabet()"); |
959 LOGGSMU1("CSmsPDU::SetAlphabet()"); |
965 |
960 |
966 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
961 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
967 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
962 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
968 datacodingscheme->SetAlphabet(aAlphabet); |
963 datacodingscheme->SetAlphabet(aAlphabet); |
969 } // CSmsPDU::SetAlphabet |
964 } // CSmsPDU::SetAlphabet |
978 * @return True if SMS class is defined, else false |
973 * @return True if SMS class is defined, else false |
979 * @capability None |
974 * @capability None |
980 */ |
975 */ |
981 EXPORT_C TBool CSmsPDU::Class(TSmsDataCodingScheme::TSmsClass& aClass) const |
976 EXPORT_C TBool CSmsPDU::Class(TSmsDataCodingScheme::TSmsClass& aClass) const |
982 { |
977 { |
983 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_CLASS_1, "CSmsPDU::Class()"); |
978 LOGGSMU1("CSmsPDU::Class()"); |
984 |
979 |
985 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
980 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
986 return DataCodingScheme()->Class(aClass); |
981 return DataCodingScheme()->Class(aClass); |
987 } // CSmsPDU::Class |
982 } // CSmsPDU::Class |
988 |
983 |
996 * @param aClass Sms class 0 - 3 encoded in the data coding scheme |
991 * @param aClass Sms class 0 - 3 encoded in the data coding scheme |
997 * @capability None |
992 * @capability None |
998 */ |
993 */ |
999 EXPORT_C void CSmsPDU::SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass) |
994 EXPORT_C void CSmsPDU::SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass) |
1000 { |
995 { |
1001 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETCLASS_1, "CSmsPDU::SetClass()"); |
996 LOGGSMU1("CSmsPDU::SetClass()"); |
1002 |
997 |
1003 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
998 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1004 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
999 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1005 datacodingscheme->SetClass(aClassDefined,aClass); |
1000 datacodingscheme->SetClass(aClassDefined,aClass); |
1006 } // CSmsPDU::SetClass |
1001 } // CSmsPDU::SetClass |
1014 * @return True if Text Compressed is encoded |
1009 * @return True if Text Compressed is encoded |
1015 * @capability None |
1010 * @capability None |
1016 */ |
1011 */ |
1017 EXPORT_C TBool CSmsPDU::TextCompressed() const |
1012 EXPORT_C TBool CSmsPDU::TextCompressed() const |
1018 { |
1013 { |
1019 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_TEXTCOMPRESSED_1, "CSmsPDU::TextCompressed()"); |
1014 LOGGSMU1("CSmsPDU::TextCompressed()"); |
1020 |
1015 |
1021 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1016 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1022 return DataCodingScheme()->TextCompressed(); |
1017 return DataCodingScheme()->TextCompressed(); |
1023 } // CSmsPDU::TextCompressed |
1018 } // CSmsPDU::TextCompressed |
1024 |
1019 |
1031 * @param aCompressed True to encode Text Compressed |
1026 * @param aCompressed True to encode Text Compressed |
1032 * @capability None |
1027 * @capability None |
1033 */ |
1028 */ |
1034 EXPORT_C void CSmsPDU::SetTextCompressed(TBool aCompressed) |
1029 EXPORT_C void CSmsPDU::SetTextCompressed(TBool aCompressed) |
1035 { |
1030 { |
1036 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETTEXTCOMPRESSED_1, "CSmsPDU::SetTextCompressed()"); |
1031 LOGGSMU1("CSmsPDU::SetTextCompressed()"); |
1037 |
1032 |
1038 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1033 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1039 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1034 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1040 datacodingscheme->SetTextCompressed(aCompressed); |
1035 datacodingscheme->SetTextCompressed(aCompressed); |
1041 } // CSmsPDU::SetTextCompressed |
1036 } // CSmsPDU::SetTextCompressed |
1049 * @return Indication State |
1044 * @return Indication State |
1050 * @capability None |
1045 * @capability None |
1051 */ |
1046 */ |
1052 EXPORT_C TSmsDataCodingScheme::TSmsIndicationState CSmsPDU::IndicationState() const |
1047 EXPORT_C TSmsDataCodingScheme::TSmsIndicationState CSmsPDU::IndicationState() const |
1053 { |
1048 { |
1054 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_INDICATIONSTATE_1, "CSmsPDU::IndicationState()"); |
1049 LOGGSMU1("CSmsPDU::IndicationState()"); |
1055 |
1050 |
1056 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1051 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1057 return DataCodingScheme()->IndicationState(); |
1052 return DataCodingScheme()->IndicationState(); |
1058 } // TSmsDataCodingScheme::TSmsIndicationState |
1053 } // TSmsDataCodingScheme::TSmsIndicationState |
1059 |
1054 |
1066 * @param aState Indication State |
1061 * @param aState Indication State |
1067 * @capability None |
1062 * @capability None |
1068 */ |
1063 */ |
1069 EXPORT_C void CSmsPDU::SetIndicationState(TSmsDataCodingScheme::TSmsIndicationState aState) |
1064 EXPORT_C void CSmsPDU::SetIndicationState(TSmsDataCodingScheme::TSmsIndicationState aState) |
1070 { |
1065 { |
1071 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETINDICATIONSTATE_1, "CSmsPDU::SetIndicationState()"); |
1066 LOGGSMU1("CSmsPDU::SetIndicationState()"); |
1072 |
1067 |
1073 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1068 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1074 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1069 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1075 datacodingscheme->SetIndicationState(aState); |
1070 datacodingscheme->SetIndicationState(aState); |
1076 } // CSmsPDU::SetIndicationState |
1071 } // CSmsPDU::SetIndicationState |
1084 * @return Indication Type |
1079 * @return Indication Type |
1085 * @capability None |
1080 * @capability None |
1086 */ |
1081 */ |
1087 EXPORT_C TSmsDataCodingScheme::TSmsIndicationType CSmsPDU::IndicationType() const |
1082 EXPORT_C TSmsDataCodingScheme::TSmsIndicationType CSmsPDU::IndicationType() const |
1088 { |
1083 { |
1089 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_INDICATIONTYPE_1, "CSmsPDU::IndicationType()"); |
1084 LOGGSMU1("CSmsPDU::IndicationType()"); |
1090 |
1085 |
1091 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1086 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1092 return DataCodingScheme()->IndicationType(); |
1087 return DataCodingScheme()->IndicationType(); |
1093 } // TSmsDataCodingScheme::TSmsIndicationType |
1088 } // TSmsDataCodingScheme::TSmsIndicationType |
1094 |
1089 |
1101 * @param aType Indication Type |
1096 * @param aType Indication Type |
1102 * @capability None |
1097 * @capability None |
1103 */ |
1098 */ |
1104 EXPORT_C void CSmsPDU::SetIndicationType(TSmsDataCodingScheme::TSmsIndicationType aType) |
1099 EXPORT_C void CSmsPDU::SetIndicationType(TSmsDataCodingScheme::TSmsIndicationType aType) |
1105 { |
1100 { |
1106 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETINDICATIONTYPE_1, "CSmsPDU::SetIndicationType()"); |
1101 LOGGSMU1("CSmsPDU::SetIndicationType()"); |
1107 |
1102 |
1108 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1103 __ASSERT_DEBUG(DataCodingScheme()!=NULL,Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
1109 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1104 TSmsDataCodingScheme* datacodingscheme=(TSmsDataCodingScheme*) DataCodingScheme(); |
1110 datacodingscheme->SetIndicationType(aType); |
1105 datacodingscheme->SetIndicationType(aType); |
1111 } // CSmsPDU::SetIndicationType |
1106 } // CSmsPDU::SetIndicationType |
1119 * @return True if the PDU is part of a concatenated message. |
1114 * @return True if the PDU is part of a concatenated message. |
1120 * @capability None |
1115 * @capability None |
1121 */ |
1116 */ |
1122 EXPORT_C TBool CSmsPDU::TextConcatenated(TBool* aIs16Bit) const |
1117 EXPORT_C TBool CSmsPDU::TextConcatenated(TBool* aIs16Bit) const |
1123 { |
1118 { |
1124 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_TEXTCONCATENATED_1, "CSmsPDU::TextConcatenated()"); |
1119 LOGGSMU1("CSmsPDU::TextConcatenated()"); |
1125 |
1120 |
1126 TInt index; |
1121 TInt index; |
1127 return DoTextConcatenated(index,aIs16Bit); |
1122 return DoTextConcatenated(index,aIs16Bit); |
1128 } // CSmsPDU::TextConcatenated |
1123 } // CSmsPDU::TextConcatenated |
1129 |
1124 |
1138 * @param aIs16Bit True if type of Concatenation Information Element is 16 bit |
1133 * @param aIs16Bit True if type of Concatenation Information Element is 16 bit |
1139 * @capability None |
1134 * @capability None |
1140 */ |
1135 */ |
1141 EXPORT_C void CSmsPDU::SetTextConcatenatedL(TBool aConcatenated,TBool aIs16Bit) |
1136 EXPORT_C void CSmsPDU::SetTextConcatenatedL(TBool aConcatenated,TBool aIs16Bit) |
1142 { |
1137 { |
1143 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETTEXTCONCATENATEDL_1, "CSmsPDU::SetTextConcatenatedL()"); |
1138 LOGGSMU1("CSmsPDU::SetTextConcatenatedL()"); |
1144 |
1139 |
1145 TInt index=0; |
1140 TInt index=0; |
1146 TInt is16bit; |
1141 TInt is16bit; |
1147 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1142 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1148 if (aConcatenated) |
1143 if (aConcatenated) |
1176 * @return Reference contained in the Concatenation Information Element |
1171 * @return Reference contained in the Concatenation Information Element |
1177 * @capability None |
1172 * @capability None |
1178 */ |
1173 */ |
1179 EXPORT_C TInt CSmsPDU::ConcatenatedMessageReference() const |
1174 EXPORT_C TInt CSmsPDU::ConcatenatedMessageReference() const |
1180 { |
1175 { |
1181 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_CONCATENATEDMESSAGEREFERENCE_1, "CSmsPDU::ConcatenatedMessageReference()"); |
1176 LOGGSMU1("CSmsPDU::ConcatenatedMessageReference()"); |
1182 |
1177 |
1183 TInt index=0; |
1178 TInt index=0; |
1184 TBool is16bit; |
1179 TBool is16bit; |
1185 TInt reference=0; |
1180 TInt reference=0; |
1186 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1181 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1204 * @param aReference Value to set the Concatenated Message Reference. |
1199 * @param aReference Value to set the Concatenated Message Reference. |
1205 * @capability None |
1200 * @capability None |
1206 */ |
1201 */ |
1207 EXPORT_C void CSmsPDU::SetConcatenatedMessageReference(TInt aReference) |
1202 EXPORT_C void CSmsPDU::SetConcatenatedMessageReference(TInt aReference) |
1208 { |
1203 { |
1209 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETCONCATENATEDMESSAGEREFERENCE_1, "CSmsPDU::SetConcatenatedMessageReference()"); |
1204 LOGGSMU1("CSmsPDU::SetConcatenatedMessageReference()"); |
1210 |
1205 |
1211 TInt index=0; |
1206 TInt index=0; |
1212 TBool is16bit; |
1207 TBool is16bit; |
1213 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1208 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1214 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1209 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1234 * @return Number of PDU's in a Concatenated Message |
1229 * @return Number of PDU's in a Concatenated Message |
1235 * @capability None |
1230 * @capability None |
1236 */ |
1231 */ |
1237 EXPORT_C TInt CSmsPDU::NumConcatenatedMessagePDUs() const |
1232 EXPORT_C TInt CSmsPDU::NumConcatenatedMessagePDUs() const |
1238 { |
1233 { |
1239 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_NUMCONCATENATEDMESSAGEPDUS_1, "CSmsPDU::NumConcatenatedMessagePDUs()"); |
1234 LOGGSMU1("CSmsPDU::NumConcatenatedMessagePDUs()"); |
1240 |
1235 |
1241 TInt index=0; |
1236 TInt index=0; |
1242 TBool is16bit; |
1237 TBool is16bit; |
1243 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1238 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1244 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1239 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1255 * @param aNum Number of PDU's in a Concatenated Message |
1250 * @param aNum Number of PDU's in a Concatenated Message |
1256 * @capability None |
1251 * @capability None |
1257 */ |
1252 */ |
1258 EXPORT_C void CSmsPDU::SetNumConcatenatedMessagePDUs(TInt aNum) |
1253 EXPORT_C void CSmsPDU::SetNumConcatenatedMessagePDUs(TInt aNum) |
1259 { |
1254 { |
1260 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETNUMCONCATENATEDMESSAGEPDUS_1, "CSmsPDU::SetNumConcatenatedMessagePDUs()"); |
1255 LOGGSMU1("CSmsPDU::SetNumConcatenatedMessagePDUs()"); |
1261 |
1256 |
1262 TInt index=0; |
1257 TInt index=0; |
1263 TBool is16bit; |
1258 TBool is16bit; |
1264 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1259 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1265 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1260 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1277 * @return Index of the PDU within the Concatenated Message |
1272 * @return Index of the PDU within the Concatenated Message |
1278 * @capability None |
1273 * @capability None |
1279 */ |
1274 */ |
1280 EXPORT_C TInt CSmsPDU::ConcatenatedMessagePDUIndex() const |
1275 EXPORT_C TInt CSmsPDU::ConcatenatedMessagePDUIndex() const |
1281 { |
1276 { |
1282 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_CONCATENATEDMESSAGEPDUINDEX_1, "CSmsPDU::ConcatenatedMessagePDUIndex()"); |
1277 LOGGSMU1("CSmsPDU::ConcatenatedMessagePDUIndex()"); |
1283 |
1278 |
1284 TInt index=0; |
1279 TInt index=0; |
1285 TBool is16bit; |
1280 TBool is16bit; |
1286 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1281 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1287 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1282 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1298 * @param aIndex Index of the PDU within the Concatenated Message |
1293 * @param aIndex Index of the PDU within the Concatenated Message |
1299 * @capability None |
1294 * @capability None |
1300 */ |
1295 */ |
1301 EXPORT_C void CSmsPDU::SetConcatenatedMessagePDUIndex(TInt aIndex) |
1296 EXPORT_C void CSmsPDU::SetConcatenatedMessagePDUIndex(TInt aIndex) |
1302 { |
1297 { |
1303 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETCONCATENATEDMESSAGEPDUINDEX_1, "CSmsPDU::SetConcatenatedMessagePDUIndex()"); |
1298 LOGGSMU1("CSmsPDU::SetConcatenatedMessagePDUIndex()"); |
1304 |
1299 |
1305 TInt index=0; |
1300 TInt index=0; |
1306 TBool is16bit; |
1301 TBool is16bit; |
1307 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1302 TBool textconcatenated=DoTextConcatenated(index,&is16bit); |
1308 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1303 __ASSERT_ALWAYS(textconcatenated,Panic(KGsmuPanicMessageNotConcatenated)); |
1322 * in the user data |
1317 * in the user data |
1323 * @capability None |
1318 * @capability None |
1324 */ |
1319 */ |
1325 EXPORT_C TBool CSmsPDU::ApplicationPortAddressing(TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit) const |
1320 EXPORT_C TBool CSmsPDU::ApplicationPortAddressing(TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit) const |
1326 { |
1321 { |
1327 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_APPLICATIONPORTADDRESSING_1, "CSmsPDU::ApplicationPortAddressing()"); |
1322 LOGGSMU1("CSmsPDU::ApplicationPortAddressing()"); |
1328 |
1323 |
1329 TInt index; |
1324 TInt index; |
1330 return DoApplicationPortAddressing(index,aDestination,aOriginator,aIs16Bit); |
1325 return DoApplicationPortAddressing(index,aDestination,aOriginator,aIs16Bit); |
1331 } // CSmsPDU::ApplicationPortAddressing |
1326 } // CSmsPDU::ApplicationPortAddressing |
1332 |
1327 |
1341 * @param aIs16Bit True if the addresses are 16 bit, false if 8 bit |
1336 * @param aIs16Bit True if the addresses are 16 bit, false if 8 bit |
1342 * @capability None |
1337 * @capability None |
1343 */ |
1338 */ |
1344 EXPORT_C void CSmsPDU::SetApplicationPortAddressingL(TBool aAddressing,TInt aDestination,TInt aOriginator,TBool aIs16Bit) |
1339 EXPORT_C void CSmsPDU::SetApplicationPortAddressingL(TBool aAddressing,TInt aDestination,TInt aOriginator,TBool aIs16Bit) |
1345 { |
1340 { |
1346 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETAPPLICATIONPORTADDRESSINGL_1, "CSmsPDU::SetApplicationPortAddressingL()"); |
1341 LOGGSMU1("CSmsPDU::SetApplicationPortAddressingL()"); |
1347 |
1342 |
1348 TInt index=0; |
1343 TInt index=0; |
1349 TInt is16bit; |
1344 TInt is16bit; |
1350 TBool addressing=DoApplicationPortAddressing(index,aDestination,aOriginator,&is16bit); |
1345 TBool addressing=DoApplicationPortAddressing(index,aDestination,aOriginator,&is16bit); |
1351 if (aAddressing) |
1346 if (aAddressing) |
1379 * @return Bits 7 and 6 of the PID field |
1374 * @return Bits 7 and 6 of the PID field |
1380 * @capability None |
1375 * @capability None |
1381 */ |
1376 */ |
1382 EXPORT_C TSmsProtocolIdentifier::TSmsPIDType CSmsPDU::PIDType() const |
1377 EXPORT_C TSmsProtocolIdentifier::TSmsPIDType CSmsPDU::PIDType() const |
1383 { |
1378 { |
1384 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_PIDTYPE_1, "CSmsPDU::PIDType()"); |
1379 LOGGSMU1("CSmsPDU::PIDType()"); |
1385 |
1380 |
1386 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1381 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1387 return ProtocolIdentifier()->PIDType(); |
1382 return ProtocolIdentifier()->PIDType(); |
1388 } // TSmsProtocolIdentifier::TSmsPIDType |
1383 } // TSmsProtocolIdentifier::TSmsPIDType |
1389 |
1384 |
1394 * @param aSmsPIDType Bits 7 and 6 of the PID field |
1389 * @param aSmsPIDType Bits 7 and 6 of the PID field |
1395 * @capability None |
1390 * @capability None |
1396 */ |
1391 */ |
1397 EXPORT_C void CSmsPDU::SetPIDType(TSmsProtocolIdentifier::TSmsPIDType aSmsPIDType) |
1392 EXPORT_C void CSmsPDU::SetPIDType(TSmsProtocolIdentifier::TSmsPIDType aSmsPIDType) |
1398 { |
1393 { |
1399 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETPIDTYPE_1, "CSmsPDU::SetPIDType()"); |
1394 LOGGSMU1("CSmsPDU::SetPIDType()"); |
1400 |
1395 |
1401 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1396 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1402 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1397 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1403 protocolidentifier->SetPIDType(aSmsPIDType); |
1398 protocolidentifier->SetPIDType(aSmsPIDType); |
1404 } // CSmsPDU::SetPIDType |
1399 } // CSmsPDU::SetPIDType |
1410 * @return Telematic device indicator |
1405 * @return Telematic device indicator |
1411 * @capability None |
1406 * @capability None |
1412 */ |
1407 */ |
1413 EXPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator CSmsPDU::TelematicDeviceIndicator() const |
1408 EXPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator CSmsPDU::TelematicDeviceIndicator() const |
1414 { |
1409 { |
1415 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_TELEMATICDEVICEINDICATOR_1, "CSmsPDU::TelematicDeviceIndicator()"); |
1410 LOGGSMU1("CSmsPDU::TelematicDeviceIndicator()"); |
1416 |
1411 |
1417 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1412 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1418 return ProtocolIdentifier()->TelematicDeviceIndicator(); |
1413 return ProtocolIdentifier()->TelematicDeviceIndicator(); |
1419 } // TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator |
1414 } // TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator |
1420 |
1415 |
1425 * @param aIndicator Telematic device indicator |
1420 * @param aIndicator Telematic device indicator |
1426 * @capability None |
1421 * @capability None |
1427 */ |
1422 */ |
1428 EXPORT_C void CSmsPDU::SetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator aIndicator) |
1423 EXPORT_C void CSmsPDU::SetTelematicDeviceIndicator(TSmsProtocolIdentifier::TSmsTelematicDeviceIndicator aIndicator) |
1429 { |
1424 { |
1430 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETTELEMATICDEVICEINDICATOR_1, "CSmsPDU::SetTelematicDeviceIndicator()"); |
1425 LOGGSMU1("CSmsPDU::SetTelematicDeviceIndicator()"); |
1431 |
1426 |
1432 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1427 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1433 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1428 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1434 protocolidentifier->SetTelematicDeviceIndicator(aIndicator); |
1429 protocolidentifier->SetTelematicDeviceIndicator(aIndicator); |
1435 } // CSmsPDU::SetTelematicDeviceIndicator |
1430 } // CSmsPDU::SetTelematicDeviceIndicator |
1441 * @return Short Message Type |
1436 * @return Short Message Type |
1442 * @capability None |
1437 * @capability None |
1443 */ |
1438 */ |
1444 EXPORT_C TSmsProtocolIdentifier::TSmsShortMessageType CSmsPDU::ShortMessageType() const |
1439 EXPORT_C TSmsProtocolIdentifier::TSmsShortMessageType CSmsPDU::ShortMessageType() const |
1445 { |
1440 { |
1446 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SHORTMESSAGETYPE_1, "CSmsPDU::ShortMessageType()"); |
1441 LOGGSMU1("CSmsPDU::ShortMessageType()"); |
1447 |
1442 |
1448 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1443 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1449 return (TSmsProtocolIdentifier::TSmsShortMessageType) ProtocolIdentifier()->ShortMessageType(); |
1444 return (TSmsProtocolIdentifier::TSmsShortMessageType) ProtocolIdentifier()->ShortMessageType(); |
1450 } // TSmsProtocolIdentifier::TSmsShortMessageType |
1445 } // TSmsProtocolIdentifier::TSmsShortMessageType |
1451 |
1446 |
1456 * @param aShortMessageType Short Message Type |
1451 * @param aShortMessageType Short Message Type |
1457 * @capability None |
1452 * @capability None |
1458 */ |
1453 */ |
1459 EXPORT_C void CSmsPDU::SetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageType aShortMessageType) |
1454 EXPORT_C void CSmsPDU::SetShortMessageType(TSmsProtocolIdentifier::TSmsShortMessageType aShortMessageType) |
1460 { |
1455 { |
1461 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETSHORTMESSAGETYPE_1, "CSmsPDU::SetShortMessageType()"); |
1456 LOGGSMU1("CSmsPDU::SetShortMessageType()"); |
1462 |
1457 |
1463 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1458 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1464 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1459 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1465 protocolidentifier->SetShortMessageType(aShortMessageType); |
1460 protocolidentifier->SetShortMessageType(aShortMessageType); |
1466 } // CSmsPDU::SetShortMessageType |
1461 } // CSmsPDU::SetShortMessageType |
1472 * @return Telematic device type |
1467 * @return Telematic device type |
1473 * @capability None |
1468 * @capability None |
1474 */ |
1469 */ |
1475 EXPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceType CSmsPDU::TelematicDeviceType() const |
1470 EXPORT_C TSmsProtocolIdentifier::TSmsTelematicDeviceType CSmsPDU::TelematicDeviceType() const |
1476 { |
1471 { |
1477 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_TELEMATICDEVICETYPE_1, "CSmsPDU::TelematicDeviceType()"); |
1472 LOGGSMU1("CSmsPDU::TelematicDeviceType()"); |
1478 |
1473 |
1479 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1474 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1480 return ProtocolIdentifier()->TelematicDeviceType(); |
1475 return ProtocolIdentifier()->TelematicDeviceType(); |
1481 } // TSmsProtocolIdentifier::TSmsTelematicDeviceType |
1476 } // TSmsProtocolIdentifier::TSmsTelematicDeviceType |
1482 |
1477 |
1487 * @param aDeviceType Telematic device type |
1482 * @param aDeviceType Telematic device type |
1488 * @capability None |
1483 * @capability None |
1489 */ |
1484 */ |
1490 EXPORT_C void CSmsPDU::SetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceType aDeviceType) |
1485 EXPORT_C void CSmsPDU::SetTelematicDeviceType(TSmsProtocolIdentifier::TSmsTelematicDeviceType aDeviceType) |
1491 { |
1486 { |
1492 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETTELEMATICDEVICETYPE_1, "CSmsPDU::SetTelematicDeviceType()"); |
1487 LOGGSMU1("CSmsPDU::SetTelematicDeviceType()"); |
1493 |
1488 |
1494 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1489 __ASSERT_DEBUG(ProtocolIdentifier()!=NULL,Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
1495 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1490 TSmsProtocolIdentifier* protocolidentifier=(TSmsProtocolIdentifier*) ProtocolIdentifier(); |
1496 protocolidentifier->SetTelematicDeviceType(aDeviceType); |
1491 protocolidentifier->SetTelematicDeviceType(aDeviceType); |
1497 } // CSmsPDU::SetTelematicDeviceType |
1492 } // CSmsPDU::SetTelematicDeviceType |
1505 * @return True if the User Data Header Indicator is set |
1500 * @return True if the User Data Header Indicator is set |
1506 * @capability None |
1501 * @capability None |
1507 */ |
1502 */ |
1508 EXPORT_C TBool CSmsPDU::UserDataPresent() const |
1503 EXPORT_C TBool CSmsPDU::UserDataPresent() const |
1509 { |
1504 { |
1510 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_USERDATAPRESENT_1, "CSmsPDU::UserDataPresent()"); |
1505 LOGGSMU1("CSmsPDU::UserDataPresent()"); |
1511 |
1506 |
1512 TBool udPresent=ETrue; |
1507 TBool udPresent=ETrue; |
1513 switch (iSmsPDUType) |
1508 switch (iSmsPDUType) |
1514 { |
1509 { |
1515 case ESmsDeliver: |
1510 case ESmsDeliver: |
1538 * @param aPresent True to set the User Data Header Indicator |
1533 * @param aPresent True to set the User Data Header Indicator |
1539 * @capability None |
1534 * @capability None |
1540 */ |
1535 */ |
1541 EXPORT_C void CSmsPDU::SetUserDataPresent(TBool aPresent) |
1536 EXPORT_C void CSmsPDU::SetUserDataPresent(TBool aPresent) |
1542 { |
1537 { |
1543 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETUSERDATAPRESENT_1, "CSmsPDU::SetUserDataPresent(): aPresent=%d", aPresent); |
1538 LOGGSMU2("CSmsPDU::SetUserDataPresent(): aPresent=%d", aPresent); |
1544 |
1539 |
1545 __ASSERT_DEBUG(ParameterIndicator()!=NULL,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
1540 __ASSERT_DEBUG(ParameterIndicator()!=NULL,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
1546 TSmsParameterIndicator* parameterindicator=(TSmsParameterIndicator*) ParameterIndicator(); |
1541 TSmsParameterIndicator* parameterindicator=(TSmsParameterIndicator*) ParameterIndicator(); |
1547 parameterindicator->SetUserDataPresent(aPresent); |
1542 parameterindicator->SetUserDataPresent(aPresent); |
1548 } // CSmsPDU::SetUserDataPresent |
1543 } // CSmsPDU::SetUserDataPresent |
1556 * @return True if data coding scheme is present |
1551 * @return True if data coding scheme is present |
1557 * @capability None |
1552 * @capability None |
1558 */ |
1553 */ |
1559 EXPORT_C TBool CSmsPDU::DataCodingSchemePresent() const |
1554 EXPORT_C TBool CSmsPDU::DataCodingSchemePresent() const |
1560 { |
1555 { |
1561 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_DATACODINGSCHEMEPRESENT_1, "CSmsPDU::DataCodingSchemePresent()"); |
1556 LOGGSMU1("CSmsPDU::DataCodingSchemePresent()"); |
1562 |
1557 |
1563 TBool dcsPresent=ETrue; |
1558 TBool dcsPresent=ETrue; |
1564 switch (iSmsPDUType) |
1559 switch (iSmsPDUType) |
1565 { |
1560 { |
1566 case ESmsDeliver: |
1561 case ESmsDeliver: |
1590 * @param aPresent True if data coding scheme is present |
1585 * @param aPresent True if data coding scheme is present |
1591 * @capability None |
1586 * @capability None |
1592 */ |
1587 */ |
1593 EXPORT_C void CSmsPDU::SetDataCodingSchemePresent(TBool aPresent) |
1588 EXPORT_C void CSmsPDU::SetDataCodingSchemePresent(TBool aPresent) |
1594 { |
1589 { |
1595 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETDATACODINGSCHEMEPRESENT_1, "CSmsPDU::SetDataCodingSchemePresent(): aPresent=%d", aPresent); |
1590 LOGGSMU2("CSmsPDU::SetDataCodingSchemePresent(): aPresent=%d", aPresent); |
1596 |
1591 |
1597 __ASSERT_DEBUG(ParameterIndicator()!=NULL,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
1592 __ASSERT_DEBUG(ParameterIndicator()!=NULL,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
1598 TSmsParameterIndicator* parameterindicator=(TSmsParameterIndicator*) ParameterIndicator(); |
1593 TSmsParameterIndicator* parameterindicator=(TSmsParameterIndicator*) ParameterIndicator(); |
1599 parameterindicator->SetDataCodingSchemePresent(aPresent); |
1594 parameterindicator->SetDataCodingSchemePresent(aPresent); |
1600 } // CSmsPDU::SetDataCodingSchemePresent |
1595 } // CSmsPDU::SetDataCodingSchemePresent |
1608 * @return True if Protocol Identifier is present |
1603 * @return True if Protocol Identifier is present |
1609 * @capability None |
1604 * @capability None |
1610 */ |
1605 */ |
1611 EXPORT_C TBool CSmsPDU::ProtocolIdentifierPresent() const |
1606 EXPORT_C TBool CSmsPDU::ProtocolIdentifierPresent() const |
1612 { |
1607 { |
1613 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_PROTOCOLIDENTIFIERPRESENT_1, "CSmsPDU::ProtocolIdentifierPresent()"); |
1608 LOGGSMU1("CSmsPDU::ProtocolIdentifierPresent()"); |
1614 |
1609 |
1615 TBool pidPresent=ETrue; |
1610 TBool pidPresent=ETrue; |
1616 switch (iSmsPDUType) |
1611 switch (iSmsPDUType) |
1617 { |
1612 { |
1618 case ESmsDeliver: |
1613 case ESmsDeliver: |
1642 * @param aPresent True if Protocol Identifier is present |
1637 * @param aPresent True if Protocol Identifier is present |
1643 * @capability None |
1638 * @capability None |
1644 */ |
1639 */ |
1645 EXPORT_C void CSmsPDU::SetProtocolIdentifierPresent(TBool aPresent) |
1640 EXPORT_C void CSmsPDU::SetProtocolIdentifierPresent(TBool aPresent) |
1646 { |
1641 { |
1647 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_SETPROTOCOLIDENTIFIERPRESENT_1, "CSmsPDU::SetProtocolIdentifierPresent(): aPresent=%d", aPresent); |
1642 LOGGSMU2("CSmsPDU::SetProtocolIdentifierPresent(): aPresent=%d", aPresent); |
1648 |
1643 |
1649 __ASSERT_DEBUG(ParameterIndicator()!=NULL,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
1644 __ASSERT_DEBUG(ParameterIndicator()!=NULL,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
1650 TSmsParameterIndicator* parameterindicator=(TSmsParameterIndicator*) ParameterIndicator(); |
1645 TSmsParameterIndicator* parameterindicator=(TSmsParameterIndicator*) ParameterIndicator(); |
1651 parameterindicator->SetProtocolIdentifierPresent(aPresent); |
1646 parameterindicator->SetProtocolIdentifierPresent(aPresent); |
1652 } // CSmsPDU::SetProtocolIdentifierPresent |
1647 } // CSmsPDU::SetProtocolIdentifierPresent |
1659 * @return User Data |
1654 * @return User Data |
1660 * @capability None |
1655 * @capability None |
1661 */ |
1656 */ |
1662 EXPORT_C CSmsUserData& CSmsPDU::UserData() |
1657 EXPORT_C CSmsUserData& CSmsPDU::UserData() |
1663 { |
1658 { |
1664 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_USERDATA_1, "CSmsPDU::UserData()"); |
1659 LOGGSMU1("CSmsPDU::UserData()"); |
1665 |
1660 |
1666 __ASSERT_DEBUG(UserDataPtr()!=NULL,Panic(KGsmuPanicUserDataNotPresent)); |
1661 __ASSERT_DEBUG(UserDataPtr()!=NULL,Panic(KGsmuPanicUserDataNotPresent)); |
1667 CSmsUserData* userdata=(CSmsUserData*) UserDataPtr(); |
1662 CSmsUserData* userdata=(CSmsUserData*) UserDataPtr(); |
1668 return *userdata; |
1663 return *userdata; |
1669 } // CSmsPDU::UserData |
1664 } // CSmsPDU::UserData |
1675 * @return User Data |
1670 * @return User Data |
1676 * @capability None |
1671 * @capability None |
1677 */ |
1672 */ |
1678 EXPORT_C const CSmsUserData& CSmsPDU::UserData() const |
1673 EXPORT_C const CSmsUserData& CSmsPDU::UserData() const |
1679 { |
1674 { |
1680 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSPDU_USERDATA1_1, "CSmsPDU::UserData()"); |
1675 LOGGSMU1("CSmsPDU::UserData()"); |
1681 |
1676 |
1682 __ASSERT_DEBUG(UserDataPtr()!=NULL,Panic(KGsmuPanicUserDataNotPresent)); |
1677 __ASSERT_DEBUG(UserDataPtr()!=NULL,Panic(KGsmuPanicUserDataNotPresent)); |
1683 return *UserDataPtr(); |
1678 return *UserDataPtr(); |
1684 } // CSmsPDU::UserData |
1679 } // CSmsPDU::UserData |
1685 |
1680 |
1736 return NULL; |
1731 return NULL; |
1737 } |
1732 } |
1738 |
1733 |
1739 TBool CSmsPDU::DoTextConcatenated(TInt& aIndex,TBool* aIs16Bit) const |
1734 TBool CSmsPDU::DoTextConcatenated(TInt& aIndex,TBool* aIs16Bit) const |
1740 { |
1735 { |
1741 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_DOTEXTCONCATENATED_1, "CSmsPDU::DoTextConcatenated()"); |
1736 LOGGSMU1("CSmsPDU::DoTextConcatenated()"); |
1742 |
1737 |
1743 TBool is8bit=UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIConcatenatedShortMessages8BitReference,aIndex); |
1738 TBool is8bit=UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIConcatenatedShortMessages8BitReference,aIndex); |
1744 TBool is16bit=EFalse; |
1739 TBool is16bit=EFalse; |
1745 if (!is8bit) |
1740 if (!is8bit) |
1746 is16bit=UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIConcatenatedShortMessages16BitReference,aIndex); |
1741 is16bit=UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIConcatenatedShortMessages16BitReference,aIndex); |
1750 } // CSmsPDU::DoTextConcatenated |
1745 } // CSmsPDU::DoTextConcatenated |
1751 |
1746 |
1752 |
1747 |
1753 void CSmsPDU::DoSetTextConcatenatedL(TBool aIs16Bit) |
1748 void CSmsPDU::DoSetTextConcatenatedL(TBool aIs16Bit) |
1754 { |
1749 { |
1755 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_DOSETTEXTCONCATENATEDL_1, "CSmsPDU::DoSetTextConcatenatedL(): aIs16Bit=%d", aIs16Bit); |
1750 LOGGSMU2("CSmsPDU::DoSetTextConcatenatedL(): aIs16Bit=%d", aIs16Bit); |
1756 |
1751 |
1757 if (!aIs16Bit) |
1752 if (!aIs16Bit) |
1758 { |
1753 { |
1759 TBuf8<3> data; |
1754 TBuf8<3> data; |
1760 data.SetLength(3); |
1755 data.SetLength(3); |
1776 } // CSmsPDU::DoSetTextConcatenatedL |
1771 } // CSmsPDU::DoSetTextConcatenatedL |
1777 |
1772 |
1778 |
1773 |
1779 TBool CSmsPDU::DoApplicationPortAddressing(TInt& aIndex,TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit) const |
1774 TBool CSmsPDU::DoApplicationPortAddressing(TInt& aIndex,TInt& aDestination,TInt& aOriginator,TBool* aIs16Bit) const |
1780 { |
1775 { |
1781 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_DOAPPLICATIONPORTADDRESSING_1, "CSmsPDU::DoApplicationPortAddressing()"); |
1776 LOGGSMU1("CSmsPDU::DoApplicationPortAddressing()"); |
1782 |
1777 |
1783 TBool is8bit=UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIApplicationPortAddressing8Bit,aIndex); |
1778 TBool is8bit=UserData().InformationElementIndex(CSmsInformationElement::ESmsIEIApplicationPortAddressing8Bit,aIndex); |
1784 TBool is16bit=EFalse; |
1779 TBool is16bit=EFalse; |
1785 if (is8bit) |
1780 if (is8bit) |
1786 { |
1781 { |
1806 } // CSmsPDU::DoApplicationPortAddressing |
1801 } // CSmsPDU::DoApplicationPortAddressing |
1807 |
1802 |
1808 |
1803 |
1809 void CSmsPDU::DoSetApplicationPortAddressingL(TInt aDestination,TInt aOriginator,TBool aIs16Bit) |
1804 void CSmsPDU::DoSetApplicationPortAddressingL(TInt aDestination,TInt aOriginator,TBool aIs16Bit) |
1810 { |
1805 { |
1811 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSPDU_DOSETAPPLICATIONPORTADDRESSINGL_1, "CSmsPDU::DoSetApplicationPortAddressingL(): aDestination=%d, aOriginator=%d, aIs16Bit=%d",aDestination, aOriginator, aIs16Bit); |
1806 LOGGSMU4("CSmsPDU::DoSetApplicationPortAddressingL(): aDestination=%d, aOriginator=%d, aIs16Bit=%d", |
1807 aDestination, aOriginator, aIs16Bit); |
|
1812 |
1808 |
1813 if (!aIs16Bit) |
1809 if (!aIs16Bit) |
1814 { |
1810 { |
1815 __ASSERT_ALWAYS((aDestination>=0x00) && (aDestination<=0xFF) && (aOriginator>=0x00) && (aOriginator<=0xFF),Panic(KGsmuPanicPortOutOfRange)); |
1811 __ASSERT_ALWAYS((aDestination>=0x00) && (aDestination<=0xFF) && (aOriginator>=0x00) && (aOriginator<=0xFF),Panic(KGsmuPanicPortOutOfRange)); |
1816 TBuf8<2> data; |
1812 TBuf8<2> data; |
1847 * @return True if More Messages to Send flag set |
1843 * @return True if More Messages to Send flag set |
1848 * @capability None |
1844 * @capability None |
1849 */ |
1845 */ |
1850 EXPORT_C TBool CSmsDeliver::MoreMessagesToSend() const |
1846 EXPORT_C TBool CSmsDeliver::MoreMessagesToSend() const |
1851 { |
1847 { |
1852 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_MOREMESSAGESTOSEND_1, "CSmsDeliver::MoreMessagesToSend"); |
1848 LOGGSMU1("CSmsDeliver::MoreMessagesToSend"); |
1853 |
1849 |
1854 return (iFirstOctet&TSmsFirstOctet::ESmsMoreMessagesToSendMask)==TSmsFirstOctet::ESmsMoreMessagesToSend; |
1850 return (iFirstOctet&TSmsFirstOctet::ESmsMoreMessagesToSendMask)==TSmsFirstOctet::ESmsMoreMessagesToSend; |
1855 } // CSmsDeliver::MoreMessagesToSend |
1851 } // CSmsDeliver::MoreMessagesToSend |
1856 |
1852 |
1857 |
1853 |
1861 * @param aMore True if More Messages to Send |
1857 * @param aMore True if More Messages to Send |
1862 * @capability None |
1858 * @capability None |
1863 */ |
1859 */ |
1864 EXPORT_C void CSmsDeliver::SetMoreMessagesToSend(TBool aMore) |
1860 EXPORT_C void CSmsDeliver::SetMoreMessagesToSend(TBool aMore) |
1865 { |
1861 { |
1866 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_SETMOREMESSAGESTOSEND_1, "CSmsDeliver::SetMoreMessagesToSend(): aMore=%d", aMore); |
1862 LOGGSMU2("CSmsDeliver::SetMoreMessagesToSend(): aMore=%d", aMore); |
1867 |
1863 |
1868 iFirstOctet=aMore? (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsMoreMessagesToSend): |
1864 iFirstOctet=aMore? (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsMoreMessagesToSend): |
1869 (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsNoMoreMessagesToSend); |
1865 (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsNoMoreMessagesToSend); |
1870 } // CSmsDeliver::SetMoreMessagesToSend |
1866 } // CSmsDeliver::SetMoreMessagesToSend |
1871 |
1867 |
1879 * @return True if Reply Path exists |
1875 * @return True if Reply Path exists |
1880 * @capability None |
1876 * @capability None |
1881 */ |
1877 */ |
1882 EXPORT_C TBool CSmsDeliver::ReplyPath() const |
1878 EXPORT_C TBool CSmsDeliver::ReplyPath() const |
1883 { |
1879 { |
1884 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_REPLYPATH_1, "CSmsDeliver::ReplyPath"); |
1880 LOGGSMU1("CSmsDeliver::ReplyPath"); |
1885 |
1881 |
1886 return (iFirstOctet&TSmsFirstOctet::ESmsReplyPathMask)==TSmsFirstOctet::ESmsReplyPathExists; |
1882 return (iFirstOctet&TSmsFirstOctet::ESmsReplyPathMask)==TSmsFirstOctet::ESmsReplyPathExists; |
1887 } // CSmsDeliver::ReplyPath |
1883 } // CSmsDeliver::ReplyPath |
1888 |
1884 |
1889 |
1885 |
1893 * @param aReplyPath True to set Reply Path |
1889 * @param aReplyPath True to set Reply Path |
1894 * @capability None |
1890 * @capability None |
1895 */ |
1891 */ |
1896 EXPORT_C void CSmsDeliver::SetReplyPath(TBool aReplyPath) |
1892 EXPORT_C void CSmsDeliver::SetReplyPath(TBool aReplyPath) |
1897 { |
1893 { |
1898 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_SETREPLYPATH_1, "CSmsDeliver::SetReplyPath(): aReplyPath=%d", aReplyPath); |
1894 LOGGSMU2("CSmsDeliver::SetReplyPath(): aReplyPath=%d", aReplyPath); |
1899 |
1895 |
1900 iFirstOctet=aReplyPath? (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathExists): |
1896 iFirstOctet=aReplyPath? (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathExists): |
1901 (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathNone); |
1897 (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathNone); |
1902 } // CSmsDeliver::SetReplyPath |
1898 } // CSmsDeliver::SetReplyPath |
1903 |
1899 |
1908 * @return True if Status Report to be returned. |
1904 * @return True if Status Report to be returned. |
1909 * @capability None |
1905 * @capability None |
1910 */ |
1906 */ |
1911 EXPORT_C TBool CSmsDeliver::StatusReportIndication() const |
1907 EXPORT_C TBool CSmsDeliver::StatusReportIndication() const |
1912 { |
1908 { |
1913 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_STATUSREPORTINDICATION_1, "CSmsDeliver::StatusReportIndication"); |
1909 LOGGSMU1("CSmsDeliver::StatusReportIndication"); |
1914 |
1910 |
1915 return (iFirstOctet&TSmsFirstOctet::ESmsStatusReportIndicatorMask)==TSmsFirstOctet::ESmsStatusReportReturned; |
1911 return (iFirstOctet&TSmsFirstOctet::ESmsStatusReportIndicatorMask)==TSmsFirstOctet::ESmsStatusReportReturned; |
1916 } // CSmsDeliver::StatusReportIndication |
1912 } // CSmsDeliver::StatusReportIndication |
1917 |
1913 |
1918 |
1914 |
1922 * @param aIndication Set True to request Status Report |
1918 * @param aIndication Set True to request Status Report |
1923 * @capability None |
1919 * @capability None |
1924 */ |
1920 */ |
1925 EXPORT_C void CSmsDeliver::SetStatusReportIndication(TBool aIndication) |
1921 EXPORT_C void CSmsDeliver::SetStatusReportIndication(TBool aIndication) |
1926 { |
1922 { |
1927 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_SETSTATUSREPORTINDICATION_1, "CSmsDeliver::SetStatusReportIndication(): aIndication=%d", aIndication); |
1923 LOGGSMU2("CSmsDeliver::SetStatusReportIndication(): aIndication=%d", aIndication); |
1928 |
1924 |
1929 iFirstOctet=aIndication? (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportIndicatorMask)|TSmsFirstOctet::ESmsStatusReportReturned): |
1925 iFirstOctet=aIndication? (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportIndicatorMask)|TSmsFirstOctet::ESmsStatusReportReturned): |
1930 (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportIndicatorMask)|TSmsFirstOctet::ESmsStatusReportNotReturned); |
1926 (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportIndicatorMask)|TSmsFirstOctet::ESmsStatusReportNotReturned); |
1931 } // CSmsDeliver::SetStatusReportIndication |
1927 } // CSmsDeliver::SetStatusReportIndication |
1932 |
1928 |
1949 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
1945 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
1950 * @capability None |
1946 * @capability None |
1951 */ |
1947 */ |
1952 EXPORT_C void CSmsDeliver::ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours) |
1948 EXPORT_C void CSmsDeliver::ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours) |
1953 { |
1949 { |
1954 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_SERVICECENTERTIMESTAMP_1, "CSmsDeliver::ServiceCenterTimeStamp()"); |
1950 LOGGSMU1("CSmsDeliver::ServiceCenterTimeStamp()"); |
1955 |
1951 |
1956 aTime=iServiceCenterTimeStamp.Time(); |
1952 aTime=iServiceCenterTimeStamp.Time(); |
1957 aNumQuarterHours=iServiceCenterTimeStamp.TimeOffset(); |
1953 aNumQuarterHours=iServiceCenterTimeStamp.TimeOffset(); |
1958 } // CSmsDeliver::ServiceCenterTimeStamp |
1954 } // CSmsDeliver::ServiceCenterTimeStamp |
1959 |
1955 |
1965 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
1961 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
1966 * @capability None |
1962 * @capability None |
1967 */ |
1963 */ |
1968 EXPORT_C void CSmsDeliver::SetServiceCenterTimeStamp(const TTime& aTime,TInt aNumQuarterHours) |
1964 EXPORT_C void CSmsDeliver::SetServiceCenterTimeStamp(const TTime& aTime,TInt aNumQuarterHours) |
1969 { |
1965 { |
1970 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_SETSERVICECENTERTIMESTAMP_1, "CSmsDeliver::ServiceCenterTimeStamp(): aNumQuarterHours=%d", aNumQuarterHours); |
1966 LOGGSMU2("CSmsDeliver::ServiceCenterTimeStamp(): aNumQuarterHours=%d", aNumQuarterHours); |
1971 |
1967 |
1972 iServiceCenterTimeStamp.SetTime(aTime); |
1968 iServiceCenterTimeStamp.SetTime(aTime); |
1973 iServiceCenterTimeStamp.SetTimeOffset(aNumQuarterHours); |
1969 iServiceCenterTimeStamp.SetTimeOffset(aNumQuarterHours); |
1974 } // CSmsDeliver::SetServiceCenterTimeStamp |
1970 } // CSmsDeliver::SetServiceCenterTimeStamp |
1975 |
1971 |
1976 |
1972 |
1977 void CSmsDeliver::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
1973 void CSmsDeliver::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
1978 { |
1974 { |
1979 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_CONSTRUCTL_1, "CSmsDeliver::ConstructL()"); |
1975 LOGGSMU1("CSmsDeliver::ConstructL()"); |
1980 |
1976 |
1981 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
1977 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
1982 iOriginalAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
1978 iOriginalAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
1983 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
1979 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
1984 } // CSmsDeliver::ConstructL |
1980 } // CSmsDeliver::ConstructL |
1989 * |
1985 * |
1990 * @return Pointer to the newly created CSmsDeliver object. |
1986 * @return Pointer to the newly created CSmsDeliver object. |
1991 */ |
1987 */ |
1992 EXPORT_C CSmsDeliver* CSmsDeliver::DuplicateL() const |
1988 EXPORT_C CSmsDeliver* CSmsDeliver::DuplicateL() const |
1993 { |
1989 { |
1994 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_DUPLICATEL_1, "CSmsDeliver::DuplicateL()"); |
1990 LOGGSMU1("CSmsDeliver::DuplicateL()"); |
1995 |
1991 |
1996 CSmsDeliver* smsDeliver = new (ELeave) CSmsDeliver(); |
1992 CSmsDeliver* smsDeliver = new (ELeave) CSmsDeliver(); |
1997 CleanupStack::PushL(smsDeliver); |
1993 CleanupStack::PushL(smsDeliver); |
1998 |
1994 |
1999 smsDeliver->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
1995 smsDeliver->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2011 } // CSmsDeliver::DuplicateL |
2007 } // CSmsDeliver::DuplicateL |
2012 |
2008 |
2013 |
2009 |
2014 TUint8* CSmsDeliver::EncodeL(TUint8* aPtr) const |
2010 TUint8* CSmsDeliver::EncodeL(TUint8* aPtr) const |
2015 { |
2011 { |
2016 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_ENCODEL_1, "CSmsDeliver::EncodeL()"); |
2012 LOGGSMU1("CSmsDeliver::EncodeL()"); |
2017 |
2013 |
2018 aPtr=iFirstOctet.EncodeL(aPtr); |
2014 aPtr=iFirstOctet.EncodeL(aPtr); |
2019 aPtr=iOriginalAddress->EncodeL(aPtr); |
2015 aPtr=iOriginalAddress->EncodeL(aPtr); |
2020 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
2016 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
2021 aPtr=iDataCodingScheme.EncodeL(aPtr); |
2017 aPtr=iDataCodingScheme.EncodeL(aPtr); |
2028 return EncodeL(aPtr); |
2024 return EncodeL(aPtr); |
2029 } |
2025 } |
2030 |
2026 |
2031 void CSmsDeliver::DecodeL(TGsmuLex8& aPdu) |
2027 void CSmsDeliver::DecodeL(TGsmuLex8& aPdu) |
2032 { |
2028 { |
2033 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_DECODEL_1, "CSmsDeliver::DecodeL()"); |
2029 LOGGSMU1("CSmsDeliver::DecodeL()"); |
2034 |
2030 |
2035 iFirstOctet.DecodeL(aPdu); |
2031 iFirstOctet.DecodeL(aPdu); |
2036 iOriginalAddress->DecodeL(aPdu); |
2032 iOriginalAddress->DecodeL(aPdu); |
2037 iProtocolIdentifier.DecodeL(aPdu); |
2033 iProtocolIdentifier.DecodeL(aPdu); |
2038 iDataCodingScheme.DecodeL(aPdu); |
2034 iDataCodingScheme.DecodeL(aPdu); |
2057 } // CSmsDeliver::DecodeL |
2053 } // CSmsDeliver::DecodeL |
2058 |
2054 |
2059 |
2055 |
2060 void CSmsDeliver::InternalizeMessagePDUL(RReadStream& aStream) |
2056 void CSmsDeliver::InternalizeMessagePDUL(RReadStream& aStream) |
2061 { |
2057 { |
2062 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_INTERNALIZEMESSAGEPDUL_1, "CSmsDeliver::InternalizeMessagePDUL()"); |
2058 LOGGSMU1("CSmsDeliver::InternalizeMessagePDUL()"); |
2063 |
2059 |
2064 iServiceCenterAddress->InternalizeL(aStream); |
2060 iServiceCenterAddress->InternalizeL(aStream); |
2065 |
2061 |
2066 aStream >> iFirstOctet; |
2062 aStream >> iFirstOctet; |
2067 iOriginalAddress->InternalizeL(aStream); |
2063 iOriginalAddress->InternalizeL(aStream); |
2076 } // CSmsDeliver::InternalizeMessagePDUL |
2072 } // CSmsDeliver::InternalizeMessagePDUL |
2077 |
2073 |
2078 |
2074 |
2079 void CSmsDeliver::ExternalizeMessagePDUL(RWriteStream& aStream) const |
2075 void CSmsDeliver::ExternalizeMessagePDUL(RWriteStream& aStream) const |
2080 { |
2076 { |
2081 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_EXTERNALIZEMESSAGEPDUL_1, "CSmsDeliver::ExternalizeMessagePDUL()"); |
2077 LOGGSMU1("CSmsDeliver::ExternalizeMessagePDUL()"); |
2082 |
2078 |
2083 iServiceCenterAddress->ExternalizeL(aStream); |
2079 iServiceCenterAddress->ExternalizeL(aStream); |
2084 |
2080 |
2085 aStream << iFirstOctet; |
2081 aStream << iFirstOctet; |
2086 iOriginalAddress->ExternalizeL(aStream); |
2082 iOriginalAddress->ExternalizeL(aStream); |
2095 } // CSmsDeliver::ExternalizeMessagePDUL |
2091 } // CSmsDeliver::ExternalizeMessagePDUL |
2096 |
2092 |
2097 |
2093 |
2098 const TSmsDataCodingScheme* CSmsDeliver::DataCodingScheme() const |
2094 const TSmsDataCodingScheme* CSmsDeliver::DataCodingScheme() const |
2099 { |
2095 { |
2100 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_DATACODINGSCHEME_1, "CSmsDeliver::DataCodingScheme()"); |
2096 LOGGSMU1("CSmsDeliver::DataCodingScheme()"); |
2101 |
2097 |
2102 return &iDataCodingScheme; |
2098 return &iDataCodingScheme; |
2103 } // CSmsDeliver::DataCodingScheme |
2099 } // CSmsDeliver::DataCodingScheme |
2104 |
2100 |
2105 |
2101 |
2109 * @return The Deliver PID field |
2105 * @return The Deliver PID field |
2110 * @capability None |
2106 * @capability None |
2111 */ |
2107 */ |
2112 EXPORT_C const TSmsProtocolIdentifier* CSmsDeliver::ProtocolIdentifier() const |
2108 EXPORT_C const TSmsProtocolIdentifier* CSmsDeliver::ProtocolIdentifier() const |
2113 { |
2109 { |
2114 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVER_PROTOCOLIDENTIFIER_1, "CSmsDeliver::ProtocolIdentifier()"); |
2110 LOGGSMU1("CSmsDeliver::ProtocolIdentifier()"); |
2115 |
2111 |
2116 return &iProtocolIdentifier; |
2112 return &iProtocolIdentifier; |
2117 } // CSmsDeliver::ProtocolIdentifier |
2113 } // CSmsDeliver::ProtocolIdentifier |
2118 |
2114 |
2119 |
2115 |
2120 const CSmsUserData* CSmsDeliver::UserDataPtr() const |
2116 const CSmsUserData* CSmsDeliver::UserDataPtr() const |
2121 { |
2117 { |
2122 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_USERDATAPTR_1, "CSmsDeliver::UserDataPtr()"); |
2118 LOGGSMU1("CSmsDeliver::UserDataPtr()"); |
2123 |
2119 |
2124 return iUserData; |
2120 return iUserData; |
2125 } // CSmsDeliver::UserDataPtr |
2121 } // CSmsDeliver::UserDataPtr |
2126 |
2122 |
2127 |
2123 |
2128 const CSmsAddress* CSmsDeliver::ToFromAddressPtr() const |
2124 const CSmsAddress* CSmsDeliver::ToFromAddressPtr() const |
2129 { |
2125 { |
2130 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVER_TOFROMADDRESSPTR_1, "CSmsDeliver::ToFromAddressPtr()"); |
2126 LOGGSMU1("CSmsDeliver::ToFromAddressPtr()"); |
2131 |
2127 |
2132 return iOriginalAddress; |
2128 return iOriginalAddress; |
2133 } // CSmsDeliver::ToFromAddressPtr |
2129 } // CSmsDeliver::ToFromAddressPtr |
2134 |
2130 |
2135 |
2131 |
2161 * @return True if the SC is being instructed to reject duplicates |
2157 * @return True if the SC is being instructed to reject duplicates |
2162 * @capability None |
2158 * @capability None |
2163 */ |
2159 */ |
2164 EXPORT_C TBool CSmsSubmit::RejectDuplicates() const |
2160 EXPORT_C TBool CSmsSubmit::RejectDuplicates() const |
2165 { |
2161 { |
2166 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_REJECTDUPLICATES_1, "CSmsSubmit::RejectDuplicates()"); |
2162 LOGGSMU1("CSmsSubmit::RejectDuplicates()"); |
2167 |
2163 |
2168 return (iFirstOctet&TSmsFirstOctet::ESmsRejectDuplicatesMask)==TSmsFirstOctet::ESmsRejectDuplicates; |
2164 return (iFirstOctet&TSmsFirstOctet::ESmsRejectDuplicatesMask)==TSmsFirstOctet::ESmsRejectDuplicates; |
2169 } // CSmsSubmit::RejectDuplicates |
2165 } // CSmsSubmit::RejectDuplicates |
2170 |
2166 |
2171 |
2167 |
2175 * @param aRejectDuplicates True to instruct the SC to reject duplicates |
2171 * @param aRejectDuplicates True to instruct the SC to reject duplicates |
2176 * @capability None |
2172 * @capability None |
2177 */ |
2173 */ |
2178 EXPORT_C void CSmsSubmit::SetRejectDuplicates(TBool aRejectDuplicates) |
2174 EXPORT_C void CSmsSubmit::SetRejectDuplicates(TBool aRejectDuplicates) |
2179 { |
2175 { |
2180 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_SETREJECTDUPLICATES_1, "CSmsSubmit::SetRejectDuplicates(): aRejectDuplicates=%d", aRejectDuplicates); |
2176 LOGGSMU2("CSmsSubmit::SetRejectDuplicates(): aRejectDuplicates=%d", aRejectDuplicates); |
2181 |
2177 |
2182 iFirstOctet=aRejectDuplicates? (iFirstOctet&(~TSmsFirstOctet::ESmsRejectDuplicatesMask)|TSmsFirstOctet::ESmsRejectDuplicates): |
2178 iFirstOctet=aRejectDuplicates? (iFirstOctet&(~TSmsFirstOctet::ESmsRejectDuplicatesMask)|TSmsFirstOctet::ESmsRejectDuplicates): |
2183 (iFirstOctet&(~TSmsFirstOctet::ESmsRejectDuplicatesMask)|TSmsFirstOctet::ESmsAcceptDuplicates); |
2179 (iFirstOctet&(~TSmsFirstOctet::ESmsRejectDuplicatesMask)|TSmsFirstOctet::ESmsAcceptDuplicates); |
2184 } // CSmsSubmit::SetRejectDuplicates |
2180 } // CSmsSubmit::SetRejectDuplicates |
2185 |
2181 |
2190 * @return Validity Period Format |
2186 * @return Validity Period Format |
2191 * @capability None |
2187 * @capability None |
2192 */ |
2188 */ |
2193 EXPORT_C TSmsFirstOctet::TSmsValidityPeriodFormat CSmsSubmit::ValidityPeriodFormat() const |
2189 EXPORT_C TSmsFirstOctet::TSmsValidityPeriodFormat CSmsSubmit::ValidityPeriodFormat() const |
2194 { |
2190 { |
2195 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_VALIDITYPERIODFORMAT_1, "CSmsSubmit::ValidityPeriodFormat()"); |
2191 LOGGSMU1("CSmsSubmit::ValidityPeriodFormat()"); |
2196 |
2192 |
2197 return iValidityPeriod.ValidityPeriodFormat(); |
2193 return iValidityPeriod.ValidityPeriodFormat(); |
2198 } // TSmsFirstOctet::TSmsValidityPeriodFormat |
2194 } // TSmsFirstOctet::TSmsValidityPeriodFormat |
2199 |
2195 |
2200 |
2196 |
2204 * @param aValidityPeriodFormat Validity Period Format |
2200 * @param aValidityPeriodFormat Validity Period Format |
2205 * @capability None |
2201 * @capability None |
2206 */ |
2202 */ |
2207 EXPORT_C void CSmsSubmit::SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat) |
2203 EXPORT_C void CSmsSubmit::SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat) |
2208 { |
2204 { |
2209 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_SETVALIDITYPERIODFORMAT_1, "CSmsSubmit::SetValidityPeriodFormat()"); |
2205 LOGGSMU1("CSmsSubmit::SetValidityPeriodFormat()"); |
2210 |
2206 |
2211 iValidityPeriod.SetValidityPeriodFormat(aValidityPeriodFormat); |
2207 iValidityPeriod.SetValidityPeriodFormat(aValidityPeriodFormat); |
2212 } // CSmsSubmit::SetValidityPeriodFormat |
2208 } // CSmsSubmit::SetValidityPeriodFormat |
2213 |
2209 |
2214 |
2210 |
2221 * @return True if Reply Path exists |
2217 * @return True if Reply Path exists |
2222 * @capability None |
2218 * @capability None |
2223 */ |
2219 */ |
2224 EXPORT_C TBool CSmsSubmit::ReplyPath() const |
2220 EXPORT_C TBool CSmsSubmit::ReplyPath() const |
2225 { |
2221 { |
2226 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_REPLYPATH_1, "CSmsSubmit::ReplyPath()"); |
2222 LOGGSMU1("CSmsSubmit::ReplyPath()"); |
2227 |
2223 |
2228 return (iFirstOctet&TSmsFirstOctet::ESmsReplyPathMask)==TSmsFirstOctet::ESmsReplyPathExists; |
2224 return (iFirstOctet&TSmsFirstOctet::ESmsReplyPathMask)==TSmsFirstOctet::ESmsReplyPathExists; |
2229 } // CSmsSubmit::ReplyPath |
2225 } // CSmsSubmit::ReplyPath |
2230 |
2226 |
2231 |
2227 |
2235 * @param aReplyPath Set to True to set Reply Path |
2231 * @param aReplyPath Set to True to set Reply Path |
2236 * @capability None |
2232 * @capability None |
2237 */ |
2233 */ |
2238 EXPORT_C void CSmsSubmit::SetReplyPath(TBool aReplyPath) |
2234 EXPORT_C void CSmsSubmit::SetReplyPath(TBool aReplyPath) |
2239 { |
2235 { |
2240 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_SETREPLYPATH_1, "CSmsSubmit::SetReplyPath(): aReplyPath=%d", aReplyPath); |
2236 LOGGSMU2("CSmsSubmit::SetReplyPath(): aReplyPath=%d", aReplyPath); |
2241 |
2237 |
2242 iFirstOctet=aReplyPath? (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathExists): |
2238 iFirstOctet=aReplyPath? (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathExists): |
2243 (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathNone); |
2239 (iFirstOctet&(~TSmsFirstOctet::ESmsReplyPathMask)|TSmsFirstOctet::ESmsReplyPathNone); |
2244 } // CSmsSubmit::SetReplyPath |
2240 } // CSmsSubmit::SetReplyPath |
2245 |
2241 |
2252 * @return True if the sender is requesting Status Reports |
2248 * @return True if the sender is requesting Status Reports |
2253 * @capability None |
2249 * @capability None |
2254 */ |
2250 */ |
2255 EXPORT_C TBool CSmsSubmit::StatusReportRequest() const |
2251 EXPORT_C TBool CSmsSubmit::StatusReportRequest() const |
2256 { |
2252 { |
2257 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_STATUSREPORTREQUEST_1, "CSmsSubmit::StatusReportRequest()"); |
2253 LOGGSMU1("CSmsSubmit::StatusReportRequest()"); |
2258 |
2254 |
2259 return (iFirstOctet&TSmsFirstOctet::ESmsStatusReportRequestMask)==TSmsFirstOctet::ESmsStatusReportRequested; |
2255 return (iFirstOctet&TSmsFirstOctet::ESmsStatusReportRequestMask)==TSmsFirstOctet::ESmsStatusReportRequested; |
2260 } // CSmsSubmit::StatusReportRequest |
2256 } // CSmsSubmit::StatusReportRequest |
2261 |
2257 |
2262 |
2258 |
2266 * @param aRequest Status Report Request flag |
2262 * @param aRequest Status Report Request flag |
2267 * @capability None |
2263 * @capability None |
2268 */ |
2264 */ |
2269 EXPORT_C void CSmsSubmit::SetStatusReportRequest(TBool aRequest) |
2265 EXPORT_C void CSmsSubmit::SetStatusReportRequest(TBool aRequest) |
2270 { |
2266 { |
2271 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_SETSTATUSREPORTREQUEST_1, "CSmsSubmit::SetStatusReportRequest(): aRequest=%d", aRequest); |
2267 LOGGSMU2("CSmsSubmit::SetStatusReportRequest(): aRequest=%d", aRequest); |
2272 |
2268 |
2273 iFirstOctet=aRequest? (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsStatusReportRequested): |
2269 iFirstOctet=aRequest? (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsStatusReportRequested): |
2274 (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsStatusReportNotRequested); |
2270 (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsStatusReportNotRequested); |
2275 } // CSmsSubmit::SetStatusReportRequest |
2271 } // CSmsSubmit::SetStatusReportRequest |
2276 |
2272 |
2281 * @return Message Reference |
2277 * @return Message Reference |
2282 * @capability None |
2278 * @capability None |
2283 */ |
2279 */ |
2284 EXPORT_C TInt CSmsSubmit::MessageReference() const |
2280 EXPORT_C TInt CSmsSubmit::MessageReference() const |
2285 { |
2281 { |
2286 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_MESSAGEREFERENCE_1, "CSmsSubmit::MessageReference()"); |
2282 LOGGSMU1("CSmsSubmit::MessageReference()"); |
2287 |
2283 |
2288 return iMessageReference; |
2284 return iMessageReference; |
2289 } // CSmsSubmit::MessageReference |
2285 } // CSmsSubmit::MessageReference |
2290 |
2286 |
2291 |
2287 |
2295 * @param aMessageReference Message Reference |
2291 * @param aMessageReference Message Reference |
2296 * @capability None |
2292 * @capability None |
2297 */ |
2293 */ |
2298 EXPORT_C void CSmsSubmit::SetMessageReference(TInt aMessageReference) |
2294 EXPORT_C void CSmsSubmit::SetMessageReference(TInt aMessageReference) |
2299 { |
2295 { |
2300 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_SETMESSAGEREFERENCE_1, "CSmsSubmit::SetMessageReference(): aMessageReference=%d",aMessageReference); |
2296 LOGGSMU2("CSmsSubmit::SetMessageReference(): aMessageReference=%d", |
2297 aMessageReference); |
|
2301 iMessageReference=aMessageReference; |
2298 iMessageReference=aMessageReference; |
2302 } // CSmsSubmit::SetMessageReference |
2299 } // CSmsSubmit::SetMessageReference |
2303 |
2300 |
2304 |
2301 |
2305 /** |
2302 /** |
2308 * @return Validity Period |
2305 * @return Validity Period |
2309 * @capability None |
2306 * @capability None |
2310 */ |
2307 */ |
2311 EXPORT_C const TTimeIntervalMinutes& CSmsSubmit::ValidityPeriod() const |
2308 EXPORT_C const TTimeIntervalMinutes& CSmsSubmit::ValidityPeriod() const |
2312 { |
2309 { |
2313 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_VALIDITYPERIOD_1, "CSmsSubmit::ValidityPeriod()"); |
2310 LOGGSMU1("CSmsSubmit::ValidityPeriod()"); |
2314 |
2311 |
2315 return iValidityPeriod.TimeIntervalMinutes(); |
2312 return iValidityPeriod.TimeIntervalMinutes(); |
2316 } // CSmsSubmit::ValidityPeriod |
2313 } // CSmsSubmit::ValidityPeriod |
2317 |
2314 |
2318 |
2315 |
2322 * @param aTimeIntervalMinutes Validity Period |
2319 * @param aTimeIntervalMinutes Validity Period |
2323 * @capability None |
2320 * @capability None |
2324 */ |
2321 */ |
2325 EXPORT_C void CSmsSubmit::SetValidityPeriod(const TTimeIntervalMinutes& aTimeIntervalMinutes) |
2322 EXPORT_C void CSmsSubmit::SetValidityPeriod(const TTimeIntervalMinutes& aTimeIntervalMinutes) |
2326 { |
2323 { |
2327 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_SETVALIDITYPERIOD_1, "CSmsSubmit::SetValidityPeriod(): %d",aTimeIntervalMinutes.Int()); |
2324 LOGGSMU2("CSmsSubmit::SetValidityPeriod(): aTimeIntervalMinutes", |
2325 aTimeIntervalMinutes.Int()); |
|
2328 |
2326 |
2329 iValidityPeriod.SetTimeIntervalMinutes(aTimeIntervalMinutes); |
2327 iValidityPeriod.SetTimeIntervalMinutes(aTimeIntervalMinutes); |
2330 } // CSmsSubmit::SetValidityPeriod |
2328 } // CSmsSubmit::SetValidityPeriod |
2331 |
2329 |
2332 |
2330 |
2333 const TSmsDataCodingScheme* CSmsSubmit::DataCodingScheme() const |
2331 const TSmsDataCodingScheme* CSmsSubmit::DataCodingScheme() const |
2334 { |
2332 { |
2335 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_DATACODINGSCHEME_1, "CSmsSubmit::DataCodingScheme()"); |
2333 LOGGSMU1("CSmsSubmit::DataCodingScheme()"); |
2336 |
2334 |
2337 return &iDataCodingScheme; |
2335 return &iDataCodingScheme; |
2338 } // CSmsSubmit::DataCodingScheme |
2336 } // CSmsSubmit::DataCodingScheme |
2339 |
2337 |
2340 |
2338 |
2341 const TSmsProtocolIdentifier* CSmsSubmit::ProtocolIdentifier() const |
2339 const TSmsProtocolIdentifier* CSmsSubmit::ProtocolIdentifier() const |
2342 { |
2340 { |
2343 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_PROTOCOLIDENTIFIER_1, "CSmsSubmit::ProtocolIdentifier()"); |
2341 LOGGSMU1("CSmsSubmit::ProtocolIdentifier()"); |
2344 |
2342 |
2345 return &iProtocolIdentifier; |
2343 return &iProtocolIdentifier; |
2346 } // CSmsSubmit::ProtocolIdentifier |
2344 } // CSmsSubmit::ProtocolIdentifier |
2347 |
2345 |
2348 |
2346 |
2349 const CSmsUserData* CSmsSubmit::UserDataPtr() const |
2347 const CSmsUserData* CSmsSubmit::UserDataPtr() const |
2350 { |
2348 { |
2351 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_USERDATAPTR_1, "CSmsSubmit::UserDataPtr()"); |
2349 LOGGSMU1("CSmsSubmit::UserDataPtr()"); |
2352 |
2350 |
2353 return iUserData; |
2351 return iUserData; |
2354 } // CSmsSubmit::UserDataPtr |
2352 } // CSmsSubmit::UserDataPtr |
2355 |
2353 |
2356 |
2354 |
2357 const CSmsAddress* CSmsSubmit::ToFromAddressPtr() const |
2355 const CSmsAddress* CSmsSubmit::ToFromAddressPtr() const |
2358 { |
2356 { |
2359 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_TOFROMADDRESSPTR_1, "CSmsSubmit::ToFromAddressPtr()"); |
2357 LOGGSMU1("CSmsSubmit::ToFromAddressPtr()"); |
2360 |
2358 |
2361 return iDestinationAddress; |
2359 return iDestinationAddress; |
2362 } // CSmsSubmit::ToFromAddressPtr |
2360 } // CSmsSubmit::ToFromAddressPtr |
2363 |
2361 |
2364 |
2362 |
2365 void CSmsSubmit::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
2363 void CSmsSubmit::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
2366 { |
2364 { |
2367 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_CONSTRUCTL_1, "CSmsSubmit::ConstructL()"); |
2365 LOGGSMU1("CSmsSubmit::ConstructL()"); |
2368 |
2366 |
2369 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2367 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2370 iDestinationAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2368 iDestinationAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2371 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
2369 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
2372 } // CSmsSubmit::ConstructL |
2370 } // CSmsSubmit::ConstructL |
2377 * |
2375 * |
2378 * @return Pointer to the newly created CSmsSubmit object. |
2376 * @return Pointer to the newly created CSmsSubmit object. |
2379 */ |
2377 */ |
2380 EXPORT_C CSmsSubmit* CSmsSubmit::DuplicateL() const |
2378 EXPORT_C CSmsSubmit* CSmsSubmit::DuplicateL() const |
2381 { |
2379 { |
2382 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMIT_DUPLICATEL_1, "CSmsSubmit::DuplicateL()"); |
2380 LOGGSMU1("CSmsSubmit::DuplicateL()"); |
2383 |
2381 |
2384 CSmsSubmit* smsSubmit = new (ELeave) CSmsSubmit(); |
2382 CSmsSubmit* smsSubmit = new (ELeave) CSmsSubmit(); |
2385 CleanupStack::PushL(smsSubmit); |
2383 CleanupStack::PushL(smsSubmit); |
2386 |
2384 |
2387 smsSubmit->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2385 smsSubmit->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2401 } // CSmsSubmit::DuplicateL |
2399 } // CSmsSubmit::DuplicateL |
2402 |
2400 |
2403 |
2401 |
2404 TUint8* CSmsSubmit::EncodeL(TUint8* aPtr) const |
2402 TUint8* CSmsSubmit::EncodeL(TUint8* aPtr) const |
2405 { |
2403 { |
2406 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_ENCODEL_1, "CSmsSubmit::EncodeL()"); |
2404 LOGGSMU1("CSmsSubmit::EncodeL()"); |
2407 |
2405 |
2408 aPtr=iFirstOctet.EncodeL(aPtr); |
2406 aPtr=iFirstOctet.EncodeL(aPtr); |
2409 aPtr=iMessageReference.EncodeL(aPtr); |
2407 aPtr=iMessageReference.EncodeL(aPtr); |
2410 aPtr=iDestinationAddress->EncodeL(aPtr); |
2408 aPtr=iDestinationAddress->EncodeL(aPtr); |
2411 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
2409 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
2414 return iUserData->EncodeL(aPtr); |
2412 return iUserData->EncodeL(aPtr); |
2415 } // CSmsSubmit::EncodeL |
2413 } // CSmsSubmit::EncodeL |
2416 |
2414 |
2417 TUint8* CSmsSubmit::EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const |
2415 TUint8* CSmsSubmit::EncodeL(TUint8* aPtr, const TEncodeParams* aEncodeParams) const |
2418 { |
2416 { |
2419 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_ENCODEL1_1, "CSmsSubmit::EncodeL()"); |
2417 LOGGSMU1("CSmsSubmit::EncodeL()"); |
2420 |
2418 |
2421 aPtr=iFirstOctet.EncodeL(aPtr); |
2419 aPtr=iFirstOctet.EncodeL(aPtr); |
2422 aPtr=iMessageReference.EncodeL(aPtr); |
2420 aPtr=iMessageReference.EncodeL(aPtr); |
2423 aPtr=iDestinationAddress->EncodeL(aPtr); |
2421 aPtr=iDestinationAddress->EncodeL(aPtr); |
2424 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
2422 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
2427 return iUserData->EncodeL(aPtr); |
2425 return iUserData->EncodeL(aPtr); |
2428 } // CSmsSubmit::EncodeL |
2426 } // CSmsSubmit::EncodeL |
2429 |
2427 |
2430 void CSmsSubmit::DecodeL(TGsmuLex8& aPdu) |
2428 void CSmsSubmit::DecodeL(TGsmuLex8& aPdu) |
2431 { |
2429 { |
2432 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_DECODEL_1, "CSmsSubmit::DecodeL()"); |
2430 LOGGSMU1("CSmsSubmit::DecodeL()"); |
2433 |
2431 |
2434 iFirstOctet.DecodeL(aPdu); |
2432 iFirstOctet.DecodeL(aPdu); |
2435 iMessageReference.DecodeL(aPdu); |
2433 iMessageReference.DecodeL(aPdu); |
2436 iDestinationAddress->DecodeL(aPdu); |
2434 iDestinationAddress->DecodeL(aPdu); |
2437 iProtocolIdentifier.DecodeL(aPdu); |
2435 iProtocolIdentifier.DecodeL(aPdu); |
2447 } // CSmsSubmit::DecodeL |
2445 } // CSmsSubmit::DecodeL |
2448 |
2446 |
2449 |
2447 |
2450 void CSmsSubmit::InternalizeMessagePDUL(RReadStream& aStream) |
2448 void CSmsSubmit::InternalizeMessagePDUL(RReadStream& aStream) |
2451 { |
2449 { |
2452 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMIT_INTERNALIZEMESSAGEPDUL_1, "CSmsSubmit::InternalizeMessagePDUL()"); |
2450 LOGGSMU1("CSmsSubmit::InternalizeMessagePDUL()"); |
2453 |
2451 |
2454 iServiceCenterAddress->InternalizeL(aStream); |
2452 iServiceCenterAddress->InternalizeL(aStream); |
2455 |
2453 |
2456 aStream >> iFirstOctet; |
2454 aStream >> iFirstOctet; |
2457 aStream >> iMessageReference; |
2455 aStream >> iMessageReference; |
2503 * @return The Failure Cause |
2501 * @return The Failure Cause |
2504 * @capability None |
2502 * @capability None |
2505 */ |
2503 */ |
2506 EXPORT_C TInt CSmsDeliverReport::FailureCause() const |
2504 EXPORT_C TInt CSmsDeliverReport::FailureCause() const |
2507 { |
2505 { |
2508 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVERREPORT_FAILURECAUSE_1, "CSmsDeliverReport::FailureCause()"); |
2506 LOGGSMU1("CSmsDeliverReport::FailureCause()"); |
2509 |
2507 |
2510 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2508 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2511 return iFailureCause.Error(); |
2509 return iFailureCause.Error(); |
2512 } // CSmsDeliverReport::FailureCause |
2510 } // CSmsDeliverReport::FailureCause |
2513 |
2511 |
2518 * @param aFailureCause The Failure Cause |
2516 * @param aFailureCause The Failure Cause |
2519 * @capability None |
2517 * @capability None |
2520 */ |
2518 */ |
2521 EXPORT_C void CSmsDeliverReport::SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause) |
2519 EXPORT_C void CSmsDeliverReport::SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause) |
2522 { |
2520 { |
2523 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVERREPORT_SETFAILURECAUSE_1, "CSmsDeliverReport::SetFailureCause()"); |
2521 LOGGSMU1("CSmsDeliverReport::SetFailureCause()"); |
2524 |
2522 |
2525 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2523 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2526 iFailureCause.SetError(aFailureCause); |
2524 iFailureCause.SetError(aFailureCause); |
2527 } // CSmsDeliverReport::SetFailureCause |
2525 } // CSmsDeliverReport::SetFailureCause |
2528 |
2526 |
2529 |
2527 |
2530 const TSmsDataCodingScheme* CSmsDeliverReport::DataCodingScheme() const |
2528 const TSmsDataCodingScheme* CSmsDeliverReport::DataCodingScheme() const |
2531 { |
2529 { |
2532 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_DATACODINGSCHEME_1, "CSmsDeliverReport::DataCodingScheme()"); |
2530 LOGGSMU1("CSmsDeliverReport::DataCodingScheme()"); |
2533 |
2531 |
2534 __ASSERT_DEBUG(DataCodingSchemePresent(),Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
2532 __ASSERT_DEBUG(DataCodingSchemePresent(),Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
2535 return &iDataCodingScheme; |
2533 return &iDataCodingScheme; |
2536 } // CSmsDeliverReport::DataCodingScheme |
2534 } // CSmsDeliverReport::DataCodingScheme |
2537 |
2535 |
2538 |
2536 |
2539 const TSmsProtocolIdentifier* CSmsDeliverReport::ProtocolIdentifier() const |
2537 const TSmsProtocolIdentifier* CSmsDeliverReport::ProtocolIdentifier() const |
2540 { |
2538 { |
2541 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_PROTOCOLIDENTIFIER_1, "CSmsDeliverReport::ProtocolIdentifier()"); |
2539 LOGGSMU1("CSmsDeliverReport::ProtocolIdentifier()"); |
2542 |
2540 |
2543 __ASSERT_DEBUG(ProtocolIdentifierPresent(),Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
2541 __ASSERT_DEBUG(ProtocolIdentifierPresent(),Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
2544 return &iProtocolIdentifier; |
2542 return &iProtocolIdentifier; |
2545 } // CSmsDeliverReport::ProtocolIdentifier |
2543 } // CSmsDeliverReport::ProtocolIdentifier |
2546 |
2544 |
2547 |
2545 |
2548 const TSmsParameterIndicator* CSmsDeliverReport::ParameterIndicator() const |
2546 const TSmsParameterIndicator* CSmsDeliverReport::ParameterIndicator() const |
2549 { |
2547 { |
2550 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_PARAMETERINDICATOR_1, "CSmsDeliverReport::ParameterIndicator()"); |
2548 LOGGSMU1("CSmsDeliverReport::ParameterIndicator()"); |
2551 |
2549 |
2552 return &iParameterIndicator; |
2550 return &iParameterIndicator; |
2553 } // CSmsDeliverReport::ParameterIndicator |
2551 } // CSmsDeliverReport::ParameterIndicator |
2554 |
2552 |
2555 |
2553 |
2556 const CSmsUserData* CSmsDeliverReport::UserDataPtr() const |
2554 const CSmsUserData* CSmsDeliverReport::UserDataPtr() const |
2557 { |
2555 { |
2558 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_USERDATAPTR_1, "CSmsDeliverReport::UserDataPtr()"); |
2556 LOGGSMU1("CSmsDeliverReport::UserDataPtr()"); |
2559 |
2557 |
2560 __ASSERT_DEBUG(UserDataPresent(),Panic(KGsmuPanicUserDataNotPresent)); |
2558 __ASSERT_DEBUG(UserDataPresent(),Panic(KGsmuPanicUserDataNotPresent)); |
2561 return iUserData; |
2559 return iUserData; |
2562 } // CSmsDeliverReport::UserDataPtr |
2560 } // CSmsDeliverReport::UserDataPtr |
2563 |
2561 |
2564 |
2562 |
2565 void CSmsDeliverReport::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
2563 void CSmsDeliverReport::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
2566 { |
2564 { |
2567 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_CONSTRUCTL_1, "CSmsDeliverReport::ConstructL()"); |
2565 LOGGSMU1("CSmsDeliverReport::ConstructL()"); |
2568 |
2566 |
2569 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2567 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2570 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
2568 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
2571 } // CSmsDeliverReport::ConstructL |
2569 } // CSmsDeliverReport::ConstructL |
2572 |
2570 |
2576 * |
2574 * |
2577 * @return Pointer to the newly created CSmsDeliverReport object. |
2575 * @return Pointer to the newly created CSmsDeliverReport object. |
2578 */ |
2576 */ |
2579 EXPORT_C CSmsDeliverReport* CSmsDeliverReport::DuplicateL() const |
2577 EXPORT_C CSmsDeliverReport* CSmsDeliverReport::DuplicateL() const |
2580 { |
2578 { |
2581 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSDELIVERREPORT_DUPLICATEL_1, "CSmsDeliverReport::DuplicateL()"); |
2579 LOGGSMU1("CSmsDeliverReport::DuplicateL()"); |
2582 |
2580 |
2583 CSmsDeliverReport* smsDeliverReport = new (ELeave) CSmsDeliverReport(iIsRPError); |
2581 CSmsDeliverReport* smsDeliverReport = new (ELeave) CSmsDeliverReport(iIsRPError); |
2584 CleanupStack::PushL(smsDeliverReport); |
2582 CleanupStack::PushL(smsDeliverReport); |
2585 |
2583 |
2586 smsDeliverReport->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2584 smsDeliverReport->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2598 } // CSmsDeliverReport::DuplicateL |
2596 } // CSmsDeliverReport::DuplicateL |
2599 |
2597 |
2600 |
2598 |
2601 TUint8* CSmsDeliverReport::EncodeL(TUint8* aPtr) const |
2599 TUint8* CSmsDeliverReport::EncodeL(TUint8* aPtr) const |
2602 { |
2600 { |
2603 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_ENCODEL_1, "CSmsDeliverReport::EncodeL()"); |
2601 LOGGSMU1("CSmsDeliverReport::EncodeL()"); |
2604 |
2602 |
2605 aPtr=iFirstOctet.EncodeL(aPtr); |
2603 aPtr=iFirstOctet.EncodeL(aPtr); |
2606 if (iIsRPError) |
2604 if (iIsRPError) |
2607 aPtr=iFailureCause.EncodeL(aPtr); |
2605 aPtr=iFailureCause.EncodeL(aPtr); |
2608 aPtr=iParameterIndicator.EncodeL(aPtr); |
2606 aPtr=iParameterIndicator.EncodeL(aPtr); |
2620 return EncodeL(aPtr); |
2618 return EncodeL(aPtr); |
2621 } |
2619 } |
2622 |
2620 |
2623 void CSmsDeliverReport::DecodeL(TGsmuLex8& aPdu) |
2621 void CSmsDeliverReport::DecodeL(TGsmuLex8& aPdu) |
2624 { |
2622 { |
2625 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSDELIVERREPORT_DECODEL_1, "CSmsDeliverReport::DecodeL()"); |
2623 LOGGSMU1("CSmsDeliverReport::DecodeL()"); |
2626 |
2624 |
2627 iFirstOctet.DecodeL(aPdu); |
2625 iFirstOctet.DecodeL(aPdu); |
2628 if (iIsRPError) |
2626 if (iIsRPError) |
2629 iFailureCause.DecodeL(aPdu); |
2627 iFailureCause.DecodeL(aPdu); |
2630 iParameterIndicator.DecodeL(aPdu); |
2628 iParameterIndicator.DecodeL(aPdu); |
2717 * @return The Failure Cause |
2715 * @return The Failure Cause |
2718 * @capability None |
2716 * @capability None |
2719 */ |
2717 */ |
2720 EXPORT_C TInt CSmsSubmitReport::FailureCause() const |
2718 EXPORT_C TInt CSmsSubmitReport::FailureCause() const |
2721 { |
2719 { |
2722 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMITREPORT_FAILURECAUSE_1, "CSmsSubmitReport::FailureCause()"); |
2720 LOGGSMU1("CSmsSubmitReport::FailureCause()"); |
2723 |
2721 |
2724 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2722 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2725 return iFailureCause.Error(); |
2723 return iFailureCause.Error(); |
2726 } // CSmsSubmitReport::FailureCause |
2724 } // CSmsSubmitReport::FailureCause |
2727 |
2725 |
2732 * @param aFailureCause The Failure Cause |
2730 * @param aFailureCause The Failure Cause |
2733 * @capability None |
2731 * @capability None |
2734 */ |
2732 */ |
2735 EXPORT_C void CSmsSubmitReport::SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause) |
2733 EXPORT_C void CSmsSubmitReport::SetFailureCause(TSmsFailureCause::TSmsFailureCauseError aFailureCause) |
2736 { |
2734 { |
2737 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMITREPORT_SETFAILURECAUSE_1, "CSmsSubmitReport::SetFailureCause()"); |
2735 LOGGSMU1("CSmsSubmitReport::SetFailureCause()"); |
2738 |
2736 |
2739 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2737 __ASSERT_DEBUG(iIsRPError,Panic(KGsmuPanicNotRPError)); |
2740 iFailureCause.SetError(aFailureCause); |
2738 iFailureCause.SetError(aFailureCause); |
2741 } // CSmsSubmitReport::SetFailureCause |
2739 } // CSmsSubmitReport::SetFailureCause |
2742 |
2740 |
2743 |
2741 |
2744 const TSmsDataCodingScheme* CSmsSubmitReport::DataCodingScheme() const |
2742 const TSmsDataCodingScheme* CSmsSubmitReport::DataCodingScheme() const |
2745 { |
2743 { |
2746 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_DATACODINGSCHEME_1, "CSmsSubmitReport::DataCodingScheme()"); |
2744 LOGGSMU1("CSmsSubmitReport::DataCodingScheme()"); |
2747 |
2745 |
2748 __ASSERT_DEBUG(DataCodingSchemePresent(),Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
2746 __ASSERT_DEBUG(DataCodingSchemePresent(),Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
2749 return &iDataCodingScheme; |
2747 return &iDataCodingScheme; |
2750 } // CSmsSubmitReport::DataCodingScheme |
2748 } // CSmsSubmitReport::DataCodingScheme |
2751 |
2749 |
2752 |
2750 |
2753 const TSmsProtocolIdentifier* CSmsSubmitReport::ProtocolIdentifier() const |
2751 const TSmsProtocolIdentifier* CSmsSubmitReport::ProtocolIdentifier() const |
2754 { |
2752 { |
2755 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_PROTOCOLIDENTIFIER_1, "CSmsSubmitReport::ProtocolIdentifier()"); |
2753 LOGGSMU1("CSmsSubmitReport::ProtocolIdentifier()"); |
2756 |
2754 |
2757 __ASSERT_DEBUG(ProtocolIdentifierPresent(),Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
2755 __ASSERT_DEBUG(ProtocolIdentifierPresent(),Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
2758 return &iProtocolIdentifier; |
2756 return &iProtocolIdentifier; |
2759 } // CSmsSubmitReport::ProtocolIdentifier |
2757 } // CSmsSubmitReport::ProtocolIdentifier |
2760 |
2758 |
2761 |
2759 |
2762 const TSmsParameterIndicator* CSmsSubmitReport::ParameterIndicator() const |
2760 const TSmsParameterIndicator* CSmsSubmitReport::ParameterIndicator() const |
2763 { |
2761 { |
2764 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_PARAMETERINDICATOR_1, "CSmsSubmitReport::ParameterIndicator()"); |
2762 LOGGSMU1("CSmsSubmitReport::ParameterIndicator()"); |
2765 |
2763 |
2766 return &iParameterIndicator; |
2764 return &iParameterIndicator; |
2767 } // CSmsSubmitReport::ParameterIndicator |
2765 } // CSmsSubmitReport::ParameterIndicator |
2768 |
2766 |
2769 |
2767 |
2770 const CSmsUserData* CSmsSubmitReport::UserDataPtr() const |
2768 const CSmsUserData* CSmsSubmitReport::UserDataPtr() const |
2771 { |
2769 { |
2772 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_USERDATAPTR_1, "CSmsSubmitReport::UserDataPtr()"); |
2770 LOGGSMU1("CSmsSubmitReport::UserDataPtr()"); |
2773 |
2771 |
2774 __ASSERT_DEBUG(UserDataPresent(),Panic(KGsmuPanicUserDataNotPresent)); |
2772 __ASSERT_DEBUG(UserDataPresent(),Panic(KGsmuPanicUserDataNotPresent)); |
2775 return iUserData; |
2773 return iUserData; |
2776 } // CSmsSubmitReport::UserDataPtr |
2774 } // CSmsSubmitReport::UserDataPtr |
2777 |
2775 |
2778 |
2776 |
2779 void CSmsSubmitReport::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
2777 void CSmsSubmitReport::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
2780 { |
2778 { |
2781 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_CONSTRUCTL_1, "CSmsSubmitReport::ConstructL()"); |
2779 LOGGSMU1("CSmsSubmitReport::ConstructL()"); |
2782 |
2780 |
2783 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2781 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
2784 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
2782 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
2785 } // CSmsSubmitReport::ConstructL |
2783 } // CSmsSubmitReport::ConstructL |
2786 |
2784 |
2790 * |
2788 * |
2791 * @return Pointer to the newly created CSmsSubmitReport object. |
2789 * @return Pointer to the newly created CSmsSubmitReport object. |
2792 */ |
2790 */ |
2793 EXPORT_C CSmsSubmitReport* CSmsSubmitReport::DuplicateL() const |
2791 EXPORT_C CSmsSubmitReport* CSmsSubmitReport::DuplicateL() const |
2794 { |
2792 { |
2795 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSUBMITREPORT_DUPLICATEL_1, "CSmsSubmitReport::DuplicateL()"); |
2793 LOGGSMU1("CSmsSubmitReport::DuplicateL()"); |
2796 |
2794 |
2797 CSmsSubmitReport* smsSubmitReport = new (ELeave) CSmsSubmitReport(iIsRPError); |
2795 CSmsSubmitReport* smsSubmitReport = new (ELeave) CSmsSubmitReport(iIsRPError); |
2798 CleanupStack::PushL(smsSubmitReport); |
2796 CleanupStack::PushL(smsSubmitReport); |
2799 |
2797 |
2800 smsSubmitReport->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2798 smsSubmitReport->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
2813 } // CSmsSubmitReport::DuplicateL |
2811 } // CSmsSubmitReport::DuplicateL |
2814 |
2812 |
2815 |
2813 |
2816 TUint8* CSmsSubmitReport::EncodeL(TUint8* aPtr) const |
2814 TUint8* CSmsSubmitReport::EncodeL(TUint8* aPtr) const |
2817 { |
2815 { |
2818 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_ENCODEL_1, "CSmsSubmitReport::EncodeL()"); |
2816 LOGGSMU1("CSmsSubmitReport::EncodeL()"); |
2819 |
2817 |
2820 aPtr=iFirstOctet.EncodeL(aPtr); |
2818 aPtr=iFirstOctet.EncodeL(aPtr); |
2821 if (iIsRPError) |
2819 if (iIsRPError) |
2822 aPtr=iFailureCause.EncodeL(aPtr); |
2820 aPtr=iFailureCause.EncodeL(aPtr); |
2823 aPtr=iParameterIndicator.EncodeL(aPtr); |
2821 aPtr=iParameterIndicator.EncodeL(aPtr); |
2836 return EncodeL(aPtr); |
2834 return EncodeL(aPtr); |
2837 } |
2835 } |
2838 |
2836 |
2839 void CSmsSubmitReport::DecodeL(TGsmuLex8& aPdu) |
2837 void CSmsSubmitReport::DecodeL(TGsmuLex8& aPdu) |
2840 { |
2838 { |
2841 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSUBMITREPORT_DECODEL_1, "CSmsSubmitReport::DecodeL()"); |
2839 LOGGSMU1("CSmsSubmitReport::DecodeL()"); |
2842 |
2840 |
2843 iFirstOctet.DecodeL(aPdu); |
2841 iFirstOctet.DecodeL(aPdu); |
2844 if (iIsRPError) |
2842 if (iIsRPError) |
2845 iFailureCause.DecodeL(aPdu); |
2843 iFailureCause.DecodeL(aPdu); |
2846 iParameterIndicator.DecodeL(aPdu); |
2844 iParameterIndicator.DecodeL(aPdu); |
2931 * @return True if More Messages to Send flag set |
2929 * @return True if More Messages to Send flag set |
2932 * @capability None |
2930 * @capability None |
2933 */ |
2931 */ |
2934 EXPORT_C TBool CSmsStatusReport::MoreMessagesToSend() const |
2932 EXPORT_C TBool CSmsStatusReport::MoreMessagesToSend() const |
2935 { |
2933 { |
2936 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_MOREMESSAGESTOSEND_1, "CSmsStatusReport::MoreMessagesToSend()"); |
2934 LOGGSMU1("CSmsStatusReport::MoreMessagesToSend()"); |
2937 |
2935 |
2938 return (iFirstOctet&TSmsFirstOctet::ESmsMoreMessagesToSendMask)==TSmsFirstOctet::ESmsMoreMessagesToSend; |
2936 return (iFirstOctet&TSmsFirstOctet::ESmsMoreMessagesToSendMask)==TSmsFirstOctet::ESmsMoreMessagesToSend; |
2939 } // CSmsStatusReport::MoreMessagesToSend |
2937 } // CSmsStatusReport::MoreMessagesToSend |
2940 |
2938 |
2941 |
2939 |
2945 * @param aMore True if More Messages to Send |
2943 * @param aMore True if More Messages to Send |
2946 * @capability None |
2944 * @capability None |
2947 */ |
2945 */ |
2948 EXPORT_C void CSmsStatusReport::SetMoreMessagesToSend(TBool aMore) |
2946 EXPORT_C void CSmsStatusReport::SetMoreMessagesToSend(TBool aMore) |
2949 { |
2947 { |
2950 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SETMOREMESSAGESTOSEND_1, "CSmsStatusReport::SetMoreMessagesToSend()"); |
2948 LOGGSMU1("CSmsStatusReport::SetMoreMessagesToSend()"); |
2951 |
2949 |
2952 iFirstOctet=aMore? (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsMoreMessagesToSend): |
2950 iFirstOctet=aMore? (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsMoreMessagesToSend): |
2953 (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsNoMoreMessagesToSend); |
2951 (iFirstOctet&(~TSmsFirstOctet::ESmsMoreMessagesToSendMask)|TSmsFirstOctet::ESmsNoMoreMessagesToSend); |
2954 } // CSmsStatusReport::SetMoreMessagesToSend |
2952 } // CSmsStatusReport::SetMoreMessagesToSend |
2955 |
2953 |
2961 * @return Status Report Qualifier |
2959 * @return Status Report Qualifier |
2962 * @capability None |
2960 * @capability None |
2963 */ |
2961 */ |
2964 EXPORT_C TSmsFirstOctet::TSmsStatusReportQualifier CSmsStatusReport::StatusReportQualifier() const |
2962 EXPORT_C TSmsFirstOctet::TSmsStatusReportQualifier CSmsStatusReport::StatusReportQualifier() const |
2965 { |
2963 { |
2966 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_STATUSREPORTQUALIFIER_1, "CSmsStatusReport::StatusReportQualifier()"); |
2964 LOGGSMU1("TSmsFirstOctet::TSmsStatusReportQualifier()"); |
2967 |
2965 |
2968 return (TSmsFirstOctet::TSmsStatusReportQualifier) (iFirstOctet&TSmsFirstOctet::ESmsStatusReportQualifierMask); |
2966 return (TSmsFirstOctet::TSmsStatusReportQualifier) (iFirstOctet&TSmsFirstOctet::ESmsStatusReportQualifierMask); |
2969 } // TSmsFirstOctet::TSmsStatusReportQualifier |
2967 } // TSmsFirstOctet::TSmsStatusReportQualifier |
2970 |
2968 |
2971 |
2969 |
2975 * @param aQualifier Status Report Qualifier |
2973 * @param aQualifier Status Report Qualifier |
2976 * @capability None |
2974 * @capability None |
2977 */ |
2975 */ |
2978 EXPORT_C void CSmsStatusReport::SetStatusReportQualifier(TSmsFirstOctet::TSmsStatusReportQualifier aQualifier) |
2976 EXPORT_C void CSmsStatusReport::SetStatusReportQualifier(TSmsFirstOctet::TSmsStatusReportQualifier aQualifier) |
2979 { |
2977 { |
2980 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SETSTATUSREPORTQUALIFIER_1, "CSmsStatusReport::SetStatusReportQualifier()"); |
2978 LOGGSMU1("CSmsStatusReport::SetStatusReportQualifier()"); |
2981 |
2979 |
2982 iFirstOctet=iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportQualifierMask)|aQualifier; |
2980 iFirstOctet=iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportQualifierMask)|aQualifier; |
2983 } // CSmsStatusReport::SetStatusReportQualifier |
2981 } // CSmsStatusReport::SetStatusReportQualifier |
2984 |
2982 |
2985 |
2983 |
3007 * @return Message Reference |
3005 * @return Message Reference |
3008 * @capability None |
3006 * @capability None |
3009 */ |
3007 */ |
3010 EXPORT_C TInt CSmsStatusReport::MessageReference() const |
3008 EXPORT_C TInt CSmsStatusReport::MessageReference() const |
3011 { |
3009 { |
3012 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_MESSAGEREFERENCE_1, "CSmsStatusReport::MessageReference %d", (TInt)iMessageReference ); |
3010 LOGGSMU2("CSmsStatusReport::MessageReference %d", (TInt)iMessageReference ); |
3013 return iMessageReference; |
3011 return iMessageReference; |
3014 } // CSmsStatusReport::MessageReference |
3012 } // CSmsStatusReport::MessageReference |
3015 |
3013 |
3016 |
3014 |
3017 /** |
3015 /** |
3021 * @capability None |
3019 * @capability None |
3022 */ |
3020 */ |
3023 EXPORT_C void CSmsStatusReport::SetMessageReference(TInt aMessageReference) |
3021 EXPORT_C void CSmsStatusReport::SetMessageReference(TInt aMessageReference) |
3024 { |
3022 { |
3025 iMessageReference=aMessageReference; |
3023 iMessageReference=aMessageReference; |
3026 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SETMESSAGEREFERENCE_1, "CSmsStatusReport::SetMessageReference %d", (TInt)iMessageReference ); |
3024 LOGGSMU2("CSmsStatusReport::SetMessageReference %d", (TInt)iMessageReference ); |
3027 } // CSmsStatusReport::SetMessageReference |
3025 } // CSmsStatusReport::SetMessageReference |
3028 |
3026 |
3029 |
3027 |
3030 /** |
3028 /** |
3031 * Gets Service Center Time Stamp. |
3029 * Gets Service Center Time Stamp. |
3034 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours. |
3032 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours. |
3035 * @capability None |
3033 * @capability None |
3036 */ |
3034 */ |
3037 EXPORT_C void CSmsStatusReport::ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours) |
3035 EXPORT_C void CSmsStatusReport::ServiceCenterTimeStamp(TTime& aTime,TInt& aNumQuarterHours) |
3038 { |
3036 { |
3039 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SERVICECENTERTIMESTAMP_1, "CSmsStatusReport::ServiceCenterTimeStamp()"); |
3037 LOGGSMU1("CSmsStatusReport::ServiceCenterTimeStamp()"); |
3040 |
3038 |
3041 aTime=iServiceCenterTimeStamp.Time(); |
3039 aTime=iServiceCenterTimeStamp.Time(); |
3042 aNumQuarterHours=iServiceCenterTimeStamp.TimeOffset(); |
3040 aNumQuarterHours=iServiceCenterTimeStamp.TimeOffset(); |
3043 } // CSmsStatusReport::ServiceCenterTimeStamp |
3041 } // CSmsStatusReport::ServiceCenterTimeStamp |
3044 |
3042 |
3050 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours. |
3048 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours. |
3051 * @capability None |
3049 * @capability None |
3052 */ |
3050 */ |
3053 EXPORT_C void CSmsStatusReport::SetServiceCenterTimeStamp(const TTime& aTime,TInt& aNumQuarterHours) |
3051 EXPORT_C void CSmsStatusReport::SetServiceCenterTimeStamp(const TTime& aTime,TInt& aNumQuarterHours) |
3054 { |
3052 { |
3055 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SETSERVICECENTERTIMESTAMP_1, "CSmsStatusReport::SetServiceCenterTimeStamp()"); |
3053 LOGGSMU1("CSmsStatusReport::SetServiceCenterTimeStamp()"); |
3056 |
3054 |
3057 iServiceCenterTimeStamp.SetTime(aTime); |
3055 iServiceCenterTimeStamp.SetTime(aTime); |
3058 iServiceCenterTimeStamp.SetTimeOffset(aNumQuarterHours); |
3056 iServiceCenterTimeStamp.SetTimeOffset(aNumQuarterHours); |
3059 } // CSmsStatusReport::SetServiceCenterTimeStamp |
3057 } // CSmsStatusReport::SetServiceCenterTimeStamp |
3060 |
3058 |
3066 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
3064 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
3067 * @capability None |
3065 * @capability None |
3068 */ |
3066 */ |
3069 EXPORT_C void CSmsStatusReport::DischargeTime(TTime& aTime,TInt& aNumQuarterHours) |
3067 EXPORT_C void CSmsStatusReport::DischargeTime(TTime& aTime,TInt& aNumQuarterHours) |
3070 { |
3068 { |
3071 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_DISCHARGETIME_1, "CSmsStatusReport::DischargeTime()"); |
3069 LOGGSMU1("CSmsStatusReport::DischargeTime()"); |
3072 |
3070 |
3073 aTime=iDischargeTime.Time(); |
3071 aTime=iDischargeTime.Time(); |
3074 aNumQuarterHours=iDischargeTime.TimeOffset(); |
3072 aNumQuarterHours=iDischargeTime.TimeOffset(); |
3075 } // CSmsStatusReport::DischargeTime |
3073 } // CSmsStatusReport::DischargeTime |
3076 |
3074 |
3082 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
3080 * @param aNumQuarterHours +/- Time Zone difference to GMT in quarter hours |
3083 * @capability None |
3081 * @capability None |
3084 */ |
3082 */ |
3085 EXPORT_C void CSmsStatusReport::SetDischargeTime(const TTime& aTime,TInt& aNumQuarterHours) |
3083 EXPORT_C void CSmsStatusReport::SetDischargeTime(const TTime& aTime,TInt& aNumQuarterHours) |
3086 { |
3084 { |
3087 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SETDISCHARGETIME_1, "CSmsStatusReport::SetDischargeTime()"); |
3085 LOGGSMU1("CSmsStatusReport::SetDischargeTime()"); |
3088 |
3086 |
3089 iDischargeTime.SetTime(aTime); |
3087 iDischargeTime.SetTime(aTime); |
3090 iDischargeTime.SetTimeOffset(aNumQuarterHours); |
3088 iDischargeTime.SetTimeOffset(aNumQuarterHours); |
3091 } // CSmsStatusReport::SetDischargeTime |
3089 } // CSmsStatusReport::SetDischargeTime |
3092 |
3090 |
3097 * @return Status |
3095 * @return Status |
3098 * @capability None |
3096 * @capability None |
3099 */ |
3097 */ |
3100 EXPORT_C TSmsStatus::TSmsStatusValue CSmsStatusReport::Status() const |
3098 EXPORT_C TSmsStatus::TSmsStatusValue CSmsStatusReport::Status() const |
3101 { |
3099 { |
3102 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_STATUS_1, "CSmsStatusReport::Status %d", iStatus.Status()); |
3100 LOGGSMU2("CSmsStatusReport::Status %d", iStatus.Status()); |
3103 return iStatus.Status(); |
3101 return iStatus.Status(); |
3104 } // TSmsStatus::TSmsStatusValue |
3102 } // TSmsStatus::TSmsStatusValue |
3105 |
3103 |
3106 |
3104 |
3107 /** |
3105 /** |
3110 * @param aValue Status |
3108 * @param aValue Status |
3111 * @capability None |
3109 * @capability None |
3112 */ |
3110 */ |
3113 EXPORT_C void CSmsStatusReport::SetStatus(TSmsStatus::TSmsStatusValue aValue) |
3111 EXPORT_C void CSmsStatusReport::SetStatus(TSmsStatus::TSmsStatusValue aValue) |
3114 { |
3112 { |
3115 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_SETSTATUS_1, "CSmsStatusReport::SetStatus()"); |
3113 LOGGSMU1("CSmsStatusReport::SetStatus()"); |
3116 |
3114 |
3117 iStatus.SetStatus(aValue); |
3115 iStatus.SetStatus(aValue); |
3118 } // CSmsStatusReport::SetStatus |
3116 } // CSmsStatusReport::SetStatus |
3119 |
3117 |
3120 |
3118 |
3121 const TSmsDataCodingScheme* CSmsStatusReport::DataCodingScheme() const |
3119 const TSmsDataCodingScheme* CSmsStatusReport::DataCodingScheme() const |
3122 { |
3120 { |
3123 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_DATACODINGSCHEME_1, "CSmsStatusReport::DataCodingScheme()"); |
3121 LOGGSMU1("CSmsStatusReport::DataCodingScheme()"); |
3124 |
3122 |
3125 __ASSERT_DEBUG(DataCodingSchemePresent(),Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
3123 __ASSERT_DEBUG(DataCodingSchemePresent(),Panic(KGsmuPanicDataCodingSchemeNotPresent)); |
3126 return &iDataCodingScheme; |
3124 return &iDataCodingScheme; |
3127 } // CSmsStatusReport::DataCodingScheme |
3125 } // CSmsStatusReport::DataCodingScheme |
3128 |
3126 |
3129 |
3127 |
3130 const TSmsProtocolIdentifier* CSmsStatusReport::ProtocolIdentifier() const |
3128 const TSmsProtocolIdentifier* CSmsStatusReport::ProtocolIdentifier() const |
3131 { |
3129 { |
3132 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_PROTOCOLIDENTIFIER_1, "CSmsStatusReport::ProtocolIdentifier()"); |
3130 LOGGSMU1("CSmsStatusReport::ProtocolIdentifier()"); |
3133 |
3131 |
3134 __ASSERT_DEBUG(ProtocolIdentifierPresent(),Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
3132 __ASSERT_DEBUG(ProtocolIdentifierPresent(),Panic(KGsmuPanicProtocolIdentifierNotPresent)); |
3135 return &iProtocolIdentifier; |
3133 return &iProtocolIdentifier; |
3136 } // CSmsStatusReport::ProtocolIdentifier |
3134 } // CSmsStatusReport::ProtocolIdentifier |
3137 |
3135 |
3138 |
3136 |
3139 const TSmsParameterIndicator* CSmsStatusReport::ParameterIndicator() const |
3137 const TSmsParameterIndicator* CSmsStatusReport::ParameterIndicator() const |
3140 { |
3138 { |
3141 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_PARAMETERINDICATOR_1, "CSmsStatusReport::ParameterIndicator()"); |
3139 LOGGSMU1("CSmsStatusReport::ParameterIndicator()"); |
3142 |
3140 |
3143 __ASSERT_DEBUG(iParameterIndicatorPresent,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
3141 __ASSERT_DEBUG(iParameterIndicatorPresent,Panic(KGsmuPanicParameterIndicatorNotPresent)); |
3144 return &iParameterIndicator; |
3142 return &iParameterIndicator; |
3145 } // CSmsStatusReport::ParameterIndicator |
3143 } // CSmsStatusReport::ParameterIndicator |
3146 |
3144 |
3147 |
3145 |
3148 const CSmsUserData* CSmsStatusReport::UserDataPtr() const |
3146 const CSmsUserData* CSmsStatusReport::UserDataPtr() const |
3149 { |
3147 { |
3150 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_USERDATAPTR_1, "CSmsStatusReport::UserDataPtr()"); |
3148 LOGGSMU1("CSmsStatusReport::UserDataPtr()"); |
3151 |
3149 |
3152 __ASSERT_DEBUG(UserDataPresent(),Panic(KGsmuPanicUserDataNotPresent)); |
3150 __ASSERT_DEBUG(UserDataPresent(),Panic(KGsmuPanicUserDataNotPresent)); |
3153 return iUserData; |
3151 return iUserData; |
3154 } // CSmsStatusReport::UserDataPtr |
3152 } // CSmsStatusReport::UserDataPtr |
3155 |
3153 |
3156 |
3154 |
3157 const CSmsAddress* CSmsStatusReport::ToFromAddressPtr() const |
3155 const CSmsAddress* CSmsStatusReport::ToFromAddressPtr() const |
3158 { |
3156 { |
3159 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_TOFROMADDRESSPTR_1, "CSmsStatusReport::ToFromAddressPtr()"); |
3157 LOGGSMU1("CSmsStatusReport::ToFromAddressPtr()"); |
3160 |
3158 |
3161 return iRecipientAddress; |
3159 return iRecipientAddress; |
3162 } // CSmsStatusReport::ToFromAddressPtr |
3160 } // CSmsStatusReport::ToFromAddressPtr |
3163 |
3161 |
3164 |
3162 |
3165 void CSmsStatusReport::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
3163 void CSmsStatusReport::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
3166 { |
3164 { |
3167 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_CONSTRUCTL_1, "CSmsStatusReport::ConstructL()"); |
3165 LOGGSMU1("CSmsStatusReport::ConstructL()"); |
3168 |
3166 |
3169 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3167 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3170 iRecipientAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3168 iRecipientAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3171 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
3169 iUserData=CSmsUserData::NewL(aCharacterSetConverter,aFs,iFirstOctet,iDataCodingScheme); |
3172 } // CSmsStatusReport::ConstructL |
3170 } // CSmsStatusReport::ConstructL |
3177 * |
3175 * |
3178 * @return Pointer to the newly created CSmsStatusReport object. |
3176 * @return Pointer to the newly created CSmsStatusReport object. |
3179 */ |
3177 */ |
3180 EXPORT_C CSmsStatusReport* CSmsStatusReport::DuplicateL() const |
3178 EXPORT_C CSmsStatusReport* CSmsStatusReport::DuplicateL() const |
3181 { |
3179 { |
3182 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSSTATUSREPORT_DUPLICATEL_1, "CSmsStatusReport::DuplicateL()"); |
3180 LOGGSMU1("CSmsStatusReport::DuplicateL()"); |
3183 |
3181 |
3184 CSmsStatusReport* smsStatusReport = new (ELeave) CSmsStatusReport(); |
3182 CSmsStatusReport* smsStatusReport = new (ELeave) CSmsStatusReport(); |
3185 CleanupStack::PushL(smsStatusReport); |
3183 CleanupStack::PushL(smsStatusReport); |
3186 |
3184 |
3187 smsStatusReport->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
3185 smsStatusReport->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
3204 } // CSmsStatusReport::DuplicateL |
3202 } // CSmsStatusReport::DuplicateL |
3205 |
3203 |
3206 |
3204 |
3207 TUint8* CSmsStatusReport::EncodeL(TUint8* aPtr) const |
3205 TUint8* CSmsStatusReport::EncodeL(TUint8* aPtr) const |
3208 { |
3206 { |
3209 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_ENCODEL_1, "CSmsStatusReport::EncodeL()"); |
3207 LOGGSMU1("CSmsStatusReport::EncodeL()"); |
3210 |
3208 |
3211 aPtr=iFirstOctet.EncodeL(aPtr); |
3209 aPtr=iFirstOctet.EncodeL(aPtr); |
3212 aPtr=iMessageReference.EncodeL(aPtr); |
3210 aPtr=iMessageReference.EncodeL(aPtr); |
3213 aPtr=iRecipientAddress->EncodeL(aPtr); |
3211 aPtr=iRecipientAddress->EncodeL(aPtr); |
3214 aPtr=iServiceCenterTimeStamp.EncodeL(aPtr); |
3212 aPtr=iServiceCenterTimeStamp.EncodeL(aPtr); |
3232 return EncodeL(aPtr); |
3230 return EncodeL(aPtr); |
3233 } |
3231 } |
3234 |
3232 |
3235 void CSmsStatusReport::DecodeL(TGsmuLex8& aPdu) |
3233 void CSmsStatusReport::DecodeL(TGsmuLex8& aPdu) |
3236 { |
3234 { |
3237 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSSTATUSREPORT_DECODEL_1, "CSmsStatusReport::DecodeL()"); |
3235 LOGGSMU1("CSmsStatusReport::DecodeL()"); |
3238 |
3236 |
3239 iFirstOctet.DecodeL(aPdu); |
3237 iFirstOctet.DecodeL(aPdu); |
3240 iMessageReference.DecodeL(aPdu); |
3238 iMessageReference.DecodeL(aPdu); |
3241 iRecipientAddress->DecodeL(aPdu); |
3239 iRecipientAddress->DecodeL(aPdu); |
3242 |
3240 |
3379 * @return True if the sender is requesting Status Reports |
3377 * @return True if the sender is requesting Status Reports |
3380 * @capability None |
3378 * @capability None |
3381 */ |
3379 */ |
3382 EXPORT_C TBool CSmsCommand::StatusReportRequest() const |
3380 EXPORT_C TBool CSmsCommand::StatusReportRequest() const |
3383 { |
3381 { |
3384 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_STATUSREPORTREQUEST_1, "CSmsCommand::StatusReportRequest()"); |
3382 LOGGSMU1("CSmsCommand::StatusReportRequest()"); |
3385 |
3383 |
3386 return (iFirstOctet&TSmsFirstOctet::ESmsStatusReportRequestMask)==TSmsFirstOctet::ESmsStatusReportRequested; |
3384 return (iFirstOctet&TSmsFirstOctet::ESmsStatusReportRequestMask)==TSmsFirstOctet::ESmsStatusReportRequested; |
3387 } // CSmsCommand::StatusReportRequest |
3385 } // CSmsCommand::StatusReportRequest |
3388 |
3386 |
3389 |
3387 |
3393 * @param aRequest Set to True to Request Status Report |
3391 * @param aRequest Set to True to Request Status Report |
3394 * @capability None |
3392 * @capability None |
3395 */ |
3393 */ |
3396 EXPORT_C void CSmsCommand::SetStatusReportRequest(TBool aRequest) |
3394 EXPORT_C void CSmsCommand::SetStatusReportRequest(TBool aRequest) |
3397 { |
3395 { |
3398 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_SETSTATUSREPORTREQUEST_1, "CSmsCommand::SetStatusReportRequest()"); |
3396 LOGGSMU1("CSmsCommand::SetStatusReportRequest()"); |
3399 |
3397 |
3400 __ASSERT_DEBUG(CommandType()==TSmsCommandType::ESmsCommandTypeEnableStatusReportRequest,Panic(KGsmuPanicSetStatusReportRequestNotSupportedForCommandType)); |
3398 __ASSERT_DEBUG(CommandType()==TSmsCommandType::ESmsCommandTypeEnableStatusReportRequest,Panic(KGsmuPanicSetStatusReportRequestNotSupportedForCommandType)); |
3401 DoSetStatusReportRequest(aRequest); |
3399 DoSetStatusReportRequest(aRequest); |
3402 } // CSmsCommand::SetStatusReportRequest |
3400 } // CSmsCommand::SetStatusReportRequest |
3403 |
3401 |
3408 * @return Message Reference |
3406 * @return Message Reference |
3409 * @capability None |
3407 * @capability None |
3410 */ |
3408 */ |
3411 EXPORT_C TInt CSmsCommand::MessageReference() const |
3409 EXPORT_C TInt CSmsCommand::MessageReference() const |
3412 { |
3410 { |
3413 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_MESSAGEREFERENCE_1, "CSmsCommand::MessageReference()"); |
3411 LOGGSMU1("CSmsCommand::MessageReference()"); |
3414 |
3412 |
3415 return iMessageReference; |
3413 return iMessageReference; |
3416 } // CSmsCommand::MessageReference |
3414 } // CSmsCommand::MessageReference |
3417 |
3415 |
3418 |
3416 |
3422 * @param aMessageReference Message Reference |
3420 * @param aMessageReference Message Reference |
3423 * @capability None |
3421 * @capability None |
3424 */ |
3422 */ |
3425 EXPORT_C void CSmsCommand::SetMessageReference(TInt aMessageReference) |
3423 EXPORT_C void CSmsCommand::SetMessageReference(TInt aMessageReference) |
3426 { |
3424 { |
3427 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_SETMESSAGEREFERENCE_1, "CSmsCommand::SetMessageReference()"); |
3425 LOGGSMU1("CSmsCommand::SetMessageReference()"); |
3428 |
3426 |
3429 iMessageReference=aMessageReference; |
3427 iMessageReference=aMessageReference; |
3430 } // CSmsCommand::SetMessageReference |
3428 } // CSmsCommand::SetMessageReference |
3431 |
3429 |
3432 |
3430 |
3436 * @return Command Type |
3434 * @return Command Type |
3437 * @capability None |
3435 * @capability None |
3438 */ |
3436 */ |
3439 EXPORT_C TInt CSmsCommand::CommandType() const |
3437 EXPORT_C TInt CSmsCommand::CommandType() const |
3440 { |
3438 { |
3441 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_COMMANDTYPE_1, "CSmsCommand::CommandType()"); |
3439 LOGGSMU1("CSmsCommand::CommandType()"); |
3442 |
3440 |
3443 return iCommandType.CommandType(); |
3441 return iCommandType.CommandType(); |
3444 } // CSmsCommand::CommandType |
3442 } // CSmsCommand::CommandType |
3445 |
3443 |
3446 |
3444 |
3450 * @param aCommandType Command Type |
3448 * @param aCommandType Command Type |
3451 * @capability None |
3449 * @capability None |
3452 */ |
3450 */ |
3453 EXPORT_C void CSmsCommand::SetCommandType(TSmsCommandType::TSmsCommandTypeValue aCommandType) |
3451 EXPORT_C void CSmsCommand::SetCommandType(TSmsCommandType::TSmsCommandTypeValue aCommandType) |
3454 { |
3452 { |
3455 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_SETCOMMANDTYPE_1, "CSmsCommand::SetCommandType()"); |
3453 LOGGSMU1("CSmsCommand::SetCommandType()"); |
3456 |
3454 |
3457 // Some command types have default status report request |
3455 // Some command types have default status report request |
3458 switch (aCommandType) |
3456 switch (aCommandType) |
3459 { |
3457 { |
3460 case TSmsCommandType::ESmsCommandTypeEnquiry: |
3458 case TSmsCommandType::ESmsCommandTypeEnquiry: |
3483 * @return Message Number |
3481 * @return Message Number |
3484 * @capability None |
3482 * @capability None |
3485 */ |
3483 */ |
3486 EXPORT_C TInt CSmsCommand::MessageNumber() const |
3484 EXPORT_C TInt CSmsCommand::MessageNumber() const |
3487 { |
3485 { |
3488 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_MESSAGENUMBER_1, "CSmsCommand::MessageNumber()"); |
3486 LOGGSMU1("CSmsCommand::MessageNumber()"); |
3489 |
3487 |
3490 return iMessageNumber; |
3488 return iMessageNumber; |
3491 } // CSmsCommand::MessageNumber |
3489 } // CSmsCommand::MessageNumber |
3492 |
3490 |
3493 |
3491 |
3497 * @param aMessageNumber Message Number |
3495 * @param aMessageNumber Message Number |
3498 * @capability None |
3496 * @capability None |
3499 */ |
3497 */ |
3500 EXPORT_C void CSmsCommand::SetMessageNumber(TInt aMessageNumber) |
3498 EXPORT_C void CSmsCommand::SetMessageNumber(TInt aMessageNumber) |
3501 { |
3499 { |
3502 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_SETMESSAGENUMBER_1, "CSmsCommand::SetMessageNumber()"); |
3500 LOGGSMU1("CSmsCommand::SetMessageNumber()"); |
3503 |
3501 |
3504 iMessageNumber=aMessageNumber; |
3502 iMessageNumber=aMessageNumber; |
3505 } // CSmsCommand::SetMessageNumber |
3503 } // CSmsCommand::SetMessageNumber |
3506 |
3504 |
3507 |
3505 |
3511 * @return Number of Information Elements in the User Data |
3509 * @return Number of Information Elements in the User Data |
3512 * @capability None |
3510 * @capability None |
3513 */ |
3511 */ |
3514 EXPORT_C TInt CSmsCommand::NumInformationElements() const |
3512 EXPORT_C TInt CSmsCommand::NumInformationElements() const |
3515 { |
3513 { |
3516 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_NUMINFORMATIONELEMENTS_1, "CSmsCommand::NumInformationElements()"); |
3514 LOGGSMU1("CSmsCommand::NumInformationElements()"); |
3517 |
3515 |
3518 return iCommandData->NumInformationElements(); |
3516 return iCommandData->NumInformationElements(); |
3519 } // CSmsCommand::NumInformationElements |
3517 } // CSmsCommand::NumInformationElements |
3520 |
3518 |
3521 |
3519 |
3526 * @return Information Element |
3524 * @return Information Element |
3527 * @capability None |
3525 * @capability None |
3528 */ |
3526 */ |
3529 EXPORT_C CSmsInformationElement& CSmsCommand::InformationElement(TInt aIndex) const |
3527 EXPORT_C CSmsInformationElement& CSmsCommand::InformationElement(TInt aIndex) const |
3530 { |
3528 { |
3531 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_INFORMATIONELEMENT_1, "CSmsCommand::InformationElement()"); |
3529 LOGGSMU1("CSmsCommand::InformationElement()"); |
3532 |
3530 |
3533 return iCommandData->InformationElement(aIndex); |
3531 return iCommandData->InformationElement(aIndex); |
3534 } // CSmsCommand::InformationElement |
3532 } // CSmsCommand::InformationElement |
3535 |
3533 |
3536 |
3534 |
3544 CSmsInformationElement*& CSmsCommand::InformationElementPtr(TInt aIndex) const |
3542 CSmsInformationElement*& CSmsCommand::InformationElementPtr(TInt aIndex) const |
3545 { |
3543 { |
3546 // Ignore in code coverage - not used in SMS stack and not exported |
3544 // Ignore in code coverage - not used in SMS stack and not exported |
3547 // but cannot be removed as impacts public header. |
3545 // but cannot be removed as impacts public header. |
3548 BULLSEYE_OFF |
3546 BULLSEYE_OFF |
3549 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_INFORMATIONELEMENTPTR_1, "CSmsCommand::InformationElementPtr()"); |
3547 LOGGSMU1("CSmsCommand::InformationElementPtr()"); |
3550 return iCommandData->InformationElementPtr(aIndex); |
3548 return iCommandData->InformationElementPtr(aIndex); |
3551 BULLSEYE_RESTORE |
3549 BULLSEYE_RESTORE |
3552 } |
3550 } |
3553 |
3551 |
3554 /** |
3552 /** |
3560 * @capability None |
3558 * @capability None |
3561 */ |
3559 */ |
3562 EXPORT_C TBool CSmsCommand::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, |
3560 EXPORT_C TBool CSmsCommand::InformationElementIndex(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, |
3563 TInt& aIndex) const |
3561 TInt& aIndex) const |
3564 { |
3562 { |
3565 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_INFORMATIONELEMENTINDEX_1, "CSmsCommand::InformationElementIndex()"); |
3563 LOGGSMU1("CSmsCommand::InformationElementIndex()"); |
3566 |
3564 |
3567 return iCommandData->InformationElementIndex(aIdentifier,aIndex); |
3565 return iCommandData->InformationElementIndex(aIdentifier,aIndex); |
3568 } // CSmsCommand::InformationElementIndex |
3566 } // CSmsCommand::InformationElementIndex |
3569 |
3567 |
3570 |
3568 |
3575 * @param aData The Information Element data |
3573 * @param aData The Information Element data |
3576 * @capability None |
3574 * @capability None |
3577 */ |
3575 */ |
3578 EXPORT_C void CSmsCommand::AddInformationElementL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, TDesC8& aData) |
3576 EXPORT_C void CSmsCommand::AddInformationElementL(CSmsInformationElement::TSmsInformationElementIdentifier aIdentifier, TDesC8& aData) |
3579 { |
3577 { |
3580 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_ADDINFORMATIONELEMENTL_1, "CSmsCommand::AddInformationElementL()"); |
3578 LOGGSMU1("CSmsCommand::AddInformationElementL()"); |
3581 |
3579 |
3582 iCommandData->AddInformationElementL(aIdentifier,aData); |
3580 iCommandData->AddInformationElementL(aIdentifier,aData); |
3583 } // CSmsCommand::AddInformationElementL |
3581 } // CSmsCommand::AddInformationElementL |
3584 |
3582 |
3585 |
3583 |
3589 * @param aIndex Index of the Information Element to be removed |
3587 * @param aIndex Index of the Information Element to be removed |
3590 * @capability None |
3588 * @capability None |
3591 */ |
3589 */ |
3592 EXPORT_C void CSmsCommand::RemoveInformationElement(TInt aIndex) |
3590 EXPORT_C void CSmsCommand::RemoveInformationElement(TInt aIndex) |
3593 { |
3591 { |
3594 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_REMOVEINFORMATIONELEMENT_1, "CSmsCommand::RemoveInformationElement()"); |
3592 LOGGSMU1("CSmsCommand::RemoveInformationElement()"); |
3595 |
3593 |
3596 iCommandData->RemoveInformationElement(aIndex); |
3594 iCommandData->RemoveInformationElement(aIndex); |
3597 } // CSmsCommand::RemoveInformationElement |
3595 } // CSmsCommand::RemoveInformationElement |
3598 |
3596 |
3599 |
3597 |
3603 * @return Maximum Data Length of the Command |
3601 * @return Maximum Data Length of the Command |
3604 * @capability None |
3602 * @capability None |
3605 */ |
3603 */ |
3606 EXPORT_C TInt CSmsCommand::MaxCommandDataLength() const |
3604 EXPORT_C TInt CSmsCommand::MaxCommandDataLength() const |
3607 { |
3605 { |
3608 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_MAXCOMMANDDATALENGTH_1, "CSmsCommand::MaxCommandDataLength()"); |
3606 LOGGSMU1("CSmsCommand::MaxCommandDataLength()"); |
3609 |
3607 |
3610 return iCommandData->MaxDataLength(); |
3608 return iCommandData->MaxDataLength(); |
3611 } // CSmsCommand::MaxCommandDataLength |
3609 } // CSmsCommand::MaxCommandDataLength |
3612 |
3610 |
3613 |
3611 |
3617 * @return The Command Data |
3615 * @return The Command Data |
3618 * @capability None |
3616 * @capability None |
3619 */ |
3617 */ |
3620 EXPORT_C TPtrC8 CSmsCommand::CommandData() const |
3618 EXPORT_C TPtrC8 CSmsCommand::CommandData() const |
3621 { |
3619 { |
3622 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_COMMANDDATA_1, "CSmsCommand::CommandData()"); |
3620 LOGGSMU1("CSmsCommand::CommandData()"); |
3623 |
3621 |
3624 return iCommandData->Data(); |
3622 return iCommandData->Data(); |
3625 } // CSmsCommand::CommandData |
3623 } // CSmsCommand::CommandData |
3626 |
3624 |
3627 |
3625 |
3631 * @param aData The Command Data |
3629 * @param aData The Command Data |
3632 * @capability None |
3630 * @capability None |
3633 */ |
3631 */ |
3634 EXPORT_C void CSmsCommand::SetCommandDataL(const TDesC8& aData) |
3632 EXPORT_C void CSmsCommand::SetCommandDataL(const TDesC8& aData) |
3635 { |
3633 { |
3636 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_SETCOMMANDDATAL_1, "CSmsCommand::SetCommandDataL()"); |
3634 LOGGSMU1("CSmsCommand::SetCommandDataL()"); |
3637 |
3635 |
3638 iCommandData->SetDataL(aData); |
3636 iCommandData->SetDataL(aData); |
3639 } // CSmsCommand::SetCommandDataL |
3637 } // CSmsCommand::SetCommandDataL |
3640 |
3638 |
3641 |
3639 |
3642 const TSmsProtocolIdentifier* CSmsCommand::ProtocolIdentifier() const |
3640 const TSmsProtocolIdentifier* CSmsCommand::ProtocolIdentifier() const |
3643 { |
3641 { |
3644 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_PROTOCOLIDENTIFIER_1, "CSmsCommand::ProtocolIdentifier()"); |
3642 LOGGSMU1("CSmsCommand::ProtocolIdentifier()"); |
3645 |
3643 |
3646 return &iProtocolIdentifier; |
3644 return &iProtocolIdentifier; |
3647 } // CSmsCommand::ProtocolIdentifier |
3645 } // CSmsCommand::ProtocolIdentifier |
3648 |
3646 |
3649 |
3647 |
3650 const CSmsAddress* CSmsCommand::ToFromAddressPtr() const |
3648 const CSmsAddress* CSmsCommand::ToFromAddressPtr() const |
3651 { |
3649 { |
3652 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_TOFROMADDRESSPTR_1, "CSmsCommand::ToFromAddressPtr()"); |
3650 LOGGSMU1("CSmsCommand::ToFromAddressPtr()"); |
3653 |
3651 |
3654 return iDestinationAddress; |
3652 return iDestinationAddress; |
3655 } // CSmsCommand::ToFromAddressPtr |
3653 } // CSmsCommand::ToFromAddressPtr |
3656 |
3654 |
3657 |
3655 |
3658 void CSmsCommand::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
3656 void CSmsCommand::ConstructL(CCnvCharacterSetConverter& aCharacterSetConverter,RFs& aFs) |
3659 { |
3657 { |
3660 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_CONSTRUCTL_1, "CSmsCommand::ConstructL()"); |
3658 LOGGSMU1("CSmsCommand::ConstructL()"); |
3661 |
3659 |
3662 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3660 iServiceCenterAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3663 iDestinationAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3661 iDestinationAddress=CSmsAddress::NewL(aCharacterSetConverter,aFs); |
3664 iCommandData=CSmsCommandData::NewL(iFirstOctet); |
3662 iCommandData=CSmsCommandData::NewL(iFirstOctet); |
3665 } // CSmsCommand::ConstructL |
3663 } // CSmsCommand::ConstructL |
3670 * |
3668 * |
3671 * @return Pointer to the newly created CSmsCommand object. |
3669 * @return Pointer to the newly created CSmsCommand object. |
3672 */ |
3670 */ |
3673 EXPORT_C CSmsCommand* CSmsCommand::DuplicateL() const |
3671 EXPORT_C CSmsCommand* CSmsCommand::DuplicateL() const |
3674 { |
3672 { |
3675 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_BORDER, CSMSCOMMAND_DUPLICATEL_1, "CSmsCommand::DuplicateL()"); |
3673 LOGGSMU1("CSmsCommand::DuplicateL()"); |
3676 |
3674 |
3677 CSmsCommand* smsCommand = new (ELeave) CSmsCommand(); |
3675 CSmsCommand* smsCommand = new (ELeave) CSmsCommand(); |
3678 CleanupStack::PushL(smsCommand); |
3676 CleanupStack::PushL(smsCommand); |
3679 |
3677 |
3680 smsCommand->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
3678 smsCommand->iServiceCenterAddress = iServiceCenterAddress->DuplicateL(); |
3692 } // CSmsCommand::DuplicateL |
3690 } // CSmsCommand::DuplicateL |
3693 |
3691 |
3694 |
3692 |
3695 TUint8* CSmsCommand::EncodeL(TUint8* aPtr) const |
3693 TUint8* CSmsCommand::EncodeL(TUint8* aPtr) const |
3696 { |
3694 { |
3697 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_ENCODEL_1, "CSmsCommand::EncodeL()"); |
3695 LOGGSMU1("CSmsCommand::EncodeL()"); |
3698 |
3696 |
3699 aPtr=iFirstOctet.EncodeL(aPtr); |
3697 aPtr=iFirstOctet.EncodeL(aPtr); |
3700 aPtr=iMessageReference.EncodeL(aPtr); |
3698 aPtr=iMessageReference.EncodeL(aPtr); |
3701 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
3699 aPtr=iProtocolIdentifier.EncodeL(aPtr); |
3702 aPtr=iCommandType.EncodeL(aPtr); |
3700 aPtr=iCommandType.EncodeL(aPtr); |
3714 BULLSEYE_RESTORE |
3712 BULLSEYE_RESTORE |
3715 } |
3713 } |
3716 |
3714 |
3717 void CSmsCommand::DecodeL(TGsmuLex8& aPdu) |
3715 void CSmsCommand::DecodeL(TGsmuLex8& aPdu) |
3718 { |
3716 { |
3719 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_DECODEL_1, "CSmsCommand::DecodeL()"); |
3717 LOGGSMU1("CSmsCommand::DecodeL()"); |
3720 |
3718 |
3721 iFirstOctet.DecodeL(aPdu); |
3719 iFirstOctet.DecodeL(aPdu); |
3722 iMessageReference.DecodeL(aPdu); |
3720 iMessageReference.DecodeL(aPdu); |
3723 iProtocolIdentifier.DecodeL(aPdu); |
3721 iProtocolIdentifier.DecodeL(aPdu); |
3724 iCommandType.DecodeL(aPdu); |
3722 iCommandType.DecodeL(aPdu); |
3756 } // CSmsCommand::ExternalizeMessagePDUL |
3754 } // CSmsCommand::ExternalizeMessagePDUL |
3757 |
3755 |
3758 |
3756 |
3759 void CSmsCommand::DoSetStatusReportRequest(TBool aRequest) |
3757 void CSmsCommand::DoSetStatusReportRequest(TBool aRequest) |
3760 { |
3758 { |
3761 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSMSCOMMAND_DOSETSTATUSREPORTREQUEST_1, "CSmsCommand::DoSetStatusReportRequest()"); |
3759 LOGGSMU1("CSmsCommand::DoSetStatusReportRequest()"); |
3762 |
3760 |
3763 iFirstOctet=aRequest? (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsStatusReportRequested): |
3761 iFirstOctet=aRequest? (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsStatusReportRequested): |
3764 (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsAcceptDuplicates); |
3762 (iFirstOctet&(~TSmsFirstOctet::ESmsStatusReportRequestMask)|TSmsFirstOctet::ESmsAcceptDuplicates); |
3765 } // CSmsCommand::DoSetStatusReportRequest |
3763 } // CSmsCommand::DoSetStatusReportRequest |