wapstack/wapmessageapi/sws/ActiveSocket.cpp
changeset 45 28dbf5a297f4
parent 44 8b72faa1200f
--- a/wapstack/wapmessageapi/sws/ActiveSocket.cpp	Tue Jun 22 11:02:32 2010 +0100
+++ b/wapstack/wapmessageapi/sws/ActiveSocket.cpp	Mon Jun 28 17:02:18 2010 +0100
@@ -12,6 +12,10 @@
 //
 // Description:
 //
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "ActiveSocketTraces.h"
+#endif
 
 #include "ActiveSocket.h"
 #include <es_wsms.h>
@@ -19,7 +23,6 @@
 #include "wapmsgerr.h"
 #include <wap_sock.h>
 #include "WapMessageApiAgent.h"
-#include "WapSwsLog.h"
 #include "WapMsgUtils.h"
 
 using namespace Wap;
@@ -81,7 +84,7 @@
 			}
 		default:
 		    {
-			LOG(SwsLog::Printf(_L("CActiveSocket::NewL Unknown Bearer Type"));)
+            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKET_NEWL_1, "CActiveSocket::NewL Unknown Bearer Type");
 			User::Leave(Wap::EBearerError);
 		    }
 		}
@@ -144,7 +147,7 @@
 			}
 		default:
 		    {
-			LOG(SwsLog::Printf(_L("CActiveSocket::NewL Unknown Bearer Type"));)
+		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKET_NEWL_1_1, "CActiveSocket::NewL Unknown Bearer Type");
 			User::Leave(Wap::EBearerError);
 		    }
 		}
@@ -270,7 +273,7 @@
 		}
 	else
 		{
-		LOG(SwsLog::Printf(_L("CActiveSocketUDP::GetServerAddress: Alloc Memory Err=%d"), err);)
+        OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKET_GETREMOTEADDRESS_1, "CActiveSocket::GetRemoteAddress: Alloc Memory Err=%d", err);
 		}
 	return err;
 	}
@@ -482,7 +485,7 @@
 		{
 	case ESocketWaitingForLength:
 			{
-			LOG(SwsLog::Printf(_L("CActiveSocketSMS::RunL() ESocketWaitingForLength"));)
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETSMS_RUNL_1, "CActiveSocketSMS::RunL() ESocketWaitingForLength");
 			iMessageRecord->SetDataState(EPendingLength);
 			iSocketState=ESocketIdle;
 			TWapNotificationInfo info(iBearerType, iStatus.Int());
@@ -492,7 +495,7 @@
 			}
 	case ESocketWaitingForData:
 			{
-			LOG(SwsLog::Printf(_L("CActiveSocketSMS::RunL() ESocketWaitingForData"));)
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETSMS_RUNL_2, "CActiveSocketSMS::RunL() ESocketWaitingForData");
 			iMessageRecord->SetDataState(EPendingData);
 			iSocketState=ESocketIdle;
 			TWapNotificationInfo info(iBearerType, iStatus.Int());
@@ -502,7 +505,7 @@
 			break;
 			}
 	default:
-		LOG(SwsLog::Printf(_L("CActiveSocketSMS::RunL() Unknown State")););
+	    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETSMS_RUNL_3, "CActiveSocketSMS::RunL() Unknown State");
 		}
 	}
 void CActiveSocketSMS::DoCancel() 
@@ -526,7 +529,7 @@
 			break;
 			}
 	default:
-		LOG(SwsLog::Printf(_L("CActiveSocketSMS::DoCancel() Unknown State")););	
+	    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETSMS_DOCANCEL_1, "CActiveSocketSMS::DoCancel() Unknown State");	
 		}
 	}
 
@@ -662,7 +665,7 @@
 		{
 	case ESocketWaitingForLength:
 			{
-			LOG(SwsLog::Printf(_L("CActiveSocketUDP::RunL() ESocketWaitingForLength"));)
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETUDP_RUNL_1, "CActiveSocketUDP::RunL() ESocketWaitingForLength");        
 			iMessageRecord->SetPduSize(iBuf.Length()+ iRxlength());
 			if(iRxlength() > 0)
 				{
@@ -680,7 +683,7 @@
 			}
 	case ESocketWaitingForData:
 			{
-			LOG(SwsLog::Printf(_L("CActiveSocketUDP::RunL() ESocketWaitingForData"));)
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETUDP_RUNL_2, "CActiveSocketUDP::RunL() ESocketWaitingForData");
 			iMessageRecord->SetDataState(EPendingData);
 			iSocketState=ESocketIdle;
 			TWapNotificationInfo info(iBearerType, iStatus.Int());
@@ -689,7 +692,7 @@
 			break;
 			}
 	default:
-		LOG(SwsLog::Printf(_L("CActiveSocketUDP::RunL() Unknown State"));)
+	    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETUDP_RUNL_3, "CActiveSocketUDP::RunL() Unknown State");
 		break;
 		}
 	}
@@ -714,7 +717,7 @@
 			break;
 			}
 	default:
-		LOG(SwsLog::Printf(_L("CActiveSocketUDP::DoCancel() Unknown State")););	
+	    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CACTIVESOCKETUDP_DOCANCEL_1, "CActiveSocketUDP::DoCancel() Unknown State");	
 		}
 	}
 
@@ -931,7 +934,7 @@
 	if (!iWspHeader && !iWspBody)
 		{
 		// if no data, should not be here at all
-		LOG(SwsLog::Printf(_L("CWspMessageRecord::GetWspData() No Data Available"));)
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGERECORD_GETWSPDATA_1, "CWspMessageRecord::GetWspData() No Data Available");
 		CleanUpData();
 		return KErrBadDescriptor;
 		}
@@ -1065,7 +1068,7 @@
 	if (!iPdu)
 		{
 		//Should not be here at all
-		LOG(SwsLog::Printf(_L("CWdpMessageRecord::GetPduData No Data Available"));)
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGERECORD_GETPDUDATA_1, "CWdpMessageRecord::GetPduData No Data Available");
 		CleanUpData();
 		return KErrBadDescriptor;
 		}