author | mikek |
Thu, 13 May 2010 08:38:18 +0100 | |
changeset 6 | 787612182dd0 |
parent 2 | 39c28ec933dd |
permissions | -rwxr-xr-x |
2
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
1 |
/* |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
2 |
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
3 |
* All rights reserved. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
8 |
* |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
9 |
* Initial Contributors: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
11 |
* |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
12 |
* Contributors: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
13 |
* |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
14 |
* Description: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
15 |
* |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
16 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
17 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
18 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
19 |
#ifndef __R_COREIMAGE_H__ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
20 |
#define __R_COREIMAGE_H__ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
21 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
22 |
class TRomNode; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
23 |
class E32Rofs; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
24 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
25 |
/** |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
26 |
@internalComponent |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
27 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
28 |
MRofsImage is the interface used to access information held within an image. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
29 |
This interface used to remove the dependency between processing of |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
30 |
extensions and kernel commands in the obey file |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
31 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
32 |
class MRofsImage |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
33 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
34 |
public: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
35 |
/** Gets the root directory node from the image |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
36 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
37 |
@return TRomNode* the first node in the directory tree |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
38 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
39 |
virtual TRomNode* RootDirectory() = 0; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
40 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
41 |
/** Copies the specified directory tree. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
42 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
43 |
@param aSourceDirectory The directory that is to be copied |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
44 |
@return The copied directory tree. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
45 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
46 |
virtual TRomNode* CopyDirectory(TRomNode*& aSourceDirectory)=0; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
47 |
/** Sets the root directory to be the specified node. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
48 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
49 |
@param aDir The node that is to be set as the root directory |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
50 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
51 |
virtual void SetRootDirectory(TRomNode* aDir) = 0; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
52 |
/** Gets the filename of the core image |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
53 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
54 |
@returns The filename of the core image file |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
55 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
56 |
virtual TText* RomFileName() = 0; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
57 |
/** Gets the size of the image file |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
58 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
59 |
@returns size of file |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
60 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
61 |
virtual TInt Size() = 0; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
62 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
63 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
64 |
const int K_ID_SIZE=4; /** Size of the image header identifier */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
65 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
66 |
/** |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
67 |
@internalComponent |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
68 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
69 |
Provides the access the actual core image file. All file operations to the |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
70 |
core image file are through this class. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
71 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
72 |
class RCoreImageReader |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
73 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
74 |
public: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
75 |
/** Image Type read from header of image file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
76 |
enum TImageType |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
77 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
78 |
/** Format of file has not been recognised */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
79 |
E_UNKNOWN, |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
80 |
/** File is a core RofsImage file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
81 |
E_ROFS, |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
82 |
/** File is an extension RofsImage file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
83 |
E_ROFX |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
84 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
85 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
86 |
RCoreImageReader(char *aFilename); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
87 |
~RCoreImageReader(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
88 |
TBool Open(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
89 |
TImageType ReadImageType(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
90 |
TInt ReadCoreHeader(TRofsHeader& aHeader); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
91 |
TInt ReadExtensionHeader(TExtensionRofsHeader& aHeader); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
92 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
93 |
TInt ReadDirEntry(TRofsDir& aDir); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
94 |
TInt ReadDirEntry(TRofsDir& aDir, long aFilePos); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
95 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
96 |
long FilePosition(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
97 |
void SetFilePosition(long aFilePos); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
98 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
99 |
TInt ReadRofEntry(TRofsEntry& aEntry); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
100 |
TInt ReadRofEntry(TRofsEntry& aEntry, long aFilePos); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
101 |
TInt ReadRofEntryName(TUint16* aName, int aLength); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
102 |
TBool IsValidPosition(long filePos); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
103 |
TText* Filename(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
104 |
private: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
105 |
TInt ReadIdentifier(); |
6
787612182dd0
1) Make cross-plat-dev-utils perl scripts independent of the package directory name
mikek
parents:
2
diff
changeset
|
106 |
TInt ImageError(int aBytesRead, int aExpected, char const* aInfo); |
2
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
107 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
108 |
/** Image type of the file being read */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
109 |
TImageType iImageType; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
110 |
/** File handle of core image being read */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
111 |
FILE* iCoreImage; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
112 |
/** Filename of core image file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
113 |
char* iFilename; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
114 |
/** Image type identifier read from image header */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
115 |
TUint8 iIdentifier[K_ID_SIZE]; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
116 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
117 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
118 |
/** |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
119 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
120 |
@internalComponent |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
121 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
122 |
Processes the core image file to create a directory tree. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
123 |
It is used when the coreimage option has been specified either |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
124 |
on the command line or in the obey file. It implements the MRofsImage |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
125 |
so it can be used by the extension image processing. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
126 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
127 |
class CCoreImage : public MRofsImage |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
128 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
129 |
public: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
130 |
CCoreImage(RCoreImageReader* aReader); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
131 |
virtual TInt ProcessImage(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
132 |
void Display(ostream* aOut); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
133 |
virtual ~CCoreImage(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
134 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
135 |
// Implementation of MRofsImage |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
136 |
TRomNode* RootDirectory(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
137 |
TRomNode* CopyDirectory(TRomNode*& aSourceDirectory); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
138 |
void SetRootDirectory(TRomNode* aDir); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
139 |
TText* RomFileName(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
140 |
TInt Size(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
141 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
142 |
protected: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
143 |
void SaveDirInfo(TRofsHeader& header); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
144 |
void SaveDirInfo(TExtensionRofsHeader& header); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
145 |
TInt ProcessDirectory(long aAdjustment); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
146 |
TInt CreateRootDir(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
147 |
long DirTreeOffset(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
148 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
149 |
/** used to read the core image file*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
150 |
RCoreImageReader *iReader; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
151 |
private: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
152 |
/** The node for the root directory */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
153 |
TRomNode *iRootDirectory; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
154 |
/** The first node in list of file entries */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
155 |
TRomBuilderEntry *iFileEntries; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
156 |
/** Offset to the directory tree in the core image */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
157 |
long iDirTreeOffset; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
158 |
/** Size of the directory tree in the core image */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
159 |
long iDirTreeSize; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
160 |
/** Offset to the file entries of the directory in the core image */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
161 |
long iDirFileEntriesOffset; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
162 |
/** Size of the file entries block of the directory */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
163 |
long iDirFileEntriesSize; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
164 |
/** Filename of the rom image file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
165 |
TText* iRomFileName; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
166 |
/** Size of image */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
167 |
TInt iImageSize; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
168 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
169 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
170 |
/** |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
171 |
@internalComponent |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
172 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
173 |
Used for handling a single directory entry in the core image. This class allows |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
174 |
the directory tree to be created recursively. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
175 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
176 |
class TDirectoryEntry |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
177 |
{ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
178 |
public: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
179 |
TDirectoryEntry(long filePos, RCoreImageReader* aReader, TRomNode* aCurrentDir); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
180 |
~TDirectoryEntry(); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
181 |
TInt Process(long adjustment); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
182 |
private: |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
183 |
TInt CreateFileEntry(TText* aName, TRofsEntry& aRofsEntry); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
184 |
TInt AddSubDirs(long endDirPos); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
185 |
TInt AddFiles(long startPos, int size); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
186 |
TText* GetName(TUint16 aFirstChar, TInt aLength); |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
187 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
188 |
/** Handle to core image file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
189 |
RCoreImageReader* iReader; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
190 |
/** Node for the current directory */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
191 |
TRomNode* iCurrentDir; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
192 |
/** Current position in the file */ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
193 |
long iFilePos; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
194 |
/** |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
195 |
The references in the extension directory tree are relative the core |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
196 |
image and not the actual offset in the file. This variable holds the |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
197 |
difference between the entries in the directory tree and the actual file |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
198 |
position. This allows the same methods to be used for both core and |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
199 |
extension images. |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
200 |
*/ |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
201 |
long iAdjustment; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
202 |
}; |
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
203 |
|
39c28ec933dd
Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff
changeset
|
204 |
#endif |