First public contribution.
1 // Copyright (c) 1995-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.
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without notice. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
27 #if !defined(__F32FSYS_H__)
29 #if !defined(__F32FILE_H__)
32 #include <e32atomics.h>
37 #define KFileSystemUidValue KFileSystemUidValue16
38 #define KFileServerUidValue KFileServerUidValue16
39 #define KFileServerDllUidValue KFileServerDllUidValue16
41 #define KFileSystemUidValue KFileSystemUidValue8
42 #define KFileServerUidValueKFileServerUidValue8
43 #define KFileServerDllUidValueKFileServerDllUidValue8
48 Filesystem error code 1 : indicates an item cannot be found,
49 because it has been hidden.
51 const TInt KErrHidden=(1);
54 Filesystem error code 2 : in the context of file operations, a path
55 was not found, because it has been hidden.
57 const TInt KErrPathHidden=(2);
60 const TInt KFileShareLockGranularity=2;
61 const TInt KAsyncRequestArrayGranularity=2;
67 File system UID value 16.
69 const TInt KFileSystemUidValue16=0x100039df;
78 File system UID value 8.
80 const TInt KFileSystemUidValue8=0x1000008f;
89 File server UID value 16.
91 const TInt KFileServerUidValue16=0x100039e3;
100 File server UID value 8.
102 const TInt KFileServerUidValue8=0x100000bb;
111 File server DLL UID value 16.
113 const TInt KFileServerDllUidValue16=0x100039e4;
122 File server DLL UID value 8.
124 const TInt KFileServerDllUidValue8=0x100000bd;
133 Local file system UID value.
135 const TInt KLocalFileSystemUidValue=0x100000d6;
144 Estart component UID value.
146 const TInt KEstartUidValue=0x10272C04;
153 Maximum length of a volume name.
155 const TInt KMaxVolumeNameLength=11;
164 First local drive indicator.
166 const TInt KFirstLocalDrive=EDriveC;
169 const TInt KMaxExtensionCount=2;
171 const TInt KDriveInvalid=-1;
173 _LIT(KMediaPWrdFile, "?:\\sys\\data\\mmcstore");
179 const TUint KSystemDriveKey = 0x10283049;
186 Enumeration that specifies whether, on opening a file:
187 - an existing file is opened
188 - a new file is created
189 - an existing file is replaced.
191 enum TFileOpen {EFileOpen,EFileCreate,EFileReplace};
202 typedef TFileMode TShare;
216 class CFsMessageRequest;
224 class CExtNotifyMediaChange;
231 Implements reference counting to track concurrent references to itself.
233 An object of this type arranges automatic destruction of itself when the final
234 reference is removed.
236 A reference counting object is any object which has CFsObject as its base class.
237 Constructing a CFsObject derived type or calling its Open() member function
238 adds a reference to that object by adding one to the reference count; calling
239 its Close() member function removes a reference by subtracting one from the
240 reference count; when the last user of the object calls Close(), the reference
241 count becomes zero and the object is automatically destroyed.
243 class CFsObject : public CBase
247 IMPORT_C CFsObject();
248 IMPORT_C virtual TInt Open();
249 IMPORT_C virtual void Close();
250 IMPORT_C TInt SetName(const TDesC* aName);
251 IMPORT_C TName Name() const;
252 IMPORT_C virtual TBool IsCorrectThread();
253 inline CFsObjectCon* Container() const;
256 TInt UniqueID() const;
259 IMPORT_C ~CFsObject();
262 CFsObjectCon* iContainer;
264 friend class CFsObjectCon;
265 friend class CFsObjectIx;
272 class CFsInternalRequest;
275 Implements a request dispatcher.
277 Base class for file server resources.
278 for example subsessions that are opened, such as RFile etc, that need closing are closed by
279 issuing a subsession close request, handled by this object.
284 class CFsDispatchObject : public CFsObject
289 Returns the drive number.
290 @return Drive number.
292 TInt DriveNumber() const {return(iDriveNumber);}
293 IMPORT_C void Close();
294 IMPORT_C virtual TBool IsCorrectThread();
296 void DoInitL(TInt aDrvNumber);
298 ~CFsDispatchObject();
300 CFsInternalRequest* iRequest;
302 friend class TFsCloseObject;
303 friend class CFileShare; // needed to override the close operation so that the file cache can be flushed on a close
310 Notifier class must be unique to each thread so one per drive or threaded plugin should be used
311 allocated in the file system. No longer global
316 NONSHARABLE_CLASS(CAsyncNotifier) : public CBase
319 IMPORT_C static CAsyncNotifier* New();
320 IMPORT_C ~CAsyncNotifier();
321 IMPORT_C TInt Notify(const TDesC& aLine1,const TDesC& aLine2,const TDesC& aButton1,const TDesC& aButton2,TInt& aButtonVal);
322 inline void SetMount(CMountCB* aMount) { iMount = aMount; };
334 class CProxyDriveFactory;
340 Structure containing information related to a single drive extension.
342 struct TExtensionInfo
344 TBool iIsPrimary; ///< Is the primary drive extension for a given drive
345 CProxyDriveFactory* iFactory; ///< Pointer to the drive extension's object factory
355 Represents information related to the Drive extension(s) in use for a given drive.
361 TInt iCount; ///< Number of drive extensions in use
363 TExtensionInfo iInfo[KMaxExtensionCount]; ///< Drive extension related information
373 Represents a drive in the file server.
375 Note that drives may act as substitutes for paths on other drives,
376 in which case any access to this drive letter will be translated into
377 a reference to the assigned path. In this way drives can act as short
378 cuts to paths on other drives.
384 void CreateL(TInt aDriveNumber);
386 TInt CheckMountAndEntryName(const TDesC& aName);
387 TInt FinaliseMount();
388 TInt FinaliseMount(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
389 TInt MountControl(TInt aLevel, TInt aOption, TAny* aParam);
390 void MountFileSystem(TBool aForceMount, TUint32 aFsNameHash = 0);
391 void FlushCachedFileInfoL();
392 TInt FlushCachedFileInfo(TBool aPurgeCache = EFalse);
393 void PurgeDirty(CMountCB& aMount);
394 void DriveInfo(TDriveInfo& anInfo);
395 TInt Volume(TVolumeInfo& aVolume);
396 TInt SetVolume(const TDesC& aName);
397 TInt MkDir(const TDesC& aName);
398 TInt RmDir(const TDesC& aName);
399 TInt Delete(const TDesC& aName);
400 TInt Rename(const TDesC& anOldName,const TDesC& aNewName);
401 TInt Replace(const TDesC& anOldName,const TDesC& aNewName);
402 TInt Entry(const TDesC& aName,TEntry& anEntry);
403 TInt SetEntry(const TDesC& aName,const TTime& aTime,TUint aMask,TUint aVal);
404 TInt FileTemp(CFsRequest* aRequest,TInt& aHandle,const TDesC& aPath,TDes& aName,TUint aMode);
405 TInt FileOpen(CFsRequest* aRequest,TInt& aHandle,const TDesC& aName,TUint aMode,TFileOpen anOpen);
406 TInt DirOpen(CSessionFs* aSession,TInt& aHandle,const TDesC& aName,TUint anAtt,const TUidType& aUidType);
407 CFormatCB* FormatOpenL(CFsRequest* aRequest, TInt& aFmtHandle, TFormatMode aFmtMode, const TLDFormatInfo* apLDFormatInfo, const TVolFormatParam* apVolFormatParam);
410 TInt CheckDisk(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
413 TInt ScanDrive(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
415 TInt ReadFileSection(const TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage);
416 TInt ReadFileSection64(const TDesC& aName,TInt64 aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage);
417 TInt GetShortName(const TDesC& aLongName,TDes& aShortName);
418 TInt GetLongName(const TDesC& aShortName,TDes& aLongName);
419 TInt IsFileOpen(const TDesC& aFileName,CFileCB*& aFileCB);
420 TInt IsFileInRom(const TDesC& aFileName,TUint8*& aFileStart);
421 TInt LockDevice(TMediaPassword& aOld,TMediaPassword& aNew,TBool aStore);
422 TInt UnlockDevice(TMediaPassword& aPassword,TBool aStore);
423 TInt ClearDevicePassword(TMediaPassword& aPassword);
424 TInt EraseDevicePassword();
425 TInt FreeDiskSpace(TInt64& aFreeDiskSpace);
426 TInt ForceRemountDrive(const TDesC8* aMountInfo,TInt aMountInfoMessageHandle,TUint aFlags);
427 TBool IsWriteProtected();
428 TInt MountExtension(CProxyDriveFactory* aFactory,TBool aIsPrimary);
429 TInt DismountExtension(CProxyDriveFactory* aFactory,TBool aIsPrimary);
430 TInt ExtensionName(TDes& aExtensionName,TInt aPos);
431 TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
432 void SetAtt(TUint aValue);
433 IMPORT_C TUint Att();
434 IMPORT_C TBool GetNotifyUser();
435 IMPORT_C void Dismount();
436 IMPORT_C TBool IsWriteableResource() const;
437 IMPORT_C TBool IsCurrentWriteFunction() const;
438 inline TInt GetReason() const;
439 inline void SetChanged(TBool aValue);
440 inline TBool IsChanged() const;
441 inline TInt DriveNumber() const;
442 inline TBool IsMounted() const;
443 inline TBool IsLocal() const;
444 inline TBool IsRom() const;
445 inline TBool IsRemovable() const;
446 inline TBool IsSubsted() const;
447 inline CMountCB& CurrentMount() const;
448 inline TBool IsCurrentMount(CMountCB& aMount) const;
449 inline TDrive& SubstedDrive() const;
450 inline void SetSubstedDrive(TDrive* aDrive);
451 inline HBufC& Subst() const;
452 inline void SetSubst(HBufC* aSubst);
453 inline CFsObjectCon& Mount() const;
454 inline CFileSystem& FSys();
455 inline CFileSystem*& GetFSys();
456 inline TDriveExtInfo& ExtInfo();
457 inline void SetNotifyOn();
458 inline void SetNotifyOff();
459 inline TInt ReservedSpace() const;
460 inline void SetReservedSpace(const TInt aReservedSpace);
462 inline void SetRugged(TBool aIsRugged);
463 inline TBool IsRugged() const;
465 inline TBool IsSynchronous() const;
466 inline void SetSynchronous(TBool aIsSynch);
468 TInt DismountProxyDrive();
469 TInt ForceUnmountFileSystemForFormatting();
473 TInt DismountUnlock();
474 TInt DismountLocked() const;
475 void SetDismountDeferred(TBool aPending);
476 void ForceDismount();
477 TInt ActiveMounts() const;
478 void ReactivateMounts();
479 TInt ClampFile(const TDesC& aName,TAny* aHandle);
480 TInt UnclampFile(CMountCB* aMount, RFileClamp* aHandle);
481 TInt ClampsOnDrive();
482 inline TBool DismountDeferred() const;
483 TInt DeferredDismount();
484 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
485 TInt ClearDeferredDismount();
487 void SetClampFlag(TBool aClamped);
490 inline void UnLock();
491 void MultiSlotDriveCheck();
493 TInt RequestFreeSpaceOnMount(TUint64 aFreeSpaceRequired);
494 TInt MountedVolumeSize(TUint64& aSize);
496 TBool ReMount(CMountCB& aMount);
500 void DoMountFileSystemL(CMountCB*& apMount, TBool aForceMount, TUint32 aFsNameHash);
502 void SetVolumeL(const TDesC& aName,HBufC*& aBuf);
503 void DirOpenL(CSessionFs* aSession,TInt& aHandle,const TDesC& aName,TUint anAtt,const TUidType& aUidType,CDirCB*& aDir);
504 void FileOpenL(CFsRequest* aRequest,TInt& aHandle,const TDesC& aName,TUint aMode,TFileOpen anOpen,CFileCB*& aFileCB,CFileShare*& aFileShare);
505 TInt CheckMountAndEntryNames(const TDesC& anOldName,const TDesC& aNewName);
506 CFileCB* LocateFileByPath(const TDesC& aPath);
507 TInt CheckDirectories(const TDesC& anOldName,const TDesC& aNewName);
508 void DoEntryL(const TDesC& aName,TEntry& anEntry);
509 void ReadSectionL(const TDesC& aName,TInt64 aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage);
510 TInt ValidateShare(CFileCB& aFile,TShare aReqShare);
511 TInt CheckAttributes(const TDesC& aName,TUint& aSetAttMask,TUint& aClearAttMask);
512 TBool IsExtensionMounted(CProxyDriveFactory* aFactory);
513 CFileCB* LocateFile(const TDesC& aName);
514 CFileCache* LocateClosedFile(const TDesC& aName, TBool aResurrect = ETrue);
516 IMPORT_C TBool IsDriveThread() const;
517 IMPORT_C TBool IsMainThread() const;
518 IMPORT_C void DriveFault(TBool aDriveError) const;
520 void DoCompleteDismountNotify(TInt aCompletionCode);
524 //-- intrinsic TDrive flags. Used in iDriveFlags.
528 EDismountDeferred= 0x02,
530 EClampPresent = 0x08,
531 EDriveIsSynch = 0x10, //-- is set on mount when the drive is synchronous (doesn't have its own thread)
541 CMountCB* iCurrentMount;
542 TDrive* iSubstedDrive;
544 CFsObjectCon* iMount;
546 TDriveExtInfo iExtInfo;
547 TInt iDriveFlags; ///< intrinsic TDrive flags
550 TInt iMountFailures; // number of times the mount has failed
551 TInt iLastMountError;
557 friend class LocalDrives; // for access to iChanged flag
558 friend class CExtNotifyMediaChange; // for access to iChanged flag
564 __ASSERT_COMPILE(sizeof(TVolFormatParam) != sizeof(TLDFormatInfo));
572 A file server interface class representing a mount.
574 An instance of this object is referred to as a mount control block.
576 A mount control block needs to be created for a specific volume (partition) on
577 a drive in order to be able to access that volume. Volumes may be permanent
578 or represent removable media. Note that removable media may also be mounted directly onto
579 a device with no drive. Volumes can be formatted, unlike drives.
581 The volume represented is either a currently mounted volume in the system or,
582 in the case of removable volumes, a volume that has been removed but still has
583 subsession objects open.
585 A plug-in file system implements this class.
587 class CMountCB : public CFsDispatchObject
591 IMPORT_C ~CMountCB();
592 IMPORT_C TBool operator!=(const CMountCB& aMount) const;
593 IMPORT_C TBool MatchEntryAtt(TUint anAtt,TUint aMatt) const;
594 IMPORT_C void SetDiskSpaceChange(TInt64 aFreeDiskSpace);
595 IMPORT_C void InitL(TDrive& aDrive, CFileSystem* apFileSystem);
597 inline TDrive& Drive() const;
598 inline void SetDrive(TDrive* aDrive);
599 inline HBufC& VolumeName() const;
600 inline void SetVolumeName(HBufC* aName);
601 inline TBool GetNotifyUser() const;
602 inline void SetNotifyOn();
603 inline void SetNotifyOff();
604 inline void IncLock();
605 inline void DecLock();
606 inline TInt LockStatus() const;
607 inline TBool IsCurrentMount() const;
608 inline TBool Locked() const;
609 inline TInt64 Size() const;
610 inline TInt LocalDrive(TBusLocalDrive*& aLocalDrive);
611 inline TInt ProxyDrive(CProxyDrive*& aProxyDrive);
612 inline TInt LocalBufferSupport(CFileCB* aFile = NULL);
613 inline TInt AddToCompositeMount(TInt aMountIndex);
618 Attempts to set the mount control block properties using
619 the current mount (i.e. volume) on the associated drive.
621 The function should set the volume name (iVolumeName),
622 the unique ID (iUniqueID) and the volume size (iSize)
623 by reading and processing the current mount.
625 When aForceMount is set to ETrue, the properties of a corrupt volume should
626 be forcibly stored. The classic case of when this is desirable is when
627 a corrupt volume needs to be formatted.
629 The function should leave, on error detection, with an appropriate error code.
631 @param aForceMount Indicates whether the properties of a corrupt
632 volume should be stored.
634 @leave KErrCorrupt The properties of the current mount on the drive were
635 not successfully mounted due to corruption of volume information,
636 assuming that aForceMount is not set.
638 virtual void MountL(TBool aForceMount) =0;
642 Checks whether the mount control block represents the current mount on
643 the associated drive.
645 The function should read mount information from the current volume,
646 and check it against the mount information from this mount - typically
647 iVolumeName and iUniqueID. If the mount information matches, the function
648 should return KErrNone, otherwise it should return KErrGeneral.
650 Called by the associated TDrive object when the drive has no current mounts,
651 which is the case on first access to the drive and following a volume
652 change on a drive associated with removable media. In this circumstance,
653 this function is called systematically on every mount control block owned
654 by the drive. If ReMount() calls for all existing mount
655 control blocks fail, the drive creates a new mount control block and calls
656 CMountCB::MountL() on that object; the new object is added to the list of
657 mount control blocks owned by the drive.
659 @return KErrNone if the mount represented by this object is found to be
661 KErrGeneral if this object is found not to represent
663 otherwise one of the other sytem wide error codes.
665 virtual TInt ReMount() =0;
669 Carries out any clean-up necessary for a volume dismount.
671 Dismounting a volume will always succeed, so the function does not need
672 to return an error value. Any cached information should be discarded and no
673 attempt should be made to access the volume. For removable media it may be
674 that the media has already been removed. This function is called when
675 a media change is detected.
677 virtual void Dismounted() =0;
681 Gets volume information.
683 The only information that the function has to supply is the free space,
684 TVolumeInfo::iFree, since the remaining members have already been set by
685 the calling function.
687 The function should leave, on error detection, with
688 an appropriate error code.
690 @param aVolume On return, a reference to the filled volume
693 virtual void VolumeL(TVolumeInfo& aVolume) const =0;
697 Sets the volume name for the mount, thus writing the new volume name
698 to the corresponding volume.
700 This function should leave on error detection.
702 @param aName A reference to a descriptor containing the new volume name.
704 @leave KErrBadName If the specified volume name is longer than the maximum
705 allowed length for a volume name
707 virtual void SetVolumeL(TDes& aName) =0;
711 Creates a new directory on the mount.
713 The directory to be created is identified through its full name in aName.
714 The full name is in the form:
716 \\dirA\\dirB\\dirC\\dirD
718 where dirD is the new directory to be created in \\dirA\\dirB\\dirC\\.
719 This means that dirC is the leaf directory in which dirD will be created.
721 The function should leave, on error detection, with an appropriate
724 @param aName A reference to a descriptor containing the full name of
725 the directory to be created.
727 @leave KErrPathNotFound Part of the path in aName does not exist.
728 @leave KErrAlreadyExists dirD already exists in \\dirA\\dirB\\dirC\\
729 @leave KErrAccessDenied dirD already exists but is not a directory.
730 @leave KErrDirFull There is no room in \\dirA\\dirB\\dirC\\ for the new entry,
731 which is especially applicable to the root directory.
733 virtual void MkDirL(const TDesC& aName) =0;
737 Removes the directory specified by aName (its full name) from the volume.
739 The directory specified by aName is in the form:
741 \\dirA\\dirB\\dirC\\dirD
743 where dirD is the directory to be removed from \\dirA\\dirB\\dirC\\.
744 This means that dirC is the leaf directory from which dirD should be removed.
746 The function can assume that the directory exists and is not read-only.
748 The function should leave with a suitable error code if it cannot complete
749 successfully for any reason.
751 @param aName A reference to a descriptor containing the full name of
752 the directory to be removed.
754 @leave KErrInUse dirD contains entries other than the parent (..)
755 and current (.) entries.
757 virtual void RmDirL(const TDesC& aName) =0;
761 Deletes the specified file from the mount.
763 The function can assume that the file is closed.
765 The file name specified by aName is of the form:
767 \\dirA\\dirB\\dirC\\file.ext
770 The extension is optional.
772 The function should leave on error detection, with
773 an appropriate error code.
775 @param aName A reference to a descriptor containing the full path name
776 of the file that will be removed.
778 @leave KErrAccessDenied aName specifies a file whose attributes state that
779 the file is read-only or aName specifies a directory.
781 virtual void DeleteL(const TDesC& aName) =0;
785 Renames or moves a single file or directory on the mount.
787 It can be used to move a file or directory since both
788 anOldName and anNewName specify the respective entries with full names;
791 \\dirA\\dirB\\dirC\\oldEntryName
797 \\dirE\\dirF\\dirG\\newEntryName
800 If oldEntryName is a file, it can be assumed that it is closed.
801 If oldEntryName is a directory, it can be assumed that there are no
802 open files in this directory. Furthermore, if newEntryName specifies
803 a directory, it can be assumed that it is not a subdirectory of oldEntryName.
805 The function should leave with an appropriate error code if it cannot
806 complete successfully for any reason.
808 @param anOldName A reference to a descriptor containing the full entry
809 name of the entry to be renamed.
811 @param anNewName A reference to a descriptor containing the new full entry
812 name for the entry to be renamed.
814 @leave KErrAlreadyExists The new entry already exists.
816 virtual void RenameL(const TDesC& anOldName,const TDesC& anNewName) =0;
820 Replaces one file on the mount with another.
822 The function can assume that both anOldName and, if it exists, anNewName
823 contain the full file names of files, and that these files are not open.
825 If the file aNewName does not exist it should be created.
827 The file anOldName should have its contents, attributes, and the universal
828 date and time of its last modification, copied to the file aNewName,
829 overwriting any existing contents and attribute details.
830 Finally anOldName should be deleted.
832 The function should leave with an appropriate error code if it cannot
833 complete successfully for any reason.
835 @param anOldName A reference to a descriptor containing the full file name
836 of the file to replace the file specified by anNewName
837 @param anNewName A reference to a descriptor containing the new full file
838 name for the entry to be replaced.
840 virtual void ReplaceL(const TDesC& anOldName,const TDesC& anNewName) =0;
844 Gets the entry details for the specified file or directory.
846 anEntry should be filled with details from the file or directory with the
847 full name aName. aName is of the form
849 \\dirA\\dirB\\dirC\\entry.
852 Note that anEntry.iType (the entry UID) should only be set for a file whose
853 size is greater than or equal to sizeof(TCheckedUid).
855 The function should leave with an appropriate error code if it cannot
856 complete successfully for any reason.
858 @param aName A reference to a descriptor containing the full name of
859 the entry whose details are required.
860 @param anEntry On return, a reference to the filled entry object.
862 @leave KErrPathNotFound The entry, aName, cannot be found.
864 virtual void EntryL(const TDesC& aName,TEntry& anEntry) const =0;
868 Sets entry details for a specified file or directory.
870 The entry identfied by the full name descriptor aName should have
871 its modification time and its attributes mask updated as required.
873 The entry receives a new universal modified time from aTime.
874 The entry attributes are set with aSetAttMask and cleared
876 the bits that are set in aSetAttMask should be set
877 in the entry attribute mask;
878 the bits that are set in aClearAttMask
879 should be cleared from the entry attribute mask.
881 The function can assume that aSetAttMask and aClearAttMask do not change
882 the type of attribute (i.e. volume or directory). Furthermore, if aName
883 specifies a file, it can be assumed that this file is closed.
885 The function should leave with an appropriate error code on error detection.
887 @param aName A reference to a descriptor containing the full name of
888 the entry to be updated.
889 @param aTime A reference to the time object holding the new universal
890 modified time for aName.
891 @param aSetAttMask Attribute mask for setting the entry's attributes.
892 @param aClearAttMask Attribute mask for clearing the entry's attributes.
894 virtual void SetEntryL(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask) =0;
898 Customises the opening of a new or existing file on the mount.
900 The function is called internally (via TDrive::FileOpen()) as a result of
901 a call by the client, and the file is created, if necessary, and opened by
902 the calling function. However this function implements any replacement
903 functionality, as well as any other behaviour particular to the file system.
905 If anOpen specifies EFileReplace (rather than EFileCreate or EFileOpen) then,
906 if replacement functionality is required, the data contained in the file
907 should be discarded, the archive attribute should be set, and the size of
908 the file should be set to zero. Note that it can be assumed that if anOpen
909 specifies EFileReplace then the file already exists.
911 After successful completion of the function, the file control block pointer
912 will be added to the file server's global files container.
914 The function should leave with a suitable error code if it cannot be completed
917 @param aName The full name of the file that will be opened.
918 @param aMode The file share mode. The following share modes are available:
920 EFileShareReadersOnly;
922 EFileShareReadersOrWriters;
927 @param anOpen IndicatES how the file will be opened. It can be one of
932 @param aFile Pointer to the file control block which will, on success,
933 represent the open file.
935 @leave KErrAccessDenied aName may specify a directory, or the function may
936 be attempting to open a file on a ROM drive.
938 virtual void FileOpenL(const TDesC& aName,TUint aMode,TFileOpen anOpen,CFileCB* aFile) =0;
942 Customises the opening of a directory on the mount.
944 The function is called internally, and the directory will have been created
945 and initialised by the calling function. Any customisation specific to
946 a file system should be implemented in this function.
948 Note that aName is of the form
950 \\dirA\\dirB\\dirC\\file.ext
953 where \\dirA\\dirB\\dirC\\ is the directory to be opened and file.ext is
954 an optional entry name and extension.
956 After successful completion of the function, the directory control block
957 pointer will be added to the file server global directories container.
959 The function should leave with a suitable error code if it cannot complete
960 successfully for any reason.
962 @param aName A reference to a descriptor containing the full name of
963 the directory that will be opened.
964 @param aDir Points to a directory control block which will, on success,
965 represent the open directory.
967 virtual void DirOpenL(const TDesC& aName,CDirCB* aDir) =0;
971 Reads the specified length of data from the specified position on
972 the volume directly into the client thread.
974 It can be assumed that if this function is called,
975 then there has been a successful mount.
977 This function should leave with an appropriate error code when
978 an error is detected.
980 @param aPos Start position in the volume for the read operation,
982 @param aLength The number of bytes to be read.
983 @param aTrg A pointer to the buffer into which data is to be read.
984 @param anOffset The offset at which to start adding data to the read buffer.
987 virtual void RawReadL(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt anOffset,const RMessagePtr2& aMessage) const = 0;
991 Writes a specified length of data from the client thread to the volume
992 at the specified position.
994 It can be assumed that if this function is called, then there has been
997 This function should leave with an appropriate error code when
998 an error is detected.
1000 @param aPos Start position in the volume for the write operation,
1002 @param aLength The number of bytes to be written.
1003 @param aSrc Pointer to the buffer from which data will be written.
1004 @param anOffset The offset in the buffer at which to start writing data.
1007 virtual void RawWriteL(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt anOffset,const RMessagePtr2& aMessage) = 0;
1011 Gets the short name of the file or directory with the given full name.
1013 This function is used in circumstances where a file system mangles
1014 Symbian OS natural names, in order to be able to store them on
1015 a file system that is not entirely compatible.
1017 The function should leave with a suitable error code if it cannot complete
1018 successfully for any reason.
1020 @param aLongName A reference to a descriptor containing the full name
1022 @param aShortName On return, a reference to a descriptor containing
1023 the short name of the entry.
1025 @leave KErrNotFound The entry specified by its long name cannot be found.
1027 virtual void GetShortNameL(const TDesC& aLongName,TDes& aShortName) = 0;
1031 Gets the long name of the file or directory associated with
1032 the given short name.
1034 This function is used in circumstances where a file system mangles
1035 Symbian OS natural names in order to be able to store them on
1036 a file system that is not entirely compatible.
1038 The function should leave with a suitable error code if it cannot complete
1039 successfully for any reason.
1041 @param aShorName A reference to a descriptor containing the short name
1044 @param aLongName On return, a reference to a descriptor containing
1045 the long name of the entry.
1047 @leave KErrNotFound The entry specified by its short name cannot be found.
1049 virtual void GetLongNameL(const TDesC& aShorName,TDes& aLongName) = 0;
1053 Reads a specified section of the file, regardless of the file's lock state.
1055 The function should leave with a suitable error code if it cannot complete
1056 successfully for any reason.
1058 @param aName A reference to a descriptor containing the full name of
1059 the file to be read from
1060 @param aPos The byte position to start reading from.
1061 @param aTrg A pointer to the buffer into which data is to be read.
1062 @param aLength The length of data to be read, in bytes.
1065 @leave KErrEof aPos is past the end of the file.
1067 virtual void ReadSectionL(const TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage)=0;
1071 Checks the integrity of the file system on the volume and returns an appropriate error value.
1072 The default implementation must be overridden by a derived class.
1074 @return KErrNone if the file system is stable; otherwise one of the other system wide error codes.
1075 The default implementation returns KErrNotSupported.
1077 virtual TInt CheckDisk() {return(KErrNotSupported);}
1080 The same as original CheckDisk(), but with some parameters.
1082 virtual TInt CheckDisk(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1086 Scans through and corrects errors found in the volume.
1088 The default implementation must be overridden by a derived class.
1090 @return KErrNone if no errors are found or all errors are corrected; otherwise one of the other system wide error codes.
1091 The default implementation returns KErrNotSupported.
1093 virtual TInt ScanDrive() {return(KErrNotSupported);}
1096 The same as original ScanDrive(), but with some parameters.
1098 virtual TInt ScanDrive(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1100 IMPORT_C virtual void IsFileInRom(const TDesC& aFileName,TUint8*& aFileStart);
1104 Low-level control IO
1106 virtual TInt ControlIO( const RMessagePtr2& /*aMessage*/,TInt /*aCommand*/,TAny* /*aParam1*/,TAny* /*aParam2*/) {return(KErrNotSupported);}
1110 Locks a media which supports password protection and replaces
1111 the old password with a new one.
1113 If aStore is set to ETrue, then the new password should be saved to
1114 the password store file, KMediaPWrdFile, using the exported file server
1115 function WriteToDisk().
1117 The password file is used to initialise the password store on boot up,
1118 so the user does not need to be prompted for the password again if
1121 The default implementation must be overridden in a derived class.
1123 @param aOld A reference to the old password.
1124 @param aNew A reference to the new password.
1125 @param aStore ETrue if the new password is to be saved to
1126 the password file store; EFalse if not.
1128 @return KErrNone if successful; otherwise another of the system wide
1129 error codes. The default implementation returns KErrNotSupported.
1131 virtual TInt Lock(TMediaPassword& /*aOld*/,TMediaPassword& /*aNew*/,TBool /*aStore*/) {return(KErrNotSupported);}
1135 Unlocks a media which supports password protection.
1137 If aStore is set to ETrue then the password should be saved to
1138 the password store file specified by KMediaPWrdFile using the exported file
1139 server function WriteToDisk().
1141 The password file is used to initialise the password store on boot up,
1142 so the user does not need to be prompted for the password again if
1145 The default implementation must be overridden in a derived class.
1147 @param aPassword A reference to the password.
1148 @param aStore ETrue if the password is to be saved to
1149 the password store file; EFalse otherwise.
1151 @return KErrNone if successful; otherwise another of the system wide
1152 error codes. The default implementation returns KErrNotSupported.
1154 virtual TInt Unlock(TMediaPassword& /*aPassword*/,TBool /*aStore*/) {return(KErrNotSupported);}
1158 Clears a password from a media that supports write protection.
1160 The default implementation must be overridden in a derived class.
1162 @param aPassword A reference to the password to be cleared.
1164 @return KErrNone if successful; otherwise another of the system wide
1165 error codes. The default implementation returns KErrNotSupported.
1167 virtual TInt ClearPassword(TMediaPassword& /*aPassword*/) {return(KErrNotSupported);}
1172 virtual TInt ForceRemountDrive(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoMessageHandle*/,TUint /*aFlags*/) {return(KErrNotSupported);}
1176 Legacy method: finalise the mount and put it to the consistent state.
1178 virtual void FinaliseMountL() {return;}
1181 finalise the mount and put it to the consistent state.
1183 @param aOperation describes finalisation operation, see RFs::TFinaliseDrvMode
1184 @param aParam1 not used, for future expansion
1185 @param aParam2 not used, for future expansion
1187 virtual void FinaliseMountL(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1191 /** Mount Control levels or operations to perform */
1194 //-- reserved generic mount (CMountCB) control codes
1196 EMountStateQuery, ///< query mount state, see TMntCtlOption, ESQ_IsMountFinalised
1197 EMountVolParamQuery, ///< mount-specific queries for volume parameters. See ESQ_RequestFreeSpace, ESQ_GetCurrentFreeSpace
1198 ECheckFsMountable, ///< extended mount functionality, checks if this file system can be mounted on specified drive. See CheckFileSystemMountable()
1200 //-- starting from the next code someone may define some specific mount type control codes, like ESpecificMountCtl+17
1201 ESpecificMountCtl = 0x40000000,
1203 //-- starting from the next code someone may define some specific File System control codes
1204 ESpecificFsCtl = 0x40001000,
1206 EMountFsParamQuery, ///< File System parameters queries; File System properties can be "static" i.e not requiring properly mounted volume. See ESpecificFsCtlOpt
1210 /** Mount Control options that makes sense only for certain control codes, see TMntCtlLevel */
1213 //-- reserved generic mount (CMountCB) control options codes
1215 /** query if the mount is finalised, corresponds to the EMountStateQuery control code only. @see IsMountFinalised() */
1216 ESQ_IsMountFinalised,
1218 //-----------------------------------------------------------------------------------------------------------------------------
1220 //-- starting from the next code someone may define some specific mount type control options
1221 ESpecificMountCtlOpt = 0x40000000,
1223 /** Corresponds to EMountVolParamQuery. Request a certain amount of free space on the volume. @see RequestFreeSpace() */
1224 ESQ_RequestFreeSpace,
1226 /** Corresponds to EMountVolParamQuery. A request to obtain the _current_ amount of free space on the volume asynchronously, without blocking. */
1227 ESQ_GetCurrentFreeSpace,
1229 /** Corresponds to EMountVolParamQuery. A request to obtain size of the mounted volume without blocking (CMountCB::VolumeL() can block). */
1230 ESQ_MountedVolumeSize,
1232 //-----------------------------------------------------------------------------------------------------------------------------
1234 //-- starting from the next code someone may define some specific File System control options
1235 ESpecificFsCtlOpt = 0x40001000,
1237 /** Get Maximum file size, which is supported by the file system that has produced this mount. */
1238 ESQ_GetMaxSupportedFileSize,
1246 Generic mount control method.
1247 @param aLevel specifies the operation to perfrom on the mount
1248 @param aOption specific option for the given operation
1249 @param aParam pointer to generic parameter, its meaning depends on aLevel and aOption
1251 @return standard error code. Default imlementation returns KErrNotSupported
1253 virtual TInt MountControl(TInt aLevel, TInt aOption, TAny* aParam);
1257 Erase a password from a media that supports write protection.
1259 The default implementation must be overridden in a derived class.
1261 @return KErrNone if successful; otherwise another of the system wide
1262 error codes. The default implementation returns KErrNotSupported.
1264 virtual TInt ErasePassword() {return(KErrNotSupported);}
1267 An interface class which may optionally be returned by a file system
1268 by calling GetInterface(EFileAccessor, ...)
1273 virtual TInt GetFileUniqueId(const TDesC& aName, TInt64& aUniqueId) = 0;
1274 virtual TInt Spare3(TInt aVal, TAny* aPtr1, TAny* aPtr2) = 0;
1275 virtual TInt Spare2(TInt aVal, TAny* aPtr1, TAny* aPtr2) = 0;
1276 virtual TInt Spare1(TInt aVal, TAny* aPtr1, TAny* aPtr2) = 0;
1282 CMountCB::MFileExtendedInterface interface provides extended interface for CMountCB to
1283 read a specified section of large file (size greater than 2GB - 1).
1285 The interface could be retrieved by calling CMountCB::GetInterface() with
1286 EFileExtendedInterface as an argument.
1288 Sub classes of CMountCB who does support large file access will need to multiple-inherit
1289 with this class and implement the interface. The implementation of the interface will be
1290 retrieved via GetInterface() and provided to user by non-virtual APIs to avoid breaking
1291 binary compatibility.
1293 NOTE: Do not try to delete CMountCB::MFileExtendedInterface interface pointer!
1295 @see CMountCB::GetInterface()
1298 class MFileExtendedInterface
1302 Reads a specified section of the file, regardless of the file's lock state.
1304 The function should leave with a suitable error code if it cannot complete
1305 successfully for any reason.
1307 This function should be implemented in file systems supporting files
1308 of size greater than 2GB - 1.
1310 @param aName A reference to a descriptor containing the full name of
1311 the file to be read from
1312 @param aPos The byte position to start reading from.
1313 @param aTrg A pointer to the buffer into which data is to be read.
1314 @param aLength The length of data to be read, in bytes.
1317 @leave KErrEof aPos is past the end of the file.
1319 @see CMountCB::ReadSectionL()
1321 virtual void ReadSection64L(const TDesC& aName, TInt64 aPos, TAny* aTrg, TInt aLength, const RMessagePtr2& aMessage) = 0;
1325 Enumeration of the aInterfaceIDs used in GetInterface.
1329 EAddFsToCompositeMount = 0,
1332 EGetFileSystemSubType = 3,
1333 EGetClusterSize = 4,
1334 ELocalBufferSupport = 5,
1335 EAddToCompositeMount = 6,
1337 EFileExtendedInterface = 8
1340 // File clamping support
1341 TInt ClampFile(const TInt aDriveNo,const TDesC& aName,TAny* aHandle);
1342 TInt UnclampFile(RFileClamp* aHandle);
1343 IMPORT_C TInt IsFileClamped(const TInt64 aUniqueId);
1346 // File accessor support
1347 TInt GetFileUniqueId(const TDesC& aName, TInt64& aUniqueId);
1348 TInt Spare3(TInt aVal, TAny* aPtr1, TAny* aPtr2);
1349 TInt Spare2(TInt aVal, TAny* aPtr1, TAny* aPtr2);
1350 TInt Spare1(TInt aVal, TAny* aPtr1, TAny* aPtr2);
1352 // Extensions of interface
1353 TInt FileSystemSubType(TDes& aName);
1354 TInt FileSystemClusterSize();
1355 void FileSystemName(TDes& aName);
1357 // Large file support
1358 void ReadSection64L(const TDesC& aName,TInt64 aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage);
1360 inline TInt CheckFileSystemMountable();
1361 inline TInt RequestFreeSpace(TUint64 &aFreeSpaceBytes);
1362 inline TInt MountedVolumeSize(TUint64& aVolSizeBytes);
1363 inline TInt GetCurrentFreeSpaceAvailable(TInt64 &aFreeSpaceBytes);
1364 inline TInt IsMountFinalised(TBool &aFinalised);
1365 inline TInt GetMaxSupportedFileSize(TUint64 &aSize);
1368 inline void SetMountNumber(TInt aMountNumber);
1369 inline void SetDismounted(TBool aDismounted=ETrue);
1370 inline TInt MountNumber() const;
1371 inline TBool IsDismounted() const;
1373 void SetProxyDriveDismounted();
1374 TBool ProxyDriveDismounted();
1376 IMPORT_C CFileSystem* FileSystem() const;
1379 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1380 binary compatibility.
1381 @param aInterfaceId Interface identifier of the interface to be retrieved.
1382 @param aInterface A reference to a pointer that retrieves the specified interface.
1383 @param aInput An arbitrary input argument.
1384 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1386 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1388 // calls GetInterface() with tracepoints added
1389 TInt GetInterfaceTraced(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1395 void SetFileSystem(CFileSystem* aFS);
1397 //-- these factory methods mus be used to produce objects representing files, directories etc. as soon as all these objects are
1398 //-- associated with the mount, not the file sytem (file system is a factory for corresponding mounts)
1399 //-- corresponding CFileSystem:: methods must not be used.
1400 //-- CMountCB has a reference to the CFileSystem that produced it.
1401 CFileCB* NewFileL() const;
1402 CDirCB* NewDirL() const;
1403 CFormatCB* NewFormatL() const;
1407 TInt iMountNumber; ///< Unique mount number set by the TDrive object representing the drive on which the object resides.
1408 TUint iUniqueID; ///< volume Unique ID. Set in MountL().
1409 TInt64 iSize; ///< Size of the volume. First set in MountL().
1412 A list of all open files on that mount.
1413 Set by the TDrive object representing the drive of which the mount resides.
1415 TDblQue<CFileCB> iMountQ;
1417 friend class TDrive;
1418 friend class TFsAddCompositeMount;
1424 CMountBody* iBody; ///< used for extending CMountCB functionality
1431 MFileSystemSubType interface provides extended interface for CMountCB to retrieve sub type
1432 of mounted file systems.
1434 The interface could be retrieved by calling CMountCB::GetInterface() with EGetFileSystemSubType
1437 If the file system does not support sub types, MFileSystemSubType cannot be retieved.
1438 Sub classes of CMountCB who does support sub types will need to multiple-inherit with
1439 this class and implement the interface. The implementation of the interface will be
1440 retrieved via GetInterface() and provided to user by non-virtual APIs to avoid breaking
1441 binary compatibility.
1443 NOTE: Do not try to delete MFileSystemSubType interface pointer!
1445 @see CMountCB::GetInterface()
1447 class MFileSystemSubType
1451 Retrieves file system's sub type name (E.g. FAT16), if the file system does not have sub
1452 types (E.g. Rofs), return the file system's name.
1453 @param aName Returned descriptor contains file system name or sub type name.
1454 @return KErrNone if successful.
1456 virtual TInt SubType(TDes& aName) const = 0;
1462 MFileSystemClusterSize interface provides extended interface for CMountCB to retrieve cluster size
1463 of mounted file systems.
1465 The interface could be retrieved by calling CMountCB::GetInterface() with EGetClusterSize
1468 If the file system does not support clustering, MFileSystemClusterSize cannot be retieved.
1469 Sub classes of CMountCB who does support clustering will need to multiple-inherit with
1470 this class and implement the interface. The implementation of the interface will be
1471 retrieved via GetInterface() and provided to user by non-virtual APIs to avoid breaking
1472 binary compatibility.
1474 NOTE: Do not try to delete MFileSystemSubType interface pointer!
1476 @see CMountCB::GetInterface()
1478 class MFileSystemClusterSize
1482 Retrieves file system's cluster size
1483 @return None-zero cluster size if successful.
1485 virtual TInt ClusterSize() const = 0;
1496 class TAsyncReadRequest
1499 TAsyncReadRequest(TInt64 aEndPos, CFileShare* aOwningShareP, CFsRequest* aRequestP);
1500 TBool CompleteIfMatching(CFileShare* aOwningShareP, TRequestStatus* aStatusP, TInt aError);
1502 TAsyncReadRequest();
1504 TInt64 iEndPos; // The request is completed file length >= iEndPos.
1505 CFileShare* iOwningShareP; // The share that owns this outstanding request.
1506 const TRequestStatus* iStatusP; // Used to identify the request when cancelling.
1507 CSessionFs* iSessionP; // The owning session of the original request.
1508 RMessage2 iMessage; // The message to be completed when data is available.
1518 The lock specifies the lowest and highest position in the file to be locked.
1519 Note that files may have many locks on it, but overlapping sections cannot be locked.
1520 This is used by a file control block, a CFileCB object.
1524 class TFileShareLock
1527 TFileShareLock(const CFileShare* aOwner, TUint64 aPosLow, TUint64 aPosHigh);
1530 inline TUint64 PosLow() const;
1531 inline TUint64 PosHigh() const;
1532 inline TBool MatchOwner(const CFileShare* aShare) const;
1534 TBool MatchByPos(TUint64 aPosLow, TUint64 aPosHigh) const;
1538 TFileShareLock(const TFileShareLock&);
1539 TFileShareLock& operator=(const TFileShareLock&);
1543 const CFileShare* iOwner; ///<The owning file share object.
1544 TUint64 iPosLow; ///<The start of the section of the file to be locked.
1545 TUint64 iPosHigh; ///<The end of the section of the file to be locked.
1547 friend class CFileCB;
1550 /** @internalTechnology */
1551 typedef RArray<TFileShareLock> TFileLocksArray;
1558 A file server interface class representing an open file.
1560 An instance of this object is referred to as a file control block.
1562 A file control block needs to be created for a specific file to be able to
1563 access that file within a directory.
1565 A plug-in file system implements this class.
1567 class CFileCB : public CFsDispatchObject
1571 IMPORT_C ~CFileCB();
1573 IMPORT_C void InitL(TDrive* aDrive,TDrive* aCreatedDrive, HBufC* aName);
1575 inline void SetMount(CMountCB * aMount);
1576 inline TDrive& Drive() const;
1577 inline TDrive& CreatedDrive() const;
1578 inline CMountCB& Mount() const;
1579 inline HBufC& FileName() const;
1580 inline HBufC& FileNameF() const;
1581 inline TInt UniqueID() const;
1582 TInt FindLock(TInt aPosLow,TInt aPosHigh);
1583 TInt AddLock(CFileShare* aFileShare,TInt aPos,TInt aLength);
1584 TInt RemoveLock(CFileShare* aFileShare,TInt aPos,TInt aLength);
1585 TInt CheckLock(CFileShare* aFileShare,TInt aPos,TInt aLength);
1586 void RemoveLocks(CFileShare* aFileShare);
1587 inline TShare Share() const;
1588 inline void SetShare(TShare aShare);
1589 inline TInt Size() const;
1590 inline void SetSize(TInt aSize);
1591 inline TInt Att() const;
1592 inline void SetAtt(TInt aAtt);
1593 inline TTime Modified() const;
1594 inline void SetModified(TTime aModified);
1595 inline TBool FileCorrupt() const;
1596 inline void SetFileCorrupt(TBool aFileCorrupt);
1597 inline TBool BadPower() const;
1598 inline void SetBadPower(TBool aBadPower);
1599 inline TUint32 NameHash() const;
1601 inline TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos=-1);
1602 inline TInt LocalDrive(TBusLocalDrive*& aLocalDrive);
1604 TBool LocalBufferSupport() const;
1605 void SetLocalBufferSupport(TBool aEnabled);
1607 /** File caching support methods */
1609 CFileCache* FileCache() const;
1610 TInt FairSchedulingLen() const;
1611 void ResetReadAhead();
1613 void SetDeleteOnClose();
1614 TBool DeleteOnClose() const;
1618 void SetNotifyAsyncReadersPending(TBool aNotifyAsyncReadersPending);
1619 TBool NotifyAsyncReadersPending() const;
1620 TInt CancelAsyncReadRequest(CFileShare* aShareP, TRequestStatus* aStatusP);
1622 /** Extended API support methods */
1624 TBool ExtendedFileInterfaceSupported();
1625 void ReadL(TInt64 aPos,TInt& aLength,TDes8* aDes,const RMessagePtr2& aMessage, TInt aOffset);
1626 void WriteL(TInt64 aPos,TInt& aLength,const TDesC8* aDes,const RMessagePtr2& aMessage, TInt aOffset);
1627 void SetSizeL(TInt64 aSize);
1629 IMPORT_C TInt64 Size64() const;
1630 IMPORT_C void SetSize64(TInt64 aSize, TBool aDriveLocked);
1631 IMPORT_C void SetMaxSupportedSize(TUint64 aMaxFileSize);
1634 TInt64 CachedSize64() const;
1635 void SetCachedSize64(TInt64 aSize);
1636 TInt FindLock64(TInt64 aPosLow,TInt64 aPosHigh);
1637 TInt AddLock64(CFileShare* aFileShare,TInt64 aPos,TInt64 aLength);
1638 TInt RemoveLock64(CFileShare* aFileShare,TInt64 aPos,TInt64 aLength);
1639 TInt CheckLock64(CFileShare* aFileShare,TInt64 aPos,TInt64 aLength);
1642 Renames the file with the full file name provided.
1644 Because the full name of the file includes the path, the function can
1645 also be used to move the file.
1647 It can be assumed that no other sub-session has access to the file:
1648 i.e. the file has not been opened in EFileShareAny share mode.
1649 It can also be assumed that the file has been opened for writing.
1651 The function should leave with KErrAlreadyExists if aNewName already exists.
1652 An appropriate error code should also be generated if the function leaves
1653 before completion for any other reason.
1655 @param aNewName The new full name of the file.
1657 @see CFileCB::iFileName
1659 virtual void RenameL(const TDesC& aNewName) =0;
1663 Reads a specified number of bytes from the open file starting at
1664 the specified postition, and writes the result into a descriptor.
1666 It can be assumed that aPos is inside the file and aLength > 0.
1667 The file should only be read up to its end regardless of
1668 the value of aPos + aLength. The number of bytes read should be stored
1669 in aLength on return.
1671 If the function leaves before completion for any reason it should generate
1672 an appropriate error code, and in this situation,
1673 the arguments are not valid on return.
1675 @param aPos Represents a position relative to the start of the file
1676 where ReadL() should start to read.
1677 @param aLength On entry, specifies the number of bytes to be read
1678 from the file. On return, this should contain the number
1679 of bytes read, but this is not valid if the function leaves.
1680 @param aDes Pointer to a descriptor into which the data should be written.
1683 virtual void ReadL(TInt aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage) =0;
1687 Writes data to the open file.
1689 iModified and iSize are set by the file server after this function
1690 has completed successfully.
1692 It can be assumed that aPos is within the file range and aLength > 0.
1693 When aPos + aLength is greater than the file size then the file should
1694 be enlarged using SetSizeL(). The number of bytes written should be
1695 returned through the argument aLength.
1697 If the function leaves before completion for any reason it should generate
1698 an appropriate error code, and in this situation the arguments are
1699 not valid on return.
1701 @param aPos Represents a position relative to the start of the file
1702 where WriteL() should start to write.
1703 @param aLength Specifies the number of bytes to be written to the file.
1704 On return, the number of bytes written, but this is not
1705 valid if the function leaves.
1706 @param aDes Pointer to a descriptor containing the data to be written
1710 @see CFileCB::iModified
1712 @see CFileCB::SetSizeL
1714 @leave KErrDiskFull The operation cannot be completed because the disk is full.
1716 virtual void WriteL(TInt aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage) =0;
1720 Extends or truncates the file by re-setting the file size.
1722 The function should not change iModified and iSize attributes of
1723 the file object: this is done by the file server.
1724 If the file is extended, nothing should be written in the extended area.
1726 The function should leave with a suitable error code on error detection.
1728 @param aSize The new file size in number of bytes.
1730 @leave KErrDiskFull The operation cannot be completed because the disk is full.
1732 @see CFileCB::iModified
1735 virtual void SetSizeL(TInt aSize) =0;
1739 Sets the attribute mask, iAtt, and the modified time of the file, iModified.
1741 If aMask|aVal does not equal zero, then aMask should be OR'ed with iAtt,
1742 whilst the inverse of aVal should be AND'ed with iAtt.
1743 If the modified flag is set in aMask then iModified should be set to aTime.
1745 The function should leave with a suitable error code on error detection.
1747 @param aTime The new modified time, if the modified flag is set in aMask.
1748 @param aMask Bit mask containing bits set (to 1) that are to be set (to 1)
1750 @param aVal Bitmask containing bits set (to 1) that are to be unset (to 0)
1753 @see CFileCB::iModified
1756 virtual void SetEntryL(const TTime& aTime,TUint aMask,TUint aVal) =0;
1760 Flushes, to disk, the cached information necessary for the integrity
1761 of recently written data, such as the file size.
1763 The function should leave with a suitable error code on error detection.
1765 virtual void FlushDataL() =0;
1769 Flushes, to disk, all cached file data (e.g. attributes, modification time,
1772 The modified bit in the file attributes mask should be cleared if
1773 the flush was successful.
1775 The function should leave with a suitable error code on error detection.
1777 virtual void FlushAllL() =0;
1778 IMPORT_C virtual TInt Address(TInt& aPos) const;
1779 IMPORT_C void SetArchiveAttribute();
1782 Block Map API interface
1784 class MBlockMapInterface
1787 virtual TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos)=0;
1791 An interface class which may optionally be returned by a file system
1792 by calling GetInterface(EExtendedFileInterface, ...)
1793 The purpose of this interface is twofold:
1794 - to support fair scheduling (by use of the aOffset parameter)
1795 - to enable large file support
1797 class MExtendedFileInterface
1801 Functionally equivalent to CFileCB::ReadL(), but supports large files and fair scheduling
1803 Reads a specified number of bytes from the open file starting at
1804 the specified postition, and writes the result into a descriptor.
1806 @param aPos Represents a position relative to the start of the file
1807 where ReadL() should start to read.
1808 Note that the filesystem may not support positions above KMaxTInt,
1809 in which case it leaves with KErrNotSupported.
1810 @param aLength On entry, specifies the number of bytes to be read
1811 from the file. On return, this contains the number
1812 of bytes read, this value is not valid if the function leaves.
1813 @param aDes Pointer to a descriptor into which the data is written.
1814 @param aMessage A reference to a client message or an RLocalMessage.
1815 @param aOffset The offset into the descriptor where the data is to be written.
1816 This is non-zero if the read was fair-scheduled
1821 virtual void ReadL(TInt64 aPos,TInt& aLength,TDes8* aDes,const RMessagePtr2& aMessage, TInt aOffset) = 0;
1824 Functionally equivalent to CFileCB::WriteL(), but supports large files and fair scheduling
1826 Writes data to the open file.
1828 @param aPos Represents a position relative to the start of the file
1829 where WriteL() starts to write.
1830 Note that the filesystem may not support positions above KMaxTInt,
1831 in which case it leaves with KErrNotSupported.
1832 @param aLength Specifies the number of bytes to be written to the file.
1833 On return this is the number of bytes written, this value is not
1834 valid if the function leaves.
1835 @param aDes Pointer to a descriptor containing the data to be written
1837 @param aMessage A reference to a client message or an RLocalMessage
1838 @param aOffset The offset into the descriptor where the data is to be read from.
1839 This is non-zero if the read was fair-scheduled
1841 @see CFileCB::WriteL
1844 virtual void WriteL(TInt64 aPos,TInt& aLength,const TDesC8* aDes,const RMessagePtr2& aMessage, TInt aOffset) = 0;
1847 Functionally equivalent to CFileCB::SetSizeL(), but supports large files
1849 Extends or truncates the file by re-setting the file size.
1851 The function does not change the iModified and iSize attributes of
1852 the file object: this is done by the file server.
1853 If the file is extended, nothing is written in the extended area.
1855 The function leaves with a suitable error code when an error is to detected.
1857 @param aSize The new file size in bytes.
1859 @leave KErrDiskFull The operation cannot be completed because the disk is full.
1861 @see CFileCB::SetSizeL
1862 @see CFileCB::iModified
1865 virtual void SetSizeL(TInt64 aSize) = 0;
1872 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1873 binary compatibility.
1874 @param aInterfaceId Interface identifier of the interface to be retrieved.
1875 @param aInterface A reference to a pointer that retrieves the specified interface.
1876 @param aInput An arbitrary input argument.
1877 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1879 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1881 // calls GetInterface() with tracepoints added
1882 TInt GetInterfaceTraced(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1887 EBlockMapInterface = 0,
1889 EExtendedFileInterface
1892 TUint64 MaxSupportedSize(void) const;
1895 inline TFileLocksArray& FileLocks();
1901 void DemoteShare(CFileShare* aFileShare);
1902 void PromoteShare(CFileShare* aFileShare);
1904 RArray<TAsyncReadRequest>& AsyncReadRequests();
1905 TInt AddAsyncReadRequest(CFileShare* aFileShareP, TInt64 aPos, TInt aLength, CFsRequest* aRequestP);
1906 void NotifyAsyncReaders();
1911 Inititally, the mode that the file was opened with, which defines the level
1912 of access allowed to the file. Set by the TDrive object
1913 (representing the drive on which the file resides) when the file
1914 control block is created.
1920 The size of the file. This is the low 32 bit part of the file size.
1921 The upper 32 bit part of the file size is saved on the file server side
1922 for File Systems supporting file size > 4GB - 1.
1923 File Systems supporting file size > 4GB - 1 shall use CFileCB::Size64()
1924 to query the file size and CFileCB::SetSize64() to set file size.
1930 The attributes of the file.
1936 The universal time at which the file was last modified.
1942 Indicates whether the file that the object represents is corrupt:
1943 true if it is corrupt, false otherwise.
1949 Indicates whether a recent access to the file that the object represents
1950 failed due to KErrBadPower.
1957 The full name of the file, including drive and extensions.
1962 The full name of the file, including drive and extensions - Folded.
1968 TDrive* iCreatedDrive;
1971 TFileLocksArray* iFileLocks; ///< an array of file position locks
1972 TDblQueLink iMountLink;
1977 friend class TDrive;
1978 friend class CMountCB;
1979 friend class CFileShare;
1980 friend class TFsFileRead;
1981 friend class TFsFileWrite;
1982 friend class TFsFileSetSize;
1983 friend class TFsFileReadCancel;
1984 friend class TFsFileDuplicate;
1985 friend class TFsFileRename;
1986 friend class CCompFileCB;
1987 friend class CFileCache;
1992 Helper class to construct a dummy RMessage2 object. This allows the file server to
1993 read and write local buffers to a file system's CFileCB-derived interface.
1997 class RLocalMessage : public RMessage2
2000 inline RLocalMessage();
2002 inline void InitHandle();
2003 inline void SetFunction(TInt aFunction);
2004 inline void SetArgs(TIpcArgs& aArgs);
2005 inline TInt Arg(TInt aIndex) const;
2013 A file server interface class representing an open file that is being shared.
2014 For example multiple reading of the same file.
2019 NONSHARABLE_CLASS(CFileShare) : public CFsDispatchObject
2022 CFileShare(CFileCB* aFileCB);
2026 inline CFileCB& File();
2028 // For serialising aync requests
2029 TBool RequestStart(CFsMessageRequest* aRequest);
2030 void RequestEnd(CFsMessageRequest* aRequest);
2031 TBool RequestInProgress() const;
2032 inline TBool IsFileModeBig();
2036 File share mode. The mode in which the file was opened first.
2041 Current file position. This is the position at which reading and writing takes place.
2045 Error condition due to flush.
2051 // A pointer to the current request. Used for serializing client
2052 // async read/write requests which might otherwise be processed out
2053 // of order due to fair scheduling
2054 CFsMessageRequest* iCurrentRequest;
2064 A file server interface class representing an open directory
2066 An instance of this object is referred to as a directory control block.
2068 A directory control block must be created for a specific directory to access
2069 that directory within a volume.
2071 A plug-in file system implements this class.
2073 class CDirCB : public CFsDispatchObject
2079 IMPORT_C void InitL(TDrive* aDrive);
2080 inline void SetMount(CMountCB * aMount){iMount=aMount;};
2081 inline TDrive& Drive() const;
2082 inline CMountCB& Mount() const;
2083 inline TBool Pending() const;
2084 inline void SetPending(TBool aPending);
2088 Gets information from the first suitable entry in the directory,
2089 starting from the current read position.
2091 The function should read successive entries until a suitable entry is found.
2092 An entry is suitable if the entry attributes match the criteria set by this
2093 object's attributes, which are set on initialisation.
2094 For example, if the directory control block has the attribute
2095 KEntryAttMaskSupported, and the file has the attribute KEntryAttVolume,
2096 then the entry will be deemed unsuitable and the next entry will be read.
2098 This function is called by the file server.
2100 If, on return, the entry's full file name, TEntry::iName, is longer than
2101 the maximum buffer size, then the entry cannot be returned to the client.
2102 In this case the file server will set iPending to true and will call
2103 StoreLongEntryName() before calling this function again.
2104 In this case (when iPending is true), the function should re-read
2105 the last entry to be read; it should also set iPending to false and
2106 should not advance the current read position.
2108 The time stored in the iModified member of anEntry should not be converted,
2109 but left as UTC time.
2111 When storing the iName member of anEntry, the current (.),
2112 or parent marker (..) in the directory should not be returned.
2114 If the KEntryAttAllowUid flag is set in the iAtt member of anEntry, then
2115 the entry UID type of an entry will be read. If, on reading the UID from
2116 a file, KErrCorrupt is generated, because the file is corrupt,
2117 ReadL() should not leave with this error message, but should return
2119 If any other errors are raised the function should leave.
2121 All of the properties of a TEntry, other than the UID types, are always read.
2123 ReadL() should leave with a suitable error code if it cannot complete
2124 successfully for any reason.
2126 @param anEntry Entry information object.
2128 virtual void ReadL(TEntry& anEntry) =0;
2131 IMPORT_C virtual void StoreLongEntryNameL(const TDesC& aName);
2135 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
2136 binary compatibility.
2137 @param aInterfaceId Interface identifier of the interface to be retrieved.
2138 @param aInterface A reference to a pointer that retrieves the specified interface.
2139 @param aInput An arbitrary input argument.
2140 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
2142 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2146 Bitmask of the attributes of interest.
2148 Set using the the TDrive friend class instance representing
2149 the directory's drive after the object is made.
2155 Set after construction using the TDrive friend class instance representing
2156 the directory's drive.
2162 Flag to indicate whether preceding entry details should be returned when
2163 multiple entries are being read.
2166 friend class TDrive;
2170 TUint32 iReserved; // Reserved for future expansion
2176 class CFormatCBBody;
2182 A file server interface class representing a format operation on a disk.
2184 An instance of this object is referred to as a format control block.
2186 The type of format operation to be applied depends on the type of disk,
2187 and is stored in iMode. Each format operation has a number of steps and
2188 is kept track of using iCurrentStep.
2190 A format control block needs to be created for a specific mount control block
2191 for the disk controlled via that mount to be formatted.
2193 A plug-in file system provides an implementation of this class.
2196 class CFormatCB : public CFsDispatchObject
2199 IMPORT_C CFormatCB();
2200 IMPORT_C ~CFormatCB();
2201 IMPORT_C TInt CheckMount();
2203 void InitL(TDrive* aDrive, TFormatMode aMode);
2205 void SetFormatParameters(const TLDFormatInfo* apLDFormatInfo);
2206 TInt SetFormatParameters(const TVolFormatParam* apVolFormatParam);
2209 inline TDrive& Drive() const;
2210 inline CMountCB& Mount() const;
2211 inline TFormatMode Mode() const;
2212 inline TInt& CurrentStep();
2215 Performs a formatting step on the drive.
2217 The step performed should depend on the values of iMode and iCurrentStep.
2219 It can be assumed that there are no resources open on the mount,
2220 that the media is formattable, and that the media is not write protected.
2222 If iMode == EQuickFormat, then only meta data is to be written.
2223 This should be carried out in a single step, with iCurrentStep set
2224 to zero on completion.
2226 If iMode != EQuickFormat, then the format step performed by
2227 this function should depend on iCurrentStep. When the function
2228 returns with iCurrentStep set to zero, the formatting of the drive is complete.
2230 On error detection, the function should leave with an appropriate error code.
2232 @see CFormatCB::iMode
2233 @see CFormatCB::iCurrentStep
2235 virtual void DoFormatStepL() =0;
2239 /** Enumeration of the aInterfaceIDs used in GetInterface */
2242 ESetFmtParameters = 1, ///< used in implementation of SetFormatParameters(const TVolFormatParam* apVolFormatParam)
2248 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
2249 binary compatibility.
2250 @param aInterfaceId Interface identifier of the interface to be retrieved.
2251 @param aInterface A reference to a pointer that retrieves the specified interface.
2252 @param aInput An arbitrary input argument.
2253 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
2255 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2259 TInt iCurrentStep; ///< current format step counter 100...0
2260 TFormatMode iMode; ///< Format mode. This is set by the file server when this objetc is instantiated.
2261 TSpecialFormatInfoBuf iSpecialInfo; ///< Buffer containing user-specified format parameters.
2266 CMountCB* iMount; ///< parent Mount
2267 CFormatCBBody* iBody; ///< additional data holder
2277 A file server interface class representing a raw disk.
2279 An instance of this object is referred to as a raw disk control block.
2281 This is not an abstract base class and does not need to be derived from
2282 when implementing a file system. This is because direct disk access is
2283 implemented by the file server directly calling RawReadL() and RawWriteL()
2284 from the derived CMountCB object of the file system.
2286 NONSHARABLE_CLASS(CRawDiskCB) : public CFsDispatchObject
2291 void InitL(CMountCB* aMount,TBool aIsWriteProtected);
2292 inline CMountCB& Mount();
2293 inline TDrive& Drive();
2294 inline TBool IsWriteProtected() const;
2295 inline void SetChanged();
2297 enum { EWriteProtected = 1, EChanged = 2 };
2298 inline void SetWriteProtected();
2299 inline TBool IsChanged() const;
2306 class CFileSystemBody;
2312 A file server interface class, representing the factory class for a file system.
2314 A plug-in file system implements this class.
2316 Creates objects derived from CMountCB, CFileCB, CDirCB and CFormatCB.
2323 class CFileSystem : public CFsObject
2326 IMPORT_C CFileSystem();
2327 IMPORT_C ~CFileSystem();
2328 IMPORT_C virtual TInt Remove();
2329 IMPORT_C virtual TBool QueryVersionSupported(const TVersion& aVer) const;
2330 IMPORT_C virtual TBool IsExtensionSupported() const;
2331 IMPORT_C TBool IsProxyDriveSupported();
2332 IMPORT_C void SetLibrary(RLibrary aLib);
2333 IMPORT_C RLibrary Library() const;
2338 Installs the file system.
2340 The function should set the name of the file system object through a call
2341 to CObject::SetName(), thus making it accessible, internally,
2342 using FileSystems->FindByFullName(). This enables the file server
2343 to find and handle installed file systems.
2344 The function should also set the file system version.
2345 The version is determined by the file system implementation.
2346 It is used in calls to CFileSystem::QueryVersionSupported().
2348 This function is called as a result of a call to RFs::AddFileSystem().
2350 @return KErrNone if succesful; otherwise one of the other system-wide error
2353 @see RFs::AddFileSystem
2354 @see CObject::SetName
2358 virtual TInt Install() =0;
2362 Creates a new mount control block, a CMountCB derived object.
2364 On success, a pointer to the new mount object should be returned,
2365 otherwise the function should leave.
2367 @return A pointer to the new mount object.
2371 virtual CMountCB* NewMountL() const =0;
2375 Creates a new file control block, i.e. a CFileCB derived object.
2377 On success, a pointer to the new file object should be returned,
2378 otherwise the function should leave.
2380 @return A pointer to the new file object.
2384 virtual CFileCB* NewFileL() const =0;
2388 Creates a new directory control block, i.e. a CDirCB derived object.
2390 On success, a pointer to the new directory control block should be returned,
2391 otherwise the function should leave.
2393 @return A pointer to the new directory object.
2397 virtual CDirCB* NewDirL() const =0;
2401 Creates a new volume format control block, i.e. a CFormatCB derived object.
2403 On success, a pointer to the new volume format control block should be returned,
2404 otherwise the function should leave.
2406 @return A pointer to the new volume format object.
2410 virtual CFormatCB* NewFormatL() const =0;
2414 Retrieves drive information.
2416 The function should set anInfo.iMediaAtt and anInfo.iType according to
2417 the specified drive number.
2419 Note that anInfo.iDriveAtt will already have been set by the calling
2422 The function can obtain the necessary information by calling
2423 the appropriate TBusLocalDrive::Caps() function using the argument aDriveNumber.
2425 @param anInfo On return, contains the drive information.
2426 @param aDriveNumber The drive number.
2428 IMPORT_C virtual void DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const;
2430 virtual TInt DefaultPath(TDes& aPath) const;
2432 /** Enumeration of the aInterfaceIDs used in GetInterface.*/
2435 EProxyDriveSupport = 0,
2436 EExtendedFunctionality, ///< corresponds to MFileSystemExtInterface
2439 /** This is interface corresponds to the extended CFileSystem functionality*/
2440 class MFileSystemExtInterface
2443 virtual CMountCB* NewMountExL(TDrive* apDrive, CFileSystem** apFileSystem, TBool aForceMount, TUint32 aFsNameHash) = 0;
2444 virtual TInt GetSupportedFileSystemName(TInt aFsNumber, TDes& aFsName) const = 0;
2449 CMountCB* NewMountExL(TDrive* apDrive, CFileSystem** apFileSystem, TBool aForceMount, TUint32 aFsNameHash);
2450 TInt GetSupportedFileSystemName(TInt aFsNumber, TDes& aFsName);
2455 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
2456 binary compatibility.
2457 @param aInterfaceId Interface identifier of the interface to be retrieved.
2458 @param aInterface A reference to a pointer that retrieves the specified interface.
2459 @param aInput An arbitrary input argument.
2460 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
2462 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2467 RLibrary iLibrary; ///< *.fsy file system plugin dll handle
2468 CFileSystemBody* iBody; ///< extension of this class, used to provide extended functionality w/o changing this class size (BC issue)
2470 friend class TDrive;
2481 Base abstract class.
2482 Interface between a local plugin file system and a media subsystem.
2484 @see CLocalProxyDrive
2485 @see CBaseExtProxyDrive
2487 class CProxyDrive : public CBase
2490 CProxyDrive(CMountCB* aMount);
2492 inline CMountCB* Mount() const;
2493 inline void SetMount(CMountCB *aMount);
2495 IMPORT_C virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
2496 IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
2497 IMPORT_C virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset,TInt aFlags);
2498 IMPORT_C virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
2499 IMPORT_C virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
2501 inline TInt LocalBufferSupport();
2506 Initialise the proxy drive.
2508 Derived class must provide an implementation for it.
2510 @return KErrNone if successful, otherwise one of the system-wide error codes.
2512 virtual TInt Initialise()=0;
2515 It invokes Dismounted() on the proxy drive.
2517 Derived class must provide an implementation for it.
2519 @return KErrNone if successful, otherwise one of the system-wide error codes.
2521 virtual TInt Dismounted()=0;
2524 Increase the size of the proxy drive by the specified length (in bytes).
2526 Derived class must provide an implementation for it.
2528 @param aLength The length (in bytes) of which the drive is to be increased by.
2530 @return KErrNone if successful, otherwise one of the system-wide error codes.
2532 virtual TInt Enlarge(TInt aLength)=0;
2535 Reduce the size of the proxy drive by removing the specified length
2536 (in bytes) starting at the specified position.
2538 Derived class must provide an implementation for it.
2540 @param aPos The start position of area to be removed.
2541 @param aLength The length/size (in bytes) by which the drive is to be reduced.
2543 @return System-wide error codes based on the status of the operation.
2545 virtual TInt ReduceSize(TInt aPos, TInt aLength)=0;
2548 Read from the proxy drive.
2550 Derived class must provide an implementation for it.
2552 @param aPos The address from where the read begins.
2553 @param aLength The length of the read.
2554 @param aTrg A descriptor of the memory buffer from which to read.
2555 @param aThreadHandle The handle-number representing the drive thread.
2556 @param aOffset Offset into aTrg to read the data from.
2558 @return System-wide error codes based on the status of the operation.
2560 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset)=0;
2563 Read from the proxy drive.
2565 Derived class must provide an implementation for it.
2567 @param aPos The address from where the read begins.
2568 @param aLength The length of the read.
2569 @param aTrg A descriptor of the memory buffer from which to read.
2571 @return System-wide error codes based on the status of the operation.
2573 virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg)=0;
2576 Write to the proxy drive.
2578 Derived class must provide an implementation for it.
2580 @param aPos The address from where the write begins.
2581 @param aLength The length of the write.
2582 @param aSrc A descriptor of the memory buffer from which to write.
2583 @param aThreadHandle The handle-number representing the drive thread.
2584 @param aOffset Offset into aSrc to write the data to.
2586 @return System-wide error codes based on the status of the operation.
2588 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset)=0;
2591 Write to the proxy drive.
2593 Derived class must provide an implementation for it.
2595 @param aPos The address from where the write begins.
2596 @param aSrc A descriptor of the memory buffer from which to write.
2598 @return System-wide error codes based on the status of the operation.
2600 virtual TInt Write(TInt64 aPos,const TDesC8& aSrc)=0;
2603 Get the proxy drive's capabilities information.
2605 Derived class must provide an implementation for it.
2607 @param anInfo A descriptor of the connected drives capabilities.
2609 @return System-wide error codes based on the status of the operation.
2611 virtual TInt Caps(TDes8& anInfo)=0;
2614 Format the connected drive.
2616 Derived class must provide an implementation for it.
2618 @param anInfo Device specific format information.
2620 @return System-wide error codes based on the status of the operation.
2622 virtual TInt Format(TFormatInfo& anInfo)=0;
2625 Format the proxy drive.
2627 Derived class must provide an implementation for it.
2629 @param aPos The position of the data which is being formatted.
2630 @param aLength The length of the data which is being formatted.
2632 @return System-wide error codes based on the status of the operation.
2634 virtual TInt Format(TInt64 aPos,TInt aLength)=0;
2637 Set the mount information on the proxy drive.
2639 Derived class must provide an implementation for it.
2641 @param aMountInfo Information passed down to the media driver.
2642 The meaning of this information depends on the media driver.
2643 @param aMountInfoThreadHandle Message thread handle number.
2645 @return System-wide error codes based on the status of the operation.
2647 virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle)=0;
2650 Forces a remount on the proxy drive
2652 Derived class must provide an implementation for it.
2654 @param aFlags Flags to be passed into the driver.
2656 @return System-wide error codes based on the status of the operation.
2658 virtual TInt ForceRemount(TUint aFlags=0)=0;
2661 Unlocks a password-enabled proxy drive.
2663 Derived class must provide an implementation for it.
2665 @param aPassword A descriptor containing the existing password.
2666 @param aStorePassword If ETrue, the password is added to the password store.
2668 @return System-wide error codes based on the status of the operation.
2670 virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword)=0;
2673 Locks a password-enabled proxy drive with the new password.
2675 Derived class must provide an implementation for it.
2677 @param aOldPassword A descriptor containing the existing password.
2678 @param aNewPassword A descriptor containing the new password.
2679 @param aStorePassword If ETrue, the password is added to the password store.
2681 @return System-wide error codes based on the status of the operation.
2683 virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword)=0;
2686 Clears a password from a proxy drive - controller sets password to null.
2688 Derived class must provide an implementation for it.
2690 @param aPassword A descriptor containing the password.
2692 @return System-wide error codes based on the status of the operation.
2694 virtual TInt Clear(TMediaPassword &aPassword)=0;
2697 Forcibly unlock a password-enabled proxy drive.
2699 Derived class must provide an implementation for it.
2701 @return System-wide error codes based on the status of the operation.
2703 virtual TInt ErasePassword()=0;
2705 // implementation using GetInterface(..)
2709 ELocalBufferSupport,
2715 Retrieves TBusLocalDrive object associated with the file.
2717 @return System-wide error codes based on the status of the operation.
2719 IMPORT_C TInt GetLocalDrive(TBusLocalDrive*& aLocDrv);
2722 Informs the extension that the mount has been finalised and is in a consistent state.
2724 @return System-wide error codes based on the status of the operation.
2728 IMPORT_C TInt Finalise(TBool aFinalised);
2732 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
2733 binary compatibility.
2735 @param aInterfaceId Interface identifier of the interface to be retrieved.
2736 @param aInterface A reference to a pointer that retrieves the specified interface.
2737 @param aInput An arbitrary input argument.
2739 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
2741 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2745 TUint32 iReserved; // Reserved for future expansion
2755 Local drive specific mount control block.
2757 class CLocDrvMountCB : public CMountCB
2760 IMPORT_C CLocDrvMountCB();
2761 IMPORT_C ~CLocDrvMountCB();
2762 IMPORT_C TInt CreateLocalDrive(TBusLocalDrive& aLocDrv);
2763 IMPORT_C TInt CreateDrive(TInt aDriveNumber);
2764 IMPORT_C TInt InitLocalDrive();
2765 IMPORT_C void DismountedLocalDrive();
2766 inline CProxyDrive* LocalDrive() const;
2769 CProxyDrive* iProxyDrive;
2780 Local drive specific proxy drive interface.
2781 Class passes commands directly to TBusLocalDrive.
2785 NONSHARABLE_CLASS(CLocalProxyDrive) : public CProxyDrive
2788 static CLocalProxyDrive* New(CMountCB* aMount,TBusLocalDrive& aLocDrv);
2790 virtual TInt Initialise();
2791 virtual TInt Dismounted();
2792 virtual TInt Enlarge(TInt aLength);
2793 virtual TInt ReduceSize(TInt aPos, TInt aLength);
2794 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset, TInt aFlags);
2795 virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
2796 virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
2797 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
2798 virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
2799 virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
2800 virtual TInt Caps(TDes8& anInfo);
2801 virtual TInt Format(TFormatInfo& anInfo);
2802 virtual TInt Format(TInt64 aPos,TInt aLength);
2803 virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle);
2804 virtual TInt ForceRemount(TUint aFlags=0);
2805 virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
2806 virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword);
2807 virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword);
2808 virtual TInt Clear(TMediaPassword &aPassword);
2809 virtual TInt ErasePassword();
2810 virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
2811 virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
2813 virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2815 CLocalProxyDrive(CMountCB* aMount,TBusLocalDrive& aLocDrv);
2817 TBusLocalDrive& iLocDrv;
2827 Media subsystem extensions must be derived from this specific class interface.
2828 Objects of this type should be created through use of a derived CProxyDriveFactory class.
2830 Class passes commands directly to CProxyDrive.
2833 @see CProxyDriveFactory
2835 class CBaseExtProxyDrive : public CProxyDrive
2838 IMPORT_C CBaseExtProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount);
2839 IMPORT_C ~CBaseExtProxyDrive();
2840 IMPORT_C virtual TInt Initialise();
2841 IMPORT_C virtual TInt Dismounted();
2842 IMPORT_C virtual TInt Enlarge(TInt aLength);
2843 IMPORT_C virtual TInt ReduceSize(TInt aPos, TInt aLength);
2844 IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
2845 IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
2846 IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
2847 IMPORT_C virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
2848 IMPORT_C virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
2849 IMPORT_C virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
2850 IMPORT_C virtual TInt Caps(TDes8& anInfo);
2851 IMPORT_C virtual TInt Format(TFormatInfo& anInfo);
2852 IMPORT_C virtual TInt Format(TInt64 aPos,TInt aLength);
2853 IMPORT_C virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle);
2854 IMPORT_C virtual TInt ForceRemount(TUint aFlags=0);
2855 IMPORT_C virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword);
2856 IMPORT_C virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword);
2857 IMPORT_C virtual TInt Clear(TMediaPassword &aPassword);
2858 IMPORT_C virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
2859 IMPORT_C virtual TInt ErasePassword();
2860 IMPORT_C virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
2861 IMPORT_C virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
2862 inline TInt LocalBufferSupport();
2866 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
2867 binary compatibility.
2868 @param aInterfaceId Interface identifier of the interface to be retrieved.
2869 @param aInterface A reference to a pointer that retrieves the specified interface.
2870 @param aInput An arbitrary input argument.
2871 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
2873 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2875 CProxyDrive* iProxy;
2885 Abstract base class for Proxy drive factory classes.
2887 Class is used for the creation of media subsystem extensions CBaseExtProxyDrive.
2889 @see CBaseExtProxyDrive
2891 class CProxyDriveFactory : public CFsObject
2894 IMPORT_C CProxyDriveFactory();
2895 IMPORT_C virtual TInt Remove();
2896 inline void SetLibrary(RLibrary aLib);
2897 inline RLibrary Library() const;
2900 Installation of the factory object.
2901 @return system wide error code
2903 virtual TInt Install() =0;
2905 Instantiates a CProxyDrive object.
2906 @param aProxy Proxy drive to be used.
2907 @param aMount Mount control block.
2909 @return pointer to Instantiated CProxyDrive object.
2911 virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount)=0;
2921 class CExtProxyDriveFactory : public CFsObject
2924 IMPORT_C CExtProxyDriveFactory();
2925 IMPORT_C virtual TInt Remove();
2926 inline void SetLibrary(RLibrary aLib);
2927 inline RLibrary Library() const;
2929 virtual TInt Install() =0;
2930 virtual TInt CreateProxyDrive(CProxyDrive*& aMountProxyDrive, CMountCB* aMount)=0;
2932 IMPORT_C virtual void AsyncEnumerate();
2942 class CExtProxyDrive : public CProxyDrive
2945 IMPORT_C CExtProxyDrive(CMountCB* aMount,CExtProxyDriveFactory* aDevice);
2946 IMPORT_C ~CExtProxyDrive();
2948 IMPORT_C virtual TInt NotifyChange(TDes8 &aChanged, TRequestStatus* aStatus);
2949 IMPORT_C virtual void NotifyChangeCancel();
2950 IMPORT_C virtual TInt SetInfo(const RMessage2 &msg, TAny* aMessageParam2, TAny* aMessageParam3);
2952 inline TInt DriveNumber();
2953 inline void SetDriveNumber(TInt aDrive);
2954 inline CExtProxyDriveFactory* FactoryP();
2958 Return a pointer to a specified interface extension - to allow future extension of this class without breaking
2959 binary compatibility.
2960 @param aInterfaceId Interface identifier of the interface to be retrieved.
2961 @param aInterface A reference to a pointer that retrieves the specified interface.
2962 @param aInput An arbitrary input argument.
2963 @return KErrNone If the interface is supported, KErrNotSupported otherwise.
2965 IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
2967 TInt SetupMediaChange();
2970 CExtProxyDriveFactory* iFactory;
2974 CExtNotifyMediaChange* iMediaChangeNotifier;
2976 TUint32 iReserved[4]; // Reserved bytes for future expansion
2978 friend class LocalDrives;
2985 NONSHARABLE_CLASS(CExtNotifyMediaChange) : public CActive
2988 static CExtNotifyMediaChange* NewL(CExtProxyDrive* aDrive);
2989 ~CExtNotifyMediaChange();
2993 CExtNotifyMediaChange(CExtProxyDrive* aDrive);
3000 CExtProxyDrive* iDrive;
3008 Gets the local bus drive.
3010 @param aLocalDrive The local drive number.
3012 @return The local bus drive.
3014 IMPORT_C TBusLocalDrive& GetLocalDrive(TInt aLocalDrive);
3019 Gets the proxy drive device for a given drive
3021 @param aLocalDrive The local drive number.
3023 @return The local bus drive.
3025 IMPORT_C CExtProxyDrive* GetProxyDrive(TInt aDrive);
3030 Gets the proxy drive for a given drive
3032 @param aLocalDrive The local drive number.
3034 @return The proxy drive
3036 IMPORT_C TInt GetProxyDrive(TInt aDrive, CProxyDrive*& aProxyDrive);
3041 Return ETrue if drive is actually a proxy instead of a local drive
3043 @param The drive number.
3045 @return ETrue if drive is actually a proxy instead of a local drive
3047 IMPORT_C TBool IsProxyDrive(TInt aDrive);
3053 Checks a given drive number is mapped to a local drive.
3055 @param aDrive The local drive number.
3057 @return specified drive number is mapped to a local drive.
3059 IMPORT_C TBool IsValidLocalDriveMapping(TInt aDrive);
3064 Sets the media attributes and type in the anInfo parameter to those of the
3067 @param anInfo TDriveInfo object to store the drive information.
3068 @param aDriveNumber The number of the drive to get the information from.
3070 IMPORT_C void GetDriveInfo(TDriveInfo& anInfo,TInt aDriveNumber);
3076 Returns the local drive number for a given drive number.
3078 @param aDrive The drive number.
3080 @return KDriveInvalid if drive is not mapped to a local drive.
3081 otherwise the local drive number.
3083 IMPORT_C TInt DriveNumberToLocalDriveNumber(TInt aDrive);
3087 IMPORT_C TInt GetLocalDriveNumber(TBusLocalDrive* aLocDrv);
3093 struct TFatUtilityFunctions;
3096 Representation of FAT Utility Functions as provided by a Code Page DLL.
3097 These functions are to be implemented by Code Page-DLLs.
3101 struct TCodePageFunctions
3103 typedef TBool (*TConvertFromUnicode)(TDes8& aForeign, const TDesC16& aUnicode, const TDesC8& aReplacementForUnconvertibleCharacter);
3104 typedef TInt (*TConvertFromUnicodeL)(TDes8& aForeign, const TDesC16& aUnicode, TBool leaveWhenOverflow);
3105 typedef TBool (*TConvertToUnicode)(TDes16& aUnicode, const TDesC8& aForeign);
3106 typedef TInt (*TConvertToUnicodeL)(TDes16& aUnicode, const TDesC8& aForeign, TBool leaveWhenOverflow);
3107 typedef TBool (*TIsLegalShortNameCharacter)(TUint aCharacter);
3109 TConvertFromUnicode iConvertFromUnicode;
3110 TConvertFromUnicodeL iConvertFromUnicodeL;
3111 TConvertToUnicode iConvertToUnicode;
3112 TConvertToUnicodeL iConvertToUnicodeL;
3113 TIsLegalShortNameCharacter iIsLegalShortNameCharacter;
3117 A utility class for Codepage Dll. Controls overflow action. Provides current status of
3118 Locale/codepage dll loaded. Provides conversions functions to be used by Codepage Dlls.
3122 class TCodePageUtils
3127 Determines the Overflow action in case of if overflow occurs.
3129 enum TOverflowAction
3132 Will leave if an overflow occurs.
3134 EOverflowActionLeave,
3136 Will truncate the data if an overflow occurs.
3138 EOverflowActionTruncate
3142 Determines the current status of Locale dll / Codepage dll.
3144 enum TCodepageLoaded
3147 No Locale Dll or Codepage Dll is loaded.
3151 Locale Dll is loaded.
3155 Codepage Dll is loaded.
3162 Convert from Unicode, truncating if there is not enough room in the output.
3164 @param aForeign The output is appended here.
3165 @param aUnicode The input.
3167 @return False if and only if aForeign has not enough space remaining.
3169 TBool ConvertFromUnicode(TDes8& aForeign, const TDesC16& aUnicode, TOverflowAction aOverflowAction) const;
3172 Convert from Unicode, truncating if there is not enough room in the output.
3174 @param aForeign The output is appended here.
3175 @param aUnicode The input.
3177 @leave KErrOverflow if aForeign is too short for the output.
3179 IMPORT_C void ConvertFromUnicodeL(TDes8& aForeign, const TDesC16& aUnicode, TOverflowAction aOverflowAction=EOverflowActionLeave) const;
3182 Convert to Unicode, truncating if there is not enough room in the output.
3184 @param aUnicode The output is appended here.
3185 @param aForeign The input.
3187 @return False if and only if aUnicode has not enough space remaining.
3189 TBool ConvertToUnicode(TDes16& aUnicode, const TDesC8& aForeign ) const;
3192 Convert to Unicode, leaving if there is not enough room in the output.
3194 @param aUnicode The output is appended here.
3195 @param aForeign The input.
3197 @leave KErrOverflow if aUnicode is too short for the output.
3199 IMPORT_C void ConvertToUnicodeL(TDes16& aUnicode, const TDesC8& aForeign, TOverflowAction aOverflowAction=EOverflowActionLeave) const;
3202 Returns true if the input character is legal in a short name.
3204 @param aCharacter Character, in the foreign character encoding.
3206 @return true if aCharacter is legal in a FAT short name.
3208 IMPORT_C TBool IsLegalShortNameCharacter(TUint aCharacter,TBool aUseExtendedChars=EFalse) const;
3213 Constructor for TCodePageUtils.
3218 Returns whether a Codepage dll is loaded.
3220 @return True if Codepage dll is loaded.
3223 TBool IsCodepageLoaded() const;
3226 Returns the type of active codepage.
3227 @return ENone if no dll is loaded
3228 ELocaleDll if Locale Dll is loaded
3229 ECodepageDll if Codepage Dll is loaded
3231 TCodepageLoaded CodepageLoaded() const;
3234 Sets the current codepage to that provided by the current Locale DLL.
3236 @param aFunctions Pointer to FAT conversion functions to be used.
3240 void SetLocaleCodePage(TFatUtilityFunctions* aFunctions);
3243 Gets the function pointer to the read Locale conversions functions.
3245 @return function pointer to the read Locale conversions functions.
3247 TFatUtilityFunctions* LocaleFatUtilityFunctions() const;
3250 Gets structure to function pointers to the read Codepage conversions functions.
3252 @return structure to function pointers to the read Codepage conversions functions.
3254 TCodePageFunctions CodepageFatUtilityFunctions() const;
3259 Structure to function pointers to the read Codepage conversions functions.
3261 TCodePageFunctions iCodePageFunctions;
3264 Function pointer to the read Locale conversions functions.
3266 TFatUtilityFunctions* iLocaleFatUtilityFunctions;
3269 Variable to hold the active codepage type.
3271 TCodepageLoaded iCodepageLoaded;
3273 friend class TFsLoadCodePage;
3279 Gets the pointer to the current FAT conversions functions.
3281 @return Pointer to the current FAT conversions functions.
3283 IMPORT_C const TFatUtilityFunctions* GetFatUtilityFunctions();
3288 Gets the instance of TCodePageUtils class.
3290 @return Instance of TCodePageUtils class.
3292 IMPORT_C const TCodePageUtils& GetCodePage();
3300 Copies data to a buffer.
3302 If necessary, the buffer, a heap descriptor, is allocated or re-allocated
3303 before copying takes place.
3305 @param aBuf A reference to a pointer to heap descriptor forming the buffer.
3306 This will be allocated if it does not already exist,
3307 or re-allocated if the existing buffer is not large enough.
3308 @param aDes The data to be copied.
3310 IMPORT_C void AllocBufferL(HBufC*& aBuf,const TDesC& aDes);
3320 Notifies sessions of a debug event if aFunction has the KDebugNotifyMask set.
3322 This function can only be used in debug builds or if _DEBUG
3323 or _DEBUG_RELEASE is defined.
3325 @param aFunction A function.
3326 @param aDrive A drive.
3328 IMPORT_C void DebugNotifySessions(TInt aFunction,TInt aDrive);
3337 Writes data from a buffer to a file.
3339 Called by the mount control block lock and the unlock functions.
3341 @param aFileName The file to be written to.
3342 @param aBuf The data to be written.
3344 IMPORT_C void WriteToDisk(const TDesC& aFileName,const TDesC8& aBuf);
3350 Create a proxy drive using the local proxy drive passed in
3351 and any extensions that have been added to the drive.
3353 @param aConcreteDrive local proxy drive
3354 @param aMount local proxy drive mount control block
3356 @return pointer to instantiated CProxyDrive object.
3358 IMPORT_C CProxyDrive* CreateProxyDriveL(CProxyDrive* aConcreteDrive,CMountCB* aMount);
3365 IMPORT_C TInt CompareFilenames(const TDesC& aFileName1,const TDesC& aFileName2);
3368 Lookup a file system by name.
3370 @param aName file system name.
3372 @return pointer to instantiated CFileSystem object.
3374 IMPORT_C CFileSystem* GetFileSystem(const TDesC& aName);
3381 A static class for retrieving F32 properties
3388 IMPORT_C static TBool Initialise(TInt aRomAddress, TInt aLength);
3389 IMPORT_C static TBool GetString(const TDesC8& aSection, const TDesC8& aProperty, TDes8& aPropVal);
3390 IMPORT_C static TBool GetInt(const TDesC8& aSection, const TDesC8& aProperty, TInt32& aPropVal);
3391 IMPORT_C static TBool GetBool(const TDesC8& aSection, const TDesC8& aProperty, TBool& aPropVal);
3393 static TBool iInitialised;
3394 static TInt iRomAddress;
3395 static TInt iRomLength;
3398 #include <f32fsys.inl>