imgtools/imgcheck/inc/depchecker.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 * DepChecker class declaration
       
    16 * @internalComponent
       
    17 * @released
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef DEPCHECKER_H
       
    23 #define DEPCHECKER_H
       
    24 
       
    25 #include "imgcheckmanager.h"
       
    26 #include "hash.h"
       
    27 
       
    28 /** 
       
    29 Typedefs locally used
       
    30 
       
    31 @internalComponent
       
    32 @released
       
    33 */
       
    34 typedef std::map<unsigned int, String> AddressVsExeName;
       
    35 
       
    36 /**
       
    37 If multiple images are specified as the input, then this value must be 
       
    38 high to acheive effective searching
       
    39 
       
    40 @internalComponent
       
    41 @released
       
    42 */
       
    43 const int KHashTableSize = 2000; 
       
    44 
       
    45 /**
       
    46 The possibilities for more number of hidden files are less, so this 
       
    47 much size of Hash pointer is more than enough
       
    48 
       
    49 @internalComponent
       
    50 @released
       
    51 */
       
    52 const int KHiddenExeHashSize = 100; //Hidden 
       
    53 /**
       
    54 class Dependency Checker
       
    55 
       
    56 @internalComponent
       
    57 @released
       
    58 */
       
    59 class DepChecker : public Checker
       
    60 {
       
    61 public:
       
    62 	DepChecker(CmdLineHandler* aCmdPtr, ImageReaderPtrList& aImageReaderList, bool aNoRomImage);
       
    63 	~DepChecker(void);
       
    64 	void Check(ImgVsExeStatus& aImgVsExeStatus);
       
    65 	void PrepareAndWriteData(ExeContainer* aExeContainer);
       
    66 	
       
    67 private:
       
    68 	void DeleteHiddenExeFromExecutableList(ImageReader* aImageReader, StringList& aHiddenExeList);
       
    69 	void CollectDependencyStatus(String& aString, String& aStatus) const;
       
    70 	void PrepareImageExeList(ImageReader* aImageReader);
       
    71 	void RomImagePassed(void) const;
       
    72 	
       
    73 private:
       
    74 	AddressVsExeName iAddressVsExeName; //ROM specific
       
    75 	HashTable* iHashPtr; //Used to search the dependencies effectively
       
    76 	HashTable* iHiddenExeHashPtr;
       
    77 	bool iNoRomImage;
       
    78 };
       
    79 
       
    80 #endif //DEPCHECKER_H