|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // f32\sfat32\fat_config.h |
|
15 // FAT fsy configurator |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalTechnology |
|
22 */ |
|
23 |
|
24 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
25 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
26 //!! |
|
27 //!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it |
|
28 //!! |
|
29 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
30 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|
31 |
|
32 |
|
33 #ifndef FAT_CONFIGURATOR_H |
|
34 #define FAT_CONFIGURATOR_H |
|
35 |
|
36 #include <f32dbg.h> |
|
37 //----------------------------------------------------------------------------- |
|
38 |
|
39 /** |
|
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). |
|
42 */ |
|
43 class TFatConfig |
|
44 { |
|
45 public: |
|
46 |
|
47 TFatConfig(); |
|
48 void ReadConfig(TInt aDrvNumber, TBool aForceRead = EFalse); |
|
49 |
|
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; |
|
55 |
|
56 |
|
57 inline TUint32 DirCacheSize() const; |
|
58 inline TUint32 DirCacheMaxPageSizeLog2() const; |
|
59 |
|
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; |
|
63 |
|
64 inline TUint32 LeafDirCacheSize() const; |
|
65 inline TUint32 DynamicDirCacheSizeMin() const; |
|
66 inline TUint32 DynamicDirCacheSizeMax() const; |
|
67 inline TUint32 DynamicDirCacheMaxPageSizeLog2() const; |
|
68 |
|
69 protected: |
|
70 |
|
71 TFatConfig(const TFatConfig&); |
|
72 TFatConfig& operator=(const TFatConfig&); |
|
73 |
|
74 TUint32 ReadUint(const TDesC8& aSection, const TDesC8& aKeyName, TUint32 aDefaultValue) const; |
|
75 |
|
76 private: |
|
77 |
|
78 void DumpParameters() const; |
|
79 void DoDumpUintParam(const TDesC8& aKeyName, TUint32 aParam) const; |
|
80 |
|
81 void ProcessDirCacheParams(const TDesC8& aSection); |
|
82 void ProcessFatCacheParams(const TDesC8& aSection); |
|
83 void ProcessDynamicDirCacheParams(const TDesC8& aSection); |
|
84 |
|
85 private: |
|
86 |
|
87 TUint32 iInitialised : 1; //-- ETrue if the object is initialised, i.e. ReadConfig() called |
|
88 |
|
89 //-- cached FAT parameters, see appropriate methods description |
|
90 |
|
91 //-- boolean values |
|
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. |
|
97 |
|
98 //--- |
|
99 |
|
100 TUint16 iDirCacheSizeKB; ///< directory cache size, Kbytes |
|
101 TUint16 iDirCacheMaxPageSizeLog2; ///< Log2(Max. dir. cache page size) |
|
102 |
|
103 TUint16 iFat16FixedCacheReadGrLog2; ///< Log2(FAT16 fixed cache read granularity) |
|
104 TUint16 iFat16FixedCacheWriteGrLog2; ///< Log2(FAT16 fixed cache write granularity) |
|
105 |
|
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) |
|
109 |
|
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) |
|
114 |
|
115 }; |
|
116 |
|
117 #include"fat_config.inl" |
|
118 |
|
119 #endif //FAT_CONFIGURATOR_H |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |