Update contrib.
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 #ifndef FAT_CONFIGURATOR_H
25 #define FAT_CONFIGURATOR_H
28 //-----------------------------------------------------------------------------
31 This class provides access to the FAT settings in estart.txt file and the interface to
32 get these setting to the client (CFatMountCB).
39 void ReadConfig(TInt aDrvNumber, TBool aForceRead = EFalse);
41 //-- parameters getters
42 inline TBool ScanDrvSkipFinalisedVolume() const;
43 inline TBool FAT32_AsynchMount() const;
44 inline TBool FAT32_UseFSInfoOnMount() const;
45 inline TBool FAT32_UseBitSupercache() const;
48 inline TUint32 DirCacheSize() const;
49 inline TUint32 DirCacheMaxPageSizeLog2() const;
51 inline void Fat16FixedCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2) const;
52 inline void Fat32LruCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2, TUint32& aCacheSize) const;
53 inline TBool FAT16_UseCleanShutDownBit() const;
55 inline TUint32 LeafDirCacheSize() const;
56 inline TUint32 DynamicDirCacheSizeMin() const;
57 inline TUint32 DynamicDirCacheSizeMax() const;
58 inline TUint32 DynamicDirCacheMaxPageSizeLog2() const;
62 TFatConfig(const TFatConfig&);
63 TFatConfig& operator=(const TFatConfig&);
65 TUint32 ReadUint(const TDesC8& aSection, const TDesC8& aKeyName, TUint32 aDefaultValue) const;
69 void DumpParameters() const;
70 void DoDumpUintParam(const TDesC8& aKeyName, TUint32 aParam) const;
72 void ProcessDirCacheParams(const TDesC8& aSection);
73 void ProcessFatCacheParams(const TDesC8& aSection);
74 void ProcessDynamicDirCacheParams(const TDesC8& aSection);
78 TUint32 iInitialised : 1; //-- ETrue if the object is initialised, i.e. ReadConfig() called
80 //-- cached FAT parameters, see appropriate methods description
83 TUint32 iScanDrvSkipFinalisedVolume :1; ///< if 1 ScanDrive will skip properly finalised volumes
84 TUint32 iFAT32_AsynchMount :1; ///< if 1 FAT3 Asynchronous mounting is enabled
85 TUint32 iFAT32_UseFSInfoOnMount :1; ///< 1 enables using FSInfo sector on FAT32 volumes
86 TUint32 iFAT32_UseBitSupercache :1; ///< 1 enables using FAT32 bit supercache for fast free cluster lookup
87 TUint32 iFAT16_UseCleanShutDownBit :1; ///< if 1 "clean shutdown mask" bit in FAT16[1] will be used during volume finalisations.
91 TUint16 iDirCacheSizeKB; ///< directory cache size, Kbytes
92 TUint16 iDirCacheMaxPageSizeLog2; ///< Log2(Max. dir. cache page size)
94 TUint16 iFat16FixedCacheReadGrLog2; ///< Log2(FAT16 fixed cache read granularity)
95 TUint16 iFat16FixedCacheWriteGrLog2; ///< Log2(FAT16 fixed cache write granularity)
97 TUint16 iFat32LRUCacheSizeKB; ///< FAT32 LRU cache size, Kbytes
98 TUint16 iFat32LRUCacheReadGrLog2; ///< Log2(FAT32 LRU cache read granularity)
99 TUint16 iFat32LRUCacheWriteGrLog2; ///< Log2(FAT32 LRU cache write granularity)
101 TUint32 iLeafDirCacheSize; ///< leaf directory cache size, maximum number of most recently visited leaf dirs to be cached
102 TUint32 iDynamicDirCacheSizeMinKB; ///< minimum directory cache size, Kbytes
103 TUint32 iDynamicDirCacheSizeMaxKB; ///< maximum directory cache size, Kbytes
104 TUint32 iDynamicDirCacheMaxPageSizeLog2;///< Log2(maximum dynamic dir cache page size)
108 #include"fat_config.inl"
110 #endif //FAT_CONFIGURATOR_H