sl@0: // Copyright (c) 2002-2010 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: #ifndef __LOGSERVRESOURCEINTERPRETER_H__ sl@0: #define __LOGSERVRESOURCEINTERPRETER_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: Gives an access to the LogWrap resource file and maintains a cache of the retrieved resource entries. sl@0: sl@0: @internalComponent sl@0: */ sl@0: class CLogServResourceInterpreter : public CBase sl@0: { sl@0: public: sl@0: static CLogServResourceInterpreter* NewL(RFs& aFs); sl@0: ~CLogServResourceInterpreter(); sl@0: void CreateResourceReaderLC(TResourceReader& aReader, TInt aId); sl@0: sl@0: private: sl@0: /** sl@0: Resource file item. sl@0: Holds one resource string identified by an id. sl@0: @internalComponent sl@0: */ sl@0: struct TResourceString sl@0: { sl@0: inline TResourceString(TInt aResourceId, HBufC8* aResourceString) : sl@0: iId(aResourceId), sl@0: iString(aResourceString) sl@0: { sl@0: } sl@0: TInt iId; sl@0: HBufC8* iString; sl@0: }; sl@0: sl@0: CLogServResourceInterpreter(RFs& aFs); sl@0: void ConstructL(); sl@0: HBufC8* GetStringL(TInt aId); sl@0: static TInt Compare(const TResourceString& aLeft, const TResourceString& aRight); sl@0: sl@0: private: sl@0: RFs& iFs; sl@0: RResourceFile iFile; sl@0: RArray iStrings; sl@0: }; sl@0: sl@0: #endif