smsprotocols/smsstack/common/src/smsstacklog.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    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 
       
    29 #include "gsmupdu.h"
    23 #include "gsmupdu.h"
    30 #include "smsstacklog.h"
    24 #include "smsstacklog.h"
    31 #include <s32mem.h>
    25 
    32 
    26 
    33 //
    27 //
    34 // All functions in this file are available only if logging is enabled.
    28 // All functions in this file are available only if logging is enabled.
    35 //
    29 //
    36 #ifdef OST_TRACE_COMPILER_IN_USE
    30 #ifdef _SMS_LOGGING_ENABLED
    37 
    31 
    38 
    32 
    39 /**
    33 /**
    40  *  Number of characters per line during hex dump logging.
    34  *  Number of characters per line during hex dump logging.
    41  */
    35  */
    46  *  Converts a PDU from a buffer into a ASCII string and decodes it.
    40  *  Converts a PDU from a buffer into a ASCII string and decodes it.
    47  *
    41  *
    48  *  @param aPDU         PDU to log.
    42  *  @param aPDU         PDU to log.
    49  *  @param aCommandPdu  Flag to say if this is a command PDU.
    43  *  @param aCommandPdu  Flag to say if this is a command PDU.
    50  */
    44  */
    51 void LogSmsIfPDUL(const TDesC8& aText, const TDesC8& aPDU, TBool aCommandPdu)
    45 void LogSmsIfPDU(const TDesC8& aText, const TDesC8& aPDU, TBool aCommandPdu)
    52 	{
    46 	{
    53 	TBuf8<128>  tmpBuf;
    47 	TBuf8<128>  tmpBuf;
    54 
    48 
    55 	//
    49 	//
    56 	// Log the PDU as raw hex...
    50 	// Log the PDU as raw hex...
    57 	//
    51 	//
    58 	tmpBuf.Copy(aText);
    52 	tmpBuf.Copy(aText);
    59 	tmpBuf.Append(_L8("RAW:  "));
    53 	tmpBuf.Append(_L8("RAW:  "));
    60 
    54 
    61 	LogSmsIfHexBuf(tmpBuf, aPDU);
    55 	LOGSMSIFHEXBUF(tmpBuf, aPDU);
    62 
    56 
    63 	//
    57 	//
    64 	// Log the first octet...
    58 	// Log the first octet...
    65 	//
    59 	//
    66 	// bit	   7	6	 5	  4    3	2	 1	  0
    60 	// bit	   7	6	 5	  4    3	2	 1	  0
   201 	else
   195 	else
   202 		{
   196 		{
   203 		tmpBuf.Append(_L8("    -      -"));
   197 		tmpBuf.Append(_L8("    -      -"));
   204 		}
   198 		}
   205 
   199 
   206 	OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_1, "%s      HEX   MTI        RP UDHI  SRX  MMS   RD     VP", aText);
   200 	LOGSMSIF2("%S      HEX   MTI        RP UDHI  SRX  MMS   RD     VP", &aText);
   207 	OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_2, "%sFO:   0x%02X  %s", aText, (TUint)firstOctet, tmpBuf);
   201 	LOGSMSIF4("%SFO:   0x%02X  %S", &aText, firstOctet, &tmpBuf);
   208 
   202 
   209 	if (pduType == -1)
   203 	if (pduType == -1)
   210 		{
   204 		{
   211 		// Not supported!
   205 		// Not supported!
   212 		return;
   206 		return;
   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...
   259 			octetOffset++;
   253 			octetOffset++;
   260 			}
   254 			}
   261 		
   255 		
   262 		tmpBuf.SetLength(telLength);
   256 		tmpBuf.SetLength(telLength);
   263 
   257 
   264 		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_7, "%sTEL:  0x%02X  %s", aText, (TUint)typeOfNumber, tmpBuf);
   258 		LOGSMSIF4("%STEL:  0x%02X  %S", &aText, typeOfNumber, &tmpBuf);
   265 		}
   259 		}
   266 	else
   260 	else
   267 		{
   261 		{
   268 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_8, "%sTEL:  Illegal length value (%d)!", aText, telLength);
   262 		LOGSMSIF3("%STEL:  Illegal length value (%d)!", &aText, telLength);
   269 		return;
   263 		return;
   270 		}
   264 		}
   271 
   265 
   272 	//
   266 	//
   273 	// PID and the DCS (submit and deliver only)...
   267 	// PID and the DCS (submit and deliver only)...
   274 	//
   268 	//
   275 	if (pduType == CSmsPDU::ESmsSubmit  ||  pduType == CSmsPDU::ESmsDeliver)
   269 	if (pduType == CSmsPDU::ESmsSubmit  ||  pduType == CSmsPDU::ESmsDeliver)
   276 		{
   270 		{
   277 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_9, "%sPID:  0x%02X", aText, aPDU[octetOffset]);
   271 		LOGSMSIF3("%SPID:  0x%02X", &aText, aPDU[octetOffset]);
   278 		octetOffset++;
   272 		octetOffset++;
   279 
   273 
   280 		tmpBuf.Zero();
   274 		tmpBuf.Zero();
   281 
   275 
   282 		TInt  dcs = aPDU[octetOffset];
   276 		TInt  dcs = aPDU[octetOffset];
   407 		else
   401 		else
   408 			{
   402 			{
   409 			tmpBuf.Append(_L8("-"));
   403 			tmpBuf.Append(_L8("-"));
   410 			}
   404 			}
   411 
   405 
   412 		OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_10, "%sDCS:  HEX   CLASS      DCS     INDICATION TYPE", aText);
   406 		LOGSMSIF2("%SDCS:  HEX   CLASS      DCS     INDICATION TYPE", &aText);
   413 		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_11, "%s      0x%02X  %s", aText, (TUint) dcs, tmpBuf);
   407 		LOGSMSIF4("%S      0x%02X  %S", &aText, dcs, &tmpBuf);
   414 		}
   408 		}
   415 
   409 
   416 	//
   410 	//
   417 	// VP (submit only)...
   411 	// VP (submit only)...
   418 	//
   412 	//
   419 	if (pduType == CSmsPDU::ESmsSubmit)
   413 	if (pduType == CSmsPDU::ESmsSubmit)
   420 		{
   414 		{
   421 		if (vpf == EVpRel)
   415 		if (vpf == EVpRel)
   422 			{
   416 			{
   423 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_12, "%sVP:   %d (Relative)", aText, aPDU[octetOffset++]);
   417 			LOGSMSIF3("%SVP:   %d (Relative)", &aText, aPDU[octetOffset++]);
   424 			}
   418 			}
   425 		else if (vpf == EVpAbs)
   419 		else if (vpf == EVpAbs)
   426 			{
   420 			{
   427 			// absolute format	  -  TODO to look for the right format
   421 			// absolute format	  -  TODO to look for the right format
   428 			tmpBuf.Zero();
   422 			tmpBuf.Zero();
   430 			for (TInt index = 0;  index < 7;  index++)
   424 			for (TInt index = 0;  index < 7;  index++)
   431 				{
   425 				{
   432 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   426 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   433 				}
   427 				}
   434 			
   428 			
   435 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_13, "%sVP:   %s (Absolute)", aText, tmpBuf);
   429 			LOGSMSIF3("%SVP:   %S (Absolute)", &aText, &tmpBuf);
   436 			octetOffset += 7;
   430 			octetOffset += 7;
   437 			}
   431 			}
   438 		else if (vpf == EVpEnh)
   432 		else if (vpf == EVpEnh)
   439 			{
   433 			{
   440 			// enhanced validity period   -  TODO to look for the right format
   434 			// enhanced validity period   -  TODO to look for the right format
   443 			for (TInt index = 0;  index < 7;  index++)
   437 			for (TInt index = 0;  index < 7;  index++)
   444 				{
   438 				{
   445 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   439 				tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   446 				}
   440 				}
   447 			
   441 			
   448 			OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_14, "%sVP:   %s (Enhanced)", aText, tmpBuf);
   442 			LOGSMSIF3("%SVP:   %S (Enhanced)", &aText, &tmpBuf);
   449 			octetOffset += 7;
   443 			octetOffset += 7;
   450 			}
   444 			}
   451 		}
   445 		}
   452 
   446 
   453 	//
   447 	//
   460 		for (TInt index = 0;  index < 7;  index++)
   454 		for (TInt index = 0;  index < 7;  index++)
   461 			{
   455 			{
   462 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   456 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   463 			}
   457 			}
   464 			
   458 			
   465 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_15, "%sSCTS: %s", aText, tmpBuf);
   459 		LOGSMSIF3("%SSCTS: %S", &aText, &tmpBuf);
   466 		octetOffset += 7;
   460 		octetOffset += 7;
   467 		}
   461 		}
   468 	
   462 	
   469 	//
   463 	//
   470 	// Getting the DT and the status of the SR (SR only)
   464 	// Getting the DT and the status of the SR (SR only)
   478 		for (TInt index = 0;  index < 7;  index++)
   472 		for (TInt index = 0;  index < 7;  index++)
   479 			{
   473 			{
   480 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   474 			tmpBuf.AppendFormat(_L8("%02X"), aPDU[octetOffset + index]);
   481 			}
   475 			}
   482 			
   476 			
   483 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_16, "%sDT:   %s", aText, tmpBuf);
   477 		LOGSMSIF3("%SDT:   %S", &aText, &tmpBuf);
   484 		octetOffset += 7;
   478 		octetOffset += 7;
   485 
   479 
   486 		OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, LOGSMSIFPDUL_17, "%sST:   %02X", aText, aPDU[octetOffset]);
   480 		LOGSMSIF3("%SST:   %02X", &aText, aPDU[octetOffset]);
   487 		octetOffset++;
   481 		octetOffset++;
   488 		}
   482 		}
   489 
   483 
   490 	//
   484 	//
   491 	// Getting the UDL   -    TODO to add UD later and to decode the UDH
   485 	// Getting the UDL   -    TODO to add UD later and to decode the UDH
   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