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 |
#ifndef FAT_CONFIGURATOR_H
|
sl@0
|
25 |
#define FAT_CONFIGURATOR_H
|
sl@0
|
26 |
|
sl@0
|
27 |
#include <f32dbg.h>
|
sl@0
|
28 |
//-----------------------------------------------------------------------------
|
sl@0
|
29 |
|
sl@0
|
30 |
/**
|
sl@0
|
31 |
This class provides access to the FAT settings in estart.txt file and the interface to
|
sl@0
|
32 |
get these setting to the client (CFatMountCB).
|
sl@0
|
33 |
*/
|
sl@0
|
34 |
class TFatConfig
|
sl@0
|
35 |
{
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
|
sl@0
|
38 |
TFatConfig();
|
sl@0
|
39 |
void ReadConfig(TInt aDrvNumber, TBool aForceRead = EFalse);
|
sl@0
|
40 |
|
sl@0
|
41 |
//-- parameters getters
|
sl@0
|
42 |
inline TBool ScanDrvSkipFinalisedVolume() const;
|
sl@0
|
43 |
inline TBool FAT32_AsynchMount() const;
|
sl@0
|
44 |
inline TBool FAT32_UseFSInfoOnMount() const;
|
sl@0
|
45 |
inline TBool FAT32_UseBitSupercache() const;
|
sl@0
|
46 |
|
sl@0
|
47 |
|
sl@0
|
48 |
inline TUint32 DirCacheSize() const;
|
sl@0
|
49 |
inline TUint32 DirCacheMaxPageSizeLog2() const;
|
sl@0
|
50 |
|
sl@0
|
51 |
inline void Fat16FixedCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2) const;
|
sl@0
|
52 |
inline void Fat32LruCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2, TUint32& aCacheSize) const;
|
sl@0
|
53 |
inline TBool FAT16_UseCleanShutDownBit() const;
|
sl@0
|
54 |
|
sl@0
|
55 |
inline TUint32 LeafDirCacheSize() const;
|
sl@0
|
56 |
inline TUint32 DynamicDirCacheSizeMin() const;
|
sl@0
|
57 |
inline TUint32 DynamicDirCacheSizeMax() const;
|
sl@0
|
58 |
inline TUint32 DynamicDirCacheMaxPageSizeLog2() const;
|
sl@0
|
59 |
|
sl@0
|
60 |
protected:
|
sl@0
|
61 |
|
sl@0
|
62 |
TFatConfig(const TFatConfig&);
|
sl@0
|
63 |
TFatConfig& operator=(const TFatConfig&);
|
sl@0
|
64 |
|
sl@0
|
65 |
TUint32 ReadUint(const TDesC8& aSection, const TDesC8& aKeyName, TUint32 aDefaultValue) const;
|
sl@0
|
66 |
|
sl@0
|
67 |
private:
|
sl@0
|
68 |
|
sl@0
|
69 |
void DumpParameters() const;
|
sl@0
|
70 |
void DoDumpUintParam(const TDesC8& aKeyName, TUint32 aParam) const;
|
sl@0
|
71 |
|
sl@0
|
72 |
void ProcessDirCacheParams(const TDesC8& aSection);
|
sl@0
|
73 |
void ProcessFatCacheParams(const TDesC8& aSection);
|
sl@0
|
74 |
void ProcessDynamicDirCacheParams(const TDesC8& aSection);
|
sl@0
|
75 |
|
sl@0
|
76 |
private:
|
sl@0
|
77 |
|
sl@0
|
78 |
TUint32 iInitialised : 1; //-- ETrue if the object is initialised, i.e. ReadConfig() called
|
sl@0
|
79 |
|
sl@0
|
80 |
//-- cached FAT parameters, see appropriate methods description
|
sl@0
|
81 |
|
sl@0
|
82 |
//-- boolean values
|
sl@0
|
83 |
TUint32 iScanDrvSkipFinalisedVolume :1; ///< if 1 ScanDrive will skip properly finalised volumes
|
sl@0
|
84 |
TUint32 iFAT32_AsynchMount :1; ///< if 1 FAT3 Asynchronous mounting is enabled
|
sl@0
|
85 |
TUint32 iFAT32_UseFSInfoOnMount :1; ///< 1 enables using FSInfo sector on FAT32 volumes
|
sl@0
|
86 |
TUint32 iFAT32_UseBitSupercache :1; ///< 1 enables using FAT32 bit supercache for fast free cluster lookup
|
sl@0
|
87 |
TUint32 iFAT16_UseCleanShutDownBit :1; ///< if 1 "clean shutdown mask" bit in FAT16[1] will be used during volume finalisations.
|
sl@0
|
88 |
|
sl@0
|
89 |
//---
|
sl@0
|
90 |
|
sl@0
|
91 |
TUint16 iDirCacheSizeKB; ///< directory cache size, Kbytes
|
sl@0
|
92 |
TUint16 iDirCacheMaxPageSizeLog2; ///< Log2(Max. dir. cache page size)
|
sl@0
|
93 |
|
sl@0
|
94 |
TUint16 iFat16FixedCacheReadGrLog2; ///< Log2(FAT16 fixed cache read granularity)
|
sl@0
|
95 |
TUint16 iFat16FixedCacheWriteGrLog2; ///< Log2(FAT16 fixed cache write granularity)
|
sl@0
|
96 |
|
sl@0
|
97 |
TUint16 iFat32LRUCacheSizeKB; ///< FAT32 LRU cache size, Kbytes
|
sl@0
|
98 |
TUint16 iFat32LRUCacheReadGrLog2; ///< Log2(FAT32 LRU cache read granularity)
|
sl@0
|
99 |
TUint16 iFat32LRUCacheWriteGrLog2; ///< Log2(FAT32 LRU cache write granularity)
|
sl@0
|
100 |
|
sl@0
|
101 |
TUint32 iLeafDirCacheSize; ///< leaf directory cache size, maximum number of most recently visited leaf dirs to be cached
|
sl@0
|
102 |
TUint32 iDynamicDirCacheSizeMinKB; ///< minimum directory cache size, Kbytes
|
sl@0
|
103 |
TUint32 iDynamicDirCacheSizeMaxKB; ///< maximum directory cache size, Kbytes
|
sl@0
|
104 |
TUint32 iDynamicDirCacheMaxPageSizeLog2;///< Log2(maximum dynamic dir cache page size)
|
sl@0
|
105 |
|
sl@0
|
106 |
};
|
sl@0
|
107 |
|
sl@0
|
108 |
#include"fat_config.inl"
|
sl@0
|
109 |
|
sl@0
|
110 |
#endif //FAT_CONFIGURATOR_H
|
sl@0
|
111 |
|
sl@0
|
112 |
|
sl@0
|
113 |
|
sl@0
|
114 |
|
sl@0
|
115 |
|
sl@0
|
116 |
|