imgtools/imgcheck/libimgutils/inc/rofsreader.h
changeset 0 044383f39525
child 590 360bd6b35136
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     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 ROFSREADER_H
       
    22 #define ROFSREADER_H
       
    23 
       
    24 #include "imagereader.h"
       
    25 #include "e32reader.h"
       
    26 #include "typedefs.h"
       
    27 #include "rofsimage.h"
       
    28 
       
    29 const String KRofsImageIdentifier = "ROFS";
       
    30 const String KRofsExtImageIdentifier = "ROFx";
       
    31 
       
    32 /**
       
    33 class to read rofs image
       
    34 
       
    35 @internalComponent
       
    36 @released
       
    37 */
       
    38 class RofsReader : public ImageReader
       
    39 {
       
    40 public:
       
    41 	RofsReader(char *aFile, EImageType aImgType);
       
    42 	~RofsReader(void);
       
    43 	static bool IsRofsImage(String& aWord);
       
    44 	static bool IsRofsExtImage(String& aWord);
       
    45     bool IsExecutable(String aName);
       
    46 	void ReadImage(void);
       
    47 	void ProcessImage(void);
       
    48 	ExeNamesVsDepListMap& GatherDependencies(void);
       
    49 	void PrepareExeDependencyList(E32Image* aE32Image, StringList& aExecutableList);
       
    50 	void PrepareExecutableList(void);
       
    51     void PrepareExeVsE32ImageMap(TRomNode* aEntry, CCoreImage *aImage, EImageType aImageType, Ifstream& aInputStream, ExeVsE32ImageMap& aExeVsE32ImageMap, ExeVsOffsetMap& aExeVsOffsetMap, StringList& aHiddenExeList);
       
    52 	void DeleteHiddenExecutableVsE32ImageEntry(void);
       
    53     void PrepareExeVsIdMap(void);
       
    54     const ExeVsIdDataMap& GetExeVsIdMap(void) const;
       
    55 
       
    56 private:
       
    57 	CCoreImage *iImage;
       
    58 	RCoreImageReader *iImageReader;
       
    59 	TRomNode *iRootDirEntry;
       
    60     ExeVsOffsetMap iExeVsOffsetMap;
       
    61 
       
    62 	EImageType iImageType;
       
    63 	ExeVsE32ImageMap iExeVsE32ImageMap;
       
    64 };
       
    65 
       
    66 #endif //ROFSREADER_H