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