218 // |
212 // |
219 if (pduType == CSmsPDU::ESmsSubmit || |
213 if (pduType == CSmsPDU::ESmsSubmit || |
220 pduType == CSmsPDU::ESmsStatusReport || |
214 pduType == CSmsPDU::ESmsStatusReport || |
221 pduType == CSmsPDU::ESmsCommand) |
215 pduType == CSmsPDU::ESmsCommand) |
222 { |
216 { |
223 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_3, "%sMR: 0x%02X", aText, aPDU[octetOffset]); |
217 LOGSMSIF3("%SMR: 0x%02X", &aText, aPDU[octetOffset]); |
224 octetOffset++; |
218 octetOffset++; |
225 } |
219 } |
226 |
220 |
227 // |
221 // |
228 // Command's PID, CT and MN... |
222 // Command's PID, CT and MN... |
229 // |
223 // |
230 if (pduType == CSmsPDU::ESmsCommand) |
224 if (pduType == CSmsPDU::ESmsCommand) |
231 { |
225 { |
232 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_4, "%sPID: 0x%02X", aText, aPDU[octetOffset]); |
226 LOGSMSIF3("%SPID: 0x%02X", &aText, aPDU[octetOffset]); |
233 octetOffset++; |
227 octetOffset++; |
234 |
228 |
235 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_5, "%sCT: 0x%02X", aText, aPDU[octetOffset]); |
229 LOGSMSIF3("%SCT: 0x%02X", &aText, aPDU[octetOffset]); |
236 octetOffset++; |
230 octetOffset++; |
237 |
231 |
238 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_6, "%sMN: 0x%02X", aText, aPDU[octetOffset]); |
232 LOGSMSIF3("%SMN: 0x%02X", &aText, aPDU[octetOffset]); |
239 octetOffset++; |
233 octetOffset++; |
240 } |
234 } |
241 |
235 |
242 // |
236 // |
243 // Log the telephone number... |
237 // Log the telephone number... |
525 } |
519 } |
526 } |
520 } |
527 } |
521 } |
528 else |
522 else |
529 { |
523 { |
530 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_18, "%sUDL: Problems with the ieidl_a %d being less that UDHL",aText, ieidl_a); |
524 LOGSMSIF3("%SUDL: Problems with the ieidl_a %d being less that UDHL", |
|
525 &aText, ieidl_a); |
531 } |
526 } |
532 |
527 |
533 if ((ieidl_a + 1) > udhl) |
528 if ((ieidl_a + 1) > udhl) |
534 { |
529 { |
535 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_19, "%sUDL: Corrupted or implement decoding for second iei_b, iei_n!",aText); |
530 LOGSMSIF2("%SUDL: Corrupted or implement decoding for second iei_b, iei_n!", |
|
531 &aText); |
536 } |
532 } |
537 |
533 |
538 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_20, "%sUDL: HEX UDHL IEI_A IEIDL_A ", aText); |
534 LOGSMSIF2("%SUDL: HEX UDHL IEI_A IEIDL_A ", &aText); |
539 |
535 LOGSMSIF7("%S 0x%02X 0x%02X 0x%02X 0x%02X %S", &aText, |
540 TBuf8<200> data; |
536 udl, udhl, iei_a, ieidl_a, &tmpBuf); |
541 RDesWriteStream dataStream(data); |
|
542 |
|
543 dataStream.WriteInt32L(aText.Length()); |
|
544 dataStream.WriteL(aText); |
|
545 |
|
546 dataStream.WriteInt32L(udl); |
|
547 dataStream.WriteInt32L(udhl); |
|
548 dataStream.WriteInt32L(iei_a); |
|
549 dataStream.WriteInt32L(ieidl_a); |
|
550 |
|
551 dataStream.WriteInt32L(tmpBuf.Length()); |
|
552 dataStream.WriteL(tmpBuf); |
|
553 |
|
554 dataStream.Close(); |
|
555 OstTraceDefData( OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_21, "%s 0x%02X 0x%02X 0x%02X 0x%02X %s", data.Ptr(), data.Size() ); |
|
556 } |
537 } |
557 else |
538 else |
558 { |
539 { |
559 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_22, "%sUDL: Corrupted because TP-UDHP is TRUE and TP-UDHL is less than 1!", aText); |
540 LOGSMSIF2("%SUDL: Corrupted because TP-UDHP is TRUE and TP-UDHL is less than 1!", &aText); |
560 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_23, "%sUDL: HEX UDHL IEI_A", aText); |
541 LOGSMSIF2("%SUDL: HEX UDHL IEI_A", &aText); |
561 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_24, "%s 0x%02X 0x%02X", aText, udl, udhl); |
542 LOGSMSIF4("%S 0x%02X 0x%02X", &aText, udl, udhl); |
562 } |
543 } |
563 } |
544 } |
564 else |
545 else |
565 { |
546 { |
566 TInt udl = aPDU[octetOffset++]; |
547 TInt udl = aPDU[octetOffset++]; |
567 |
548 |
568 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_25, "%sUDL: HEX UDHL", aText); |
549 LOGSMSIF2("%SUDL: HEX UDHL", &aText); |
569 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_26, "%s 0x%02X -", aText, udl); |
550 LOGSMSIF3("%S 0x%02X -", &aText, udl); |
570 } |
551 } |
571 } |
552 } |
572 } // LogSmsIfPDUL |
553 } // LogSmsIfPDU |
573 |
554 |
574 |
555 |
575 #ifdef OST_TRACE_COMPILER_IN_USE |
|
576 void LogSmsIfHexBuf(const TDesC8& aText, const TDesC8& aHexBuf) |
556 void LogSmsIfHexBuf(const TDesC8& aText, const TDesC8& aHexBuf) |
577 #else |
|
578 void LogSmsIfHexBuf(const TDesC8& /*aText*/, const TDesC8& aHexBuf) |
|
579 #endif |
|
580 { |
557 { |
581 // |
558 // |
582 // Print the PDU in hex in rows of upto KHexDumpCharsPerLine bytes... |
559 // Print the PDU in hex in rows of upto KHexDumpCharsPerLine bytes... |
583 // |
560 // |
584 TBuf8<KHexDumpCharsPerLine * 2> hexLine; |
561 TBuf8<KHexDumpCharsPerLine * 2> hexLine; |
600 for (byteIndex = 0; byteIndex < bytesToLog; byteIndex++) |
577 for (byteIndex = 0; byteIndex < bytesToLog; byteIndex++) |
601 { |
578 { |
602 hexLine.AppendFormat(_L8("%02X"), aHexBuf[position + byteIndex]); |
579 hexLine.AppendFormat(_L8("%02X"), aHexBuf[position + byteIndex]); |
603 } |
580 } |
604 |
581 |
605 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFHEXBUF_1, "%s%s", aText, hexLine); |
582 LOGSMSIF3("%S%S", &aText, &hexLine); |
606 } |
583 } |
607 } // LogSmsIfHexBuf |
584 } // LogSmsIfHexBuf |
608 |
585 |
609 |
586 |
610 /** |
587 /** |
611 * Logs a Type of Number enum. |
588 * Logs a Type of Number enum. |
612 * |
589 * |
613 * @param aTON Enum to log. |
590 * @param aTON Enum to log. |
614 */ |
591 */ |
615 #ifdef OST_TRACE_COMPILER_IN_USE |
|
616 void LogSmsIfTypeOfNumber(const TDesC8& aText, RMobilePhone::TMobileTON aTON) |
592 void LogSmsIfTypeOfNumber(const TDesC8& aText, RMobilePhone::TMobileTON aTON) |
617 #else |
|
618 void LogSmsIfTypeOfNumber(const TDesC8& /*aText*/, RMobilePhone::TMobileTON aTON) |
|
619 #endif |
|
620 { |
593 { |
621 switch (aTON) |
594 switch (aTON) |
622 { |
595 { |
623 case RMobilePhone::EUnknownNumber: |
596 case RMobilePhone::EUnknownNumber: |
624 { |
597 { |
625 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_1, "%sEUnknownNumber", aText); |
598 LOGSMSIF2("%SEUnknownNumber", &aText); |
626 } |
599 } |
627 break; |
600 break; |
628 |
601 |
629 case RMobilePhone::EInternationalNumber: |
602 case RMobilePhone::EInternationalNumber: |
630 { |
603 { |
631 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_2, "%sEInternationalNumber", aText); |
604 LOGSMSIF2("%SEInternationalNumber", &aText); |
632 } |
605 } |
633 break; |
606 break; |
634 |
607 |
635 case RMobilePhone::ENationalNumber: |
608 case RMobilePhone::ENationalNumber: |
636 { |
609 { |
637 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_3, "%sENationalNumber", aText); |
610 LOGSMSIF2("%SENationalNumber", &aText); |
638 } |
611 } |
639 break; |
612 break; |
640 |
613 |
641 case RMobilePhone::ENetworkSpecificNumber: |
614 case RMobilePhone::ENetworkSpecificNumber: |
642 { |
615 { |
643 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_4, "%sENetworkSpecificNumber", aText); |
616 LOGSMSIF2("%SENetworkSpecificNumber", &aText); |
644 } |
617 } |
645 break; |
618 break; |
646 |
619 |
647 case RMobilePhone::ESubscriberNumber: |
620 case RMobilePhone::ESubscriberNumber: |
648 { |
621 { |
649 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_5, "%sESubscriberNumber", aText); |
622 LOGSMSIF2("%SESubscriberNumber", &aText); |
650 } |
623 } |
651 break; |
624 break; |
652 |
625 |
653 case RMobilePhone::EAlphanumericNumber: |
626 case RMobilePhone::EAlphanumericNumber: |
654 { |
627 { |
655 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_6, "%sEAlphanumericNumber", aText); |
628 LOGSMSIF2("%SEAlphanumericNumber", &aText); |
656 } |
629 } |
657 break; |
630 break; |
658 |
631 |
659 case RMobilePhone::EAbbreviatedNumber: |
632 case RMobilePhone::EAbbreviatedNumber: |
660 { |
633 { |
661 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_7, "%sEAbbreviatedNumber", aText); |
634 LOGSMSIF2("%SEAbbreviatedNumber", &aText); |
662 } |
635 } |
663 break; |
636 break; |
664 |
637 |
665 default: |
638 default: |
666 { |
639 { |
667 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_8, "%s<unknown enum %d>", aText, aTON); |
640 LOGSMSIF3("%S<unknown enum %d>", &aText, aTON); |
668 } |
641 } |
669 break; |
642 break; |
670 } |
643 } |
671 } // LogSmsIfTypeOfNumber |
644 } // LogSmsIfTypeOfNumber |
672 |
645 |
674 /** |
647 /** |
675 * Logs a Numbering Plan enum. |
648 * Logs a Numbering Plan enum. |
676 * |
649 * |
677 * @param aNPI Enum to log. |
650 * @param aNPI Enum to log. |
678 */ |
651 */ |
679 #ifdef OST_TRACE_COMPILER_IN_USE |
|
680 void LogSmsIfNumberingPlan(const TDesC8& aText, RMobilePhone::TMobileNPI aNPI) |
652 void LogSmsIfNumberingPlan(const TDesC8& aText, RMobilePhone::TMobileNPI aNPI) |
681 #else |
|
682 void LogSmsIfNumberingPlan(const TDesC8& /*aText*/, RMobilePhone::TMobileNPI aNPI) |
|
683 #endif |
|
684 { |
653 { |
685 switch (aNPI) |
654 switch (aNPI) |
686 { |
655 { |
687 case RMobilePhone::EUnknownNumberingPlan: |
656 case RMobilePhone::EUnknownNumberingPlan: |
688 { |
657 { |
689 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_1, "%sEUnknownNumberingPlan", aText); |
658 LOGSMSIF2("%SEUnknownNumberingPlan", &aText); |
690 } |
659 } |
691 break; |
660 break; |
692 |
661 |
693 case RMobilePhone::EIsdnNumberPlan: |
662 case RMobilePhone::EIsdnNumberPlan: |
694 { |
663 { |
695 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_2, "%sEIsdnNumberPlan", aText); |
664 LOGSMSIF2("%SEIsdnNumberPlan", &aText); |
696 } |
665 } |
697 break; |
666 break; |
698 |
667 |
699 case RMobilePhone::EDataNumberPlan: |
668 case RMobilePhone::EDataNumberPlan: |
700 { |
669 { |
701 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_3, "%sEDataNumberPlan", aText); |
670 LOGSMSIF2("%SEDataNumberPlan", &aText); |
702 } |
671 } |
703 break; |
672 break; |
704 |
673 |
705 case RMobilePhone::ETelexNumberPlan: |
674 case RMobilePhone::ETelexNumberPlan: |
706 { |
675 { |
707 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_4, "%sETelexNumberPlan", aText); |
676 LOGSMSIF2("%SETelexNumberPlan", &aText); |
708 } |
677 } |
709 break; |
678 break; |
710 |
679 |
711 case RMobilePhone::EServiceCentreSpecificPlan1: |
680 case RMobilePhone::EServiceCentreSpecificPlan1: |
712 { |
681 { |
713 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_5, "%sEServiceCentreSpecificPlan1", aText); |
682 LOGSMSIF2("%SEServiceCentreSpecificPlan1", &aText); |
714 } |
683 } |
715 break; |
684 break; |
716 |
685 |
717 case RMobilePhone::EServiceCentreSpecificPlan2: |
686 case RMobilePhone::EServiceCentreSpecificPlan2: |
718 { |
687 { |
719 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_6, "%sEServiceCentreSpecificPlan2", aText); |
688 LOGSMSIF2("%SEServiceCentreSpecificPlan2", &aText); |
720 } |
689 } |
721 break; |
690 break; |
722 |
691 |
723 case RMobilePhone::ENationalNumberPlan: |
692 case RMobilePhone::ENationalNumberPlan: |
724 { |
693 { |
725 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_7, "%sENationalNumberPlan", aText); |
694 LOGSMSIF2("%SENationalNumberPlan", &aText); |
726 } |
695 } |
727 break; |
696 break; |
728 |
697 |
729 case RMobilePhone::EPrivateNumberPlan: |
698 case RMobilePhone::EPrivateNumberPlan: |
730 { |
699 { |
731 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_8, "%sEPrivateNumberPlan", aText); |
700 LOGSMSIF2("%SEPrivateNumberPlan", &aText); |
732 } |
701 } |
733 break; |
702 break; |
734 |
703 |
735 case RMobilePhone::EERMESNumberPlan: |
704 case RMobilePhone::EERMESNumberPlan: |
736 { |
705 { |
737 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_9, "%sEERMESNumberPlan", aText); |
706 LOGSMSIF2("%SEERMESNumberPlan", &aText); |
738 } |
707 } |
739 break; |
708 break; |
740 |
709 |
741 default: |
710 default: |
742 { |
711 { |
743 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_10, "%s<unknown enum %d>", aText, aNPI); |
712 LOGSMSIF3("%S<unknown enum %d>", &aText, aNPI); |
744 } |
713 } |
745 break; |
714 break; |
746 } |
715 } |
747 } // LogSmsIfNumberingPlan |
716 } // LogSmsIfNumberingPlan |
748 |
717 |
756 const RMobileSmsStore::TMobileGsmSmsEntryV1& aSmsGsmEntryV1) |
725 const RMobileSmsStore::TMobileGsmSmsEntryV1& aSmsGsmEntryV1) |
757 { |
726 { |
758 // |
727 // |
759 // Header and index... |
728 // Header and index... |
760 // |
729 // |
761 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_1, "%sRMobileSmsStore::TMobileGsmSmsEntryV1:", aText); |
730 LOGSMSIF2("%SRMobileSmsStore::TMobileGsmSmsEntryV1:", &aText); |
762 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_2, "%s iIndex=%d (0x%08x)", aText, aSmsGsmEntryV1.iIndex,aSmsGsmEntryV1.iIndex); |
731 LOGSMSIF4("%S iIndex=%d (0x%08x)", &aText, aSmsGsmEntryV1.iIndex, |
|
732 aSmsGsmEntryV1.iIndex); |
763 |
733 |
764 // |
734 // |
765 // Message status... |
735 // Message status... |
766 // |
736 // |
767 switch (aSmsGsmEntryV1.iMsgStatus) |
737 switch (aSmsGsmEntryV1.iMsgStatus) |
768 { |
738 { |
769 case RMobileSmsStore::EStoredMessageUnknownStatus: |
739 case RMobileSmsStore::EStoredMessageUnknownStatus: |
770 { |
740 { |
771 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_3, "%s iStoreStats=EStoredMessageUnknownStatus", aText); |
741 LOGSMSIF2("%S iStoreStats=EStoredMessageUnknownStatus", &aText); |
772 } |
742 } |
773 break; |
743 break; |
774 |
744 |
775 case RMobileSmsStore::EStoredMessageUnread: |
745 case RMobileSmsStore::EStoredMessageUnread: |
776 { |
746 { |
777 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_4, "%s iStoreStats=EStoredMessageUnread", aText); |
747 LOGSMSIF2("%S iStoreStats=EStoredMessageUnread", &aText); |
778 } |
748 } |
779 break; |
749 break; |
780 |
750 |
781 case RMobileSmsStore::EStoredMessageRead: |
751 case RMobileSmsStore::EStoredMessageRead: |
782 { |
752 { |
783 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_5, "%s iStoreStats=EStoredMessageRead", aText); |
753 LOGSMSIF2("%S iStoreStats=EStoredMessageRead", &aText); |
784 } |
754 } |
785 break; |
755 break; |
786 |
756 |
787 case RMobileSmsStore::EStoredMessageUnsent: |
757 case RMobileSmsStore::EStoredMessageUnsent: |
788 { |
758 { |
789 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_6, "%s iStoreStats=EStoredMessageUnsent", aText); |
759 LOGSMSIF2("%S iStoreStats=EStoredMessageUnsent", &aText); |
790 } |
760 } |
791 break; |
761 break; |
792 |
762 |
793 case RMobileSmsStore::EStoredMessageSent: |
763 case RMobileSmsStore::EStoredMessageSent: |
794 { |
764 { |
795 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_7, "%s iStoreStats=EStoredMessageSent", aText); |
765 LOGSMSIF2("%S iStoreStats=EStoredMessageSent", &aText); |
796 } |
766 } |
797 break; |
767 break; |
798 |
768 |
799 case RMobileSmsStore::EStoredMessageDelivered: |
769 case RMobileSmsStore::EStoredMessageDelivered: |
800 { |
770 { |
801 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_8, "%s iStoreStats=EStoredMessageDelivered", aText); |
771 LOGSMSIF2("%S iStoreStats=EStoredMessageDelivered", &aText); |
802 } |
772 } |
803 break; |
773 break; |
804 |
774 |
805 default: |
775 default: |
806 { |
776 { |
807 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_9, "%s iStoreStats=<unknown enum %d>", aText,aSmsGsmEntryV1.iMsgStatus); |
777 LOGSMSIF3("%S iStoreStats=<unknown enum %d>", &aText, |
|
778 aSmsGsmEntryV1.iMsgStatus); |
808 } |
779 } |
809 break; |
780 break; |
810 } |
781 } |
811 |
782 |
812 // |
783 // |
813 // Service centre number... |
784 // Service centre number... |
814 // |
785 // |
815 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> numberIn8bit; |
786 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> numberIn8bit; |
816 |
787 |
817 numberIn8bit.Copy(aSmsGsmEntryV1.iServiceCentre.iTelNumber); |
788 numberIn8bit.Copy(aSmsGsmEntryV1.iServiceCentre.iTelNumber); |
818 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_10, "%s SRC Address=\"%s\"", aText, numberIn8bit); |
789 LOGSMSIF3("%S SRC Address=\"%S\"", &aText, &numberIn8bit); |
819 |
790 |
820 // |
791 // |
821 // Service Centre Type Of Number... |
792 // Service Centre Type Of Number... |
822 // |
793 // |
823 TBuf8<128> tmpBuf; |
794 TBuf8<128> tmpBuf; |
824 |
795 |
825 tmpBuf.Copy(aText); |
796 tmpBuf.Copy(aText); |
826 tmpBuf.Append(_L8(" SRC AddrTON=")); |
797 tmpBuf.Append(_L8(" SRC AddrTON=")); |
827 |
798 |
828 LogSmsIfTypeOfNumber(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iTypeOfNumber); |
799 LOGSMSIFTYPEOFNUMBER(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iTypeOfNumber); |
829 |
800 |
830 // |
801 // |
831 // Number Plan... |
802 // Number Plan... |
832 // |
803 // |
833 tmpBuf.Copy(aText); |
804 tmpBuf.Copy(aText); |
834 tmpBuf.Append(_L8(" SRC AddrNPI=")); |
805 tmpBuf.Append(_L8(" SRC AddrNPI=")); |
835 |
806 |
836 LogSmsIfNumberingPlan(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iNumberPlan); |
807 LOGSMSIFNUMBERINGPLAN(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iNumberPlan); |
837 |
808 |
838 // |
809 // |
839 // PDU... |
810 // PDU... |
840 // |
811 // |
841 tmpBuf.Copy(aText); |
812 tmpBuf.Copy(aText); |
842 tmpBuf.Append(_L8(" PDU: ")); |
813 tmpBuf.Append(_L8(" PDU: ")); |
843 |
814 |
844 LogSmsIfPDUL(tmpBuf, aSmsGsmEntryV1.iMsgData, EFalse); |
815 LOGSMSIFPDU(tmpBuf, aSmsGsmEntryV1.iMsgData, EFalse); |
845 } // LogSmsIfSmsEntry |
816 } // LogSmsIfSmsEntry |
846 |
817 |
847 |
818 |
848 /** |
819 /** |
849 * Logs contents of TMobileSmsSendAttributesV1 object. |
820 * Logs contents of TMobileSmsSendAttributesV1 object. |
851 * @param aAttrib Attributes to log. |
822 * @param aAttrib Attributes to log. |
852 */ |
823 */ |
853 void LogSmsIfSendAttributes(const TDesC8& aText, |
824 void LogSmsIfSendAttributes(const TDesC8& aText, |
854 const RMobileSmsMessaging::TMobileSmsSendAttributesV1& aAttrib) |
825 const RMobileSmsMessaging::TMobileSmsSendAttributesV1& aAttrib) |
855 { |
826 { |
856 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_1, "%sRMobileSmsMessaging::TMobileSmsSendAttributesV1:", aText); |
827 LOGSMSIF2("%SRMobileSmsMessaging::TMobileSmsSendAttributesV1:", &aText); |
857 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_2, "%s iFlags=0x%08x", aText, (TInt)(aAttrib.iFlags)); |
828 LOGSMSIF3("%S iFlags=0x%08x", &aText, (TInt)(aAttrib.iFlags)); |
858 |
829 |
859 if (aAttrib.iFlags & RMobileSmsMessaging::KGsmServiceCentre) |
830 if (aAttrib.iFlags & RMobileSmsMessaging::KGsmServiceCentre) |
860 { |
831 { |
861 TBuf8<128 + RMobilePhone::KMaxMobileTelNumberSize> tmpBuf; |
832 TBuf8<128 + RMobilePhone::KMaxMobileTelNumberSize> tmpBuf; |
862 |
833 |
863 tmpBuf.Copy(aAttrib.iGsmServiceCentre.iTelNumber); |
834 tmpBuf.Copy(aAttrib.iGsmServiceCentre.iTelNumber); |
864 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_3, "%s SRC Address=%s", aText, tmpBuf); |
835 LOGSMSIF3("%S SRC Address=%S", &aText, &tmpBuf); |
865 |
836 |
866 tmpBuf.Copy(aText); |
837 tmpBuf.Copy(aText); |
867 tmpBuf.Append(_L8(" SRC AddrTON=")); |
838 tmpBuf.Append(_L8(" SRC AddrTON=")); |
868 |
839 |
869 LogSmsIfTypeOfNumber(tmpBuf, aAttrib.iGsmServiceCentre.iTypeOfNumber); |
840 LOGSMSIFTYPEOFNUMBER(tmpBuf, aAttrib.iGsmServiceCentre.iTypeOfNumber); |
870 |
841 |
871 tmpBuf.Copy(aText); |
842 tmpBuf.Copy(aText); |
872 tmpBuf.Append(_L8(" SRC AddrNPI=")); |
843 tmpBuf.Append(_L8(" SRC AddrNPI=")); |
873 |
844 |
874 LogSmsIfNumberingPlan(tmpBuf, aAttrib.iGsmServiceCentre.iNumberPlan); |
845 LOGSMSIFNUMBERINGPLAN(tmpBuf, aAttrib.iGsmServiceCentre.iNumberPlan); |
875 } |
846 } |
876 |
847 |
877 if (aAttrib.iFlags & RMobileSmsMessaging::KSmsDataFormat) |
848 if (aAttrib.iFlags & RMobileSmsMessaging::KSmsDataFormat) |
878 { |
849 { |
879 switch (aAttrib.iDataFormat) |
850 switch (aAttrib.iDataFormat) |
880 { |
851 { |
881 case RMobileSmsMessaging::EFormatUnspecified: |
852 case RMobileSmsMessaging::EFormatUnspecified: |
882 { |
853 { |
883 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_4, "%s iDataFormat=EFormatUnspecified", aText); |
854 LOGSMSIF2("%S iDataFormat=EFormatUnspecified", &aText); |
884 } |
855 } |
885 break; |
856 break; |
886 |
857 |
887 case RMobileSmsMessaging::EFormatGsmTpdu: |
858 case RMobileSmsMessaging::EFormatGsmTpdu: |
888 { |
859 { |
889 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_5, "%s iDataFormat=EFormatGsmTpdu", aText); |
860 LOGSMSIF2("%S iDataFormat=EFormatGsmTpdu", &aText); |
890 } |
861 } |
891 break; |
862 break; |
892 |
863 |
893 case RMobileSmsMessaging::EFormatCdmaTpdu: |
864 case RMobileSmsMessaging::EFormatCdmaTpdu: |
894 { |
865 { |
895 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_6, "%s iDataFormat=EFormatCdmaTpdu", aText); |
866 LOGSMSIF2("%S iDataFormat=EFormatCdmaTpdu", &aText); |
896 } |
867 } |
897 break; |
868 break; |
898 |
869 |
899 default: |
870 default: |
900 { |
871 { |
901 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_7, "%s iDataFormat=<unknown enum %d>", aText,aAttrib.iDataFormat); |
872 LOGSMSIF3("%S iDataFormat=<unknown enum %d>", &aText, |
|
873 aAttrib.iDataFormat); |
902 } |
874 } |
903 break; |
875 break; |
904 } |
876 } |
905 } |
877 } |
906 |
878 |
907 if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaTeleservice) |
879 if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaTeleservice) |
908 { |
880 { |
909 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_8, "%s iCdmaTeles=0x%08X", aText, (TUint)aAttrib.iCdmaTeleservice); |
881 LOGSMSIF3("%S iCdmaTeles=0x08X", &aText, aAttrib.iCdmaTeleservice); |
910 } |
882 } |
911 |
883 |
912 if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaServiceCategory) |
884 if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaServiceCategory) |
913 { |
885 { |
914 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_9, "%s iCdmaServ=0x%08X", aText, (TUint)aAttrib.iCdmaServiceCategory); |
886 LOGSMSIF3("%S iCdmaServ=0x08X", &aText, aAttrib.iCdmaServiceCategory); |
915 } |
887 } |
916 |
888 |
917 if (aAttrib.iFlags & RMobileSmsMessaging::KRemotePartyInfo) |
889 if (aAttrib.iFlags & RMobileSmsMessaging::KRemotePartyInfo) |
918 { |
890 { |
919 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> tmpBuf; |
891 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> tmpBuf; |
920 |
892 |
921 tmpBuf.Copy(aAttrib.iDestination.iTelNumber); |
893 tmpBuf.Copy(aAttrib.iDestination.iTelNumber); |
922 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_10, "%s DST Address=%s", aText, tmpBuf); |
894 LOGSMSIF3("%S DST Address=%S", &aText, &tmpBuf); |
923 |
895 |
924 tmpBuf.Copy(aText); |
896 tmpBuf.Copy(aText); |
925 tmpBuf.Append(_L8(" DST AddrTON=")); |
897 tmpBuf.Append(_L8(" DST AddrTON=")); |
926 |
898 |
927 LogSmsIfTypeOfNumber(tmpBuf, aAttrib.iDestination.iTypeOfNumber); |
899 LOGSMSIFTYPEOFNUMBER(tmpBuf, aAttrib.iDestination.iTypeOfNumber); |
928 |
900 |
929 tmpBuf.Copy(aText); |
901 tmpBuf.Copy(aText); |
930 tmpBuf.Append(_L8(" DST AddrNPI=")); |
902 tmpBuf.Append(_L8(" DST AddrNPI=")); |
931 |
903 |
932 LogSmsIfNumberingPlan(tmpBuf, aAttrib.iDestination.iNumberPlan); |
904 LOGSMSIFNUMBERINGPLAN(tmpBuf, aAttrib.iDestination.iNumberPlan); |
933 } |
905 } |
934 |
906 |
935 if (aAttrib.iFlags & RMobileSmsMessaging::KMoreToSend) |
907 if (aAttrib.iFlags & RMobileSmsMessaging::KMoreToSend) |
936 { |
908 { |
937 if (aAttrib.iMore) |
909 if (aAttrib.iMore) |
938 { |
910 { |
939 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_11, "%s iMore=ETrue", aText); |
911 LOGSMSIF2("%S iMore=ETrue", &aText); |
940 } |
912 } |
941 else |
913 else |
942 { |
914 { |
943 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_12, "%s iMore=EFalse", aText); |
915 LOGSMSIF2("%S iMore=EFalse", &aText); |
944 } |
916 } |
945 } |
917 } |
946 |
918 |
947 if (aAttrib.iFlags & RMobileSmsMessaging::KMessageReference) |
919 if (aAttrib.iFlags & RMobileSmsMessaging::KMessageReference) |
948 { |
920 { |
949 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_13, "%s iMsgRef=0x%08X", aText, (TUint)aAttrib.iMsgRef); |
921 LOGSMSIF3("%S iMsgRef=0x08X", &aText, aAttrib.iMsgRef); |
950 } |
922 } |
951 |
923 |
952 if(aAttrib.iFlags & RMobileSmsMessaging::KGsmSubmitReport) |
924 if(aAttrib.iFlags & RMobileSmsMessaging::KGsmSubmitReport) |
953 { |
925 { |
954 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> tmpBuf; |
926 TBuf8<RMobilePhone::KMaxMobileTelNumberSize> tmpBuf; |
955 |
927 |
956 tmpBuf.Copy(aText); |
928 tmpBuf.Copy(aText); |
957 tmpBuf.Append(_L8(" iSubmitReport PDU: ")); |
929 tmpBuf.Append(_L8(" iSubmitReport PDU: ")); |
958 |
930 |
959 LogSmsIfPDUL(tmpBuf, aAttrib.iSubmitReport, EFalse); |
931 LOGSMSIFPDU(tmpBuf, aAttrib.iSubmitReport, EFalse); |
960 } |
932 } |
961 } // LogSmsIfSendAttributes |
933 } // LogSmsIfSendAttributes |
962 |
934 |
963 #endif // OST_TRACE_COMPILER_IN_USE |
935 #endif // _SMS_LOGGING_ENABLED |