190 |
190 |
191 //----------------------------------------------------------------- |
191 //----------------------------------------------------------------- |
192 //-- pure virtual interface |
192 //-- pure virtual interface |
193 virtual TUint32 ReadL(TUint32 aFatIndex) const = 0; |
193 virtual TUint32 ReadL(TUint32 aFatIndex) const = 0; |
194 virtual void WriteL(TUint32 aFatIndex, TUint32 aValue) = 0; |
194 virtual void WriteL(TUint32 aFatIndex, TUint32 aValue) = 0; |
195 virtual TInt64 DataPositionInBytesL(TUint32 aCluster) const = 0; |
195 virtual TInt64 DataPositionInBytes(TUint32 aCluster) const = 0; |
196 virtual void MountL(const TMountParams& aMountParam) = 0; |
196 virtual void MountL(const TMountParams& aMountParam) = 0; |
197 //----------------------------------------------------------------- |
197 //----------------------------------------------------------------- |
198 //-- just virtual interface |
198 //-- just virtual interface |
199 |
199 |
200 virtual void Dismount(TBool /*aDiscardDirtyData*/) {} |
200 virtual void Dismount(TBool /*aDiscardDirtyData*/) {} |
426 class TLeafDirData; |
426 class TLeafDirData; |
427 class CLeafDirCache; |
427 class CLeafDirCache; |
428 |
428 |
429 |
429 |
430 /** |
430 /** |
431 Fat file system mount implmentation, provides all that is required of a plug in |
431 Fat file system mount implementation, provides all that is required of a plug in |
432 file system mount as well as Fat mount specific functionality |
432 file system mount as well as Fat mount specific functionality |
433 */ |
433 */ |
434 class CFatMountCB : public CLocDrvMountCB, |
434 class CFatMountCB : public CLocDrvMountCB, |
435 public MFileSystemSubType, |
435 public MFileSystemSubType, |
436 public MFileSystemClusterSize, |
436 public MFileSystemClusterSize, |
765 |
766 |
766 TBool iReadOnly : 1;///< if true, the drive is in read-only mode |
767 TBool iReadOnly : 1;///< if true, the drive is in read-only mode |
767 TBool iRamDrive : 1;///< true if this is a RAM drive |
768 TBool iRamDrive : 1;///< true if this is a RAM drive |
768 TBool iMainBootSecValid : 1;///< true if the main boot sector is valid, if false, a backup boot sector may be in use. |
769 TBool iMainBootSecValid : 1;///< true if the main boot sector is valid, if false, a backup boot sector may be in use. |
769 |
770 |
770 TFatMntState iState; ///< this mounnt internal state |
771 TFatMntState iState; ///< this mounnt internal state |
771 |
772 |
772 TFatType iFatType; ///< FAT type, FAT12,16 or 32 |
773 TFatType iFatType; ///< FAT type, FAT12,16 or 32 |
773 TUint32 iFatEocCode; ///< End Of Cluster Chain code, 0xff8 for FAT12, 0xfff8 for FAT16, and 0xffffff8 for FAT32 |
774 TUint32 iFatEocCode; ///< End Of Cluster Chain code, 0xff8 for FAT12, 0xfff8 for FAT16, and 0xffffff8 for FAT32 |
774 |
775 |
775 CLeafDirCache* iLeafDirCache; ///< A cache for most recently visited directories, only valid when limit is set bigger than 1 |
776 CLeafDirCache* iLeafDirCache; ///< A cache for most recently visited directories, only valid when limit is set bigger than 1 |
776 |
777 |
777 TFatVolParam iVolParam; ///< FAT volume parameters, populated form the boot sector values. |
778 TFatVolParam iVolParam; ///< FAT volume parameters, populated form the boot sector values. |
778 |
779 |
780 TUint32 iUsableClusters; ///< Number of usable cluster on the volume |
781 TUint32 iUsableClusters; ///< Number of usable cluster on the volume |
781 |
782 |
782 CFatTable* iFatTable; ///< Pointer to the volume Fat |
783 CFatTable* iFatTable; ///< Pointer to the volume Fat |
783 CRawDisk* iRawDisk; ///< Pointer to the raw data interface class |
784 CRawDisk* iRawDisk; ///< Pointer to the raw data interface class |
784 |
785 |
785 CAsyncNotifier* iNotifier; ///< Async notifier for notifying user of Fat error conditions |
786 CAsyncNotifier* iNotifier; ///< Async notifier for notifying user of Fat error conditions |
786 |
787 |
787 XDriveInterface iDriverInterface; ///< the object representing interface to the drive, provides read/write access and notifiers |
788 XDriveInterface iDriverInterface; ///< the object representing interface to the drive, provides read/write access and notifiers |
788 TFatConfig iFatConfig; ///< FAT parametrers from estart.txt |
789 TFatConfig iFatConfig; ///< FAT parametrers from estart.txt |
789 |
790 |
790 XFileCreationHelper iFileCreationHelper; |
791 XFileCreationHelper iFileCreationHelper; |
897 TInt iSeekIndexSize; ///< size of seek index |
898 TInt iSeekIndexSize; ///< size of seek index |
898 |
899 |
899 TUint iStartCluster; ///< Start cluster number of file |
900 TUint iStartCluster; ///< Start cluster number of file |
900 TEntryPos iCurrentPos; ///< Current position in file data |
901 TEntryPos iCurrentPos; ///< Current position in file data |
901 |
902 |
902 TEntryPos iFileDosEntryPos; ///< File DOS dir. entry position |
903 TEntryPos iFileDosEntryPos; ///< File DOS dir. entry position |
903 |
904 |
904 TBool iFileSizeModified :1; ///< flag, indicating that file size was modified and needs to be flushed onto the media (see FlushL()) |
905 TBool iFileSizeModified :1; ///< flag, indicating that file size was modified and needs to be flushed onto the media (see FlushL()) |
905 TBool iFileTimeModified :1; ///< flag, indicating that file modification time was modified and needs to be flushed onto the media (see FlushL()) |
906 TBool iFileTimeModified :1; ///< flag, indicating that file modification time was modified and needs to be flushed onto the media (see FlushL()) |
906 |
907 |
907 }; |
908 }; |
908 |
909 |
909 |
910 |
910 |
911 |