diff -r 630d2f34d719 -r 07a122eea281 telephonyserverplugins/simtsy/src/CSimReduceTimers.cpp --- a/telephonyserverplugins/simtsy/src/CSimReduceTimers.cpp Tue Aug 31 16:23:08 2010 +0300 +++ b/telephonyserverplugins/simtsy/src/CSimReduceTimers.cpp Wed Sep 01 12:40:21 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-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" @@ -21,13 +21,7 @@ */ - - -#include "OstTraceDefinitions.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "CSimReduceTimersTraces.h" -#endif - +#include "Simlog.h" #include "CSimReduceTimers.h" @@ -90,26 +84,26 @@ if (aProperty == iPSProperty && // Condition for correct property (aStatus == ETimerIdAllTimers)) // and correct value for signal { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_SIMPSEVENT_1, ">>CSimReduceTimers.cpp: Reduce Timer event fired for all timers"); + LOGMISC1(">>CSimReduceTimers.cpp: Reduce Timer event fired for all timers"); Notify(); } else if(aProperty == iPSProperty && aStatus > 0) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_SIMPSEVENT_2, ">>CSimReduceTimers.cpp: Reduce Timer event fired for event ID %d", aStatus); + LOGMISC2(">>CSimReduceTimers.cpp: Reduce Timer event fired for event ID %d", aStatus); Notify(aStatus); } } void CSimReduceTimers::AttachL(MSimTimerUpdateObserver* aObserver) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_ATTACHL_1, "CSimReduceTimers::AttachL"); + LOGMISC1("CSimReduceTimers::AttachL"); User::LeaveIfError(iObservers.Append(aObserver)); } void CSimReduceTimers::DetachL(MSimTimerUpdateObserver* aObserver) { TInt pos = iObservers.Find(aObserver); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_DETACHL_1, "CSimReduceTimers::DetachL, from position %d", pos); + LOGMISC2("CSimReduceTimers::DetachL, from position %d", pos); User::LeaveIfError(pos); iObservers.Remove(pos); } @@ -117,10 +111,10 @@ void CSimReduceTimers::Notify() { TInt totalItems = iObservers.Count(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY_1, "CSimReduceTimers::Notify, %d observers registered", totalItems); + LOGMISC2("CSimReduceTimers::Notify, %d observers registered", totalItems); if (totalItems <= 0) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY_2, "CSimReduceTimers::Notify, No timers to reduce."); + LOGMISC1("CSimReduceTimers::Notify, No timers to reduce."); return; } @@ -129,7 +123,7 @@ for (num = 0; num < totalItems; num++) { TInt temp = iObservers[num]->GetRemainingSeconds(); - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY_3, "CSimReduceTimers::Notify, iObservers[%d] remaining time = %d", num, temp); + LOGMISC3("CSimReduceTimers::Notify, iObservers[%d] remaining time = %d", num, temp); // Ensure no error is returned and check if the current itteration gives a lower time remaining. if (temp > 0 && temp < minTimeReduce) @@ -140,16 +134,16 @@ if (minTimeReduce == KMaxTInt) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY_4, "CSimReduceTimers::Notify, No running timers."); + LOGMISC1("CSimReduceTimers::Notify, No running timers."); return; } - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY_5, "CSimReduceTimers::Notify, Min time to reduce all timers: %d", minTimeReduce); + LOGMISC2("CSimReduceTimers::Notify, Min time to reduce all timers: %d", minTimeReduce); // Ensure that reducing timers by minTimeReduce does not reduce any timer to less than KTimerDelayOnReduceTimeSignal. minTimeReduce -= KTimerDelayOnReduceTimeSignal; if (minTimeReduce <= 0) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY_6, "CSimReduceTimers::Notify, Min time to reduce <= KTimerDelayOnReduceTimeSignal, no change to timers."); + LOGMISC1("CSimReduceTimers::Notify, Min time to reduce <= KTimerDelayOnReduceTimeSignal, no change to timers."); return; } @@ -162,10 +156,10 @@ void CSimReduceTimers::Notify(TInt aTimerEventId) { TInt totalItems = iObservers.Count(); - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY1_1, "CSimReduceTimers::Notify, %d observers registered", totalItems); + LOGMISC2("CSimReduceTimers::Notify, %d observers registered", totalItems); if (totalItems <= 0) { - OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY1_2, "CSimReduceTimers::Notify, No timers to reduce."); + LOGMISC1("CSimReduceTimers::Notify, No timers to reduce."); return; } @@ -188,7 +182,8 @@ if(indexOfLowest == KErrNotFound) { - OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY1_3, ">>CSimReduceTimers::Notify, No observers with event ID %d found", aTimerEventId); + LOGMISC2(">>CSimReduceTimers::Notify, No observers with event ID %d found", + aTimerEventId); return; } @@ -196,11 +191,13 @@ TInt reduceBy = lowestTime - KTimerDelayOnReduceTimeSignal; if(reduceBy >= lowestTime) { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY1_4, "CSimReduceTimers::Notify, Lowest timer for event ID %d already less than %d sec. No timer reduced.",KTimerDelayOnReduceTimeSignal, aTimerEventId); + LOGMISC3("CSimReduceTimers::Notify, Lowest timer for event ID %d already less than %d sec. No timer reduced.", + KTimerDelayOnReduceTimeSignal, aTimerEventId); } else { - OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMREDUCETIMERS_NOTIFY1_5, ">>CSimReduceTimers::Notify, Timer for observer with event ID %d, reduced by %d sec", aTimerEventId, reduceBy); + LOGMISC3(">>CSimReduceTimers::Notify, Timer for observer with event ID %d, reduced by %d sec", + aTimerEventId, reduceBy); iObservers[indexOfLowest]->Update(reduceBy); } }