0
|
1 |
// Copyright (c) 2007-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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// Implements handling of the string info segment in Elf core dump
|
|
15 |
// Definition of the string info table.
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalTechnology
|
|
21 |
@released
|
|
22 |
*/
|
|
23 |
|
|
24 |
#ifndef __SYMBIAN_STRING_INFOV2_H__
|
|
25 |
#define __SYMBIAN_STRING_INFOV2_H__
|
|
26 |
|
|
27 |
_LIT8(KSymbianElfCoreDumpVersionV2, "2.0.0");
|
|
28 |
|
|
29 |
/**
|
|
30 |
@internalTechnology
|
|
31 |
@released
|
|
32 |
|
|
33 |
String info table is used by symbian elf formatter to manage the string segment data.
|
|
34 |
*/
|
|
35 |
class CStringInfoTableV2 : public CBase
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
static CStringInfoTableV2* NewL();
|
|
39 |
static CStringInfoTableV2* NewLC();
|
|
40 |
|
|
41 |
static CStringInfoTableV2* NewL(const TDesC8& aStrings);
|
|
42 |
static CStringInfoTableV2* NewLC(const TDesC8& aStrings);
|
|
43 |
|
|
44 |
~CStringInfoTableV2();
|
|
45 |
|
|
46 |
public:
|
|
47 |
TUint GetIndex(const TDesC8 &aItem);
|
|
48 |
TUint AddStringL(const TDesC8 &aItem);
|
|
49 |
TText8* GetAllStrings();
|
|
50 |
TUint GetSize();
|
|
51 |
|
|
52 |
private:
|
|
53 |
void ConstructL();
|
|
54 |
void ConstructL(const TDesC8& aStrings);
|
|
55 |
|
|
56 |
CStringInfoTableV2();
|
|
57 |
/** internal buffer holding the content of the string table */
|
|
58 |
RBuf8 iBuffer;
|
|
59 |
};
|
|
60 |
|
|
61 |
/**
|
|
62 |
Called when willing to locate the index of the specified text in the internal buffer
|
|
63 |
@param aItem descriptor holding the text to locate
|
|
64 |
@return index of the located text in the internall buffer
|
|
65 |
*/
|
|
66 |
inline TUint CStringInfoTableV2::GetIndex(const TDesC8 &aItem)
|
|
67 |
{
|
|
68 |
return iBuffer.Find(aItem);
|
|
69 |
}
|
|
70 |
|
|
71 |
/**
|
|
72 |
Called when required to get the raw content of the string table
|
|
73 |
@return pointer to the content of the internal buffer
|
|
74 |
*/
|
|
75 |
inline TText8* CStringInfoTableV2::GetAllStrings()
|
|
76 |
{
|
|
77 |
return (TText8*)iBuffer.Ptr();
|
|
78 |
}
|
|
79 |
|
|
80 |
/**
|
|
81 |
Called when required to get the size of the string table
|
|
82 |
@return size of the internal buffer
|
|
83 |
*/
|
|
84 |
inline TUint CStringInfoTableV2::GetSize()
|
|
85 |
{
|
|
86 |
return iBuffer.Length();
|
|
87 |
}
|
|
88 |
|
|
89 |
#endif // __SYMBIAN_STRING_INFOV2_H__
|