First public contribution.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef NO_LOG_ENGINE_IN_ROM
25 EXPORT_C CLogWrapper::~CLogWrapper()
26 /** Frees all resources owned by the log wrapper prior to its destruction. Specifically,
27 it deletes the Log Engine (or the instance of the Log Engine base class, if
28 the UI variant does not have a Log Engine installed). */
33 EXPORT_C CLogWrapper* CLogWrapper::NewL(RFs& aFs, TInt aPriority/* = CActive::EPriorityStandard*/)
35 CLogWrapper* self = new(ELeave)CLogWrapper();
36 CleanupStack::PushL(self);
37 self->ConstructL(aFs, aPriority);
38 CleanupStack::Pop(); // self
42 CLogWrapper::CLogWrapper()
46 #ifndef NO_LOG_ENGINE_IN_ROM
47 void CLogWrapper::ConstructL(RFs& aFs, TInt aPriority)
49 iBase = CLogClient::NewL(aFs, aPriority);
52 #pragma BullseyeCoverage off
53 void CLogWrapper::ConstructL(RFs&, TInt aPriority)
55 iBase = new(ELeave)CLogBase(aPriority);
57 #pragma BullseyeCoverage on
60 EXPORT_C TBool CLogWrapper::ClientAvailable() const
61 /** Determines whether the Log Engine is installed.
63 @return ETrue if there is a Log Engine, EFalse, otherwise. */
65 #ifndef NO_LOG_ENGINE_IN_ROM