Update contrib.
1 // Copyright (c) 2008-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\sfat\fat_config.inl
15 // FAT fsy configurator
24 #ifndef FAT_CONFIGURATOR_INL
25 #define FAT_CONFIGURATOR_INL
27 //-----------------------------------------------------------------------------
29 Meaning of this parameter:
30 if not 0, ScanDrive will not run on finalised FAT volume, i.e. that has "CleanShutdown" flag set in FAT[1] by
32 See CFatMountCB::ScanDrive().
34 TBool TFatConfig::ScanDrvSkipFinalisedVolume() const
37 return iScanDrvSkipFinalisedVolume;
40 //-----------------------------------------------------------------------------
42 Meaning of this parameter:
43 if not 0, enables asynchronous mounting of the FAT32 volumes.
44 In particular background FAT32 scan for free clusters. See CAtaFatTable::CountFreeClustersL().
46 TBool TFatConfig::FAT32_AsynchMount() const
49 return iFAT32_AsynchMount;
52 //-----------------------------------------------------------------------------
54 Meaning of this parameter:
55 if not 0, enables using FSInfo sector data during FAT32 volumes mounting to determine number of free clusters etc.
57 TBool TFatConfig::FAT32_UseFSInfoOnMount() const
60 return iFAT32_UseFSInfoOnMount;
63 //-----------------------------------------------------------------------------
65 Meaning of this parameter:
66 if not 0, enables using FAT32 bit supercache that makes free FAT entries lookup faster
68 TBool TFatConfig::FAT32_UseBitSupercache() const
71 return iFAT32_UseBitSupercache;
74 //-----------------------------------------------------------------------------
76 Meaning of this parameter:
77 Overall FAT directory cache size in bytes
79 TUint32 TFatConfig::DirCacheSize() const
82 return iDirCacheSizeKB * K1KiloByte;
85 //-----------------------------------------------------------------------------
88 Meaning of this parameter:
89 Log2 of the maximal size of the dir. cache page in bytes. (Minimal size will be current cluster size)
91 TUint32 TFatConfig::DirCacheMaxPageSizeLog2() const
94 return iDirCacheMaxPageSizeLog2;
98 Get FAT16 fixed cache parameters
99 @param aRdGrLog2 Log2(read granularity)
100 @param aWrGrLog2 Log2(write granularity)
102 void TFatConfig::Fat16FixedCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2) const
104 ASSERT(iInitialised);
105 aRdGrLog2 = iFat16FixedCacheReadGrLog2;
106 aWrGrLog2 = iFat16FixedCacheWriteGrLog2;
109 Get FAT32 LRU cache parameters
110 @param aRdGrLog2 Log2(read granularity)
111 @param aWrGrLog2 Log2(write granularity)
112 @param aCacheSize maximal cache size, bytes
114 void TFatConfig::Fat32LruCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2, TUint32& aCacheSize) const
116 ASSERT(iInitialised);
117 aRdGrLog2 = iFat32LRUCacheReadGrLog2;
118 aWrGrLog2 = iFat32LRUCacheWriteGrLog2;
119 aCacheSize = iFat32LRUCacheSizeKB * K1KiloByte;
124 Meaning of this parameter:
125 if not 0, "clean shutdown mask" bit in FAT16[1] will be used during volume finalisation.
126 Otherwise, FAT16[1] will not be affected during finalisation
128 TBool TFatConfig::FAT16_UseCleanShutDownBit() const
130 ASSERT(iInitialised);
131 return iFAT16_UseCleanShutDownBit;
136 //-----------------------------------------------------------------------------
138 Get leaf dir cache size
139 @return leaf dir cache size
141 TUint32 TFatConfig::LeafDirCacheSize() const
143 ASSERT(iInitialised);
144 return iLeafDirCacheSize;
148 get the minimum cache size setting for dynamic dir cache
149 @return minimum cache size in bytes
151 TUint32 TFatConfig::DynamicDirCacheSizeMin() const
153 ASSERT(iInitialised);
154 ASSERT(iDynamicDirCacheSizeMinKB < (KMaxTUint32 >> K1KiloByteLog2)); //check data overflow
155 return iDynamicDirCacheSizeMinKB << K1KiloByteLog2;
159 get the maximum cache size setting for dynamic dir cache
160 @return maximum cache size in bytes
162 TUint32 TFatConfig::DynamicDirCacheSizeMax() const
164 ASSERT(iInitialised);
165 ASSERT(iDynamicDirCacheSizeMaxKB < (KMaxTUint32 >> K1KiloByteLog2)); //check data overflow
166 return iDynamicDirCacheSizeMaxKB << K1KiloByteLog2;
170 retrieve the size of the maximal size of the dynamic dir cache page in log2.
171 (Minimal size will be current cluster size)
172 @return maximum page size in bytes in log2
174 TUint32 TFatConfig::DynamicDirCacheMaxPageSizeLog2() const
176 ASSERT(iInitialised);
177 return iDynamicDirCacheMaxPageSizeLog2;
181 #endif //FAT_CONFIGURATOR_INL