diff -r a5deb6b96675 -r 63cf70d3ecd8 backupandrestore/backupengine/src/absessionmap.cpp --- a/backupandrestore/backupengine/src/absessionmap.cpp Thu Sep 02 21:21:26 2010 +0300 +++ b/backupandrestore/backupengine/src/absessionmap.cpp Fri Sep 17 08:34:51 2010 +0300 @@ -23,10 +23,14 @@ #include "absessionmap.h" #include "sbedataowner.h" #include "sbepanic.h" +#include "OstTraceDefinitions.h" +#include "sbtrace.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "absessionmapTraces.h" +#endif namespace conn - { - + { CABSessionElement::CABSessionElement(TSecureId aSecureId) : iKey(aSecureId), iValue(NULL) /** Class Constructor @@ -34,6 +38,8 @@ @param aSecureId The secure Id of the data owner that the session has been created for */ { + OstTraceFunctionEntry0( CABSESSIONELEMENT_CABSESSIONELEMENT_CONS_ENTRY ); + OstTraceFunctionExit0( CABSESSIONELEMENT_CABSESSIONELEMENT_CONS_EXIT ); } CABSessionElement::~CABSessionElement() @@ -41,6 +47,8 @@ Class destructor */ { + OstTraceFunctionEntry0( CABSESSIONELEMENT_CABSESSIONELEMENT_DES_ENTRY ); + OstTraceFunctionExit0( CABSESSIONELEMENT_CABSESSIONELEMENT_DES_EXIT ); } CABSessionElement* CABSessionElement::NewL(TSecureId aSecureId) @@ -49,10 +57,12 @@ @param aSecureId The secure Id of the data owner that the session has been created for */ { + OstTraceFunctionEntry0( CABSESSIONELEMENT_NEWL_ENTRY ); CABSessionElement* self = new (ELeave) CABSessionElement(aSecureId); CleanupStack::PushL(self); self->ConstructL(); CleanupStack::Pop(self); + OstTraceFunctionExit0( CABSESSIONELEMENT_NEWL_EXIT ); return self; } @@ -61,8 +71,10 @@ Create the session for the data owner specified by iKey */ { + OstTraceFunctionEntry0( CABSESSIONELEMENT_CONSTRUCTL_ENTRY ); // Note that the server takes ownership of the session, not this object iValue = CABSession::NewL(iKey); + OstTraceFunctionExit0( CABSESSIONELEMENT_CONSTRUCTL_EXIT ); } CABSessionMap* CABSessionMap::NewL() @@ -72,7 +84,9 @@ @return Pointer to a created CABSessionMap object */ { + OstTraceFunctionEntry0( CABSESSIONMAP_NEWL_ENTRY ); CABSessionMap* self = new (ELeave) CABSessionMap; + OstTraceFunctionExit0( CABSESSIONMAP_NEWL_EXIT ); return self; } @@ -84,11 +98,15 @@ @return Reference to the created session */ { + OstTraceFunctionEntry0( CABSESSIONMAP_CREATEL_ENTRY ); CABSessionElement* element = CABSessionElement::NewL(aSecureId); CleanupStack::PushL(element); iMapElements.AppendL(element); CleanupStack::Pop(element); - return element->Value(); + + CABSession& session = element->Value(); + OstTraceFunctionExit0( CABSESSIONMAP_CREATEL_EXIT ); + return session; } void CABSessionMap::Delete(TSecureId aSecureId) @@ -98,6 +116,7 @@ @param aSecureId The key to the session to be deleted */ { + OstTraceFunctionEntry0( CABSESSIONMAP_DELETE_ENTRY ); TInt count = iMapElements.Count(); for (TInt index = 0; index < count; index++) @@ -110,6 +129,7 @@ break; } } + OstTraceFunctionExit0( CABSESSIONMAP_DELETE_EXIT ); } CABSession& CABSessionMap::SessionL(TSecureId aSecureId) @@ -121,6 +141,7 @@ @return The session that the DO with SID aSecureId is connected to */ { + OstTraceFunctionEntry0( CABSESSIONMAP_SESSIONL_ENTRY ); TInt count = iMapElements.Count(); CABSession* pSession = NULL; @@ -136,9 +157,11 @@ if (!pSession) { + OstTrace0(TRACE_ERROR, CABSESSIONMAP_SESSIONL, "Leave: KErrNotFound"); User::Leave(KErrNotFound); } + OstTraceFunctionExit0( CABSESSIONMAP_SESSIONL_EXIT ); return *pSession; } @@ -147,6 +170,8 @@ Class Constructor */ { + OstTraceFunctionEntry0( CABSESSIONMAP_CABSESSIONMAP_CONS_ENTRY ); + OstTraceFunctionExit0( CABSESSIONMAP_CABSESSIONMAP_CONS_EXIT ); } CABSessionMap::~CABSessionMap() @@ -154,8 +179,10 @@ Class destructor */ { + OstTraceFunctionEntry0( CABSESSIONMAP_CABSESSIONMAP_DES_ENTRY ); iMapElements.ResetAndDestroy(); iMapElements.Close(); + OstTraceFunctionExit0( CABSESSIONMAP_CABSESSIONMAP_DES_EXIT ); } void CABSessionMap::InvalidateABSessions() @@ -163,6 +190,7 @@ Set each CABSession currently hold in the map as invalid */ { + OstTraceFunctionEntry0( CABSESSIONMAP_INVALIDATEABSESSIONS_ENTRY ); TInt count = iMapElements.Count(); CABSession* pSession = NULL; @@ -174,5 +202,6 @@ pSession->SetInvalid(); } } + OstTraceFunctionExit0( CABSESSIONMAP_INVALIDATEABSESSIONS_EXIT ); } }