imgtools/imgcheck/libimgutils/inc/romimageheader.h
changeset 0 044383f39525
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 ROMIMAGEHEADER_H
       
    22 #define ROMIMAGEHEADER_H
       
    23 
       
    24 #include "typedefs.h"
       
    25 #include "e32std.h"
       
    26 #include "e32def.h"
       
    27 
       
    28 class TRomLoaderHeader;
       
    29 class TRomHeader;
       
    30 class TExtensionRomHeader;
       
    31 
       
    32 const unsigned int KRomWrapperSize = 0x100;
       
    33 const unsigned int KRomNameSize = 16;
       
    34 
       
    35 /**
       
    36 Class for ROM Loader
       
    37 
       
    38 @internalComponent
       
    39 @released
       
    40 */
       
    41 class TRomLoad
       
    42 {
       
    43 public:
       
    44 	unsigned short int name[KRomNameSize];
       
    45 	unsigned short int versionStr[4];
       
    46 	unsigned short int buildNumStr[4];
       
    47 	unsigned int romSize;
       
    48 	unsigned int wrapSize;
       
    49 };
       
    50 
       
    51 const TUint KFillSize = KRomWrapperSize - sizeof(TRomLoad);
       
    52 
       
    53 class CObeyFile;
       
    54 
       
    55 /**
       
    56 Class for ROM Loader header
       
    57 
       
    58 @internalComponent
       
    59 @released
       
    60 */
       
    61 class TRomLoaderHeader
       
    62 {
       
    63 public:
       
    64 	void SetUp(CObeyFile *aObey);
       
    65 private:
       
    66 	TRomLoad iLoad;
       
    67 	unsigned char filler[KFillSize];
       
    68 };
       
    69 
       
    70 /**
       
    71 Class for ROM image header
       
    72 
       
    73 @internalComponent
       
    74 @released
       
    75 */
       
    76 class RomImageHeader
       
    77 {
       
    78 public:
       
    79 	RomImageHeader(char* aHdr, EImageType aImgType = ERomImage, bool aNoRomLoaderHeader = false );
       
    80 	TRomLoaderHeader	*iLoaderHdr;
       
    81 	TRomHeader			*iRomHdr;
       
    82 	TExtensionRomHeader	*iExtRomHdr;
       
    83 };
       
    84 
       
    85 #endif //ROMIMAGEHEADER_H