Update contrib.
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.
21 _LIT(KLogResourceFile,"\\resource\\logeng\\logwrap.rsc");
23 /** Sets the priority of this active object.
25 @param aPriority The priority of this active object. */
26 EXPORT_C CLogBase::CLogBase(TInt aPriority)
27 : CLogActive(aPriority), iResourceFile(NULL)
31 /** Fees all resources owned by the object prior to its destruction. In particular
32 it closes the resource file reader. */
33 EXPORT_C CLogBase::~CLogBase()
38 #pragma BullseyeCoverage off
40 /** Adds an event to the log database. This is an asynchronous request.
42 This function is overridden by log engine implementations.
44 @param aEvent A reference to a log event detail object. This value is not
46 @param aStatus The request status. On completion of the asynchronous request,
47 it always contains KErrNotSupported.
48 @capability Note For built-in event types, the required capability level is defined in
49 the event type's write access policy. */
50 EXPORT_C void CLogBase::AddEvent(CLogEvent&, TRequestStatus& aStatus)
52 TRequestStatus* st = &aStatus;
53 User::RequestComplete(st, KErrNotSupported);
56 /** Gets the details of an existing event. This is an asynchronous request.
58 This function is overridden by log engine implementations.
60 @param aEvent A reference to a log event detail object. This value is not
62 @param aStatus The request status. On completion of the asynchronous request,
63 it always contains KErrNotSupported.
64 @capability Note For built-in event types, the required capability level is defined in
65 the event type's read access policy. */
66 EXPORT_C void CLogBase::GetEvent(CLogEvent&, TRequestStatus& aStatus)
68 TRequestStatus* st = &aStatus;
69 User::RequestComplete(st, KErrNotSupported);
72 /** Changes the details of an existing event. This is an asynchronous request.
74 This function is overridden by log engine implementations.
76 @param aEvent A reference to a log event detail object. This value is not
78 @param aStatus The request status. On completion of the asynchronous request,
79 it always contains KErrNotSupported.
80 @capability Note For built-in event types, the required capability level is defined in
81 the event type's write access policy. */
82 EXPORT_C void CLogBase::ChangeEvent(const CLogEvent&, TRequestStatus& aStatus)
84 TRequestStatus* st = &aStatus;
85 User::RequestComplete(st, KErrNotSupported);
88 /** Deletes an event from the log. This is an asynchronous request.
90 This function is overridden by log engine implementations.
92 @param aId The unique event ID of the event to be deleted. This value is not
94 @param aStatus The request status. On completion of the asynchronous request,
95 it always contains KErrNotSupported..
96 @capability Note For built-in event types, the required capability level is defined in
97 the event type's write access policy. */
98 EXPORT_C void CLogBase::DeleteEvent(TLogId, TRequestStatus& aStatus)
100 TRequestStatus* st = &aStatus;
101 User::RequestComplete(st, KErrNotSupported);
104 /** Gets a standard string from the logwrap.dll resource file.
106 This function is overridden by log engine implementations.
108 @param aString A modifiable descriptor. The length of this descriptor is set
110 @param aId The resource ID for the string. This value is not used.
111 @return KErrNotSupported.
112 @see RResourceFile */
113 EXPORT_C TInt CLogBase::GetString(TDes& aString, TInt) const
116 return KErrNotSupported;
119 void CLogBase::DoRunL()
121 __ASSERT_DEBUG(ETrue, Panic(ELogNotImplemented));
124 #pragma BullseyeCoverage on
126 EXPORT_C void CLogBase::LoadResourcesL(RFs& aFs)
128 // Find the resource file
130 Dll::FileName(fileName);
133 parse.Set(KLogResourceFile, &fileName, NULL);
134 fileName = parse.FullName();
136 // Get language of resource file
137 BaflUtils::NearestLanguageFile(aFs, fileName);
139 // Creating resource file member with 0 offset and 0 section size
140 iResourceFile = CResourceFile::NewL(aFs, fileName, 0, 0);
143 #pragma BullseyeCoverage off
145 EXPORT_C void CLogBase::CLogBase_Reserved1()
149 #pragma BullseyeCoverage on