|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __LAUNCHERE32IMAGE_H__ |
|
21 #define __LAUNCHERE32IMAGE_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <badesca.h> |
|
25 #include <eikenv.h> |
|
26 |
|
27 class E32ImageHeader; |
|
28 class E32ImportSection; |
|
29 class E32RelocSection; |
|
30 class CEikonEnv; |
|
31 |
|
32 |
|
33 NONSHARABLE_CLASS(E32ImageReader) : public CBase, public TProcessCreateInfo |
|
34 { |
|
35 public: |
|
36 static E32ImageReader* NewLC(); |
|
37 ~E32ImageReader(); |
|
38 |
|
39 public: |
|
40 CDesCArray* ListOfDLLsL(const TDesC& aFullPathToE32Image); |
|
41 |
|
42 private: |
|
43 E32ImageReader(); |
|
44 void ConstructL(); |
|
45 TInt LoadData(); |
|
46 static TUint8* MemoryMove(TAny* aDestination, const TAny* aSource, TInt aNumberofBytes); |
|
47 TInt LoadFile(TUint32 aCompression); |
|
48 TInt LoadFileNoCompress(); |
|
49 void LoadFileInflateL(); |
|
50 TInt Read(TText8* aDest, TInt aSize); |
|
51 TInt Read(TInt aPos, TText8* aDest, TInt aSize); |
|
52 TInt ReadImportData(); |
|
53 |
|
54 private: |
|
55 CEikonEnv* iEnv; |
|
56 |
|
57 public: |
|
58 E32ImageHeader* iHeader; |
|
59 E32ImportSection* iImportSection; |
|
60 E32RelocSection* iCodeRelocSection; |
|
61 E32RelocSection* iDataRelocSection; |
|
62 TUint32* iImportData; |
|
63 TUint8* iRestOfFileData; |
|
64 TUint32 iRestOfFileSize; |
|
65 TUint32 iConversionOffset; |
|
66 RFile iFile; |
|
67 TUint32 iCodeDelta; |
|
68 TUint32 iDataDelta; |
|
69 TUint32 iExportDirLoad; |
|
70 TBool isDll; |
|
71 TBool iAlreadyLoaded; |
|
72 TAny* iCloseCodeSeg; |
|
73 TInt iCurrentImportCount; |
|
74 TInt iNextImportPos; |
|
75 TUint32* iCurrentImportList; |
|
76 TUint8 iCurrentImportListSorted; |
|
77 TUint8 iExportDirLoadAllocated; |
|
78 TUint8 iPadding1; |
|
79 TUint8 iPadding2; |
|
80 }; |
|
81 |
|
82 #endif // __LAUNCHERE32IMAGE_H__ |