sl@0
|
1 |
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// f32\sfat32\fat_config.h
|
sl@0
|
15 |
// FAT fsy configurator
|
sl@0
|
16 |
//
|
sl@0
|
17 |
//
|
sl@0
|
18 |
|
sl@0
|
19 |
/**
|
sl@0
|
20 |
@file
|
sl@0
|
21 |
@internalTechnology
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
|
sl@0
|
24 |
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
sl@0
|
25 |
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
sl@0
|
26 |
//!!
|
sl@0
|
27 |
//!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
|
sl@0
|
28 |
//!!
|
sl@0
|
29 |
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
sl@0
|
30 |
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
sl@0
|
31 |
|
sl@0
|
32 |
|
sl@0
|
33 |
#ifndef FAT_CONFIGURATOR_H
|
sl@0
|
34 |
#define FAT_CONFIGURATOR_H
|
sl@0
|
35 |
|
sl@0
|
36 |
#include <f32dbg.h>
|
sl@0
|
37 |
//-----------------------------------------------------------------------------
|
sl@0
|
38 |
|
sl@0
|
39 |
/**
|
sl@0
|
40 |
This class provides access to the FAT settings in estart.txt file and the interface to
|
sl@0
|
41 |
get these setting to the client (CFatMountCB).
|
sl@0
|
42 |
*/
|
sl@0
|
43 |
class TFatConfig
|
sl@0
|
44 |
{
|
sl@0
|
45 |
public:
|
sl@0
|
46 |
|
sl@0
|
47 |
TFatConfig();
|
sl@0
|
48 |
void ReadConfig(TInt aDrvNumber, TBool aForceRead = EFalse);
|
sl@0
|
49 |
|
sl@0
|
50 |
//-- parameters getters
|
sl@0
|
51 |
inline TBool ScanDrvSkipFinalisedVolume() const;
|
sl@0
|
52 |
inline TBool FAT32_AsynchMount() const;
|
sl@0
|
53 |
inline TBool FAT32_UseFSInfoOnMount() const;
|
sl@0
|
54 |
inline TBool FAT32_UseBitSupercache() const;
|
sl@0
|
55 |
|
sl@0
|
56 |
|
sl@0
|
57 |
inline TUint32 DirCacheSize() const;
|
sl@0
|
58 |
inline TUint32 DirCacheMaxPageSizeLog2() const;
|
sl@0
|
59 |
|
sl@0
|
60 |
inline void Fat16FixedCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2) const;
|
sl@0
|
61 |
inline void Fat32LruCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2, TUint32& aCacheSize) const;
|
sl@0
|
62 |
inline TBool FAT16_UseCleanShutDownBit() const;
|
sl@0
|
63 |
|
sl@0
|
64 |
inline TUint32 LeafDirCacheSize() const;
|
sl@0
|
65 |
inline TUint32 DynamicDirCacheSizeMin() const;
|
sl@0
|
66 |
inline TUint32 DynamicDirCacheSizeMax() const;
|
sl@0
|
67 |
inline TUint32 DynamicDirCacheMaxPageSizeLog2() const;
|
sl@0
|
68 |
|
sl@0
|
69 |
protected:
|
sl@0
|
70 |
|
sl@0
|
71 |
TFatConfig(const TFatConfig&);
|
sl@0
|
72 |
TFatConfig& operator=(const TFatConfig&);
|
sl@0
|
73 |
|
sl@0
|
74 |
TUint32 ReadUint(const TDesC8& aSection, const TDesC8& aKeyName, TUint32 aDefaultValue) const;
|
sl@0
|
75 |
|
sl@0
|
76 |
private:
|
sl@0
|
77 |
|
sl@0
|
78 |
void DumpParameters() const;
|
sl@0
|
79 |
void DoDumpUintParam(const TDesC8& aKeyName, TUint32 aParam) const;
|
sl@0
|
80 |
|
sl@0
|
81 |
void ProcessDirCacheParams(const TDesC8& aSection);
|
sl@0
|
82 |
void ProcessFatCacheParams(const TDesC8& aSection);
|
sl@0
|
83 |
void ProcessDynamicDirCacheParams(const TDesC8& aSection);
|
sl@0
|
84 |
|
sl@0
|
85 |
private:
|
sl@0
|
86 |
|
sl@0
|
87 |
TUint32 iInitialised : 1; //-- ETrue if the object is initialised, i.e. ReadConfig() called
|
sl@0
|
88 |
|
sl@0
|
89 |
//-- cached FAT parameters, see appropriate methods description
|
sl@0
|
90 |
|
sl@0
|
91 |
//-- boolean values
|
sl@0
|
92 |
TUint32 iScanDrvSkipFinalisedVolume :1; ///< if 1 ScanDrive will skip properly finalised volumes
|
sl@0
|
93 |
TUint32 iFAT32_AsynchMount :1; ///< if 1 FAT3 Asynchronous mounting is enabled
|
sl@0
|
94 |
TUint32 iFAT32_UseFSInfoOnMount :1; ///< 1 enables using FSInfo sector on FAT32 volumes
|
sl@0
|
95 |
TUint32 iFAT32_UseBitSupercache :1; ///< 1 enables using FAT32 bit supercache for fast free cluster lookup
|
sl@0
|
96 |
TUint32 iFAT16_UseCleanShutDownBit :1; ///< if 1 "clean shutdown mask" bit in FAT16[1] will be used during volume finalisations.
|
sl@0
|
97 |
|
sl@0
|
98 |
//---
|
sl@0
|
99 |
|
sl@0
|
100 |
TUint16 iDirCacheSizeKB; ///< directory cache size, Kbytes
|
sl@0
|
101 |
TUint16 iDirCacheMaxPageSizeLog2; ///< Log2(Max. dir. cache page size)
|
sl@0
|
102 |
|
sl@0
|
103 |
TUint16 iFat16FixedCacheReadGrLog2; ///< Log2(FAT16 fixed cache read granularity)
|
sl@0
|
104 |
TUint16 iFat16FixedCacheWriteGrLog2; ///< Log2(FAT16 fixed cache write granularity)
|
sl@0
|
105 |
|
sl@0
|
106 |
TUint16 iFat32LRUCacheSizeKB; ///< FAT32 LRU cache size, Kbytes
|
sl@0
|
107 |
TUint16 iFat32LRUCacheReadGrLog2; ///< Log2(FAT32 LRU cache read granularity)
|
sl@0
|
108 |
TUint16 iFat32LRUCacheWriteGrLog2; ///< Log2(FAT32 LRU cache write granularity)
|
sl@0
|
109 |
|
sl@0
|
110 |
TUint32 iLeafDirCacheSize; ///< leaf directory cache size, maximum number of most recently visited leaf dirs to be cached
|
sl@0
|
111 |
TUint32 iDynamicDirCacheSizeMinKB; ///< minimum directory cache size, Kbytes
|
sl@0
|
112 |
TUint32 iDynamicDirCacheSizeMaxKB; ///< maximum directory cache size, Kbytes
|
sl@0
|
113 |
TUint32 iDynamicDirCacheMaxPageSizeLog2;///< Log2(maximum dynamic dir cache page size)
|
sl@0
|
114 |
|
sl@0
|
115 |
};
|
sl@0
|
116 |
|
sl@0
|
117 |
#include"fat_config.inl"
|
sl@0
|
118 |
|
sl@0
|
119 |
#endif //FAT_CONFIGURATOR_H
|
sl@0
|
120 |
|
sl@0
|
121 |
|
sl@0
|
122 |
|
sl@0
|
123 |
|
sl@0
|
124 |
|
sl@0
|
125 |
|