sl@0
|
1 |
// Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __LOGSERVRESOURCEINTERPRETER_H__
|
sl@0
|
17 |
#define __LOGSERVRESOURCEINTERPRETER_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <barsc.h>
|
sl@0
|
20 |
#include <barsread.h>
|
sl@0
|
21 |
#include <logcli.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
/**
|
sl@0
|
24 |
Gives an access to the LogWrap resource file and maintains a cache of the retrieved resource entries.
|
sl@0
|
25 |
|
sl@0
|
26 |
@internalComponent
|
sl@0
|
27 |
*/
|
sl@0
|
28 |
class CLogServResourceInterpreter : public CBase
|
sl@0
|
29 |
{
|
sl@0
|
30 |
public:
|
sl@0
|
31 |
static CLogServResourceInterpreter* NewL(RFs& aFs);
|
sl@0
|
32 |
~CLogServResourceInterpreter();
|
sl@0
|
33 |
void CreateResourceReaderLC(TResourceReader& aReader, TInt aId);
|
sl@0
|
34 |
|
sl@0
|
35 |
private:
|
sl@0
|
36 |
/**
|
sl@0
|
37 |
Resource file item.
|
sl@0
|
38 |
Holds one resource string identified by an id.
|
sl@0
|
39 |
@internalComponent
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
struct TResourceString
|
sl@0
|
42 |
{
|
sl@0
|
43 |
inline TResourceString(TInt aResourceId, HBufC8* aResourceString) :
|
sl@0
|
44 |
iId(aResourceId),
|
sl@0
|
45 |
iString(aResourceString)
|
sl@0
|
46 |
{
|
sl@0
|
47 |
}
|
sl@0
|
48 |
TInt iId;
|
sl@0
|
49 |
HBufC8* iString;
|
sl@0
|
50 |
};
|
sl@0
|
51 |
|
sl@0
|
52 |
CLogServResourceInterpreter(RFs& aFs);
|
sl@0
|
53 |
void ConstructL();
|
sl@0
|
54 |
HBufC8* GetStringL(TInt aId);
|
sl@0
|
55 |
static TInt Compare(const TResourceString& aLeft, const TResourceString& aRight);
|
sl@0
|
56 |
|
sl@0
|
57 |
private:
|
sl@0
|
58 |
RFs& iFs;
|
sl@0
|
59 |
RResourceFile iFile;
|
sl@0
|
60 |
RArray<TResourceString> iStrings;
|
sl@0
|
61 |
};
|
sl@0
|
62 |
|
sl@0
|
63 |
#endif
|