diff -r f6d3d9676ee4 -r d63d727ee0a6 userlibandfileserver/fileserver/sfat/inc/fat_table.h --- a/userlibandfileserver/fileserver/sfat/inc/fat_table.h Tue Dec 08 08:11:42 2009 +0100 +++ b/userlibandfileserver/fileserver/sfat/inc/fat_table.h Mon Jan 04 12:25:19 2010 +0100 @@ -21,6 +21,16 @@ @internalTechnology */ +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +//!! +//!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it +//!! +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + + #ifndef FAT_TABLE_H #define FAT_TABLE_H @@ -31,30 +41,30 @@ Fat table used for all media except RAM, manages the Fat table for all cluster requests. */ class CAtaFatTable : public CFatTable - { + { public: static CAtaFatTable* NewL(CFatMountCB& aOwner); //-- overrides from the base class - void FlushL(); - void Dismount(TBool aDiscardDirtyData); + void FlushL(); + void Dismount(TBool aDiscardDirtyData); void ReMountL(); - void InvalidateCacheL(TInt64 aPos, TUint32 aLength); - void InvalidateCacheL(); - - TUint32 ReadL(TUint32 aFatIndex) const; - void WriteL(TUint32 aFatIndex, TUint32 aValue); + void InvalidateCacheL(TInt64 aPos, TUint32 aLength); + void InvalidateCacheL(); + + TUint32 ReadL(TUint32 aFatIndex) const; + void WriteL(TUint32 aFatIndex, TUint32 aValue); - TInt64 DataPositionInBytes(TUint32 aCluster) const; + TInt64 DataPositionInBytes(TUint32 aCluster) const; private: - CAtaFatTable(CFatMountCB& aOwner); + CAtaFatTable(CFatMountCB& aOwner); void InitializeL(); void CreateCacheL(); private: CFatCacheBase* iCache; ///< FAT cache, fixed or LRU depending on the FAT type - }; + }; //--------------------------------------------------------------------------------------------------------------------------------------- @@ -63,41 +73,41 @@ RAM media only supports Fat12/16. */ class CRamFatTable : public CFatTable - { + { public: static CRamFatTable* NewL(CFatMountCB& aOwner); void ReMountL(); - TUint32 ReadL(TUint32 aFatIndex) const; - void WriteL(TUint32 aFatIndex, TUint32 aValue); - TInt64 DataPositionInBytes(TUint32 aCluster) const; - void FreeClusterListL(TUint32 aCluster); - TUint32 AllocateSingleClusterL(TUint32 aNearestCluster); - void ExtendClusterListL(TUint32 aNumber,TInt& aCluster); + TUint32 ReadL(TUint32 aFatIndex) const; + void WriteL(TUint32 aFatIndex, TUint32 aValue); + TInt64 DataPositionInBytes(TUint32 aCluster) const; + void FreeClusterListL(TUint32 aCluster); + TUint32 AllocateSingleClusterL(TUint32 aNearestCluster); + void ExtendClusterListL(TUint32 aNumber,TInt& aCluster); private: - CRamFatTable(CFatMountCB& aOwner); + CRamFatTable(CFatMountCB& aOwner); - void InitializeL(); + void InitializeL(); - inline TUint8 *RamDiskBase() const; - inline TInt AllocateClusterNumber(); - inline void WriteFatTable(TInt aFatIndex,TInt aValue); - inline void WriteFatTable(TInt aFatIndex,TInt aFatValue,TInt anIndirectionTableValue); - inline void ReadIndirectionTable(TUint32& aCluster) const; - inline void WriteIndirectionTable(TInt aFatIndex,TInt aValue); - inline TUint8* MemCopy(TAny* aTrg,const TAny* aSrc,TInt aLength); - inline TUint8* MemCopyFillZ(TAny* aTrg, TAny* aSrc, TInt aLength); - inline void ZeroFillCluster(TInt aCluster); - - void UpdateIndirectionTable(TUint32 aStartCluster,TUint32 anEndCluster,TInt aNum); + inline TUint8 *RamDiskBase() const; + inline TInt AllocateClusterNumber(); + inline void WriteFatTable(TInt aFatIndex,TInt aValue); + inline void WriteFatTable(TInt aFatIndex,TInt aFatValue,TInt anIndirectionTableValue); + inline void ReadIndirectionTable(TUint32& aCluster) const; + inline void WriteIndirectionTable(TInt aFatIndex,TInt aValue); + inline TUint8* MemCopy(TAny* aTrg,const TAny* aSrc,TInt aLength); + inline TUint8* MemCopyFillZ(TAny* aTrg, TAny* aSrc, TInt aLength); + inline void ZeroFillCluster(TInt aCluster); + + void UpdateIndirectionTable(TUint32 aStartCluster,TUint32 anEndCluster,TInt aNum); protected: - TInt iFatTablePos; ///< Current position in the fat table - TInt iIndirectionTablePos; ///< Current position in indirection table, second fat used for this - TUint8* iRamDiskBase; ///< Pointer to the Ram disk base - }; + TInt iFatTablePos; ///< Current position in the fat table + TInt iIndirectionTablePos; ///< Current position in indirection table, second fat used for this + TUint8* iRamDiskBase; ///< Pointer to the Ram disk base + };