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: #include sl@0: #include "LOGPANIC.H" sl@0: sl@0: _LIT(KLogResourceFile,"\\resource\\logeng\\logwrap.rsc"); sl@0: sl@0: /** Sets the priority of this active object. sl@0: sl@0: @param aPriority The priority of this active object. */ sl@0: EXPORT_C CLogBase::CLogBase(TInt aPriority) sl@0: : CLogActive(aPriority), iResourceFile(NULL) sl@0: { sl@0: } sl@0: sl@0: /** Fees all resources owned by the object prior to its destruction. In particular sl@0: it closes the resource file reader. */ sl@0: EXPORT_C CLogBase::~CLogBase() sl@0: { sl@0: delete iResourceFile; sl@0: } sl@0: sl@0: #pragma BullseyeCoverage off sl@0: sl@0: /** Adds an event to the log database. This is an asynchronous request. sl@0: sl@0: This function is overridden by log engine implementations. sl@0: sl@0: @param aEvent A reference to a log event detail object. This value is not sl@0: used. sl@0: @param aStatus The request status. On completion of the asynchronous request, sl@0: it always contains KErrNotSupported. sl@0: @capability Note For built-in event types, the required capability level is defined in sl@0: the event type's write access policy. */ sl@0: EXPORT_C void CLogBase::AddEvent(CLogEvent&, TRequestStatus& aStatus) sl@0: { sl@0: TRequestStatus* st = &aStatus; sl@0: User::RequestComplete(st, KErrNotSupported); sl@0: } sl@0: sl@0: /** Gets the details of an existing event. This is an asynchronous request. sl@0: sl@0: This function is overridden by log engine implementations. sl@0: sl@0: @param aEvent A reference to a log event detail object. This value is not sl@0: used. sl@0: @param aStatus The request status. On completion of the asynchronous request, sl@0: it always contains KErrNotSupported. sl@0: @capability Note For built-in event types, the required capability level is defined in sl@0: the event type's read access policy. */ sl@0: EXPORT_C void CLogBase::GetEvent(CLogEvent&, TRequestStatus& aStatus) sl@0: { sl@0: TRequestStatus* st = &aStatus; sl@0: User::RequestComplete(st, KErrNotSupported); sl@0: } sl@0: sl@0: /** Changes the details of an existing event. This is an asynchronous request. sl@0: sl@0: This function is overridden by log engine implementations. sl@0: sl@0: @param aEvent A reference to a log event detail object. This value is not sl@0: used. sl@0: @param aStatus The request status. On completion of the asynchronous request, sl@0: it always contains KErrNotSupported. sl@0: @capability Note For built-in event types, the required capability level is defined in sl@0: the event type's write access policy. */ sl@0: EXPORT_C void CLogBase::ChangeEvent(const CLogEvent&, TRequestStatus& aStatus) sl@0: { sl@0: TRequestStatus* st = &aStatus; sl@0: User::RequestComplete(st, KErrNotSupported); sl@0: } sl@0: sl@0: /** Deletes an event from the log. This is an asynchronous request. sl@0: sl@0: This function is overridden by log engine implementations. sl@0: sl@0: @param aId The unique event ID of the event to be deleted. This value is not sl@0: used. sl@0: @param aStatus The request status. On completion of the asynchronous request, sl@0: it always contains KErrNotSupported.. sl@0: @capability Note For built-in event types, the required capability level is defined in sl@0: the event type's write access policy. */ sl@0: EXPORT_C void CLogBase::DeleteEvent(TLogId, TRequestStatus& aStatus) sl@0: { sl@0: TRequestStatus* st = &aStatus; sl@0: User::RequestComplete(st, KErrNotSupported); sl@0: } sl@0: sl@0: /** Gets a standard string from the logwrap.dll resource file. sl@0: sl@0: This function is overridden by log engine implementations. sl@0: sl@0: @param aString A modifiable descriptor. The length of this descriptor is set sl@0: to zero. sl@0: @param aId The resource ID for the string. This value is not used. sl@0: @return KErrNotSupported. sl@0: @see RResourceFile */ sl@0: EXPORT_C TInt CLogBase::GetString(TDes& aString, TInt) const sl@0: { sl@0: aString.Zero(); sl@0: return KErrNotSupported; sl@0: } sl@0: sl@0: void CLogBase::DoRunL() sl@0: { sl@0: __ASSERT_DEBUG(ETrue, Panic(ELogNotImplemented)); sl@0: } sl@0: sl@0: #pragma BullseyeCoverage on sl@0: sl@0: EXPORT_C void CLogBase::LoadResourcesL(RFs& aFs) sl@0: { sl@0: // Find the resource file sl@0: TFileName fileName; sl@0: Dll::FileName(fileName); sl@0: sl@0: TParse parse; sl@0: parse.Set(KLogResourceFile, &fileName, NULL); sl@0: fileName = parse.FullName(); sl@0: sl@0: // Get language of resource file sl@0: BaflUtils::NearestLanguageFile(aFs, fileName); sl@0: sl@0: // Creating resource file member with 0 offset and 0 section size sl@0: iResourceFile = CResourceFile::NewL(aFs, fileName, 0, 0); sl@0: } sl@0: sl@0: #pragma BullseyeCoverage off sl@0: sl@0: EXPORT_C void CLogBase::CLogBase_Reserved1() sl@0: { sl@0: } sl@0: sl@0: #pragma BullseyeCoverage on