persistentstorage/sql/SRC/Server/Compact/SqlCompactTimer.cpp
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
--- a/persistentstorage/sql/SRC/Server/Compact/SqlCompactTimer.cpp	Tue Aug 31 16:57:14 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/Compact/SqlCompactTimer.cpp	Wed Sep 01 12:39:58 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-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"
@@ -14,13 +14,8 @@
 //
 
 #include "SqlCompactTimer.h"
-#include "SqlAssert.h"
+#include "SqlPanic.h"
 #include "SqlCompactEntry.h"
-#include "OstTraceDefinitions.h"
-#ifdef OST_TRACE_COMPILER_IN_USE
-#include "SqlCompactTimerTraces.h"
-#endif
-#include "SqlTraceDef.h"
 
 /**
 Creates new CSqlCompactTimer instance.
@@ -31,13 +26,11 @@
 */
 CSqlCompactTimer* CSqlCompactTimer::NewL(TInt aIntervalMs)
 	{
-	SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTTIMER_NEWL_ENTRY, "Entry;0;CSqlCompactTimer::NewL;aIntervalMs=%d", aIntervalMs));
-	__ASSERT_DEBUG(aIntervalMs > 0, __SQLPANIC2(ESqlPanicBadArgument));
+	__SQLASSERT(aIntervalMs > 0, ESqlPanicBadArgument);
 	CSqlCompactTimer* self = new (ELeave) CSqlCompactTimer(aIntervalMs);
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
-	SQL_TRACE_COMPACT(OstTraceExt2(TRACE_INTERNALS, CSQLCOMPACTTIMER_NEWL_EXIT, "Exit;0x%X;CSqlCompactTimer::NewL;aIntervalMs=%d", (TUint)self, aIntervalMs));
 	return self;
 	}
 
@@ -46,7 +39,6 @@
 */
 CSqlCompactTimer::~CSqlCompactTimer()
 	{
-	SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTTIMER_CSQLCOMPACTTIMER2, "0x%X;CSqlCompactTimer::~CSqlCompactTimer", (TUint)this));
 	Cancel();
 	}
 
@@ -73,7 +65,6 @@
 */
 void CSqlCompactTimer::Queue(CSqlCompactEntry& aEntry)
 	{
-	SQL_TRACE_COMPACT(OstTraceExt3(TRACE_INTERNALS, CSQLCOMPACTTIMER_QUEUE, "0x%X;CSqlCompactTimer::Queue;aEntry=0x%X;Name=%S", (TUint)this, (TUint)&aEntry,__SQLPRNSTR(aEntry.FullName())));
 	SQLCOMPACTTIMER_INVARIANT();
 	iQueue.AddFirst(aEntry);
 	if(!IsActive())
@@ -92,7 +83,6 @@
 */
 void CSqlCompactTimer::DeQueue(CSqlCompactEntry& aEntry)
 	{
-	SQL_TRACE_COMPACT(OstTraceExt2(TRACE_INTERNALS, CSQLCOMPACTTIMER_DEQUEUE, "0x%X;CSqlCompactTimer::DeQueue;aEntry=0x%X", (TUint)this, (TUint)&aEntry));
 	SQLCOMPACTTIMER_INVARIANT();
 	iQueue.Remove(aEntry);
 	if(iQueue.IsEmpty())
@@ -114,7 +104,7 @@
 	iIntervalMicroSec(aIntervalMs * 1000),
 	iQueue(_FOFF(CSqlCompactEntry, iLink))
 	{
-	__ASSERT_DEBUG(aIntervalMs > 0, __SQLPANIC(ESqlPanicBadArgument));
+	__SQLASSERT(aIntervalMs > 0, ESqlPanicBadArgument);
 	}
 
 /**
@@ -138,12 +128,10 @@
 */
 void CSqlCompactTimer::RunL()
 	{
-	SQL_TRACE_COMPACT(OstTrace1(TRACE_INTERNALS, CSQLCOMPACTTIMER_RUNL, "0x%X;CSqlCompactTimer::RunL", (TUint)this));
 	SQLCOMPACTTIMER_INVARIANT();
-	__ASSERT_ALWAYS(!iQueue.IsEmpty(), __SQLPANIC(ESqlPanicInternalError));	
+	__SQLASSERT_ALWAYS(!iQueue.IsEmpty(), ESqlPanicInternalError);	
 	CSqlCompactEntry* entry = iQueue.Last();
-	SQL_TRACE_COMPACT(OstTraceExt4(TRACE_INTERNALS, CSQLCOMPACTTIMER_RUNL2, "0x%X;CSqlCompactTimer::RunL;Compact;entry=0x%X;Name=%S;iQueue.IsEmpty()=%d", (TUint)this, (TUint)entry,__SQLPRNSTR(entry->FullName()), (TInt)iQueue.IsEmpty()));
-	__ASSERT_DEBUG(entry, __SQLPANIC(ESqlPanicInternalError));	
+	__SQLASSERT(entry, ESqlPanicInternalError);	
 	(void)entry->Compact();
 	if(!iQueue.IsEmpty())
 		{
@@ -158,11 +146,11 @@
 */
 void CSqlCompactTimer::Invariant() const
 	{
-	__ASSERT_DEBUG(iIntervalMicroSec > 0, __SQLPANIC(ESqlPanicInternalError));
+	__SQLASSERT(iIntervalMicroSec > 0, ESqlPanicInternalError);
 	if(!iQueue.IsEmpty())
 		{
 		CSqlCompactEntry* entry = iQueue.Last();
-		__ASSERT_DEBUG(entry != NULL, __SQLPANIC(ESqlPanicInternalError));
+		__SQLASSERT(entry != NULL, ESqlPanicInternalError);
 		}
 	}
 #endif//_DEBUG