Update contrib.
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.
14 // f32\inc\f32fsys.inl
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without noticed. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
21 #define __IS_DRIVETHREAD() {__ASSERT_DEBUG(IsDriveThread(),DriveFault(ETrue));}
22 #define __IS_MAINTHREAD() {__ASSERT_DEBUG(IsMainThread(),DriveFault(EFalse));}
25 //---------------------------------------------------------------------------------------------------------------------------------
29 Gets last error reason.
31 @return TInt Returns last error reason.
33 inline TInt TDrive::GetReason() const
42 Sets a flag to state that the drive contents has changed.
44 @param aValue True if contents has changed; False if unchanged.
46 inline void TDrive::SetChanged(TBool aValue)
55 Determines whether the drive content has changed.
57 @return True if contents changed , False if unchanged.
59 inline TBool TDrive::IsChanged() const
68 Returns the drive number.
70 @return The drive number.
74 inline TInt TDrive::DriveNumber() const
75 {return(iDriveNumber);}
81 Determines whether the drive is mounted.
83 @return True if drive is mounted, False if drive is not mounted.
85 inline TBool TDrive::IsMounted() const
88 return(iCurrentMount!=NULL);
95 Determines whether attribute is set to local.
97 @return True if attribute is set to KDriveAttLocal, False for all other attributes.
99 inline TBool TDrive::IsLocal() const
100 {return(iAtt & KDriveAttLocal);}
106 Determines whether the drive is ROM drive.
108 @return True if drive attribute is set as ROM drive , False if not set as ROM drive.
110 inline TBool TDrive::IsRom() const
111 {return( iAtt & KDriveAttRom);}
117 Determines whether the drive is removable.
119 @return True if drive attribute is set to removable , False for all other attributes.
121 inline TBool TDrive::IsRemovable() const
122 {return( iAtt & KDriveAttRemovable);}
128 Determines whether the drive is substed.
130 @return True if drive attribute is set to substed (KDriveAttSubsted), False for all other attributes.
132 inline TBool TDrive::IsSubsted() const
133 {return( iAtt & KDriveAttSubsted);}// KDriveAttSubsted = 0x08
139 Gets a reference to the object representing the current mount.
141 @return The file's mount.
143 inline CMountCB& TDrive::CurrentMount() const
146 return(*iCurrentMount);
149 inline TBool TDrive::IsCurrentMount(CMountCB& aMount) const
150 {return(iCurrentMount == &aMount);}
155 Gets the substed drive.
157 @return A pointer to the drive which is substed.
159 inline TDrive& TDrive::SubstedDrive()const
162 return(*iSubstedDrive);
170 Sets the drive as substed to the path set by an earlier call to SetSubst().
172 @param aDrive A pointer to the drive on which the volume is mounted.
175 inline void TDrive::SetSubstedDrive(TDrive* aDrive)
178 iSubstedDrive=aDrive;
185 Gets the substed path set by an earlier call to SetSubst().
187 @return A reference to a heap descriptor containing the substed path.
189 inline HBufC& TDrive::Subst() const
199 Assigns a path to a drive.
201 @param aSubst Path will be assigned to a drive.
204 inline void TDrive::SetSubst(HBufC* aSubst)
214 Gets a reference to the object representing the mount on which the file resides.
216 @return The Drives's mount.
219 inline CFsObjectCon& TDrive::Mount() const
223 Gets a reference to the object representing the file system
225 @return The reference to file system.
228 inline CFileSystem& TDrive::FSys()
232 Gets the object representing the file system
234 @return The file system.
237 inline CFileSystem*& TDrive::GetFSys()
241 Gets the object representing the TDriveExtInfo.
243 @return The Drive extension information object.
248 inline TDriveExtInfo& TDrive::ExtInfo()
254 Sets the notification flag ON. The client will receive notifications on Read or Write
255 failures from the file system.
258 inline void TDrive::SetNotifyOn()
261 iDriveFlags &= ~ENotifyOff;
264 Sets the notification flag OFF. The client will not receive notifications on Read or Write
265 failures from the file system.
268 inline void TDrive::SetNotifyOff()
271 iDriveFlags |= ENotifyOff;
275 Locks the drive.This function acquires iLock mutex.
278 inline void TDrive::Lock()
282 UnLocks the drive.This function signals the iLock mutex.
286 inline void TDrive::UnLock()
292 Gets the reserved space of a drive
294 @return Amount of space reserved in bytes.
298 inline TInt TDrive::ReservedSpace() const
299 {return iReservedSpace;}
303 Reserves a space of a drive.
305 @param aReservedSpace Amount of space to reserve in bytes.
308 inline void TDrive::SetReservedSpace(const TInt aReservedSpace)
309 {iReservedSpace=aReservedSpace; }
313 Sets the rugged flag in the drive object.
315 @param Flag to set or clear the rugged flag.
320 inline void TDrive::SetRugged(TBool aIsRugged)
323 iDriveFlags |= ENotRugged;
325 iDriveFlags &= ~ENotRugged;
330 Returns whether the current drive is running as rugged Fat
331 or not.If IsRugged flag is set then in the event of power
332 failure fat/metadata will be in a valid state if the scandrive
333 utility is run immediately after.
335 @return Is rugged fat flag.
338 inline TBool TDrive::IsRugged() const
339 {return !(iDriveFlags & ENotRugged); }
343 @return ETrue if the drive is synchronous, i.e. runs in the main file server thread.
345 inline TBool TDrive::IsSynchronous() const
347 return iDriveFlags & EDriveIsSynch;
351 Set or reset internal EDriveIsSynch flag for the TDrive.
353 inline void TDrive::SetSynchronous(TBool aIsSynch)
356 iDriveFlags |= EDriveIsSynch;
358 iDriveFlags &= ~EDriveIsSynch;
362 inline TBool TDrive::DismountDeferred() const
363 { return(iDriveFlags & EDismountDeferred); }
369 Gets a reference to the object representing the drive on which
370 the volume is mounted.
372 @return The drive on which the volume is mounted.
374 inline TDrive& CMountCB::Drive() const
381 Sets a pointer to the object representing the drive on which
382 the volume is mounted.
384 @param aDrive A pointer to the drive on which the volume is mounted.
386 inline void CMountCB::SetDrive(TDrive* aDrive)
393 Gets a reference to a heap descriptor containing the name of
396 @return A reference to a heap descriptor containing the volume name.
398 inline HBufC& CMountCB::VolumeName() const
399 {return(*iVolumeName);}
405 Sets a pointer to a heap descriptor containing the name of the mounted volume.
407 @param aName A pointer to a heap descriptor containing the name of
408 the mounted volume to be set.
410 inline void CMountCB::SetVolumeName(HBufC* aName)
417 Tests whether the client is notified of any read or write failures.
419 The notification status is a property of the current session with
420 the file server, the value of which is stored in CSessionFs::iNotifyUser.
421 If set to true, the client will receive notifications from the file system.
423 Typically, this function might be used to save the current notification
424 state prior to temporarily disabling notifiers. This allows the original
425 notification state to be restored.
427 Note that GetNotifyUser() is only available once the drive has been set for
428 the mount control block (using SetDrive()), since the notification status
429 is held by the session and accessed via the drive.
431 @return True if the client receives notifications from the file system,
434 inline TBool CMountCB::GetNotifyUser() const
435 {return(Drive().GetNotifyUser());}
442 inline void CMountCB::SetNotifyOn()
443 {Drive().SetNotifyOn();}
450 inline void CMountCB::SetNotifyOff()
451 {Drive().SetNotifyOff();}
457 Locks the mount by incrementing the internal lock counter.
459 The mount becomes locked on formatting or on the opening of a resource
460 (a file or a directory) or raw disk subsession.
461 A format, resource or raw disk subsession can only be opened if the mount
464 inline void CMountCB::IncLock()
471 Unlocks the mount by decrementing the internal lock counter.
473 The mount becomes locked on formatting or on the opening of a resource
474 (a file or a directory) or raw disk subsession.
475 A format, resource or raw disk subsession can only be opened if the mount
478 inline void CMountCB::DecLock()
485 Gets the current lock status.
487 It delivers the current lock status by returning the internal lock counter.
489 @return The current lock status.
491 inline TInt CMountCB::LockStatus() const
492 {return(iLockMount);}
498 Tests whether the mount is currently locked.
500 A mount is locked when the internal lock counter is greater than zero.
501 On creation, the lock counter is set to zero.
503 The mount becomes locked on formatting or on the opening of a resource
504 (a file or a directory) or raw disk subsession.
505 A format, resource or raw disk subsession can only be opened if the mount
508 @return True if the mount is locked, false, otherwise.
510 inline TBool CMountCB::Locked() const
511 {return iLockMount>0; }
517 Tests whether the mount control block represents the current mount on
518 the associated drive.
520 A drive has only one mount which is accessible: the current mount.
521 Any mount other than the current mount relates to a partition (i.e. volume)
522 that was present on a removable media which has since been removed.
523 The reason the mount has persisted is because resources (i.e. files/directories)
524 are still open on it.
526 This function is only available when the drive has been set for the mount
527 control block (using SetDrive()), since the current mount is held by the drive.
529 @return True if the mount is the current mount on the drive, false otherwise.
531 inline TBool CMountCB::IsCurrentMount() const
532 {return(this==&iDrive->CurrentMount());}
539 inline TInt64 CMountCB::Size() const
546 Set the unique mount number
547 @param aMountNumber - The unique mount number
549 const TInt KMountDismounted = 0x80000000;
550 inline void CMountCB::SetMountNumber(TInt aMountNumber)
551 { iMountNumber = (aMountNumber &~ KMountDismounted); }
557 Set the mount to be dismounted
559 inline void CMountCB::SetDismounted(TBool aDismounted)
562 iMountNumber |= KMountDismounted;
564 iMountNumber &= ~KMountDismounted;
571 Returns the unique mount number
572 @return The unique mount number
574 inline TInt CMountCB::MountNumber() const
575 { return(iMountNumber &~ KMountDismounted); }
581 Returns ETrue if the mount is flagged as dismounted.
582 @return ETrue if the mount is flagged as dismounted
584 inline TBool CMountCB::IsDismounted() const
585 { return(iMountNumber & KMountDismounted); }
590 Retrieves TBusLocalDrive object associated with the mount
592 inline TInt CMountCB::LocalDrive(TBusLocalDrive*& aLocalDrive)
595 return GetInterface(EGetLocalDrive, (TAny*&) aLocalDrive, NULL);
599 Retrieves CProxyDrive object associated with the mount
601 inline TInt CMountCB::ProxyDrive(CProxyDrive*& aProxyDrive)
604 return GetInterface(EGetProxyDrive, (TAny*&) aProxyDrive, NULL);
607 inline TInt CMountCB::AddToCompositeMount(TInt aMountIndex)
609 TAny *mountInterface = NULL;
610 return(GetInterface(EAddToCompositeMount, mountInterface, (TAny*)aMountIndex));
614 Returns whether the mount (and any extensions) support file caching
616 inline TInt CMountCB::LocalBufferSupport(CFileCB* aFile)
618 TAny* dummyInterface;
619 return GetInterface(ELocalBufferSupport, dummyInterface, aFile);
622 inline TInt CMountCB::MountControl(TInt /*aLevel*/, TInt /*aOption*/, TAny* /*aParam*/)
624 return KErrNotSupported;
628 inline void CMountCB::FinaliseMountL(TInt aOperation, TAny* /*aParam1=NULL*/, TAny* /*aParam2=NULL*/)
630 if(aOperation == RFs::EFinal_RW)
631 {//-- call the legacy method
636 User::Leave(KErrNotSupported);
639 inline TInt CMountCB::CheckDisk(TInt /*aOperation*/, TAny* /*aParam1=NULL*/, TAny* /*aParam2=NULL*/)
641 return(KErrNotSupported);
644 inline TInt CMountCB::ScanDrive(TInt /*aOperation*/, TAny* /*aParam1=NULL*/, TAny* /*aParam2=NULL*/)
646 return(KErrNotSupported);
650 //---------------------------------------------------------------------------------------------------------------------------------
653 Check is this file system can be mounted on the drive at all. The file system implementation may, for example,
654 read and validate the boot region without real mounting overhead.
657 @return KErrNotSupported this feature is not supported by the file system
658 KErrNone this file system can be mounted on this drive
659 KErrLocked the media is locked on a physical level.
660 other error codes depending on the implementation, indicating that this filesystem can't be mouned
662 inline TInt CMountCB::CheckFileSystemMountable()
664 return MountControl(ECheckFsMountable, 0, NULL);
667 //---------------------------------------------------------------------------------------------------------------------------------
669 Query if the mount is finalised, corresponds to the EMountStateQuery control code only.
670 @param aFinalised out: ETrue if the mount is finalised, EFalse otherwise.
672 @return KErrNotSupported this feature is not supported by the file system
675 inline TInt CMountCB::IsMountFinalised(TBool &aFinalised)
677 return MountControl(EMountStateQuery, ESQ_IsMountFinalised, &aFinalised);
680 //---------------------------------------------------------------------------------------------------------------------------------
682 Corresponds to EMountVolParamQuery. Request a certain amount of free space on the volume.
683 If _current_ amount of free space is >= than required or it is not being updated in background by the mount, returns immediately;
684 If mount is still counting free space and If _current_ amount of free space is < than required, the caller will be blocked
685 until mount finds enough free space or reports that the _final_ amount of free space is less than required.
687 @param aFreeSpaceBytes in: number of free bytes on the volume required, out: resulted amount of free space. It can be less than
688 required if there isn't enough free space on the volume at all.
690 @return KErrNotSupported this feature is not supported by the file system
693 inline TInt CMountCB::RequestFreeSpace(TUint64 &aFreeSpaceBytes)
695 return MountControl(EMountVolParamQuery, ESQ_RequestFreeSpace, &aFreeSpaceBytes);
698 //---------------------------------------------------------------------------------------------------------------------------------
700 Corresponds to EMountVolParamQuery. A request to obtain the _current_ amount of free space on the volume asynchronously, without blocking.
701 Some mounts implementations can count volume free space in the background.
703 @param aFreeSpaceBytes in: none; out: _current_ amount of free space on the volume.
705 @return KErrNotSupported this feature is not supported by the file system
708 inline TInt CMountCB::GetCurrentFreeSpaceAvailable(TInt64 &aFreeSpaceBytes)
710 return MountControl(EMountVolParamQuery, ESQ_GetCurrentFreeSpace, &aFreeSpaceBytes);
713 //---------------------------------------------------------------------------------------------------------------------------------
715 Corresponds to EMountVolParamQuery. A request to obtain size of the mounted volume without blocking (CMountCB::VolumeL() can block).
716 @param aVolSizeBytes in: none; out: mounted volume size, same as TVolumeInfo::iSize
718 @return KErrNotSupported this feature is not supported by the file system
721 inline TInt CMountCB::MountedVolumeSize(TUint64& aVolSizeBytes)
723 return MountControl(EMountVolParamQuery, ESQ_MountedVolumeSize, &aVolSizeBytes);
727 //---------------------------------------------------------------------------------------------------------------------------------
729 Get Maximum file size, which is supported by the file system that has produced this mount.
730 @param aVolSizeBytes in: none; out: Theoretical max. supported by this file system file size.
732 @return KErrNotSupported this feature is not supported by the file system
735 inline TInt CMountCB::GetMaxSupportedFileSize(TUint64 &aSize)
737 return MountControl(EMountFsParamQuery, ESQ_GetMaxSupportedFileSize, &aSize);
742 //###############################################################################################
746 Sets the mount associated with the file.
748 @param aMount The mount.
750 inline void CFileCB::SetMount(CMountCB * aMount)
754 Gets a reference to the object representing the drive on which
757 @return A reference to the file's drive.
759 inline TDrive& CFileCB::Drive() const
766 Gets a reference to the object representing the drive on which the file was created.
768 The 'created drive' is only different from the 'drive', as returned by Drive(), if
769 the 'drive' was a substitute for the 'created drive' in the file server session.
771 @return A reference to the drive on which the file was created.
773 inline TDrive& CFileCB::CreatedDrive() const
774 {return(*iCreatedDrive);}
780 Gets a reference to the object representing the mount on which the file resides.
782 @return The file's mount.
784 inline CMountCB& CFileCB::Mount() const
791 Gets a reference to a heap descriptor containing the full file name.
793 @return A heap descriptor containing the full file name.
795 inline HBufC& CFileCB::FileName() const
796 {return(*iFileName);}
799 Gets a reference to a heap descriptor containing the folded full file name.
801 @return A heap descriptor containing the full file name.
803 inline HBufC& CFileCB::FileNameF() const
804 {return(*iFileNameF);}
807 Gets the hash of the folded filename
809 @return hash of the folded file name
811 inline TUint32 CFileCB::NameHash() const
816 Gets a reference to the file share locks array being used by the file.
817 @return The file share lock.
819 inline TFileLocksArray& CFileCB::FileLocks()
820 {return(*iFileLocks);}
826 Gets the file object's unique ID, as returned by CObject::UniqueID().
828 @return The object's unique ID.
832 inline TInt CFileCB::UniqueID() const
833 {return(CFsObject::UniqueID());}
839 Gets the iShare value, which defines the level of access allowed to the file.
841 @return The value of iShare
845 inline TShare CFileCB::Share() const
852 Sets the iShare value, which defines the level of access allowed to the file.
854 @param aShare The new value.
858 inline void CFileCB::SetShare(TShare aShare)
865 Gets the size of the file.
867 @return The size of the file.
869 inline TInt CFileCB::Size() const
876 Sets the size of the file.
878 @param aSize The size of the file.
880 inline void CFileCB::SetSize(TInt aSize)
887 Gets the file's attributes.
889 @return An integer containing the file attribute bit mask.
891 inline TInt CFileCB::Att() const
898 Sets the file's attributes.
900 @param aAtt The file attribute bit mask.
902 inline void CFileCB::SetAtt(TInt aAtt)
909 Gets the universal time when the file was last modified.
911 @return The universal time when the file was last modiified.
913 inline TTime CFileCB::Modified() const
920 Sets the universal time when the file was last modified.
922 @param aModified The universal time when the file was last modified.
924 inline void CFileCB::SetModified(TTime aModified)
925 {iModified=aModified;}
931 Tests whether the file is corrupt.
933 @return ETrue if the file is corrupt; EFalse otherwise.
935 inline TBool CFileCB::FileCorrupt() const
936 {return iFileCorrupt;}
942 Sets whether the file is corrupt.
944 @param aFileCorrupt ETrue, if the file is corrupt; EFalse, otherwise.
946 inline void CFileCB::SetFileCorrupt(TBool aFileCorrupt)
947 {iFileCorrupt=aFileCorrupt;}
953 Gets the iBadPower value.
955 @return The value of iBadPower
957 @see CFileCB::iBadPower
959 inline TBool CFileCB::BadPower() const
960 {return (iBadPower);}
966 Sets the iBadPower value.
968 @param aBadPower ETrue, if an operation on the file has failed due
970 EFalse if power has been found to be good.
972 @see CFileCB::iBadPower
974 inline void CFileCB::SetBadPower(TBool aBadPower)
975 {iBadPower=aBadPower;}
979 Retrieves the BlockMap of a file.
989 inline TInt CFileCB::BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos)
992 TInt r = GetInterface(EBlockMapInterface, pM, (TAny*) this);
995 return reinterpret_cast<CFileCB::MBlockMapInterface*>(pM)->BlockMap(aInfo, aStartPos, aEndPos);
1000 Retrieves TBusLocalDrive object associated with an open file.
1002 inline TInt CFileCB::LocalDrive(TBusLocalDrive*& aLocalDrive)
1005 return GetInterface(EGetLocalDrive, (TAny*&) aLocalDrive, NULL);
1008 //---------------------------------------------------------------------------------------------------------------------------------
1009 // Class RLocalMessage
1010 inline RLocalMessage::RLocalMessage()
1013 inline void RLocalMessage::InitHandle()
1014 {iHandle = KLocalMessageHandle; iFunction=-1;}
1016 inline void RLocalMessage::SetFunction(TInt aFunction)
1017 {iFunction = aFunction;}
1019 inline void RLocalMessage::SetArgs(TIpcArgs& aArgs)
1021 iArgs[0] = aArgs.iArgs[0];
1022 iArgs[1] = aArgs.iArgs[1];
1023 iArgs[2] = aArgs.iArgs[2];
1024 iArgs[3] = aArgs.iArgs[3];
1028 inline TInt RLocalMessage::Arg(TInt aIndex) const
1029 {return iArgs[aIndex];}
1031 //---------------------------------------------------------------------------------------------------------------------------------
1034 Gets a reference to the object representing an open file that is being shared.
1036 @return A reference to the shared file.
1038 inline CFileCB& CFileShare::File()
1042 // Returns ETrue if the file share mode is EFileBifFile
1043 // indicating large file access for the file share
1044 inline TBool CFileShare::IsFileModeBig()
1046 return (iMode & EFileBigFile) ? (TBool)ETrue:(TBool)EFalse;
1050 //---------------------------------------------------------------------------------------------------------------------------------
1054 Gets a reference to the object representing the drive on which
1055 the directory resides.
1057 @return A reference to the directory's drive.
1059 inline TDrive& CDirCB::Drive() const
1066 Gets a reference to the object representing the mount on which
1067 the directory resides.
1069 @return A reference to the directory's mount.
1071 inline CMountCB& CDirCB::Mount() const
1078 Tests whether the preceding entry details should be returned when
1079 multiple entries are being read.
1081 @return True if the preceding entry details should be returned;
1084 inline TBool CDirCB::Pending() const
1091 Sets whether the preceding entry details should be returned when
1092 multiple entries are being read.
1094 @param aPending ETrue if the preceding entry details should be returned;
1097 inline void CDirCB::SetPending(TBool aPending)
1098 {iPending=aPending;}
1102 //---------------------------------------------------------------------------------------------------------------------------------
1106 Gets the object representing the drive on which the disk to
1107 be formatted resides.
1109 @return The drive for the format action.
1111 inline TDrive& CFormatCB::Drive() const
1118 Gets the object representing the mount on which the disk to
1119 be formatted resides.
1121 @return The mount for the format action.
1123 inline CMountCB& CFormatCB::Mount() const
1130 Gets the mode of the format operation.
1132 @return The value of the format mode.
1134 inline TFormatMode CFormatCB::Mode() const
1141 Gets the current stage in the format operation.
1143 @return The stage the current format operation has reached.
1145 inline TInt& CFormatCB::CurrentStep()
1146 {return(iCurrentStep);}
1150 //---------------------------------------------------------------------------------------------------------------------------------
1154 Gets a reference to an object representing the drive on which the disk resides.
1156 @return A reference to the drive on which the disk resides.
1158 inline TDrive& CRawDiskCB::Drive()
1159 {return(iMount->Drive());}
1165 Gets an object representing the mount on which the disk resides.
1167 @return The mount on which the disk resides.
1169 inline CMountCB& CRawDiskCB::Mount()
1176 Tests whether the mount on which the disk resides is write protected.
1178 @return True if the mount is write protected, false otherwise.
1180 inline TBool CRawDiskCB::IsWriteProtected() const
1181 { return(iFlags & EWriteProtected); }
1188 Stores the write protected state of the disk.
1190 inline void CRawDiskCB::SetWriteProtected()
1191 { iFlags |= EWriteProtected; }
1197 Tests whether the disk contents has changed (due to a write operation)
1199 @return True if the disk contents has changed
1201 inline TBool CRawDiskCB::IsChanged() const
1202 { return(iFlags & EChanged); }
1208 Set a flag to state that the disk contents has changed (due to a write operation)
1210 inline void CRawDiskCB::SetChanged()
1211 { iFlags |= EChanged; }
1215 //---------------------------------------------------------------------------------------------------------------------------------
1216 // class CProxyDriveFactory
1218 Sets the Library (DLL) handle to be used by the CProxyDriveFactory
1220 inline void CProxyDriveFactory::SetLibrary(RLibrary aLib)
1223 Gets the Library (DLL) handle in use by the CProxyDriveFactory
1224 @return Library (DLL) handle
1226 inline RLibrary CProxyDriveFactory::Library() const
1230 inline void CExtProxyDriveFactory::SetLibrary(RLibrary aLib)
1233 inline RLibrary CExtProxyDriveFactory::Library() const
1237 //---------------------------------------------------------------------------------------------------------------------------------
1238 // class CProxyDrive
1240 Gets the mount control block object for a specific volume on a drive.
1242 @return either a currently mounted volume in the system or the volume that has been removed but still has
1243 subsession objects open.
1245 inline CMountCB* CProxyDrive::Mount() const
1248 inline void CProxyDrive::SetMount(CMountCB *aMount)
1254 Returns wheher the drive (and any extensions) support file caching
1256 inline TInt CProxyDrive::LocalBufferSupport()
1258 TAny* dummyInterface;
1259 return GetInterface(ELocalBufferSupport, dummyInterface, NULL);
1263 return whether proxy drive supports file caching
1265 inline TInt CBaseExtProxyDrive::LocalBufferSupport()
1267 return iProxy->LocalBufferSupport();
1270 //---------------------------------------------------------------------------------------------------------------------------------
1271 // Surrogate Pair hepler apis
1273 Determines if aChar is the outsite BMP.
1275 @param aChar character to checked if that is outside BMP.
1276 @return ETrue if outside BMP, EFalse otherwise.
1278 inline TBool IsSupplementary(TUint aChar)
1280 return (aChar > 0xFFFF);
1284 Determines if aInt16 is a high surrogate.
1286 @param aInt16 character to checked if that is high surrogate.
1287 @return ETrue if high surrogate, EFalse otherwise.
1289 inline TBool IsHighSurrogate(TText16 aInt16)
1291 return (aInt16 & 0xFC00) == 0xD800;
1295 Determines if aInt16 is a low surrogate.
1297 @param aInt16 character to checked if that is low surrogate.
1298 @return ETrue if low surrogate, EFalse otherwise.
1300 inline TBool IsLowSurrogate(TText16 aInt16)
1302 return (aInt16 & 0xFC00) == 0xDC00;
1306 Joins high surrogate character aHighSurrogate and low surrogate character aLowSurrogate.
1308 @param aHighSurrogate a high surrogate character to be joined.
1309 @param aLowSurrogate a low surrogate character to be joined.
1310 @return joined character that is outside BMP.
1312 inline TUint JoinSurrogate(TText16 aHighSurrogate, TText16 aLowSurrogate)
1314 return ((aHighSurrogate - 0xD7F7) << 10) + aLowSurrogate;
1317 //---------------------------------------------------------------------------------------------------------------------------------
1318 // class CExtProxyDrive
1319 inline TInt CExtProxyDrive::DriveNumber()
1320 {return iDriveNumber;};
1321 inline void CExtProxyDrive::SetDriveNumber(TInt aDrive)
1322 {iDriveNumber = aDrive;};
1323 inline CExtProxyDriveFactory* CExtProxyDrive::FactoryP()
1326 //---------------------------------------------------------------------------------------------------------------------------------
1327 // class CLocDrvMountCB
1329 Gets the mounted local drive object
1331 @return The local drive.
1333 inline CProxyDrive* CLocDrvMountCB::LocalDrive() const
1334 {return(iProxyDrive);}
1336 //---------------------------------------------------------------------------------------------------------------------------------
1338 inline CFsObjectCon* CFsObject::Container() const
1339 { return iContainer; }
1340 inline TInt CFsObject::Inc()
1341 { return __e32_atomic_tas_ord32(&iAccessCount, 1, 1, 0); }
1342 inline TInt CFsObject::Dec()
1343 { return __e32_atomic_tas_ord32(&iAccessCount, 1, -1, 0); }