1.1 --- a/epoc32/include/f32fsys.inl Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,1150 +0,0 @@
1.4 -// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -// f32\inc\f32fsys.inl
1.18 -//
1.19 -//
1.20 -
1.21 -#define __IS_DRIVETHREAD() {__ASSERT_DEBUG(IsDriveThread(),DriveFault(ETrue));}
1.22 -#define __IS_MAINTHREAD() {__ASSERT_DEBUG(IsMainThread(),DriveFault(EFalse));}
1.23 -
1.24 -
1.25 -//---------------------------------------------------------------------------------------------------------------------------------
1.26 -// Class TDrive
1.27 -
1.28 -/**
1.29 -Gets last error reason.
1.30 -
1.31 -@return TInt Returns last error reason.
1.32 -*/
1.33 -inline TInt TDrive::GetReason() const
1.34 - {
1.35 - __IS_DRIVETHREAD();
1.36 - return(iReason);
1.37 - }
1.38 -
1.39 -
1.40 -
1.41 -/**
1.42 -Sets a flag to state that the drive contents has changed.
1.43 -
1.44 -@param aValue True if contents has changed; False if unchanged.
1.45 -*/
1.46 -inline void TDrive::SetChanged(TBool aValue)
1.47 - {
1.48 -// __IS_DRIVETHREAD();//scan drive running in new thread
1.49 - iChanged=aValue;
1.50 - }
1.51 -
1.52 -
1.53 -
1.54 -
1.55 -/**
1.56 -Determines whether the drive content has changed.
1.57 -
1.58 -@return True if contents changed , False if unchanged.
1.59 -*/
1.60 -inline TBool TDrive::IsChanged() const
1.61 - {
1.62 -// __IS_DRIVETHREAD();
1.63 - return(iChanged);
1.64 - }
1.65 -
1.66 -
1.67 -
1.68 -
1.69 -/**
1.70 -Returns the drive number.
1.71 -
1.72 -@return The drive number.
1.73 -
1.74 -@see TDriveNumber
1.75 -*/
1.76 -inline TInt TDrive::DriveNumber() const
1.77 - {return(iDriveNumber);}
1.78 -
1.79 -
1.80 -
1.81 -
1.82 -/**
1.83 -Determines whether the drive is mounted.
1.84 -
1.85 -@return True if drive is mounted, False if drive is not mounted.
1.86 -*/
1.87 -inline TBool TDrive::IsMounted() const
1.88 - {
1.89 - __IS_DRIVETHREAD();
1.90 - return(iCurrentMount!=NULL);
1.91 - }
1.92 -
1.93 -
1.94 -
1.95 -
1.96 -/**
1.97 -Determines whether attribute is set to local.
1.98 -
1.99 -@return True if attribute is set to KDriveAttLocal, False for all other attributes.
1.100 -*/
1.101 -inline TBool TDrive::IsLocal() const
1.102 - {return(iAtt & KDriveAttLocal);}
1.103 -
1.104 -
1.105 -
1.106 -
1.107 -/**
1.108 -Determines whether the drive is ROM drive.
1.109 -
1.110 -@return True if drive attribute is set as ROM drive , False if not set as ROM drive.
1.111 -*/
1.112 -inline TBool TDrive::IsRom() const
1.113 - {return( iAtt & KDriveAttRom);}
1.114 -
1.115 -
1.116 -
1.117 -
1.118 -/**
1.119 -Determines whether the drive is removable.
1.120 -
1.121 -@return True if drive attribute is set to removable , False for all other attributes.
1.122 -*/
1.123 -inline TBool TDrive::IsRemovable() const
1.124 - {return( iAtt & KDriveAttRemovable);}
1.125 -
1.126 -
1.127 -
1.128 -
1.129 -/**
1.130 -Determines whether the drive is substed.
1.131 -
1.132 -@return True if drive attribute is set to substed (KDriveAttSubsted), False for all other attributes.
1.133 -*/
1.134 -inline TBool TDrive::IsSubsted() const
1.135 - {return( iAtt & KDriveAttSubsted);}// KDriveAttSubsted = 0x08
1.136 -
1.137 -
1.138 -
1.139 -
1.140 -/**
1.141 -Gets a reference to the object representing the current mount.
1.142 -
1.143 -@return The file's mount.
1.144 -*/
1.145 -inline CMountCB& TDrive::CurrentMount() const
1.146 - {
1.147 - __IS_DRIVETHREAD();
1.148 - return(*iCurrentMount);
1.149 - }
1.150 -
1.151 -
1.152 -
1.153 -
1.154 -/**
1.155 -Gets the substed drive.
1.156 -
1.157 -@return A pointer to the drive which is substed.
1.158 -*/
1.159 -inline TDrive& TDrive::SubstedDrive()const
1.160 - {
1.161 - __IS_MAINTHREAD();
1.162 - return(*iSubstedDrive);
1.163 - }
1.164 -
1.165 -
1.166 -
1.167 -
1.168 -/**
1.169 -
1.170 -Sets the drive as substed to the path set by an earlier call to SetSubst().
1.171 -
1.172 -@param aDrive A pointer to the drive on which the volume is mounted.
1.173 -
1.174 -*/
1.175 -inline void TDrive::SetSubstedDrive(TDrive* aDrive)
1.176 - {
1.177 - __IS_MAINTHREAD();
1.178 - iSubstedDrive=aDrive;
1.179 - }
1.180 -
1.181 -
1.182 -
1.183 -
1.184 -/**
1.185 -Gets the substed path set by an earlier call to SetSubst().
1.186 -
1.187 -@return A reference to a heap descriptor containing the substed path.
1.188 -*/
1.189 -inline HBufC& TDrive::Subst() const
1.190 - {
1.191 - __IS_MAINTHREAD();
1.192 - return(*iSubst);
1.193 - }
1.194 -
1.195 -
1.196 -
1.197 -
1.198 -/**
1.199 -Assigns a path to a drive.
1.200 -
1.201 -@param aSubst Path will be assigned to a drive.
1.202 -
1.203 -*/
1.204 -inline void TDrive::SetSubst(HBufC* aSubst)
1.205 - {
1.206 - __IS_MAINTHREAD();
1.207 - iSubst=aSubst;
1.208 - }
1.209 -
1.210 -
1.211 -
1.212 -/**
1.213 -
1.214 -Gets a reference to the object representing the mount on which the file resides.
1.215 -
1.216 -@return The Drives's mount.
1.217 -
1.218 -*/
1.219 -inline CFsObjectCon& TDrive::Mount() const
1.220 - {return(*iMount);}
1.221 -/**
1.222 -
1.223 -Gets a reference to the object representing the file system
1.224 -
1.225 -@return The reference to file system.
1.226 -
1.227 -*/
1.228 -inline CFileSystem& TDrive::FSys()
1.229 - {return(*iFSys);}
1.230 -/**
1.231 -
1.232 -Gets the object representing the file system
1.233 -
1.234 -@return The file system.
1.235 -
1.236 -*/
1.237 -inline CFileSystem*& TDrive::GetFSys()
1.238 - {return(iFSys);}
1.239 -/**
1.240 -
1.241 -Gets the object representing the TDriveExtInfo.
1.242 -
1.243 -@return The Drive extension information object.
1.244 -
1.245 -@see TDriveExtInfo
1.246 -
1.247 -*/
1.248 -inline TDriveExtInfo& TDrive::ExtInfo()
1.249 - {
1.250 - __IS_DRIVETHREAD();
1.251 - return(iExtInfo);
1.252 - }
1.253 -/**
1.254 -Sets the notification flag ON. The client will receive notifications on Read or Write
1.255 -failures from the file system.
1.256 -
1.257 -*/
1.258 -inline void TDrive::SetNotifyOn()
1.259 - {
1.260 - __IS_DRIVETHREAD();
1.261 - iDriveFlags &= ~ENotifyOff;
1.262 - }
1.263 -/**
1.264 -Sets the notification flag OFF. The client will not receive notifications on Read or Write
1.265 -failures from the file system.
1.266 -
1.267 -*/
1.268 -inline void TDrive::SetNotifyOff()
1.269 - {
1.270 - __IS_DRIVETHREAD();
1.271 - iDriveFlags |= ENotifyOff;
1.272 - }
1.273 -/**
1.274 -
1.275 -Locks the drive.This function acquires iLock mutex.
1.276 -
1.277 -*/
1.278 -inline void TDrive::Lock()
1.279 - {iLock.Wait();}
1.280 -/**
1.281 -
1.282 -UnLocks the drive.This function signals the iLock mutex.
1.283 -
1.284 -*/
1.285 -
1.286 -inline void TDrive::UnLock()
1.287 - {iLock.Signal();}
1.288 -
1.289 -
1.290 -/**
1.291 -
1.292 -Gets the reserved space of a drive
1.293 -
1.294 -@return Amount of space reserved in bytes.
1.295 -
1.296 -*/
1.297 -
1.298 -inline TInt TDrive::ReservedSpace() const
1.299 - {return iReservedSpace;}
1.300 -
1.301 -/**
1.302 -
1.303 -Reserves a space of a drive.
1.304 -
1.305 -@param aReservedSpace Amount of space to reserve in bytes.
1.306 -
1.307 -*/
1.308 -inline void TDrive::SetReservedSpace(const TInt aReservedSpace)
1.309 - {iReservedSpace=aReservedSpace; }
1.310 -
1.311 -/**
1.312 -
1.313 -Sets the rugged flag in the drive object.
1.314 -
1.315 -@param Flag to set or clear the rugged flag.
1.316 -@see IsRugged()
1.317 -
1.318 -*/
1.319 -
1.320 -inline void TDrive::SetRugged(TBool aIsRugged)
1.321 - {
1.322 - if (!aIsRugged)
1.323 - iDriveFlags |= ENotRugged;
1.324 - else
1.325 - iDriveFlags &= ~ENotRugged;
1.326 - }
1.327 -
1.328 -/**
1.329 -
1.330 -Returns whether the current drive is running as rugged Fat
1.331 -or not.If IsRugged flag is set then in the event of power
1.332 -failure fat/metadata will be in a valid state if the scandrive
1.333 -utility is run immediately after.
1.334 -
1.335 -@return Is rugged fat flag.
1.336 -*/
1.337 -
1.338 -inline TBool TDrive::IsRugged() const
1.339 - {return !(iDriveFlags & ENotRugged); }
1.340 -
1.341 -
1.342 -/**
1.343 - @return ETrue if the drive is synchronous, i.e. runs in the main file server thread.
1.344 -*/
1.345 -inline TBool TDrive::IsSynchronous() const
1.346 -{
1.347 - return iDriveFlags & EDriveIsSynch;
1.348 -}
1.349 -
1.350 -/**
1.351 - Set or reset internal EDriveIsSynch flag for the TDrive.
1.352 -*/
1.353 -inline void TDrive::SetSynchronous(TBool aIsSynch)
1.354 -{
1.355 - if(aIsSynch)
1.356 - iDriveFlags |= EDriveIsSynch;
1.357 - else
1.358 - iDriveFlags &= ~EDriveIsSynch;
1.359 -
1.360 -}
1.361 -
1.362 -
1.363 -// Class CMountCB
1.364 -
1.365 -/**
1.366 -Gets a reference to the object representing the drive on which
1.367 -the volume is mounted.
1.368 -
1.369 -@return The drive on which the volume is mounted.
1.370 -*/
1.371 -inline TDrive& CMountCB::Drive() const
1.372 - {return(*iDrive);}
1.373 -
1.374 -
1.375 -
1.376 -
1.377 -/**
1.378 -Sets a pointer to the object representing the drive on which
1.379 -the volume is mounted.
1.380 -
1.381 -@param aDrive A pointer to the drive on which the volume is mounted.
1.382 -*/
1.383 -inline void CMountCB::SetDrive(TDrive* aDrive)
1.384 - {iDrive=aDrive;}
1.385 -
1.386 -
1.387 -
1.388 -
1.389 -/**
1.390 -Gets a reference to a heap descriptor containing the name of
1.391 -the mounted volume.
1.392 -
1.393 -@return A reference to a heap descriptor containing the volume name.
1.394 -*/
1.395 -inline HBufC& CMountCB::VolumeName() const
1.396 - {return(*iVolumeName);}
1.397 -
1.398 -
1.399 -
1.400 -
1.401 -/**
1.402 -Sets a pointer to a heap descriptor containing the name of the mounted volume.
1.403 -
1.404 -@param aName A pointer to a heap descriptor containing the name of
1.405 - the mounted volume to be set.
1.406 -*/
1.407 -inline void CMountCB::SetVolumeName(HBufC* aName)
1.408 - {iVolumeName=aName;}
1.409 -
1.410 -
1.411 -
1.412 -
1.413 -/**
1.414 -Tests whether the client is notified of any read or write failures.
1.415 -
1.416 -The notification status is a property of the current session with
1.417 -the file server, the value of which is stored in CSessionFs::iNotifyUser.
1.418 -If set to true, the client will receive notifications from the file system.
1.419 -
1.420 -Typically, this function might be used to save the current notification
1.421 -state prior to temporarily disabling notifiers. This allows the original
1.422 -notification state to be restored.
1.423 -
1.424 -Note that GetNotifyUser() is only available once the drive has been set for
1.425 -the mount control block (using SetDrive()), since the notification status
1.426 -is held by the session and accessed via the drive.
1.427 -
1.428 -@return True if the client receives notifications from the file system,
1.429 - false otherwise.
1.430 -*/
1.431 -inline TBool CMountCB::GetNotifyUser() const
1.432 - {return(Drive().GetNotifyUser());}
1.433 -
1.434 -
1.435 -
1.436 -
1.437 -/**
1.438 -*/
1.439 -inline void CMountCB::SetNotifyOn()
1.440 - {Drive().SetNotifyOn();}
1.441 -
1.442 -
1.443 -
1.444 -
1.445 -/**
1.446 -*/
1.447 -inline void CMountCB::SetNotifyOff()
1.448 - {Drive().SetNotifyOff();}
1.449 -
1.450 -
1.451 -
1.452 -
1.453 -/**
1.454 -Locks the mount by incrementing the internal lock counter.
1.455 -
1.456 -The mount becomes locked on formatting or on the opening of a resource
1.457 -(a file or a directory) or raw disk subsession.
1.458 -A format, resource or raw disk subsession can only be opened if the mount
1.459 -is not locked.
1.460 -*/
1.461 -inline void CMountCB::IncLock()
1.462 - {iLockMount++;}
1.463 -
1.464 -
1.465 -
1.466 -
1.467 -/**
1.468 -Unlocks the mount by decrementing the internal lock counter.
1.469 -
1.470 -The mount becomes locked on formatting or on the opening of a resource
1.471 -(a file or a directory) or raw disk subsession.
1.472 -A format, resource or raw disk subsession can only be opened if the mount
1.473 -is not locked.
1.474 -*/
1.475 -inline void CMountCB::DecLock()
1.476 - {iLockMount--;}
1.477 -
1.478 -
1.479 -
1.480 -
1.481 -/**
1.482 -Gets the current lock status.
1.483 -
1.484 -It delivers the current lock status by returning the internal lock counter.
1.485 -
1.486 -@return The current lock status.
1.487 -*/
1.488 -inline TInt CMountCB::LockStatus() const
1.489 - {return(iLockMount);}
1.490 -
1.491 -
1.492 -
1.493 -
1.494 -/**
1.495 -Tests whether the mount is currently locked.
1.496 -
1.497 -A mount is locked when the internal lock counter is greater than zero.
1.498 -On creation, the lock counter is set to zero.
1.499 -
1.500 -The mount becomes locked on formatting or on the opening of a resource
1.501 -(a file or a directory) or raw disk subsession.
1.502 -A format, resource or raw disk subsession can only be opened if the mount
1.503 -is not locked.
1.504 -
1.505 -@return True if the mount is locked, false, otherwise.
1.506 -*/
1.507 -inline TBool CMountCB::Locked() const
1.508 - {return iLockMount>0; }
1.509 -
1.510 -
1.511 -
1.512 -
1.513 -/**
1.514 -Tests whether the mount control block represents the current mount on
1.515 -the associated drive.
1.516 -
1.517 -A drive has only one mount which is accessible: the current mount.
1.518 -Any mount other than the current mount relates to a partition (i.e. volume)
1.519 -that was present on a removable media which has since been removed.
1.520 -The reason the mount has persisted is because resources (i.e. files/directories)
1.521 -are still open on it.
1.522 -
1.523 -This function is only available when the drive has been set for the mount
1.524 -control block (using SetDrive()), since the current mount is held by the drive.
1.525 -
1.526 -@return True if the mount is the current mount on the drive, false otherwise.
1.527 -*/
1.528 -inline TBool CMountCB::IsCurrentMount() const
1.529 - {return(this==&iDrive->CurrentMount());}
1.530 -
1.531 -
1.532 -
1.533 -
1.534 -/**
1.535 -*/
1.536 -inline TInt64 CMountCB::Size() const
1.537 - {return(iSize);}
1.538 -
1.539 -
1.540 -
1.541 -
1.542 -/**
1.543 -Set the unique mount number
1.544 -@param aMountNumber - The unique mount number
1.545 -*/
1.546 -const TInt KMountDismounted = 0x80000000;
1.547 -inline void CMountCB::SetMountNumber(TInt aMountNumber)
1.548 - { iMountNumber = (aMountNumber &~ KMountDismounted); }
1.549 -
1.550 -
1.551 -
1.552 -
1.553 -/**
1.554 -Set the mount to be dismounted
1.555 -*/
1.556 -inline void CMountCB::SetDismounted(TBool aDismounted)
1.557 - {
1.558 - if(aDismounted)
1.559 - iMountNumber |= KMountDismounted;
1.560 - else
1.561 - iMountNumber &= ~KMountDismounted;
1.562 - }
1.563 -
1.564 -
1.565 -
1.566 -
1.567 -/**
1.568 -Returns the unique mount number
1.569 -@return The unique mount number
1.570 -*/
1.571 -inline TInt CMountCB::MountNumber() const
1.572 - { return(iMountNumber &~ KMountDismounted); }
1.573 -
1.574 -
1.575 -
1.576 -
1.577 -/**
1.578 -Returns ETrue if the mount is flagged as dismounted.
1.579 -@return ETrue if the mount is flagged as dismounted
1.580 -*/
1.581 -inline TBool CMountCB::IsDismounted() const
1.582 - { return(iMountNumber & KMountDismounted); }
1.583 -
1.584 -
1.585 -
1.586 -/**
1.587 -Retrieves TBusLocalDrive object associated with the mount
1.588 -*/
1.589 -inline TInt CMountCB::LocalDrive(TBusLocalDrive*& aLocalDrive)
1.590 - {
1.591 - aLocalDrive = NULL;
1.592 - return GetInterface(EGetLocalDrive, (TAny*&) aLocalDrive, NULL);
1.593 - }
1.594 -
1.595 -inline TInt CMountCB::AddToCompositeMount(TInt aMountIndex)
1.596 - {
1.597 - TAny *mountInterface = NULL;
1.598 - return(GetInterface(EAddToCompositeMount, mountInterface, (TAny*)aMountIndex));
1.599 - }
1.600 -
1.601 -/**
1.602 -Returns whether the mount (and any extensions) support file caching
1.603 -*/
1.604 -inline TInt CMountCB::LocalBufferSupport(CFileCB* aFile)
1.605 - {
1.606 - TAny* dummyInterface;
1.607 - return GetInterface(ELocalBufferSupport, dummyInterface, aFile);
1.608 - }
1.609 -
1.610 -inline TInt CMountCB::MountControl(TInt /*aLevel*/, TInt /*aOption*/, TAny* /*aParam*/)
1.611 - {
1.612 - return KErrNotSupported;
1.613 - }
1.614 -
1.615 -
1.616 -inline void CMountCB::FinaliseMountL(TInt aOperation, TAny* /*aParam1=NULL*/, TAny* /*aParam2=NULL*/)
1.617 - {
1.618 - if(aOperation == RFs::EFinal_RW)
1.619 - {//-- call the legacy method
1.620 - FinaliseMountL();
1.621 - return;
1.622 - }
1.623 -
1.624 - User::Leave(KErrNotSupported);
1.625 - }
1.626 -
1.627 -inline TInt CMountCB::CheckDisk(TInt /*aOperation*/, TAny* /*aParam1=NULL*/, TAny* /*aParam2=NULL*/)
1.628 - {
1.629 - return(KErrNotSupported);
1.630 - }
1.631 -
1.632 -inline TInt CMountCB::ScanDrive(TInt /*aOperation*/, TAny* /*aParam1=NULL*/, TAny* /*aParam2=NULL*/)
1.633 - {
1.634 - return(KErrNotSupported);
1.635 - }
1.636 -
1.637 -//---------------------------------------------------------------------------------------------------------------------------------
1.638 -// Class CFileCB
1.639 -
1.640 -/**
1.641 -Sets the mount associated with the file.
1.642 -
1.643 -@param aMount The mount.
1.644 -*/
1.645 -inline void CFileCB::SetMount(CMountCB * aMount)
1.646 - {iMount=aMount;}
1.647 -
1.648 -/**
1.649 -Gets a reference to the object representing the drive on which
1.650 -the file resides.
1.651 -
1.652 -@return A reference to the file's drive.
1.653 -*/
1.654 -inline TDrive& CFileCB::Drive() const
1.655 - {return(*iDrive);}
1.656 -
1.657 -
1.658 -
1.659 -
1.660 -/**
1.661 -Gets a reference to the object representing the drive on which the file was created.
1.662 -
1.663 -The 'created drive' is only different from the 'drive', as returned by Drive(), if
1.664 -the 'drive' was a substitute for the 'created drive' in the file server session.
1.665 -
1.666 -@return A reference to the drive on which the file was created.
1.667 -*/
1.668 -inline TDrive& CFileCB::CreatedDrive() const
1.669 - {return(*iCreatedDrive);}
1.670 -
1.671 -
1.672 -
1.673 -
1.674 -/**
1.675 -Gets a reference to the object representing the mount on which the file resides.
1.676 -
1.677 -@return The file's mount.
1.678 -*/
1.679 -inline CMountCB& CFileCB::Mount() const
1.680 - {return(*iMount);}
1.681 -
1.682 -
1.683 -
1.684 -
1.685 -/**
1.686 -Gets a reference to a heap descriptor containing the full file name.
1.687 -
1.688 -@return A heap descriptor containing the full file name.
1.689 -*/
1.690 -inline HBufC& CFileCB::FileName() const
1.691 - {return(*iFileName);}
1.692 -
1.693 -/**
1.694 -Gets a reference to a heap descriptor containing the folded full file name.
1.695 -
1.696 -@return A heap descriptor containing the full file name.
1.697 -*/
1.698 -inline HBufC& CFileCB::FileNameF() const
1.699 - {return(*iFileNameF);}
1.700 -
1.701 -/**
1.702 -Gets the hash of the folded filename
1.703 -
1.704 -@return hash of the folded file name
1.705 -*/
1.706 -inline TUint32 CFileCB::NameHash() const
1.707 - {return(iNameHash);}
1.708 -
1.709 -
1.710 -/**
1.711 -Gets a reference to the file share lock being used by the file.
1.712 -
1.713 -@return The file share lock.
1.714 -*/
1.715 -inline RArray<SFileShareLock>& CFileCB::Lock()
1.716 - {return(*iLock);}
1.717 -
1.718 -
1.719 -
1.720 -
1.721 -/**
1.722 -Gets the file object's unique ID, as returned by CObject::UniqueID().
1.723 -
1.724 -@return The object's unique ID.
1.725 -
1.726 -@see CObject
1.727 -*/
1.728 -inline TInt CFileCB::UniqueID() const
1.729 - {return(CFsObject::UniqueID());}
1.730 -
1.731 -
1.732 -
1.733 -
1.734 -/**
1.735 -Gets the iShare value, which defines the level of access allowed to the file.
1.736 -
1.737 -@return The value of iShare
1.738 -
1.739 -@see CFileCB::iShare
1.740 -*/
1.741 -inline TShare CFileCB::Share() const
1.742 - {return(iShare);}
1.743 -
1.744 -
1.745 -
1.746 -
1.747 -/**
1.748 -Sets the iShare value, which defines the level of access allowed to the file.
1.749 -
1.750 -@param aShare The new value.
1.751 -
1.752 -@see CFileCB::iShare
1.753 -*/
1.754 -inline void CFileCB::SetShare(TShare aShare)
1.755 - {iShare=aShare;}
1.756 -
1.757 -
1.758 -
1.759 -
1.760 -/**
1.761 -Gets the size of the file.
1.762 -
1.763 -@return The size of the file.
1.764 -*/
1.765 -inline TInt CFileCB::Size() const
1.766 - {return(iSize);}
1.767 -
1.768 -
1.769 -
1.770 -
1.771 -/**
1.772 -Sets the size of the file.
1.773 -
1.774 -@param aSize The size of the file.
1.775 -*/
1.776 -inline void CFileCB::SetSize(TInt aSize)
1.777 - {iSize=aSize;}
1.778 -
1.779 -
1.780 -
1.781 -
1.782 -/**
1.783 -Gets the file's attributes.
1.784 -
1.785 -@return An integer containing the file attribute bit mask.
1.786 -*/
1.787 -inline TInt CFileCB::Att() const
1.788 - {return(iAtt);}
1.789 -
1.790 -
1.791 -
1.792 -
1.793 -/**
1.794 -Sets the file's attributes.
1.795 -
1.796 -@param aAtt The file attribute bit mask.
1.797 -*/
1.798 -inline void CFileCB::SetAtt(TInt aAtt)
1.799 - {iAtt=aAtt;}
1.800 -
1.801 -
1.802 -
1.803 -
1.804 -/**
1.805 -Gets the universal time when the file was last modified.
1.806 -
1.807 -@return The universal time when the file was last modiified.
1.808 -*/
1.809 -inline TTime CFileCB::Modified() const
1.810 - {return(iModified);}
1.811 -
1.812 -
1.813 -
1.814 -
1.815 -/**
1.816 -Sets the universal time when the file was last modified.
1.817 -
1.818 -@param aModified The universal time when the file was last modified.
1.819 -*/
1.820 -inline void CFileCB::SetModified(TTime aModified)
1.821 - {iModified=aModified;}
1.822 -
1.823 -
1.824 -
1.825 -
1.826 -/**
1.827 -Tests whether the file is corrupt.
1.828 -
1.829 -@return ETrue if the file is corrupt; EFalse otherwise.
1.830 -*/
1.831 -inline TBool CFileCB::FileCorrupt() const
1.832 - {return iFileCorrupt;}
1.833 -
1.834 -
1.835 -
1.836 -
1.837 -/**
1.838 -Sets whether the file is corrupt.
1.839 -
1.840 -@param aFileCorrupt ETrue, if the file is corrupt; EFalse, otherwise.
1.841 -*/
1.842 -inline void CFileCB::SetFileCorrupt(TBool aFileCorrupt)
1.843 - {iFileCorrupt=aFileCorrupt;}
1.844 -
1.845 -
1.846 -
1.847 -
1.848 -/**
1.849 -Gets the iBadPower value.
1.850 -
1.851 -@return The value of iBadPower
1.852 -
1.853 -@see CFileCB::iBadPower
1.854 -*/
1.855 -inline TBool CFileCB::BadPower() const
1.856 - {return (iBadPower);}
1.857 -
1.858 -
1.859 -
1.860 -
1.861 -/**
1.862 -Sets the iBadPower value.
1.863 -
1.864 -@param aBadPower ETrue, if an operation on the file has failed due
1.865 - to bad power;
1.866 - EFalse if power has been found to be good.
1.867 -
1.868 -@see CFileCB::iBadPower
1.869 -*/
1.870 -inline void CFileCB::SetBadPower(TBool aBadPower)
1.871 - {iBadPower=aBadPower;}
1.872 -
1.873 -
1.874 -/**
1.875 -Retrieves the BlockMap of a file.
1.876 -
1.877 -@param aInfo
1.878 -
1.879 -@param aStartPos
1.880 -
1.881 -@param aEndPos
1.882 -
1.883 -@return
1.884 -*/
1.885 -inline TInt CFileCB::BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos)
1.886 - {
1.887 - TAny* pM;
1.888 - TInt r = GetInterface(EBlockMapInterface, pM, (TAny*) this);
1.889 - if (KErrNone!=r)
1.890 - return r;
1.891 - return reinterpret_cast<CFileCB::MBlockMapInterface*>(pM)->BlockMap(aInfo, aStartPos, aEndPos);
1.892 - }
1.893 -
1.894 -
1.895 -/**
1.896 -Retrieves TBusLocalDrive object associated with an open file.
1.897 -*/
1.898 -inline TInt CFileCB::LocalDrive(TBusLocalDrive*& aLocalDrive)
1.899 - {
1.900 - aLocalDrive = NULL;
1.901 - return GetInterface(EGetLocalDrive, (TAny*&) aLocalDrive, NULL);
1.902 - }
1.903 -
1.904 -//---------------------------------------------------------------------------------------------------------------------------------
1.905 -// Class RLocalMessage
1.906 -inline RLocalMessage::RLocalMessage()
1.907 - {iHandle = KLocalMessageHandle; iFunction=-1;}
1.908 -
1.909 -//---------------------------------------------------------------------------------------------------------------------------------
1.910 -// Class CFileShare
1.911 -/**
1.912 -Gets a reference to the object representing an open file that is being shared.
1.913 -
1.914 -@return A reference to the shared file.
1.915 -*/
1.916 -inline CFileCB& CFileShare::File()
1.917 - {return(*iFile);}
1.918 -
1.919 -
1.920 -//---------------------------------------------------------------------------------------------------------------------------------
1.921 -// Class CDirCB
1.922 -
1.923 -/**
1.924 -Gets a reference to the object representing the drive on which
1.925 -the directory resides.
1.926 -
1.927 -@return A reference to the directory's drive.
1.928 -*/
1.929 -inline TDrive& CDirCB::Drive() const
1.930 - {return(*iDrive);}
1.931 -
1.932 -
1.933 -
1.934 -
1.935 -/**
1.936 -Gets a reference to the object representing the mount on which
1.937 -the directory resides.
1.938 -
1.939 -@return A reference to the directory's mount.
1.940 -*/
1.941 -inline CMountCB& CDirCB::Mount() const
1.942 - {return(*iMount);}
1.943 -
1.944 -
1.945 -
1.946 -
1.947 -/**
1.948 -Tests whether the preceding entry details should be returned when
1.949 -multiple entries are being read.
1.950 -
1.951 -@return True if the preceding entry details should be returned;
1.952 - false otherwise.
1.953 -*/
1.954 -inline TBool CDirCB::Pending() const
1.955 - {return iPending;}
1.956 -
1.957 -
1.958 -
1.959 -
1.960 -/**
1.961 -Sets whether the preceding entry details should be returned when
1.962 -multiple entries are being read.
1.963 -
1.964 -@param aPending ETrue if the preceding entry details should be returned;
1.965 - EFalse otherwise.
1.966 -*/
1.967 -inline void CDirCB::SetPending(TBool aPending)
1.968 - {iPending=aPending;}
1.969 -
1.970 -
1.971 -
1.972 -//---------------------------------------------------------------------------------------------------------------------------------
1.973 -// class CFormatCB
1.974 -
1.975 -/**
1.976 -Gets the object representing the drive on which the disk to
1.977 -be formatted resides.
1.978 -
1.979 -@return The drive for the format action.
1.980 -*/
1.981 -inline TDrive& CFormatCB::Drive() const
1.982 - {return(*iDrive);}
1.983 -
1.984 -
1.985 -
1.986 -
1.987 -/**
1.988 -Gets the object representing the mount on which the disk to
1.989 -be formatted resides.
1.990 -
1.991 -@return The mount for the format action.
1.992 -*/
1.993 -inline CMountCB& CFormatCB::Mount() const
1.994 - {return(*iMount);}
1.995 -
1.996 -
1.997 -
1.998 -
1.999 -/**
1.1000 -Gets the mode of the format operation.
1.1001 -
1.1002 -@return The value of the format mode.
1.1003 -*/
1.1004 -inline TFormatMode CFormatCB::Mode() const
1.1005 - {return(iMode);}
1.1006 -
1.1007 -
1.1008 -
1.1009 -
1.1010 -/**
1.1011 -Gets the current stage in the format operation.
1.1012 -
1.1013 -@return The stage the current format operation has reached.
1.1014 -*/
1.1015 -inline TInt& CFormatCB::CurrentStep()
1.1016 - {return(iCurrentStep);}
1.1017 -
1.1018 -
1.1019 -
1.1020 -//---------------------------------------------------------------------------------------------------------------------------------
1.1021 -// class CRawDiskCB
1.1022 -
1.1023 -/**
1.1024 -Gets a reference to an object representing the drive on which the disk resides.
1.1025 -
1.1026 -@return A reference to the drive on which the disk resides.
1.1027 -*/
1.1028 -inline TDrive& CRawDiskCB::Drive()
1.1029 - {return(iMount->Drive());}
1.1030 -
1.1031 -
1.1032 -
1.1033 -
1.1034 -/**
1.1035 -Gets an object representing the mount on which the disk resides.
1.1036 -
1.1037 -@return The mount on which the disk resides.
1.1038 -*/
1.1039 -inline CMountCB& CRawDiskCB::Mount()
1.1040 - {return(*iMount);}
1.1041 -
1.1042 -
1.1043 -
1.1044 -
1.1045 -/**
1.1046 -Tests whether the mount on which the disk resides is write protected.
1.1047 -
1.1048 -@return True if the mount is write protected, false otherwise.
1.1049 -*/
1.1050 -inline TBool CRawDiskCB::IsWriteProtected() const
1.1051 - { return(iFlags & EWriteProtected); }
1.1052 -
1.1053 -
1.1054 -
1.1055 -
1.1056 -
1.1057 -/**
1.1058 -Stores the write protected state of the disk.
1.1059 -*/
1.1060 -inline void CRawDiskCB::SetWriteProtected()
1.1061 - { iFlags |= EWriteProtected; }
1.1062 -
1.1063 -
1.1064 -
1.1065 -
1.1066 -/**
1.1067 -Tests whether the disk contents has changed (due to a write operation)
1.1068 -
1.1069 -@return True if the disk contents has changed
1.1070 -*/
1.1071 -inline TBool CRawDiskCB::IsChanged() const
1.1072 - { return(iFlags & EChanged); }
1.1073 -
1.1074 -
1.1075 -
1.1076 -
1.1077 -/**
1.1078 -Set a flag to state that the disk contents has changed (due to a write operation)
1.1079 -*/
1.1080 -inline void CRawDiskCB::SetChanged()
1.1081 - { iFlags |= EChanged; }
1.1082 -
1.1083 -
1.1084 -
1.1085 -//---------------------------------------------------------------------------------------------------------------------------------
1.1086 -// class CProxyDriveFactory
1.1087 -/**
1.1088 -Sets the Library (DLL) handle to be used by the CProxyDriveFactory
1.1089 -*/
1.1090 -inline void CProxyDriveFactory::SetLibrary(RLibrary aLib)
1.1091 - {iLibrary=aLib;}
1.1092 -/**
1.1093 -Gets the Library (DLL) handle in use by the CProxyDriveFactory
1.1094 -@return Library (DLL) handle
1.1095 -*/
1.1096 -inline RLibrary CProxyDriveFactory::Library() const
1.1097 - {return(iLibrary);}
1.1098 -
1.1099 -//---------------------------------------------------------------------------------------------------------------------------------
1.1100 -// class CProxyDrive
1.1101 -/**
1.1102 -Gets the mount control block object for a specific volume on a drive.
1.1103 -
1.1104 -@return either a currently mounted volume in the system or the volume that has been removed but still has
1.1105 -subsession objects open.
1.1106 -*/
1.1107 -inline CMountCB* CProxyDrive::Mount() const
1.1108 - {return(iMount);}
1.1109 -
1.1110 -
1.1111 -/**
1.1112 -Returns wheher the drive (and any extensions) support file caching
1.1113 -*/
1.1114 -inline TInt CProxyDrive::LocalBufferSupport()
1.1115 - {
1.1116 - TAny* dummyInterface;
1.1117 - return GetInterface(ELocalBufferSupport, dummyInterface, NULL);
1.1118 - }
1.1119 -
1.1120 -/**
1.1121 -return whether proxy drive supports file caching
1.1122 -*/
1.1123 -inline TInt CBaseExtProxyDrive::LocalBufferSupport()
1.1124 - {
1.1125 - return iProxy->LocalBufferSupport();
1.1126 - }
1.1127 -
1.1128 -//---------------------------------------------------------------------------------------------------------------------------------
1.1129 -// class CLocDrvMountCB
1.1130 -/**
1.1131 -Gets the mounted local drive object
1.1132 -
1.1133 -@return The local drive.
1.1134 -*/
1.1135 -inline CProxyDrive* CLocDrvMountCB::LocalDrive() const
1.1136 - {return(iProxyDrive);}
1.1137 -
1.1138 -inline TDismountParams::TDismountParams(TInt aDriveNumber, TDrive* aDrivePointer, TBool aForcedDismount, RMessage2* aForcedMessage)
1.1139 - {
1.1140 - iDriveNumber = aDriveNumber;
1.1141 - iDrivePointer = aDrivePointer;
1.1142 - iForcedDismount = aForcedDismount;
1.1143 - iForcedMessage = aForcedMessage;
1.1144 - }
1.1145 -
1.1146 -//---------------------------------------------------------------------------------------------------------------------------------
1.1147 -// class CFsObject
1.1148 -inline CFsObjectCon* CFsObject::Container() const
1.1149 - {return iContainer;}
1.1150 -inline TInt CFsObject::Inc()
1.1151 - {return(User::SafeInc(iAccessCount));}
1.1152 -inline TInt CFsObject::Dec()
1.1153 - {return(User::SafeDec(iAccessCount));}