equal
deleted
inserted
replaced
|
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 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 @released |
|
23 */ |
|
24 #include "romimageheader.h" |
|
25 /** |
|
26 Constructor intializes the Rom image header. |
|
27 |
|
28 @internalComponent |
|
29 @released |
|
30 |
|
31 @param aHdr - ROM laoder header |
|
32 @param aImgType - Image type |
|
33 */ |
|
34 RomImageHeader::RomImageHeader(char* aHdr, EImageType aImgType , bool aNoRomLoaderHeader) |
|
35 { |
|
36 switch(aImgType) |
|
37 { |
|
38 case ERomImage: |
|
39 if(!aNoRomLoaderHeader) |
|
40 { |
|
41 iLoaderHdr = (TRomLoaderHeader*)aHdr; |
|
42 iRomHdr = (TRomHeader*)(aHdr + sizeof(TRomLoaderHeader)); |
|
43 } |
|
44 else |
|
45 { |
|
46 iRomHdr = (TRomHeader*)(aHdr); |
|
47 } |
|
48 iExtRomHdr = 0; |
|
49 break; |
|
50 |
|
51 case ERomExImage: |
|
52 iExtRomHdr = (TExtensionRomHeader*)(aHdr); |
|
53 iRomHdr = 0; |
|
54 iLoaderHdr = 0; |
|
55 break; |
|
56 default: |
|
57 iLoaderHdr = 0 ; |
|
58 iRomHdr = 0; |
|
59 iExtRomHdr = 0 ; |
|
60 break ; |
|
61 } |
|
62 } |