--- a/smsprotocols/smsstack/wapprot/Src/ws_prtcl.cpp Tue Aug 31 16:23:08 2010 +0300
+++ b/smsprotocols/smsstack/wapprot/Src/ws_prtcl.cpp Wed Sep 01 12:40:21 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2003-2009 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"
@@ -13,12 +13,6 @@
// Description:
//
-
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "ws_prtclTraces.h"
-#endif
-
#include <e32base.h>
#include <f32file.h>
#include "smsprot.h"
@@ -54,7 +48,7 @@
//
CWapSmsProtocol* CWapSmsProtocol::NewL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_NEWL_1, "CWapSmsProtocol::NewL()");
+ LOGWAPPROT1("CWapSmsProtocol::NewL()");
CWapSmsProtocol* p=new(ELeave) CWapSmsProtocol;
CleanupStack::PushL(p);
@@ -72,14 +66,14 @@
void CWapSmsProtocol::HandleBackupOrRestoreStartingL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_HANDLEBACKUPORRESTORESTARTINGL_1, "CWapSmsProtocol::HandleBackupOrRestoreStartingL");
+ LOGWAPPROT1("CWapSmsProtocol::HandleBackupOrRestoreStartingL");
iWapStore->Close();
} // CWapSmsProtocol::HandleBackupOrRestoreStartingL
void CWapSmsProtocol::HandleBackupOrRestoreCompleteL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_HANDLEBACKUPORRESTORECOMPLETEL_1, "CWapSmsProtocol::HandleBackupOrRestoreCompleteL ");
+ LOGWAPPROT1("CWapSmsProtocol::HandleBackupOrRestoreCompleteL ");
iWapStore->DoOpenL();
} // CWapSmsProtocol::HandleBackupOrRestoreCompleteL
@@ -111,7 +105,7 @@
//
CServProviderBase *CWapSmsProtocol::NewSAPL(TUint aSocketType)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_NEWSAPL_1, "*CWapSmsProtocol::NewSAPL");
+ LOGWAPPROT1("*CWapSmsProtocol::NewSAPL");
if (aSocketType!=KSockDatagram)
User::Leave(KErrNotSupported);
@@ -136,7 +130,7 @@
{
// Ignore in code coverage - not intended to be used
BULLSEYE_OFF
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_BINDL_1, "CWapSmsProtocol::BindL");
+ LOGWAPPROT1("CWapSmsProtocol::BindL");
Panic(EWapSmsCantBind);
BULLSEYE_RESTORE
}
@@ -155,7 +149,7 @@
//
void CWapSmsProtocol::Identify(TServerProtocolDesc *aDes) const
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_IDENTIFY_1, "CWapSmsProtocol::Identify");
+ LOGWAPPROT1("CWapSmsProtocol::Identify");
aDes->iName=KWAPSMSProtocolId;
aDes->iAddrFamily=KWAPSMSAddrFamily;
@@ -178,7 +172,7 @@
//
void CWapSmsProtocol::BindToL(CProtocolBase* aProtocol)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_BINDTOL_1, "CWapSmsProtocol::BindToL");
+ LOGWAPPROT1("CWapSmsProtocol::BindToL");
TServerProtocolDesc info;
aProtocol->Identify(&info);
@@ -204,7 +198,7 @@
//
void CWapSmsProtocol::BindObserversToSmsL()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_BINDOBSERVERSTOSMSL_1, "CWapSmsProtocol::BindObserversToSmsL");
+ LOGWAPPROT1("CWapSmsProtocol::BindObserversToSmsL");
iNextSapPort=KMinWapPortNumber;
TSmsAddr addr0;
@@ -237,7 +231,7 @@
//
void CWapSmsProtocol::RemoveObserversFromSmsProtocol()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_REMOVEOBSERVERSFROMSMSPROTOCOL_1, "CWapSmsProtocol::RemoveObserversFromSmsProtocol");
+ LOGWAPPROT1("CWapSmsProtocol::RemoveObserversFromSmsProtocol");
if (iSmsProtocol==NULL)
return;
@@ -256,7 +250,7 @@
{
// Ignore in code coverage - not intended to be used
BULLSEYE_OFF
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_SEND_1, "CWapSmsProtocol::Send");
+ LOGWAPPROT1("CWapSmsProtocol::Send");
Panic(EWapSmsSendCallCantBind);
return KErrNone;
BULLSEYE_RESTORE
@@ -267,7 +261,7 @@
//
void CWapSmsProtocol::ProcessSmsL(const CSmsMessage& aSmsMessage)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_PROCESSSMSL_1, "CWapSmsProtocol::ProcessSmsL");
+ LOGWAPPROT1("CWapSmsProtocol::ProcessSmsL");
TInt index=0;
TBool storeDatagramComplete = EFalse;
TBool isNewStyleClient = EFalse;
@@ -332,7 +326,7 @@
//
TInt CWapSmsProtocol::GetOption(TUint aLevel, TUint aName, TDes8& aOption, CProtocolBase* /*aSourceProtocol*/)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_GETOPTION_1, "CWapSmsProtocol::GetOption");
+ LOGWAPPROT1("CWapSmsProtocol::GetOption");
TInt ret = iSmsProtocol->GetOption(aLevel, aName, aOption,this);
return ret;
@@ -345,7 +339,7 @@
//
TInt CWapSmsProtocol::SetOption(TUint aLevel, TUint aName, const TDesC8& aOption, CProtocolBase* /*aSourceProtocol*/)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_SETOPTION_1, "CWapSmsProtocol::SetOption");
+ LOGWAPPROT1("CWapSmsProtocol::SetOption");
TInt ret= iSmsProtocol->SetOption(aLevel,aName,aOption,this);
return ret;
@@ -357,7 +351,7 @@
//
void CWapSmsProtocol::Error(TInt aError, CProtocolBase* /*aSourceProtocol*/)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_ERROR_1, "CWapSmsProtocol::Error");
+ LOGWAPPROT1("CWapSmsProtocol::Error");
TDblQueIter<CWapSmsProvider> iter(iSAPList);
CWapSmsProvider* sap;
@@ -372,7 +366,7 @@
{
// Ignore in code coverage - not intended to be used
BULLSEYE_OFF
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_NEWHOSTRESOLVERL_1, "*CWapSmsProtocol::NewHostResolverL");
+ LOGWAPPROT1("*CWapSmsProtocol::NewHostResolverL");
Panic(EWapSmsCantCreateHostResolver);
return NULL;
BULLSEYE_RESTORE
@@ -385,7 +379,7 @@
{
// Ignore in code coverage - not intended to be used
BULLSEYE_OFF
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_NEWSERVICERESOLVERL_1, "*CWapSmsProtocol::NewServiceResolverL");
+ LOGWAPPROT1("*CWapSmsProtocol::NewServiceResolverL");
Panic(EWapSmsCantCreateServiceResolver);
return NULL;
BULLSEYE_RESTORE
@@ -398,7 +392,7 @@
{
// Ignore in code coverage - not intended to be used
BULLSEYE_OFF
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_NEWNETDATABASEL_1, "CWapSmsProtocol::NewNetDatabaseL");
+ LOGWAPPROT1("CWapSmsProtocol::NewNetDatabaseL");
Panic(EWapSmsCantCreateNetDatabase);
return NULL;
BULLSEYE_RESTORE
@@ -409,7 +403,7 @@
//
void CWapSmsProtocol::AddSAP(CWapSmsProvider* aSAP, TUint /*aSockType*/)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_ADDSAP_1, "CWapSmsProtocol::AddSAP");
+ LOGWAPPROT1("CWapSmsProtocol::AddSAP");
iSAPList.AddLast(*aSAP);
} // CWapSmsProtocol::AddSAP
@@ -420,7 +414,7 @@
//
TBool CWapSmsProtocol::AllocateLocalAddress(TWapAddr& aAddr)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_ALLOCATELOCALADDRESS_1, "CWapSmsProtocol::AllocateLocalAddressL");
+ LOGWAPPROT1("CWapSmsProtocol::AllocateLocalAddressL");
//
TBool found=EFalse;
TUint count=0,attempts=0;
@@ -447,7 +441,7 @@
//
CWapSmsProvider* CWapSmsProtocol::LookupSAP(CWapDatagram* aMsg)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_LOOKUPSAP_1, "CWapSmsProtocol::LookupSAP");
+ LOGWAPPROT1("CWapSmsProtocol::LookupSAP");
TBuf8<KMaxSockAddrSize> addrBuf;
addrBuf.Copy(aMsg->FromAddress());
@@ -483,7 +477,7 @@
//
TInt CWapSmsProtocol::AddrAlreadyUsedByWAP(const TWapAddr &aAddr, const CWapSmsProvider* aSap)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_ADDRALREADYUSEDBYWAP_1, "CWapSmsProtocol::AddrAlreadyUsedByWAP");
+ LOGWAPPROT1("CWapSmsProtocol::AddrAlreadyUsedByWAP");
TDblQueIter<CWapSmsProvider> iter(iSAPList);
CWapSmsProvider* sap;
@@ -498,7 +492,7 @@
return KErrInUse;
}
}
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_ADDRALREADYUSEDBYWAP_2, "CWapSmsProtocol::AddrAlreadyUsedByWAP not used by WAP");
+ LOGWAPPROT1("CWapSmsProtocol::AddrAlreadyUsedByWAP not used by WAP");
return KErrNone;
} // CWapSmsProtocol::AddrAlreadyUsedByWAP
@@ -508,7 +502,7 @@
//
CSmsProtocol* CWapSmsProtocol::SmsProtocol()
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_SMSPROTOCOL_1, "CWapSmsProtocol::SmsProtocol()");
+ LOGWAPPROT1("CWapSmsProtocol::SmsProtocol()");
return iSmsProtocol;
} // CWapSmsProtocol::SmsProtocol
@@ -519,7 +513,7 @@
//
TBool CWapSmsProtocol::FindAndDeleteMsg(CWapDatagram& aDatagram)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_FINDANDDELETEMSG_1, "CWapSmsProtocol::FindAndDeleteMsg()");
+ LOGWAPPROT1("CWapSmsProtocol::FindAndDeleteMsg()");
TInt err;
TInt ret = EFalse;
@@ -539,7 +533,7 @@
//
TInt CWapSmsProtocol::CheckSarL(const TWapAddr& aAddr,CWapSmsProvider* aSap)
{
- OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CWAPSMSPROTOCOL_CHECKSARL_1, "CWapSmsProtocol::CheckSarL()");
+ LOGWAPPROT1("CWapSmsProtocol::CheckSarL()");
TInt count=0;
TInt err = KErrNone;