imgtools/romtools/rofsbuild/r_driveimage.h
author Ross Qin <ross.qin@nokia.com>
Tue, 02 Nov 2010 16:47:21 +0800
changeset 672 bc9ef8cca9ec
parent 607 378360dbbdba
permissions -rw-r--r--
revert the change to rofsbuild image format, but add checking codes to prevent address overflow
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
606
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     1
/*
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     2
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     3
* All rights reserved.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     4
* This component and the accompanying materials are made available
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     6
* which accompanies this distribution, and is available
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     8
*
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
     9
* Initial Contributors:
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    10
* Nokia Corporation - initial contribution.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    11
*
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    12
* Contributors:
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    13
*
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    14
* Description: 
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    15
* @internalComponent * @released
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    16
* DriveImage class declaration.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    17
*
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    18
*/
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    19
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    20
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    21
#ifndef __R_DRIVEIMAGE_H__
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    22
#define __R_DRIVEIMAGE_H__
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    23
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    24
#include <fstream> 
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    25
#include <vector>
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    26
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    27
const TInt KMaxGenBuffer=0x14;  
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    28
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    29
// Node Type.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    30
enum KNodeType
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    31
	{
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    32
	KNodeTypeNone=0,		
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    33
	KNodeTypeRoot,
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    34
	KNodeTypeChild,
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    35
	KNodeTypeSibling
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    36
	};
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    37
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    38
// File Format Supported.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    39
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    40
class TFSNode ;
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    41
// Image creation class.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    42
class CDriveImage
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    43
	{
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    44
public:
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    45
	CDriveImage(CObeyFile *aObey);
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    46
	~CDriveImage();
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    47
	TInt CreateImage(const char* alogfile);
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    48
	
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    49
private:
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    50
 
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    51
	TFSNode* PrepareFileSystem(TRomNode* aRomNode); 	
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    52
	// Holds the address of CObeyFile object. used to get the object information.
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    53
	CObeyFile *iObey;	  
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    54
	 
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    55
	 
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    56
	};
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    57
30b30f9da0b7 Add ..\dev\.. to path
jjkang
parents: 0
diff changeset
    58
#endif