|
1 /* |
|
2 * Copyright (c) 2010 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 |
|
21 #ifndef __LAUNCHERE32IMAGE_H__ |
|
22 #define __LAUNCHERE32IMAGE_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <badesca.h> |
|
26 #include <eikenv.h> |
|
27 #include <e32ldr_private.h> |
|
28 |
|
29 class E32ImageHeader; |
|
30 class E32ImportSection; |
|
31 class E32RelocSection; |
|
32 class CEikonEnv; |
|
33 |
|
34 |
|
35 NONSHARABLE_CLASS(E32ImageReader) : public CBase, public TProcessCreateInfo |
|
36 { |
|
37 public: |
|
38 static E32ImageReader* NewLC(); |
|
39 ~E32ImageReader(); |
|
40 |
|
41 public: |
|
42 CDesCArray* ListOfDLLsL(const TDesC& aFullPathToE32Image); |
|
43 |
|
44 private: |
|
45 E32ImageReader(); |
|
46 void ConstructL(); |
|
47 TInt LoadData(); |
|
48 static TUint8* MemoryMove(TAny* aDestination, const TAny* aSource, TInt aNumberofBytes); |
|
49 TInt LoadFile(TUint32 aCompression); |
|
50 TInt LoadFileNoCompress(); |
|
51 void LoadFileInflateL(); |
|
52 TInt Read(TText8* aDest, TInt aSize); |
|
53 TInt Read(TInt aPos, TText8* aDest, TInt aSize); |
|
54 TInt ReadImportData(); |
|
55 |
|
56 private: |
|
57 CEikonEnv* iEnv; |
|
58 |
|
59 public: |
|
60 E32ImageHeader* iHeader; |
|
61 E32ImportSection* iImportSection; |
|
62 E32RelocSection* iCodeRelocSection; |
|
63 E32RelocSection* iDataRelocSection; |
|
64 TUint32* iImportData; |
|
65 TUint8* iRestOfFileData; |
|
66 TUint32 iRestOfFileSize; |
|
67 TUint32 iConversionOffset; |
|
68 RFile iFile; |
|
69 TUint32 iCodeDelta; |
|
70 TUint32 iDataDelta; |
|
71 TUint32 iExportDirLoad; |
|
72 TBool isDll; |
|
73 TBool iAlreadyLoaded; |
|
74 TAny* iCloseCodeSeg; |
|
75 TInt iCurrentImportCount; |
|
76 TInt iNextImportPos; |
|
77 TUint32* iCurrentImportList; |
|
78 TUint8 iCurrentImportListSorted; |
|
79 TUint8 iExportDirLoadAllocated; |
|
80 TUint8 iPadding1; |
|
81 TUint8 iPadding2; |
|
82 }; |
|
83 |
|
84 #endif // __LAUNCHERE32IMAGE_H__ |