First public contribution.
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32\sfat32\fat_config.h
15 // FAT fsy configurator
24 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 //!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
29 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33 #ifndef FAT_CONFIGURATOR_H
34 #define FAT_CONFIGURATOR_H
37 //-----------------------------------------------------------------------------
40 This class provides access to the FAT settings in estart.txt file and the interface to
41 get these setting to the client (CFatMountCB).
48 void ReadConfig(TInt aDrvNumber, TBool aForceRead = EFalse);
50 //-- parameters getters
51 inline TBool ScanDrvSkipFinalisedVolume() const;
52 inline TBool FAT32_AsynchMount() const;
53 inline TBool FAT32_UseFSInfoOnMount() const;
54 inline TBool FAT32_UseBitSupercache() const;
57 inline TUint32 DirCacheSize() const;
58 inline TUint32 DirCacheMaxPageSizeLog2() const;
60 inline void Fat16FixedCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2) const;
61 inline void Fat32LruCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2, TUint32& aCacheSize) const;
62 inline TBool FAT16_UseCleanShutDownBit() const;
64 inline TUint32 LeafDirCacheSize() const;
65 inline TUint32 DynamicDirCacheSizeMin() const;
66 inline TUint32 DynamicDirCacheSizeMax() const;
67 inline TUint32 DynamicDirCacheMaxPageSizeLog2() const;
71 TFatConfig(const TFatConfig&);
72 TFatConfig& operator=(const TFatConfig&);
74 TUint32 ReadUint(const TDesC8& aSection, const TDesC8& aKeyName, TUint32 aDefaultValue) const;
78 void DumpParameters() const;
79 void DoDumpUintParam(const TDesC8& aKeyName, TUint32 aParam) const;
81 void ProcessDirCacheParams(const TDesC8& aSection);
82 void ProcessFatCacheParams(const TDesC8& aSection);
83 void ProcessDynamicDirCacheParams(const TDesC8& aSection);
87 TUint32 iInitialised : 1; //-- ETrue if the object is initialised, i.e. ReadConfig() called
89 //-- cached FAT parameters, see appropriate methods description
92 TUint32 iScanDrvSkipFinalisedVolume :1; ///< if 1 ScanDrive will skip properly finalised volumes
93 TUint32 iFAT32_AsynchMount :1; ///< if 1 FAT3 Asynchronous mounting is enabled
94 TUint32 iFAT32_UseFSInfoOnMount :1; ///< 1 enables using FSInfo sector on FAT32 volumes
95 TUint32 iFAT32_UseBitSupercache :1; ///< 1 enables using FAT32 bit supercache for fast free cluster lookup
96 TUint32 iFAT16_UseCleanShutDownBit :1; ///< if 1 "clean shutdown mask" bit in FAT16[1] will be used during volume finalisations.
100 TUint16 iDirCacheSizeKB; ///< directory cache size, Kbytes
101 TUint16 iDirCacheMaxPageSizeLog2; ///< Log2(Max. dir. cache page size)
103 TUint16 iFat16FixedCacheReadGrLog2; ///< Log2(FAT16 fixed cache read granularity)
104 TUint16 iFat16FixedCacheWriteGrLog2; ///< Log2(FAT16 fixed cache write granularity)
106 TUint16 iFat32LRUCacheSizeKB; ///< FAT32 LRU cache size, Kbytes
107 TUint16 iFat32LRUCacheReadGrLog2; ///< Log2(FAT32 LRU cache read granularity)
108 TUint16 iFat32LRUCacheWriteGrLog2; ///< Log2(FAT32 LRU cache write granularity)
110 TUint32 iLeafDirCacheSize; ///< leaf directory cache size, maximum number of most recently visited leaf dirs to be cached
111 TUint32 iDynamicDirCacheSizeMinKB; ///< minimum directory cache size, Kbytes
112 TUint32 iDynamicDirCacheSizeMaxKB; ///< maximum directory cache size, Kbytes
113 TUint32 iDynamicDirCacheMaxPageSizeLog2;///< Log2(maximum dynamic dir cache page size)
117 #include"fat_config.inl"
119 #endif //FAT_CONFIGURATOR_H