--- 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;
}
--- a/wapstack/wapmessageapi/sws/WapMessageApiAgent.cpp Tue Jun 22 11:02:32 2010 +0100
+++ b/wapstack/wapmessageapi/sws/WapMessageApiAgent.cpp Mon Jun 28 17:02:18 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -12,13 +12,16 @@
//
// Description:
//
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "WapMessageApiAgentTraces.h"
+#endif
#include "WapMessageApiAgent.h"
#include "WapMsgUtils.h"
#include "CLWSPPduHandler.h"
#include <es_wsms.h>
#include <wapmsgerr.h>
-#include "WapSwsLog.h"
CWapAsyncCallBack::CWapAsyncCallBack( const TCallBack& aCallBack, TInt aPriority )
: CActive( aPriority ), iCallBack( aCallBack )
@@ -191,14 +194,14 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetLocalPort: Trying to GetLocalPort on unconnected API."));)
- return KErrNotReady;
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETLOCALPORT_1, "CWapMessageApiAgent::GetLocalPort: Trying to GetLocalPort on unconnected API.");
+ return KErrNotReady;
}
CActiveSocket* sock=GetActiveSocketByBearer(iLastPduBearer);
if (!sock)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetLocalPort: Can not find Last Bearer."));)
- return Wap::EBearerError;
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETLOCALPORT_2, "CWapMessageApiAgent::GetLocalPort: Can not find Last Bearer.");
+ return Wap::EBearerError;
}
sock->GetLocalPort(aLocalPort);
return KErrNone;
@@ -215,13 +218,13 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetLocalAddress: Trying to GetLocalAddress on unconnected API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETLOCALADDRESS_1, "CWapMessageApiAgent::GetLocalAddress: Trying to GetLocalAddress on unconnected API.");
return KErrNotReady;
}
CActiveSocket* sock=GetActiveSocketByBearer(iLastPduBearer);
if (!sock)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetLocalAddress: Can not find Last Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETLOCALADDRESS_2, "CWapMessageApiAgent::GetLocalAddress: Can not find Last Bearer");
return Wap::EBearerError;
}
TSockAddr& localHost=sock->GetLocalAddress();
@@ -229,7 +232,7 @@
TRAP(err, aLocalHost=localHost.AllocL())
if (err)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetLocalAddress: Alloc Memory Err=%d"), err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETLOCALADDRESS_3, "CWapMessageApiAgent::GetLocalAddress: Alloc Memory Err=%d", err);
}
return err;
}
@@ -245,7 +248,7 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetBearer: Trying to GetBearer on unconnected API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETBEARER_1, "CWapMessageApiAgent::GetBearer: Trying to GetBearer on unconnected API.");
return KErrNotReady;
}
aBearer=iLastPduBearer;
@@ -263,13 +266,13 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetServerAddress: Trying to GetServerAddress on unconnected API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETSERVERADDRESS_1, "CWapMessageApiAgent::GetServerAddress: Trying to GetServerAddress on unconnected API.");
return KErrNotReady;
}
CActiveSocket* sock=GetActiveSocketByBearer(iLastPduBearer);
if (!sock)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::GetServerAddress: Can not find last error."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_GETSERVERADDRESS_2, "CWapMessageApiAgent::GetServerAddress: Can not find last error.");
return Wap::EBearerError;
}
return sock->GetRemoteAddress(aServerHost);
@@ -333,14 +336,14 @@
TRAP(ret, CActiveSocket::NewL(iSocketServ, iBearers, aBearer, iMessageType, this, aPort))
if (ret!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d."),ret);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_1, "CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d.",ret);
return ret;
}
iIsOpen=ETrue;
}
else
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect:Trying Connect twice to the API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_2, "CWapMessageApiAgent::Connect:Trying Connect twice to the API.");
ret=KErrInUse;
}
return ret;
@@ -361,7 +364,7 @@
{
if (aSocketServHandle==0 || !aConnection)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect:Parameter Error"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_1_1, "CWapMessageApiAgent::Connect:Parameter Error");
return KErrArgument;
}
TInt ret=KErrNone;
@@ -371,14 +374,14 @@
TRAP(ret, CActiveSocket::NewL(iSocketServ, iBearers, aBearer, iMessageType, this, aPort, aConnection))
if (ret!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d."), ret);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_1_2, "CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d.", ret);
return ret;
}
iIsOpen=ETrue;
}
else
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect:Trying to Connect twice to the API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_1_3, "CWapMessageApiAgent::Connect:Trying to Connect twice to the API.");
ret=KErrInUse;
}
return ret;
@@ -399,7 +402,7 @@
{
if (aBearer==Wap::EAll)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Connect to EAll Error"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_2_1, "CWapMessageApiAgent::SendWspMessage:Connect to EAll Error");
return Wap::EBearerError;
}
TInt ret=KErrNone;
@@ -409,20 +412,20 @@
TRAP(ret, CSWSWapMsgUtils::BuildAddrL(remoteAddr, aBearer, aRemoteHost, aRemotePort))
if (ret!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect: BuildAddress err=%d."), ret);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_2_2, "CWapMessageApiAgent::Connect: BuildAddress err=%d.", ret);
return ret;
}
TRAP(ret, CActiveSocket::NewL(iSocketServ, iBearers, aBearer, iMessageType, this, remoteAddr))
if (ret!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d."), ret);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_2_3, "CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d.", ret);
return ret;
}
iIsOpen=ETrue;
}
else
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect:Trying to Connect twice to the API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_2_4, "CWapMessageApiAgent::Connect:Trying to Connect twice to the API.");
ret=KErrInUse;
}
return ret;
@@ -460,12 +463,12 @@
{
if (aBearer==Wap::EAll)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Connect to EAll Error"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_3_1, "CWapMessageApiAgent::SendWspMessage:Connect to EAll Error");
return Wap::EBearerError;
}
if (aSocketServHandle==0 || !aConnection)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect:Parameter Error"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_3_2, "CWapMessageApiAgent::Connect:Parameter Error");
return KErrArgument;
}
TInt ret=KErrNone;
@@ -476,20 +479,20 @@
TRAP(ret, CSWSWapMsgUtils::BuildAddrL(remoteAddr, aBearer, aRemoteHost, aRemotePort))
if (ret!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect: BuildAddress err=%d."),ret);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_3_3, "CWapMessageApiAgent::Connect: BuildAddress err=%d.",ret);
return ret;
}
TRAP(ret, CActiveSocket::NewL(iSocketServ, iBearers, aBearer, iMessageType, this, remoteAddr, aConnection))
if (ret!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d."),ret);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_3_4, "CWapMessageApiAgent::Connect: CActiveSocket Instantiate err=%d.",ret);
return ret;
}
iIsOpen=ETrue;
}
else
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::Connect:Connect to a connected API."));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPMESSAGEAPIAGENT_CONNECT_3_5, "CWapMessageApiAgent::Connect:Connect to a connected API.");
ret=KErrInUse;
}
return ret;
@@ -558,12 +561,12 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Tryig to send to unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_1, "CWapMessageApiAgent::SendWspMessage:Tryig to send to unconnected API");
return KErrNotReady;
}
if (aBearer==Wap::EAll)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Send to EAll Error"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_2, "CWapMessageApiAgent::SendWspMessage:Send to EAll Error");
return Wap::EBearerError;
}
HBufC8* sendBuf=NULL;
@@ -572,13 +575,13 @@
TRAP(err, CSWSWapMsgUtils::BuildAddrL(remoteAddr, aBearer, aRemoteHost, aRemotePort))
if (err!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage: BuildAddress err=%d."),err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_3, "CWapMessageApiAgent::SendWspMessage: BuildAddress err=%d.", err);
return err;
}
TRAP(err, CCLWSPPduHandler::PackWSPPduL(sendBuf, TWSPPduType(aMethod), aURI, aReqHeaders, aReqBody, aTransactionId))
if (err!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Pack Wsp Packet Error=%d"),err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_4, "CWapMessageApiAgent::SendWspMessage:Pack Wsp Packet Error=%d", err);
return err;
}
CActiveSocket* sendSock=GetActiveSocketByBearer(aBearer);
@@ -596,7 +599,7 @@
}
else
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage: Can not find Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_5, "CWapMessageApiAgent::SendWspMessage: Can not find Bearer");
err=Wap::EBearerError;
}
delete sendBuf;
@@ -618,12 +621,12 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Trying to send to unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_1_1, "CWapMessageApiAgent::SendWspMessage:Tryig to send to unconnected API");
return KErrNotReady;
}
if (!iBearers[0])
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:No Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_1_2, "CWapMessageApiAgent::SendWspMessage:No Bearer");
return Wap::EBearerError;
}
HBufC8* sendBuf=NULL;
@@ -631,7 +634,7 @@
TRAP(err, CCLWSPPduHandler::PackWSPPduL(sendBuf, TWSPPduType(aMethod), aURI, aReqHeaders, aReqBody, aTransactionId))
if (err!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWapMessageApiAgent::SendWspMessage:Pack Wsp Packet Error=%d"),err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_SENDWSPMESSAGE_1_3, "CWapMessageApiAgent::SendWspMessage:Pack Wsp Packet Error=%d",err);
return err;
}
Wap::TBearer bearer=iBearers[0]->GetBearerType();
@@ -667,14 +670,14 @@
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, KErrNotReady);
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::ReceiveWspMessage: Trying to recvive from unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_RECEIVEWSPMESSAGE_1, "CWspMessageApiAgent::ReceiveWspMessage: Trying to recevive from unconnected API");
return KErrNotReady;
}
if (iRequestActive)
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, KErrInUse);
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::ReceiveWspMessage:Outstanding Receive exist"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_RECEIVEWSPMESSAGE_2, "CWspMessageApiAgent::ReceiveWspMessage:Outstanding Receive exist");
return KErrInUse;
}
//Record the client buffer
@@ -744,7 +747,7 @@
@returns KErrNone on successful completion, or one of the system error codes on failure.
*/
{
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::Notification is called"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_NOTIFICATION_1, "CWspMessageApiAgent::Notification is called");
TWapNotificationInfo& info=*(reinterpret_cast<TWapNotificationInfo*>(const_cast<TUint8*>(aData.Ptr())));
Wap::TBearer bearer=info.iBearer;
CActiveSocket* currentSocket=GetActiveSocketByBearer(bearer);
@@ -760,7 +763,7 @@
{
if (err!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::Notification PDU length err status:%d"), err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_NOTIFICATION_2, "CWspMessageApiAgent::Notification PDU length err status:%d", err);
currentSocket->CleanUpData();
if (iRequestActive)
{
@@ -771,7 +774,7 @@
}
else
{
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::Notification PDU length is received"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_NOTIFICATION_3, "CWspMessageApiAgent::Notification PDU length is received");
if ((err=currentSocket->Receive())!=KErrNone)
{
currentSocket->CleanUpData();
@@ -790,7 +793,7 @@
CActiveSocket* sock=GetActiveSocketByStatus(EReading);
if (err!=KErrNone)
{
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::Notification PDU data is received with Err status:%d"), err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_NOTIFICATION_4, "CWspMessageApiAgent::Notification PDU data is received with Err status:%d", err);
currentSocket->CleanUpData();
if (iRequestActive && !sock)
{
@@ -801,7 +804,7 @@
}
else
{
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::Notification PDU data is received"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_NOTIFICATION_5, "CWspMessageApiAgent::Notification PDU data is received");
if (!sock && iRequestActive)
{
iTimeoutTimer->Cancel();
@@ -822,7 +825,7 @@
break;
}
default:
- LOG(SwsLog::Printf(_L("CWspMessageApiAgent::Notification() Unknown Event From Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWSPMESSAGEAPIAGENT_NOTIFICATION_6, "CWspMessageApiAgent::Notification() Unknown Event From Bearer");
;
}
}
@@ -893,7 +896,7 @@
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, KErrNotReady);
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::ReceiveWdpMessage:Recv From unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_RECEIVEWDPMESSAGE_1, "CWdpMessageApiAgent::ReceiveWdpMessage: Recv From unconnected API");
return KErrNotReady;
}
//if the length has been read
@@ -903,7 +906,7 @@
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, KErrInUse);
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::ReceiveWdpMessage:in wrong state"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_RECEIVEWDPMESSAGE_2, "CWdpMessageApiAgent::ReceiveWdpMessage:in wrong state");
return KErrInUse;
}
if (sock1)
@@ -948,7 +951,7 @@
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, err);
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::ReceiveWdpMessage:err=%d"), err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_RECEIVEWDPMESSAGE_3, "CWdpMessageApiAgent::ReceiveWdpMessage:err=%d",err);
return err;
}
}
@@ -970,7 +973,7 @@
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, KErrNotReady);
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::AwaitRecvDataSize:Wait For Data length From unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_AWAITRECVDATASIZE_1, "CWdpMessageApiAgent::AwaitRecvDataSize:Wait For Data length From unconnected API");
return KErrNotReady;
}
//if the length has been read or there is some data pending, then error completion
@@ -981,7 +984,7 @@
{
reqStatus=&aReqStatus;
User::RequestComplete(reqStatus, KErrInUse);
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::AwaitRecvDataSize:in wrong state"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_AWAITRECVDATASIZE_2, "CWdpMessageApiAgent::AwaitRecvDataSize:in wrong state");
return KErrInUse;
}
//if there is a pending length, then get it
@@ -1033,12 +1036,12 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::SendWdpMessage:Send WDP to unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_SENDWDPMESSAGE_1, "CWdpMessageApiAgent::SendWdpMessage:Send WDP to unconnected API");
return KErrNotReady;
}
if (aBearer==Wap::EAll)
{
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::SendWdpMessage:Wrong Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_SENDWDPMESSAGE_2, "CWdpMessageApiAgent::SendWdpMessage:Wrong Bearer");
return Wap::EBearerError;
}
TSockAddr remoteAddr;
@@ -1046,7 +1049,7 @@
TRAP(err, CSWSWapMsgUtils::BuildAddrL(remoteAddr, aBearer, aRemoteHost, aRemotePort))
if (err)
{
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::SendWdpMessage:BuildAddrL Err=%d"), err);)
+ OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_SENDWDPMESSAGE_3, "CWdpMessageApiAgent::SendWdpMessage:BuildAddrL Err=%d", err);
return err;
}
CActiveSocket* sendSock=GetActiveSocketByBearer(aBearer);
@@ -1064,7 +1067,7 @@
}
else
{
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::SendWdpMessage:No Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_SENDWDPMESSAGE_4, "CWdpMessageApiAgent::SendWdpMessage:No Bearer");
err=Wap::EBearerError;
}
return err;
@@ -1081,12 +1084,12 @@
{
if (!iIsOpen)
{
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::SendWdpMessage:Send WDP to unconnected API"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_SENDWDPMESSAGE_1_1, "CWdpMessageApiAgent::SendWdpMessage:Send WDP to unconnected API");
return KErrNotReady;
}
if (!iBearers[0])
{
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::SendWdpMessage:No Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_SENDWDPMESSAGE_1_2, "CWdpMessageApiAgent::SendWdpMessage:No Bearer");
return Wap::EBearerError;
}
Wap::TBearer bearer=iBearers[0]->GetBearerType();
@@ -1178,7 +1181,7 @@
}
break;
default:
- LOG(SwsLog::Printf(_L("CWdpMessageApiAgent::Notification() Unknown Event From Bearer"));)
+ OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWDPMESSAGEAPIAGENT_NOTIFICATION_1, "CWdpMessageApiAgent::Notification() Unknown Event From Bearer");
;
}
}