|
1 /* |
|
2 * Copyright (c) 2007-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 the License "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 * @internalComponent |
|
16 * @released |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef IMAGEREADER_H |
|
22 #define IMAGEREADER_H |
|
23 |
|
24 #include "typedefs.h" |
|
25 |
|
26 class TRomNode; |
|
27 |
|
28 /** |
|
29 Base class to read and process the image(ROFS/ROM/E32) |
|
30 |
|
31 @internalComponent |
|
32 @released |
|
33 */ |
|
34 class ImageReader |
|
35 { |
|
36 protected: |
|
37 String iImgFileName; |
|
38 Ifstream iInputStream; |
|
39 StringList iExecutableList; |
|
40 StringList iHiddenExeList; |
|
41 unsigned int iImageSize; |
|
42 ExeVsIdDataMap iExeVsIdData; |
|
43 ExeNamesVsDepListMap iImageVsDepList; |
|
44 bool iExeAvailable; |
|
45 |
|
46 public: |
|
47 ImageReader(const char* aFile); |
|
48 virtual ~ImageReader(void); |
|
49 virtual void ReadImage(void) = 0; |
|
50 virtual void ProcessImage(void) = 0; |
|
51 virtual void PrepareExecutableList(void); |
|
52 virtual ExeNamesVsDepListMap& GatherDependencies(void) = 0; |
|
53 virtual void PrepareExeVsIdMap(void) = 0; |
|
54 virtual const ExeVsIdDataMap& GetExeVsIdMap(void) const = 0; |
|
55 |
|
56 const StringList& GetExecutableList(void) const; |
|
57 const StringList& GetHiddenExeList(void) const; |
|
58 String& ImageName(void); |
|
59 static EImageType ReadImageType(const String aImageName); |
|
60 bool ExecutableAvailable(void); |
|
61 }; |
|
62 |
|
63 #endif //IMAGEREADER_H |