smsprotocols/smsstack/common/src/smsstacklog.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 /**
    18 /**
    19  @file
    19  @file
    20  @internalComponent
    20  @internalComponent
    21 */
    21 */
    22  
    22  
       
    23 
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "smsstacklogTraces.h"
       
    27 #endif
       
    28 
    23 #include "gsmupdu.h"
    29 #include "gsmupdu.h"
    24 #include "smsstacklog.h"
    30 #include "smsstacklog.h"
    25 
    31 #include <s32mem.h>
    26 
    32 
    27 //
    33 //
    28 // All functions in this file are available only if logging is enabled.
    34 // All functions in this file are available only if logging is enabled.
    29 //
    35 //
    30 #ifdef _SMS_LOGGING_ENABLED
    36 #ifdef OST_TRACE_COMPILER_IN_USE
    31 
    37 
    32 
    38 
    33 /**
    39 /**
    34  *  Number of characters per line during hex dump logging.
    40  *  Number of characters per line during hex dump logging.
    35  */
    41  */
    40  *  Converts a PDU from a buffer into a ASCII string and decodes it.
    46  *  Converts a PDU from a buffer into a ASCII string and decodes it.
    41  *
    47  *
    42  *  @param aPDU         PDU to log.
    48  *  @param aPDU         PDU to log.
    43  *  @param aCommandPdu  Flag to say if this is a command PDU.
    49  *  @param aCommandPdu  Flag to say if this is a command PDU.
    44  */
    50  */
    45 void LogSmsIfPDU(const TDesC8& aText, const TDesC8& aPDU, TBool aCommandPdu)
    51 void LogSmsIfPDUL(const TDesC8& aText, const TDesC8& aPDU, TBool aCommandPdu)
    46 	{
    52 	{
    47 	TBuf8<128>  tmpBuf;
    53 	TBuf8<128>  tmpBuf;
    48 
    54 
    49 	//
    55 	//
    50 	// Log the PDU as raw hex...
    56 	// Log the PDU as raw hex...
    51 	//
    57 	//
    52 	tmpBuf.Copy(aText);
    58 	tmpBuf.Copy(aText);
    53 	tmpBuf.Append(_L8("RAW:  "));
    59 	tmpBuf.Append(_L8("RAW:  "));
    54 
    60 
    55 	LOGSMSIFHEXBUF(tmpBuf, aPDU);
    61 	LogSmsIfHexBuf(tmpBuf, aPDU);
    56 
    62 
    57 	//
    63 	//
    58 	// Log the first octet...
    64 	// Log the first octet...
    59 	//
    65 	//
    60 	// bit	   7	6	 5	  4    3	2	 1	  0
    66 	// bit	   7	6	 5	  4    3	2	 1	  0
   195 	else
   201 	else
   196 		{
   202 		{
   197 		tmpBuf.Append(_L8("    -      -"));
   203 		tmpBuf.Append(_L8("    -      -"));
   198 		}
   204 		}
   199 
   205 
   200 	LOGSMSIF2("%S      HEX   MTI        RP UDHI  SRX  MMS   RD     VP", &aText);
   206 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_1, "%s      HEX   MTI        RP UDHI  SRX  MMS   RD     VP", aText);
   201 	LOGSMSIF4("%SFO:   0x%02X  %S", &aText, firstOctet, &tmpBuf);
   207 	OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_2, "%sFO:   0x%02X  %s", aText, (TUint)firstOctet, tmpBuf);
   202 
   208 
   203 	if (pduType == -1)
   209 	if (pduType == -1)
   204 		{
   210 		{
   205 		// Not supported!
   211 		// Not supported!
   206 		return;
   212 		return;
   212 	//
   218 	//
   213 	if (pduType == CSmsPDU::ESmsSubmit  ||
   219 	if (pduType == CSmsPDU::ESmsSubmit  ||
   214 	    pduType == CSmsPDU::ESmsStatusReport  ||
   220 	    pduType == CSmsPDU::ESmsStatusReport  ||
   215 	    pduType == CSmsPDU::ESmsCommand)
   221 	    pduType == CSmsPDU::ESmsCommand)
   216 		{
   222 		{
   217         LOGSMSIF3("%SMR:   0x%02X", &aText, aPDU[octetOffset]);
   223         OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_3, "%sMR:   0x%02X", aText, aPDU[octetOffset]);
   218         octetOffset++;
   224         octetOffset++;
   219 		}
   225 		}
   220 
   226 
   221 	//
   227 	//
   222 	// Command's PID, CT and MN...
   228 	// Command's PID, CT and MN...
   223 	//
   229 	//
   224 	if (pduType == CSmsPDU::ESmsCommand)
   230 	if (pduType == CSmsPDU::ESmsCommand)
   225 		{
   231 		{
   226 		LOGSMSIF3("%SPID:  0x%02X", &aText, aPDU[octetOffset]);
   232 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_4, "%sPID:  0x%02X", aText, aPDU[octetOffset]);
   227         octetOffset++;
   233         octetOffset++;
   228 
   234 
   229 		LOGSMSIF3("%SCT:   0x%02X", &aText, aPDU[octetOffset]);
   235 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_5, "%sCT:   0x%02X", aText, aPDU[octetOffset]);
   230         octetOffset++;
   236         octetOffset++;
   231 
   237 
   232 		LOGSMSIF3("%SMN:   0x%02X", &aText, aPDU[octetOffset]);
   238 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_6, "%sMN:   0x%02X", aText, aPDU[octetOffset]);
   233         octetOffset++;
   239         octetOffset++;
   234 		}
   240 		}
   235 
   241 
   236 	//
   242 	//
   237 	// Log the telephone number...
   243 	// Log the telephone number...
   253 			octetOffset++;
   259 			octetOffset++;
   254 			}
   260 			}
   255 		
   261 		
   256 		tmpBuf.SetLength(telLength);
   262 		tmpBuf.SetLength(telLength);
   257 
   263 
   258 		LOGSMSIF4("%STEL:  0x%02X  %S", &aText, typeOfNumber, &tmpBuf);
   264 		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_7, "%sTEL:  0x%02X  %s", aText, (TUint)typeOfNumber, tmpBuf);
   259 		}
   265 		}
   260 	else
   266 	else
   261 		{
   267 		{
   262 		LOGSMSIF3("%STEL:  Illegal length value (%d)!", &aText, telLength);
   268 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_8, "%sTEL:  Illegal length value (%d)!", aText, telLength);
   263 		return;
   269 		return;
   264 		}
   270 		}
   265 
   271 
   266 	//
   272 	//
   267 	// PID and the DCS (submit and deliver only)...
   273 	// PID and the DCS (submit and deliver only)...
   268 	//
   274 	//
   269 	if (pduType == CSmsPDU::ESmsSubmit  ||  pduType == CSmsPDU::ESmsDeliver)
   275 	if (pduType == CSmsPDU::ESmsSubmit  ||  pduType == CSmsPDU::ESmsDeliver)
   270 		{
   276 		{
   271 		LOGSMSIF3("%SPID:  0x%02X", &aText, aPDU[octetOffset]);
   277 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_9, "%sPID:  0x%02X", aText, aPDU[octetOffset]);
   272 		octetOffset++;
   278 		octetOffset++;
   273 
   279 
   274 		tmpBuf.Zero();
   280 		tmpBuf.Zero();
   275 
   281 
   276 		TInt  dcs = aPDU[octetOffset];
   282 		TInt  dcs = aPDU[octetOffset];
   401 		else
   407 		else
   402 			{
   408 			{
   403 			tmpBuf.Append(_L8("-"));
   409 			tmpBuf.Append(_L8("-"));
   404 			}
   410 			}
   405 
   411 
   406 		LOGSMSIF2("%SDCS:  HEX   CLASS      DCS     INDICATION TYPE", &aText);
   412 		OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_10, "%sDCS:  HEX   CLASS      DCS     INDICATION TYPE", aText);
   407 		LOGSMSIF4("%S      0x%02X  %S", &aText, dcs, &tmpBuf);
   413 		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_11, "%s      0x%02X  %s", aText, (TUint) dcs, tmpBuf);
   408 		}
   414 		}
   409 
   415 
   410 	//
   416 	//
   411 	// VP (submit only)...
   417 	// VP (submit only)...
   412 	//
   418 	//
   413 	if (pduType == CSmsPDU::ESmsSubmit)
   419 	if (pduType == CSmsPDU::ESmsSubmit)
   414 		{
   420 		{
   415 		if (vpf == EVpRel)
   421 		if (vpf == EVpRel)
   416 			{
   422 			{
   417 			LOGSMSIF3("%SVP:   %d (Relative)", &aText, aPDU[octetOffset++]);
   423 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_12, "%sVP:   %d (Relative)", aText, aPDU[octetOffset++]);
   418 			}
   424 			}
   419 		else if (vpf == EVpAbs)
   425 		else if (vpf == EVpAbs)
   420 			{
   426 			{
   421 			// absolute format	  -  TODO to look for the right format
   427 			// absolute format	  -  TODO to look for the right format
   422 			tmpBuf.Zero();
   428 			tmpBuf.Zero();
   424 			for (TInt index = 0;  index < 7;  index++)
   430 			for (TInt index = 0;  index < 7;  index++)
   425 				{
   431 				{
   426 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   432 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   427 				}
   433 				}
   428 			
   434 			
   429 			LOGSMSIF3("%SVP:   %S (Absolute)", &aText, &tmpBuf);
   435 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_13, "%sVP:   %s (Absolute)", aText, tmpBuf);
   430 			octetOffset += 7;
   436 			octetOffset += 7;
   431 			}
   437 			}
   432 		else if (vpf == EVpEnh)
   438 		else if (vpf == EVpEnh)
   433 			{
   439 			{
   434 			// enhanced validity period   -  TODO to look for the right format
   440 			// enhanced validity period   -  TODO to look for the right format
   437 			for (TInt index = 0;  index < 7;  index++)
   443 			for (TInt index = 0;  index < 7;  index++)
   438 				{
   444 				{
   439 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   445 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   440 				}
   446 				}
   441 			
   447 			
   442 			LOGSMSIF3("%SVP:   %S (Enhanced)", &aText, &tmpBuf);
   448 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_14, "%sVP:   %s (Enhanced)", aText, tmpBuf);
   443 			octetOffset += 7;
   449 			octetOffset += 7;
   444 			}
   450 			}
   445 		}
   451 		}
   446 
   452 
   447 	//
   453 	//
   454 		for (TInt index = 0;  index < 7;  index++)
   460 		for (TInt index = 0;  index < 7;  index++)
   455 			{
   461 			{
   456 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   462 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   457 			}
   463 			}
   458 			
   464 			
   459 		LOGSMSIF3("%SSCTS: %S", &aText, &tmpBuf);
   465 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_15, "%sSCTS: %s", aText, tmpBuf);
   460 		octetOffset += 7;
   466 		octetOffset += 7;
   461 		}
   467 		}
   462 	
   468 	
   463 	//
   469 	//
   464 	// Getting the DT and the status of the SR (SR only)
   470 	// Getting the DT and the status of the SR (SR only)
   472 		for (TInt index = 0;  index < 7;  index++)
   478 		for (TInt index = 0;  index < 7;  index++)
   473 			{
   479 			{
   474 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   480 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   475 			}
   481 			}
   476 			
   482 			
   477 		LOGSMSIF3("%SDT:   %S", &aText, &tmpBuf);
   483 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_16, "%sDT:   %s", aText, tmpBuf);
   478 		octetOffset += 7;
   484 		octetOffset += 7;
   479 
   485 
   480 		LOGSMSIF3("%SST:   %02X", &aText, aPDU[octetOffset]);
   486 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_17, "%sST:   %02X", aText, aPDU[octetOffset]);
   481 		octetOffset++;
   487 		octetOffset++;
   482 		}
   488 		}
   483 
   489 
   484 	//
   490 	//
   485 	// Getting the UDL   -    TODO to add UD later and to decode the UDH
   491 	// Getting the UDL   -    TODO to add UD later and to decode the UDH
   519 							}
   525 							}
   520 						}
   526 						}
   521 					}
   527 					}
   522 				else
   528 				else
   523 					{
   529 					{
   524 					LOGSMSIF3("%SUDL:  Problems with the ieidl_a %d being less that UDHL",
   530 					OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_18, "%sUDL:  Problems with the ieidl_a %d being less that UDHL",aText, ieidl_a);
   525 							  &aText, ieidl_a);
       
   526 					}
   531 					}
   527 	
   532 	
   528 				if ((ieidl_a + 1) > udhl)
   533 				if ((ieidl_a + 1) > udhl)
   529 					{
   534 					{
   530 					LOGSMSIF2("%SUDL:  Corrupted or implement decoding for second iei_b, iei_n!",
   535 					OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_19, "%sUDL:  Corrupted or implement decoding for second iei_b, iei_n!",aText);
   531 							  &aText);
       
   532 					}
   536 					}
   533 	
   537 	
   534 				LOGSMSIF2("%SUDL:  HEX    UDHL   IEI_A  IEIDL_A   ", &aText);
   538 				OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_20, "%sUDL:  HEX    UDHL   IEI_A  IEIDL_A   ", aText);
   535 				LOGSMSIF7("%S      0x%02X   0x%02X   0x%02X   0x%02X  %S", &aText,
   539 
   536 						  udl, udhl, iei_a, ieidl_a, &tmpBuf);
   540 				TBuf8<200> data;
       
   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() );
   537 				}
   556 				}
   538 			else
   557 			else
   539 				{
   558 				{
   540 				LOGSMSIF2("%SUDL:  Corrupted because TP-UDHP is TRUE and TP-UDHL is less than 1!", &aText);
   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);
   541 				LOGSMSIF2("%SUDL:  HEX   UDHL   IEI_A", &aText);
   560 				OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_23, "%sUDL:  HEX   UDHL   IEI_A", aText);
   542 				LOGSMSIF4("%S      0x%02X    0x%02X", &aText, udl, udhl);
   561 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_24, "%s      0x%02X    0x%02X", aText, udl, udhl);
   543 				}
   562 				}
   544 			}
   563 			}
   545 		else
   564 		else
   546 			{
   565 			{
   547 			TInt  udl  = aPDU[octetOffset++];
   566 			TInt  udl  = aPDU[octetOffset++];
   548 			
   567 			
   549 			LOGSMSIF2("%SUDL:  HEX    UDHL", &aText);
   568 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_25, "%sUDL:  HEX    UDHL", aText);
   550 			LOGSMSIF3("%S      0x%02X   -", &aText, udl);
   569 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_26, "%s      0x%02X   -", aText, udl);
   551 			}
   570 			}
   552 		}
   571 		}
   553 	} // LogSmsIfPDU
   572 	} // LogSmsIfPDUL
   554 
   573 
   555 
   574 
       
   575 #ifdef OST_TRACE_COMPILER_IN_USE
   556 void LogSmsIfHexBuf(const TDesC8& aText, const TDesC8& aHexBuf)
   576 void LogSmsIfHexBuf(const TDesC8& aText, const TDesC8& aHexBuf)
       
   577 #else
       
   578 void LogSmsIfHexBuf(const TDesC8& /*aText*/, const TDesC8& aHexBuf)
       
   579 #endif
   557     {
   580     {
   558 	//
   581 	//
   559 	// Print the PDU in hex in rows of upto KHexDumpCharsPerLine bytes...
   582 	// Print the PDU in hex in rows of upto KHexDumpCharsPerLine bytes...
   560 	//
   583 	//
   561 	TBuf8<KHexDumpCharsPerLine * 2>  hexLine;
   584 	TBuf8<KHexDumpCharsPerLine * 2>  hexLine;
   577 		for (byteIndex = 0;  byteIndex < bytesToLog;  byteIndex++)
   600 		for (byteIndex = 0;  byteIndex < bytesToLog;  byteIndex++)
   578 			{
   601 			{
   579 			hexLine.AppendFormat(_L8("%02X"), aHexBuf[position + byteIndex]);
   602 			hexLine.AppendFormat(_L8("%02X"), aHexBuf[position + byteIndex]);
   580 			}
   603 			}
   581 
   604 
   582 		LOGSMSIF3("%S%S", &aText, &hexLine);
   605 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFHEXBUF_1, "%s%s", aText, hexLine);
   583 		}
   606 		}
   584     } // LogSmsIfHexBuf
   607     } // LogSmsIfHexBuf
   585 
   608 
   586 
   609 
   587 /**
   610 /**
   588  *	Logs a Type of Number enum.
   611  *	Logs a Type of Number enum.
   589  *
   612  *
   590  *  @param aTON  Enum to log.
   613  *  @param aTON  Enum to log.
   591  */
   614  */
       
   615 #ifdef OST_TRACE_COMPILER_IN_USE
   592 void LogSmsIfTypeOfNumber(const TDesC8& aText, RMobilePhone::TMobileTON aTON)
   616 void LogSmsIfTypeOfNumber(const TDesC8& aText, RMobilePhone::TMobileTON aTON)
       
   617 #else
       
   618 void LogSmsIfTypeOfNumber(const TDesC8& /*aText*/, RMobilePhone::TMobileTON aTON)
       
   619 #endif
   593 	{
   620 	{
   594 	switch (aTON)
   621 	switch (aTON)
   595 		{
   622 		{
   596 		case RMobilePhone::EUnknownNumber:
   623 		case RMobilePhone::EUnknownNumber:
   597 			{
   624 			{
   598 			LOGSMSIF2("%SEUnknownNumber", &aText);
   625 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_1, "%sEUnknownNumber", aText);
   599 			}
   626 			}
   600 			break;
   627 			break;
   601 
   628 
   602 		case RMobilePhone::EInternationalNumber:
   629 		case RMobilePhone::EInternationalNumber:
   603 			{
   630 			{
   604 			LOGSMSIF2("%SEInternationalNumber", &aText);
   631 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_2, "%sEInternationalNumber", aText);
   605 			}
   632 			}
   606 			break;
   633 			break;
   607 
   634 
   608 		case RMobilePhone::ENationalNumber:
   635 		case RMobilePhone::ENationalNumber:
   609 			{
   636 			{
   610 			LOGSMSIF2("%SENationalNumber", &aText);
   637 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_3, "%sENationalNumber", aText);
   611 			}
   638 			}
   612 			break;
   639 			break;
   613 
   640 
   614 		case RMobilePhone::ENetworkSpecificNumber:
   641 		case RMobilePhone::ENetworkSpecificNumber:
   615 			{
   642 			{
   616 			LOGSMSIF2("%SENetworkSpecificNumber", &aText);
   643 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_4, "%sENetworkSpecificNumber", aText);
   617 			}
   644 			}
   618 			break;
   645 			break;
   619 
   646 
   620 		case RMobilePhone::ESubscriberNumber:
   647 		case RMobilePhone::ESubscriberNumber:
   621 			{
   648 			{
   622 			LOGSMSIF2("%SESubscriberNumber", &aText);
   649 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_5, "%sESubscriberNumber", aText);
   623 			}
   650 			}
   624 			break;
   651 			break;
   625 
   652 
   626 		case RMobilePhone::EAlphanumericNumber:
   653 		case RMobilePhone::EAlphanumericNumber:
   627 			{
   654 			{
   628 			LOGSMSIF2("%SEAlphanumericNumber", &aText);
   655 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_6, "%sEAlphanumericNumber", aText);
   629 			}
   656 			}
   630 			break;
   657 			break;
   631 
   658 
   632 		case RMobilePhone::EAbbreviatedNumber:
   659 		case RMobilePhone::EAbbreviatedNumber:
   633 			{
   660 			{
   634 			LOGSMSIF2("%SEAbbreviatedNumber", &aText);
   661 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_7, "%sEAbbreviatedNumber", aText);
   635 			}
   662 			}
   636 			break;
   663 			break;
   637 
   664 
   638 		default:
   665 		default:
   639 			{
   666 			{
   640 			LOGSMSIF3("%S<unknown enum %d>", &aText, aTON);
   667 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFTYPEOFNUMBER_8, "%s<unknown enum %d>", aText, aTON);
   641 			}
   668 			}
   642 			break;
   669 			break;
   643 		}
   670 		}
   644 	} // LogSmsIfTypeOfNumber
   671 	} // LogSmsIfTypeOfNumber
   645 
   672 
   647 /**
   674 /**
   648  *	Logs a Numbering Plan enum.
   675  *	Logs a Numbering Plan enum.
   649  *
   676  *
   650  *  @param aNPI  Enum to log.
   677  *  @param aNPI  Enum to log.
   651  */
   678  */
       
   679 #ifdef OST_TRACE_COMPILER_IN_USE
   652 void LogSmsIfNumberingPlan(const TDesC8& aText, RMobilePhone::TMobileNPI aNPI)
   680 void LogSmsIfNumberingPlan(const TDesC8& aText, RMobilePhone::TMobileNPI aNPI)
       
   681 #else
       
   682 void LogSmsIfNumberingPlan(const TDesC8& /*aText*/, RMobilePhone::TMobileNPI aNPI)
       
   683 #endif
   653 	{
   684 	{
   654 	switch (aNPI)
   685 	switch (aNPI)
   655 		{
   686 		{
   656 		case RMobilePhone::EUnknownNumberingPlan:
   687 		case RMobilePhone::EUnknownNumberingPlan:
   657 			{
   688 			{
   658 			LOGSMSIF2("%SEUnknownNumberingPlan", &aText);
   689 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_1, "%sEUnknownNumberingPlan", aText);
   659 			}
   690 			}
   660 			break;
   691 			break;
   661 
   692 
   662 		case RMobilePhone::EIsdnNumberPlan:
   693 		case RMobilePhone::EIsdnNumberPlan:
   663 			{
   694 			{
   664 			LOGSMSIF2("%SEIsdnNumberPlan", &aText);
   695 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_2, "%sEIsdnNumberPlan", aText);
   665 			}
   696 			}
   666 			break;
   697 			break;
   667 
   698 
   668 		case RMobilePhone::EDataNumberPlan:
   699 		case RMobilePhone::EDataNumberPlan:
   669 			{
   700 			{
   670 			LOGSMSIF2("%SEDataNumberPlan", &aText);
   701 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_3, "%sEDataNumberPlan", aText);
   671 			}
   702 			}
   672 			break;
   703 			break;
   673 
   704 
   674 		case RMobilePhone::ETelexNumberPlan:
   705 		case RMobilePhone::ETelexNumberPlan:
   675 			{
   706 			{
   676 			LOGSMSIF2("%SETelexNumberPlan", &aText);
   707 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_4, "%sETelexNumberPlan", aText);
   677 			}
   708 			}
   678 			break;
   709 			break;
   679 
   710 
   680 		case RMobilePhone::EServiceCentreSpecificPlan1:
   711 		case RMobilePhone::EServiceCentreSpecificPlan1:
   681 			{
   712 			{
   682 			LOGSMSIF2("%SEServiceCentreSpecificPlan1", &aText);
   713 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_5, "%sEServiceCentreSpecificPlan1", aText);
   683 			}
   714 			}
   684 			break;
   715 			break;
   685 
   716 
   686 		case RMobilePhone::EServiceCentreSpecificPlan2:
   717 		case RMobilePhone::EServiceCentreSpecificPlan2:
   687 			{
   718 			{
   688 			LOGSMSIF2("%SEServiceCentreSpecificPlan2", &aText);
   719 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_6, "%sEServiceCentreSpecificPlan2", aText);
   689 			}
   720 			}
   690 			break;
   721 			break;
   691 
   722 
   692 		case RMobilePhone::ENationalNumberPlan:
   723 		case RMobilePhone::ENationalNumberPlan:
   693 			{
   724 			{
   694 			LOGSMSIF2("%SENationalNumberPlan", &aText);
   725 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_7, "%sENationalNumberPlan", aText);
   695 			}
   726 			}
   696 			break;
   727 			break;
   697 
   728 
   698 		case RMobilePhone::EPrivateNumberPlan:
   729 		case RMobilePhone::EPrivateNumberPlan:
   699 			{
   730 			{
   700 			LOGSMSIF2("%SEPrivateNumberPlan", &aText);
   731 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_8, "%sEPrivateNumberPlan", aText);
   701 			}
   732 			}
   702 			break;
   733 			break;
   703 
   734 
   704 		case RMobilePhone::EERMESNumberPlan:
   735 		case RMobilePhone::EERMESNumberPlan:
   705 			{
   736 			{
   706 			LOGSMSIF2("%SEERMESNumberPlan", &aText);
   737 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_9, "%sEERMESNumberPlan", aText);
   707 			}
   738 			}
   708 			break;
   739 			break;
   709 
   740 
   710 		default:
   741 		default:
   711 			{
   742 			{
   712 			LOGSMSIF3("%S<unknown enum %d>", &aText, aNPI);
   743 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFNUMBERINGPLAN_10, "%s<unknown enum %d>", aText, aNPI);
   713 			}
   744 			}
   714 			break;
   745 			break;
   715 		}
   746 		}
   716 	} // LogSmsIfNumberingPlan
   747 	} // LogSmsIfNumberingPlan
   717 
   748 
   725 					  const RMobileSmsStore::TMobileGsmSmsEntryV1& aSmsGsmEntryV1)
   756 					  const RMobileSmsStore::TMobileGsmSmsEntryV1& aSmsGsmEntryV1)
   726 	{
   757 	{
   727 	//
   758 	//
   728 	// Header and index...
   759 	// Header and index...
   729 	//
   760 	//
   730 	LOGSMSIF2("%SRMobileSmsStore::TMobileGsmSmsEntryV1:", &aText);
   761 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_1, "%sRMobileSmsStore::TMobileGsmSmsEntryV1:", aText);
   731 	LOGSMSIF4("%S  iIndex=%d (0x%08x)", &aText, aSmsGsmEntryV1.iIndex,
   762 	OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_2, "%s  iIndex=%d (0x%08x)", aText, aSmsGsmEntryV1.iIndex,aSmsGsmEntryV1.iIndex);
   732 			  aSmsGsmEntryV1.iIndex);
       
   733 	
   763 	
   734 	//
   764 	//
   735 	// Message status...
   765 	// Message status...
   736 	//
   766 	//
   737 	switch (aSmsGsmEntryV1.iMsgStatus)
   767 	switch (aSmsGsmEntryV1.iMsgStatus)
   738 		{
   768 		{
   739 		case RMobileSmsStore::EStoredMessageUnknownStatus:
   769 		case RMobileSmsStore::EStoredMessageUnknownStatus:
   740 			{
   770 			{
   741 			LOGSMSIF2("%S  iStoreStats=EStoredMessageUnknownStatus", &aText);
   771 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_3, "%s  iStoreStats=EStoredMessageUnknownStatus", aText);
   742 			}
   772 			}
   743 			break;
   773 			break;
   744 
   774 
   745 		case RMobileSmsStore::EStoredMessageUnread:
   775 		case RMobileSmsStore::EStoredMessageUnread:
   746 			{
   776 			{
   747 			LOGSMSIF2("%S  iStoreStats=EStoredMessageUnread", &aText);
   777 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_4, "%s  iStoreStats=EStoredMessageUnread", aText);
   748 			}
   778 			}
   749 			break;
   779 			break;
   750 
   780 
   751 		case RMobileSmsStore::EStoredMessageRead:
   781 		case RMobileSmsStore::EStoredMessageRead:
   752 			{
   782 			{
   753 			LOGSMSIF2("%S  iStoreStats=EStoredMessageRead", &aText);
   783 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_5, "%s  iStoreStats=EStoredMessageRead", aText);
   754 			}
   784 			}
   755 			break;
   785 			break;
   756 
   786 
   757 		case RMobileSmsStore::EStoredMessageUnsent:
   787 		case RMobileSmsStore::EStoredMessageUnsent:
   758 			{
   788 			{
   759 			LOGSMSIF2("%S  iStoreStats=EStoredMessageUnsent", &aText);
   789 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_6, "%s  iStoreStats=EStoredMessageUnsent", aText);
   760 			}
   790 			}
   761 			break;
   791 			break;
   762 
   792 
   763 		case RMobileSmsStore::EStoredMessageSent:
   793 		case RMobileSmsStore::EStoredMessageSent:
   764 			{
   794 			{
   765 			LOGSMSIF2("%S  iStoreStats=EStoredMessageSent", &aText);
   795 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_7, "%s  iStoreStats=EStoredMessageSent", aText);
   766 			}
   796 			}
   767 			break;
   797 			break;
   768 
   798 
   769 		case RMobileSmsStore::EStoredMessageDelivered:
   799 		case RMobileSmsStore::EStoredMessageDelivered:
   770 			{
   800 			{
   771 			LOGSMSIF2("%S  iStoreStats=EStoredMessageDelivered", &aText);
   801 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_8, "%s  iStoreStats=EStoredMessageDelivered", aText);
   772 			}
   802 			}
   773 			break;
   803 			break;
   774 
   804 
   775 		default:
   805 		default:
   776 			{
   806 			{
   777 			LOGSMSIF3("%S  iStoreStats=<unknown enum %d>", &aText,
   807 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_9, "%s  iStoreStats=<unknown enum %d>", aText,aSmsGsmEntryV1.iMsgStatus);
   778 					  aSmsGsmEntryV1.iMsgStatus);
       
   779 			}
   808 			}
   780 			break;
   809 			break;
   781 		}
   810 		}
   782 
   811 
   783 	//
   812 	//
   784 	// Service centre number...
   813 	// Service centre number...
   785 	//
   814 	//
   786 	TBuf8<RMobilePhone::KMaxMobileTelNumberSize>  numberIn8bit;
   815 	TBuf8<RMobilePhone::KMaxMobileTelNumberSize>  numberIn8bit;
   787 
   816 
   788 	numberIn8bit.Copy(aSmsGsmEntryV1.iServiceCentre.iTelNumber);
   817 	numberIn8bit.Copy(aSmsGsmEntryV1.iServiceCentre.iTelNumber);
   789 	LOGSMSIF3("%S  SRC Address=\"%S\"", &aText, &numberIn8bit);
   818 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSMSENTRY_10, "%s  SRC Address=\"%s\"", aText, numberIn8bit);
   790 
   819 
   791 	//
   820 	//
   792 	// Service Centre Type Of Number...
   821 	// Service Centre Type Of Number...
   793 	//
   822 	//
   794 	TBuf8<128>  tmpBuf;
   823 	TBuf8<128>  tmpBuf;
   795 	
   824 	
   796 	tmpBuf.Copy(aText);
   825 	tmpBuf.Copy(aText);
   797 	tmpBuf.Append(_L8("  SRC AddrTON="));
   826 	tmpBuf.Append(_L8("  SRC AddrTON="));
   798 
   827 
   799 	LOGSMSIFTYPEOFNUMBER(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iTypeOfNumber);
   828 	LogSmsIfTypeOfNumber(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iTypeOfNumber);
   800 
   829 
   801 	//
   830 	//
   802 	// Number Plan...
   831 	// Number Plan...
   803 	//
   832 	//
   804 	tmpBuf.Copy(aText);
   833 	tmpBuf.Copy(aText);
   805 	tmpBuf.Append(_L8("  SRC AddrNPI="));
   834 	tmpBuf.Append(_L8("  SRC AddrNPI="));
   806 
   835 
   807 	LOGSMSIFNUMBERINGPLAN(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iNumberPlan);
   836 	LogSmsIfNumberingPlan(tmpBuf, aSmsGsmEntryV1.iServiceCentre.iNumberPlan);
   808 
   837 
   809 	//
   838 	//
   810 	// PDU...
   839 	// PDU...
   811 	//
   840 	//
   812 	tmpBuf.Copy(aText);
   841 	tmpBuf.Copy(aText);
   813 	tmpBuf.Append(_L8("  PDU: "));
   842 	tmpBuf.Append(_L8("  PDU: "));
   814 
   843 
   815 	LOGSMSIFPDU(tmpBuf, aSmsGsmEntryV1.iMsgData, EFalse);
   844 	LogSmsIfPDUL(tmpBuf, aSmsGsmEntryV1.iMsgData, EFalse);
   816 	} // LogSmsIfSmsEntry
   845 	} // LogSmsIfSmsEntry
   817 
   846 
   818 
   847 
   819 /**
   848 /**
   820  *	Logs contents of TMobileSmsSendAttributesV1 object.
   849  *	Logs contents of TMobileSmsSendAttributesV1 object.
   822  *  @param aAttrib  Attributes to log.
   851  *  @param aAttrib  Attributes to log.
   823  */
   852  */
   824 void LogSmsIfSendAttributes(const TDesC8& aText,
   853 void LogSmsIfSendAttributes(const TDesC8& aText,
   825 							const RMobileSmsMessaging::TMobileSmsSendAttributesV1& aAttrib)
   854 							const RMobileSmsMessaging::TMobileSmsSendAttributesV1& aAttrib)
   826 	{
   855 	{
   827 	LOGSMSIF2("%SRMobileSmsMessaging::TMobileSmsSendAttributesV1:", &aText);
   856 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_1, "%sRMobileSmsMessaging::TMobileSmsSendAttributesV1:", aText);
   828 	LOGSMSIF3("%S  iFlags=0x%08x", &aText, (TInt)(aAttrib.iFlags));
   857 	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_2, "%s  iFlags=0x%08x", aText, (TInt)(aAttrib.iFlags));
   829 
   858 
   830 	if (aAttrib.iFlags & RMobileSmsMessaging::KGsmServiceCentre)
   859 	if (aAttrib.iFlags & RMobileSmsMessaging::KGsmServiceCentre)
   831 		{
   860 		{
   832 		TBuf8<128 + RMobilePhone::KMaxMobileTelNumberSize>  tmpBuf;
   861 		TBuf8<128 + RMobilePhone::KMaxMobileTelNumberSize>  tmpBuf;
   833 		
   862 		
   834 		tmpBuf.Copy(aAttrib.iGsmServiceCentre.iTelNumber);
   863 		tmpBuf.Copy(aAttrib.iGsmServiceCentre.iTelNumber);
   835 		LOGSMSIF3("%S  SRC Address=%S", &aText, &tmpBuf);
   864 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_3, "%s  SRC Address=%s", aText, tmpBuf);
   836 
   865 
   837 		tmpBuf.Copy(aText);
   866 		tmpBuf.Copy(aText);
   838 		tmpBuf.Append(_L8("  SRC AddrTON="));
   867 		tmpBuf.Append(_L8("  SRC AddrTON="));
   839 
   868 
   840 		LOGSMSIFTYPEOFNUMBER(tmpBuf, aAttrib.iGsmServiceCentre.iTypeOfNumber);
   869 		LogSmsIfTypeOfNumber(tmpBuf, aAttrib.iGsmServiceCentre.iTypeOfNumber);
   841 
   870 
   842 		tmpBuf.Copy(aText);
   871 		tmpBuf.Copy(aText);
   843 		tmpBuf.Append(_L8("  SRC AddrNPI="));
   872 		tmpBuf.Append(_L8("  SRC AddrNPI="));
   844 
   873 
   845 		LOGSMSIFNUMBERINGPLAN(tmpBuf, aAttrib.iGsmServiceCentre.iNumberPlan);
   874 		LogSmsIfNumberingPlan(tmpBuf, aAttrib.iGsmServiceCentre.iNumberPlan);
   846 		}
   875 		}
   847 
   876 
   848 	if (aAttrib.iFlags & RMobileSmsMessaging::KSmsDataFormat)
   877 	if (aAttrib.iFlags & RMobileSmsMessaging::KSmsDataFormat)
   849 		{
   878 		{
   850 		switch (aAttrib.iDataFormat)
   879 		switch (aAttrib.iDataFormat)
   851 			{
   880 			{
   852 			case RMobileSmsMessaging::EFormatUnspecified:
   881 			case RMobileSmsMessaging::EFormatUnspecified:
   853 				{
   882 				{
   854 				LOGSMSIF2("%S  iDataFormat=EFormatUnspecified", &aText);
   883 				OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_4, "%s  iDataFormat=EFormatUnspecified", aText);
   855 				}
   884 				}
   856 				break;
   885 				break;
   857 
   886 
   858 			case RMobileSmsMessaging::EFormatGsmTpdu:
   887 			case RMobileSmsMessaging::EFormatGsmTpdu:
   859 				{
   888 				{
   860 				LOGSMSIF2("%S  iDataFormat=EFormatGsmTpdu", &aText);
   889 				OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_5, "%s  iDataFormat=EFormatGsmTpdu", aText);
   861 				}
   890 				}
   862 				break;
   891 				break;
   863 
   892 
   864 			case RMobileSmsMessaging::EFormatCdmaTpdu:
   893 			case RMobileSmsMessaging::EFormatCdmaTpdu:
   865 				{
   894 				{
   866 				LOGSMSIF2("%S  iDataFormat=EFormatCdmaTpdu", &aText);
   895 				OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_6, "%s  iDataFormat=EFormatCdmaTpdu", aText);
   867 				}
   896 				}
   868 				break;
   897 				break;
   869 
   898 
   870 			default:
   899 			default:
   871 				{
   900 				{
   872 				LOGSMSIF3("%S  iDataFormat=<unknown enum %d>", &aText,
   901 				OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_7, "%s  iDataFormat=<unknown enum %d>", aText,aAttrib.iDataFormat);
   873 						  aAttrib.iDataFormat);
       
   874 				}
   902 				}
   875 				break;
   903 				break;
   876 			}
   904 			}
   877 		}
   905 		}
   878 
   906 
   879 	if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaTeleservice)
   907 	if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaTeleservice)
   880 		{
   908 		{
   881 		LOGSMSIF3("%S  iCdmaTeles=0x08X", &aText, aAttrib.iCdmaTeleservice);
   909 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_8, "%s  iCdmaTeles=0x%08X", aText, (TUint)aAttrib.iCdmaTeleservice);
   882 		}
   910 		}
   883 
   911 
   884 	if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaServiceCategory)
   912 	if (aAttrib.iFlags & RMobileSmsMessaging::KCdmaServiceCategory)
   885 		{
   913 		{
   886 		LOGSMSIF3("%S  iCdmaServ=0x08X", &aText, aAttrib.iCdmaServiceCategory);
   914 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_9, "%s  iCdmaServ=0x%08X", aText, (TUint)aAttrib.iCdmaServiceCategory);
   887 		}
   915 		}
   888 
   916 
   889 	if (aAttrib.iFlags & RMobileSmsMessaging::KRemotePartyInfo)
   917 	if (aAttrib.iFlags & RMobileSmsMessaging::KRemotePartyInfo)
   890 		{
   918 		{
   891 		TBuf8<RMobilePhone::KMaxMobileTelNumberSize>  tmpBuf;
   919 		TBuf8<RMobilePhone::KMaxMobileTelNumberSize>  tmpBuf;
   892 		
   920 		
   893 		tmpBuf.Copy(aAttrib.iDestination.iTelNumber);
   921 		tmpBuf.Copy(aAttrib.iDestination.iTelNumber);
   894 		LOGSMSIF3("%S  DST Address=%S", &aText, &tmpBuf);
   922 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_10, "%s  DST Address=%s", aText, tmpBuf);
   895 
   923 
   896 		tmpBuf.Copy(aText);
   924 		tmpBuf.Copy(aText);
   897 		tmpBuf.Append(_L8("  DST AddrTON="));
   925 		tmpBuf.Append(_L8("  DST AddrTON="));
   898 
   926 
   899 		LOGSMSIFTYPEOFNUMBER(tmpBuf, aAttrib.iDestination.iTypeOfNumber);
   927 		LogSmsIfTypeOfNumber(tmpBuf, aAttrib.iDestination.iTypeOfNumber);
   900 
   928 
   901 		tmpBuf.Copy(aText);
   929 		tmpBuf.Copy(aText);
   902 		tmpBuf.Append(_L8("  DST AddrNPI="));
   930 		tmpBuf.Append(_L8("  DST AddrNPI="));
   903 
   931 
   904 		LOGSMSIFNUMBERINGPLAN(tmpBuf, aAttrib.iDestination.iNumberPlan);
   932 		LogSmsIfNumberingPlan(tmpBuf, aAttrib.iDestination.iNumberPlan);
   905 		}
   933 		}
   906 
   934 
   907 	if (aAttrib.iFlags & RMobileSmsMessaging::KMoreToSend)
   935 	if (aAttrib.iFlags & RMobileSmsMessaging::KMoreToSend)
   908 		{
   936 		{
   909 		if (aAttrib.iMore)
   937 		if (aAttrib.iMore)
   910 			{
   938 			{
   911 			LOGSMSIF2("%S  iMore=ETrue", &aText);
   939 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_11, "%s  iMore=ETrue", aText);
   912 			}
   940 			}
   913 		else
   941 		else
   914 			{
   942 			{
   915 			LOGSMSIF2("%S  iMore=EFalse", &aText);
   943 			OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_12, "%s  iMore=EFalse", aText);
   916 			}
   944 			}
   917 		}
   945 		}
   918 
   946 
   919 	if (aAttrib.iFlags & RMobileSmsMessaging::KMessageReference)
   947 	if (aAttrib.iFlags & RMobileSmsMessaging::KMessageReference)
   920 		{
   948 		{
   921 		LOGSMSIF3("%S  iMsgRef=0x08X", &aText, aAttrib.iMsgRef);
   949 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFSENDATTRIBUTES_13, "%s  iMsgRef=0x%08X", aText, (TUint)aAttrib.iMsgRef);
   922 		}
   950 		}
   923 
   951 
   924 	if(aAttrib.iFlags & RMobileSmsMessaging::KGsmSubmitReport)
   952 	if(aAttrib.iFlags & RMobileSmsMessaging::KGsmSubmitReport)
   925 		{
   953 		{
   926 		TBuf8<RMobilePhone::KMaxMobileTelNumberSize>  tmpBuf;
   954 		TBuf8<RMobilePhone::KMaxMobileTelNumberSize>  tmpBuf;
   927 		
   955 		
   928 		tmpBuf.Copy(aText);
   956 		tmpBuf.Copy(aText);
   929 		tmpBuf.Append(_L8("  iSubmitReport PDU: "));
   957 		tmpBuf.Append(_L8("  iSubmitReport PDU: "));
   930 
   958 
   931 		LOGSMSIFPDU(tmpBuf, aAttrib.iSubmitReport, EFalse);
   959 		LogSmsIfPDUL(tmpBuf, aAttrib.iSubmitReport, EFalse);
   932 		}
   960 		}
   933 	} // LogSmsIfSendAttributes
   961 	} // LogSmsIfSendAttributes
   934 
   962 
   935 #endif // _SMS_LOGGING_ENABLED
   963 #endif // OST_TRACE_COMPILER_IN_USE