imgtools/romtools/rofsbuild/fatcluster.h
author jjkang
Fri, 25 Jun 2010 20:58:33 +0800
changeset 605 122d2b873fd1
permissions -rw-r--r--
Minor changes: rofsbuild
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
605
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     1
/*
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     3
* All rights reserved.
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     4
* This component and the accompanying materials are made available
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     6
* which accompanies this distribution, and is available
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     8
*
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
     9
* Initial Contributors:
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    11
*
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    12
* Contributors:
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    13
*
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    14
* Description: 
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    15
*
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    16
*/
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    17
#ifndef __FAT_CLUSTER_HEADER__
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    18
#define __FAT_CLUSTER_HEADER__
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    19
#include <e32std.h>
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    20
class TFatCluster {
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    21
public:
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    22
	TFatCluster(int aIndex,int aActClustCnt = 1);
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    23
	~TFatCluster();
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    24
	bool Init(TUint aSize);
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    25
	bool LazyInit(const char* aFileName,TUint aFileSize); 
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    26
	inline TUint8* GetData() const {return iData ;	}
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    27
	inline TUint GetSize() const { return iSize ;}
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    28
	inline const char* GetFileName() const { return iFileName ;}
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    29
	inline bool IsLazy() const { return iLazy;}
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    30
	inline int ActualClusterCount() const { return iActualClusterCount;}
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    31
	inline int GetIndex() const { return iIndex ;}
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    32
protected:
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    33
	int iIndex ; 
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    34
	int iActualClusterCount ;
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    35
	TUint iSize ; // length of file or size of data
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    36
	TUint8* iData ;
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    37
	char* iFileName ;	
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    38
	bool iLazy ;
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    39
};
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    40
122d2b873fd1 Minor changes: rofsbuild
jjkang
parents:
diff changeset
    41
#endif