sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: sl@0: #ifndef NO_LOG_ENGINE_IN_ROM sl@0: #include sl@0: #endif sl@0: sl@0: #include sl@0: #include "LOGPANIC.H" sl@0: sl@0: EXPORT_C CLogWrapper::~CLogWrapper() sl@0: /** Frees all resources owned by the log wrapper prior to its destruction. Specifically, sl@0: it deletes the Log Engine (or the instance of the Log Engine base class, if sl@0: the UI variant does not have a Log Engine installed). */ sl@0: { sl@0: delete iBase; sl@0: } sl@0: sl@0: EXPORT_C CLogWrapper* CLogWrapper::NewL(RFs& aFs, TInt aPriority/* = CActive::EPriorityStandard*/) sl@0: { sl@0: CLogWrapper* self = new(ELeave)CLogWrapper(); sl@0: CleanupStack::PushL(self); sl@0: self->ConstructL(aFs, aPriority); sl@0: CleanupStack::Pop(); // self sl@0: return self; sl@0: } sl@0: sl@0: CLogWrapper::CLogWrapper() sl@0: { sl@0: } sl@0: sl@0: #ifndef NO_LOG_ENGINE_IN_ROM sl@0: void CLogWrapper::ConstructL(RFs& aFs, TInt aPriority) sl@0: { sl@0: iBase = CLogClient::NewL(aFs, aPriority); sl@0: } sl@0: #else sl@0: #pragma BullseyeCoverage off sl@0: void CLogWrapper::ConstructL(RFs&, TInt aPriority) sl@0: { sl@0: iBase = new(ELeave)CLogBase(aPriority); sl@0: } sl@0: #pragma BullseyeCoverage on sl@0: #endif sl@0: sl@0: EXPORT_C TBool CLogWrapper::ClientAvailable() const sl@0: /** Determines whether the Log Engine is installed. sl@0: sl@0: @return ETrue if there is a Log Engine, EFalse, otherwise. */ sl@0: { sl@0: #ifndef NO_LOG_ENGINE_IN_ROM sl@0: return ETrue; sl@0: #else sl@0: return EFalse; sl@0: #endif sl@0: }