1.1 --- a/epoc32/include/f32fsys.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,2941 +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.h
1.18 -//
1.19 -//
1.20 -
1.21 -
1.22 -
1.23 -/**
1.24 - @file
1.25 - @publishedPartner
1.26 - @released
1.27 -*/
1.28 -
1.29 -#if !defined(__F32FSYS_H__)
1.30 -#define __F32FSYS_H__
1.31 -#if !defined(__F32FILE_H__)
1.32 -#include <f32file.h>
1.33 -#endif
1.34 -//
1.35 -#if defined(_UNICODE)
1.36 -#define KFileSystemUidValue KFileSystemUidValue16
1.37 -#define KFileServerUidValue KFileServerUidValue16
1.38 -#define KFileServerDllUidValue KFileServerDllUidValue16
1.39 -#else
1.40 -#define KFileSystemUidValue KFileSystemUidValue8
1.41 -#define KFileServerUidValueKFileServerUidValue8
1.42 -#define KFileServerDllUidValueKFileServerDllUidValue8
1.43 -#endif
1.44 -
1.45 -
1.46 -/**
1.47 -Filesystem error code 1 : indicates an item cannot be found,
1.48 -because it has been hidden.
1.49 -*/
1.50 -const TInt KErrHidden=(1);
1.51 -
1.52 -/**
1.53 -Filesystem error code 2 : in the context of file operations, a path
1.54 -was not found, because it has been hidden.
1.55 -*/
1.56 -const TInt KErrPathHidden=(2);
1.57 -
1.58 -
1.59 -const TInt KFileShareLockGranularity=2;
1.60 -const TInt KAsyncRequestArrayGranularity=2;
1.61 -
1.62 -/**
1.63 -@publishedPartner
1.64 -@released
1.65 -
1.66 -File system UID value 16.
1.67 -*/
1.68 -const TInt KFileSystemUidValue16=0x100039df;
1.69 -
1.70 -
1.71 -
1.72 -
1.73 -/**
1.74 -@publishedPartner
1.75 -@released
1.76 -
1.77 -File system UID value 8.
1.78 -*/
1.79 -const TInt KFileSystemUidValue8=0x1000008f;
1.80 -
1.81 -
1.82 -
1.83 -
1.84 -/**
1.85 -@publishedPartner
1.86 -@released
1.87 -
1.88 -File server UID value 16.
1.89 -*/
1.90 -const TInt KFileServerUidValue16=0x100039e3;
1.91 -
1.92 -
1.93 -
1.94 -
1.95 -/**
1.96 -@publishedPartner
1.97 -@released
1.98 -
1.99 -File server UID value 8.
1.100 -*/
1.101 -const TInt KFileServerUidValue8=0x100000bb;
1.102 -
1.103 -
1.104 -
1.105 -
1.106 -/**
1.107 -@publishedPartner
1.108 -@released
1.109 -
1.110 -File server DLL UID value 16.
1.111 -*/
1.112 -const TInt KFileServerDllUidValue16=0x100039e4;
1.113 -
1.114 -
1.115 -
1.116 -
1.117 -/**
1.118 -@publishedPartner
1.119 -@released
1.120 -
1.121 -File server DLL UID value 8.
1.122 -*/
1.123 -const TInt KFileServerDllUidValue8=0x100000bd;
1.124 -
1.125 -
1.126 -
1.127 -
1.128 -/**
1.129 -@publishedPartner
1.130 -@released
1.131 -
1.132 -Local file system UID value.
1.133 -*/
1.134 -const TInt KLocalFileSystemUidValue=0x100000d6;
1.135 -
1.136 -
1.137 -
1.138 -
1.139 -/**
1.140 -@publishedPartner
1.141 -@released
1.142 -
1.143 -Estart component UID value.
1.144 -*/
1.145 -const TInt KEstartUidValue=0x10272C04;
1.146 -
1.147 -
1.148 -
1.149 -/**
1.150 -@publishedPartner
1.151 -@released
1.152 -Maximum length of a volume name.
1.153 -*/
1.154 -const TInt KMaxVolumeNameLength=11;
1.155 -
1.156 -
1.157 -
1.158 -
1.159 -/**
1.160 -@publishedPartner
1.161 -@released
1.162 -
1.163 -First local drive indicator.
1.164 -*/
1.165 -const TInt KFirstLocalDrive=EDriveC;
1.166 -
1.167 -
1.168 -const TInt KMaxExtensionCount=2;
1.169 -//
1.170 -const TInt KDriveInvalid=-1;
1.171 -//
1.172 -_LIT(KMediaPWrdFile, "?:\\sys\\data\\mmcstore");
1.173 -//
1.174 -
1.175 -/**
1.176 -@internalTechnology
1.177 -*/
1.178 -const TUint KSystemDriveKey = 0x10283049;
1.179 -
1.180 -
1.181 -/**
1.182 -@publishedPartner
1.183 -@released
1.184 -
1.185 -Enumeration that specifies whether, on opening a file:
1.186 -- an existing file is opened
1.187 -- a new file is created
1.188 -- an existing file is replaced.
1.189 -*/
1.190 -enum TFileOpen {EFileOpen,EFileCreate,EFileReplace};
1.191 -
1.192 -
1.193 -
1.194 -
1.195 -/**
1.196 -@publishedPartner
1.197 -@released
1.198 -
1.199 -The file share mode.
1.200 -*/
1.201 -typedef TFileMode TShare;
1.202 -
1.203 -
1.204 -
1.205 -
1.206 -class CMountCB;
1.207 -class CFileSystem;
1.208 -class CFileCB;
1.209 -class CDirCB;
1.210 -class CFileShare;
1.211 -class CSessionFs;
1.212 -class CFsPlugin;
1.213 -class CFileBody;
1.214 -class CMountBody;
1.215 -class CFsMessageRequest;
1.216 -
1.217 -//
1.218 -class CFsObjectCon;
1.219 -class CFileCache;
1.220 -
1.221 -/**
1.222 -@publishedPartner
1.223 -@released
1.224 -
1.225 -Implements reference counting to track concurrent references to itself.
1.226 -
1.227 -An object of this type arranges automatic destruction of itself when the final
1.228 -reference is removed.
1.229 -
1.230 -A reference counting object is any object which has CFsObject as its base class.
1.231 -Constructing a CFsObject derived type or calling its Open() member function
1.232 -adds a reference to that object by adding one to the reference count; calling
1.233 -its Close() member function removes a reference by subtracting one from the
1.234 -reference count; when the last user of the object calls Close(), the reference
1.235 -count becomes zero and the object is automatically destroyed.
1.236 -*/
1.237 -class CFsObject : public CBase
1.238 -
1.239 - {
1.240 -public:
1.241 - IMPORT_C CFsObject();
1.242 - IMPORT_C virtual TInt Open();
1.243 - IMPORT_C virtual void Close();
1.244 - IMPORT_C TInt SetName(const TDesC* aName);
1.245 - IMPORT_C TName Name() const;
1.246 - IMPORT_C virtual TBool IsCorrectThread();
1.247 - inline CFsObjectCon* Container() const;
1.248 -protected:
1.249 - void DoClose();
1.250 - TInt UniqueID() const;
1.251 - inline TInt Inc();
1.252 - inline TInt Dec();
1.253 - IMPORT_C ~CFsObject();
1.254 -private:
1.255 - TInt iAccessCount;
1.256 - CFsObjectCon* iContainer;
1.257 - HBufC* iName;
1.258 -friend class CFsObjectCon;
1.259 -friend class CFsObjectIx;
1.260 - };
1.261 -
1.262 -
1.263 -
1.264 -
1.265 -class CFsRequest;
1.266 -class CFsInternalRequest;
1.267 -
1.268 -/**
1.269 -Implements a request dispatcher.
1.270 -
1.271 -Base class for file server resources.
1.272 -for example subsessions that are opened, such as RFile etc, that need closing are closed by
1.273 -issuing a subsession close request, handled by this object.
1.274 -
1.275 -@publishedPartner
1.276 -@released
1.277 -*/
1.278 -class CFsDispatchObject : public CFsObject
1.279 - {
1.280 -public:
1.281 - CFsDispatchObject();
1.282 - /**
1.283 - Returns the drive number.
1.284 - @return Drive number.
1.285 - */
1.286 - TInt DriveNumber() const {return(iDriveNumber);}
1.287 - IMPORT_C void Close();
1.288 - IMPORT_C virtual TBool IsCorrectThread();
1.289 -protected:
1.290 - void DoInitL(TInt aDrvNumber);
1.291 - void Dispatch();
1.292 - ~CFsDispatchObject();
1.293 -private:
1.294 - CFsInternalRequest* iRequest;
1.295 - TInt iDriveNumber;
1.296 -friend class TFsCloseObject;
1.297 -friend class CFileShare; // needed to override the close operation so that the file cache can be flushed on a close
1.298 - };
1.299 -
1.300 -
1.301 -
1.302 -
1.303 -/**
1.304 -Notifier class must be unique to each thread so one per drive or threaded plugin should be used
1.305 -allocated in the file system. No longer global
1.306 -
1.307 -@publishedPartner
1.308 -@released
1.309 -*/
1.310 -NONSHARABLE_CLASS(CAsyncNotifier) : public CBase
1.311 - {
1.312 -public:
1.313 - IMPORT_C static CAsyncNotifier* New();
1.314 - IMPORT_C ~CAsyncNotifier();
1.315 - IMPORT_C TInt Notify(const TDesC& aLine1,const TDesC& aLine2,const TDesC& aButton1,const TDesC& aButton2,TInt& aButtonVal);
1.316 - inline void SetMount(CMountCB* aMount) { iMount = aMount; };
1.317 -protected:
1.318 - CAsyncNotifier();
1.319 - TInt Connect();
1.320 -private:
1.321 - RNotifier iNotifier;
1.322 - CMountCB* iMount;
1.323 - };
1.324 -
1.325 -
1.326 -
1.327 -
1.328 -class CProxyDriveFactory;
1.329 -
1.330 -/**
1.331 -@publishedPartner
1.332 -@released
1.333 -
1.334 -Structure containing information related to a single drive extension.
1.335 -*/
1.336 -struct TExtensionInfo
1.337 - {
1.338 - TBool iIsPrimary; ///< Is the primary drive extension for a given drive
1.339 - CProxyDriveFactory* iFactory; ///< Pointer to the drive extension's object factory
1.340 - };
1.341 -
1.342 -
1.343 -
1.344 -
1.345 -/**
1.346 -@publishedPartner
1.347 -@released
1.348 -
1.349 -Represents information related to the Drive extension(s) in use for a given drive.
1.350 -*/
1.351 -struct TDriveExtInfo
1.352 - {
1.353 - TDriveExtInfo();
1.354 -
1.355 - TInt iCount; ///< Number of drive extensions in use
1.356 -
1.357 - TExtensionInfo iInfo[KMaxExtensionCount]; ///< Drive extension related information
1.358 - };
1.359 -
1.360 -
1.361 -
1.362 -
1.363 -/**
1.364 -@publishedPartner
1.365 -@released
1.366 -
1.367 -Represents a drive in the file server.
1.368 -
1.369 -Note that drives may act as substitutes for paths on other drives,
1.370 -in which case any access to this drive letter will be translated into
1.371 -a reference to the assigned path. In this way drives can act as short
1.372 -cuts to paths on other drives.
1.373 -*/
1.374 -class TDrive
1.375 - {
1.376 -public:
1.377 - TDrive();
1.378 - void CreateL(TInt aDriveNumber);
1.379 - TInt CheckMount();
1.380 - TInt CheckMountAndEntryName(const TDesC& aName);
1.381 - TInt FinaliseMount();
1.382 - TInt FinaliseMount(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1.383 - TInt MountControl(TInt aLevel, TInt aOption, TAny* aParam);
1.384 -
1.385 - void MountMedia(TBool aForceMount);
1.386 - void FlushCachedFileInfoL();
1.387 - TInt FlushCachedFileInfo(TBool aPurgeCache = EFalse);
1.388 - void PurgeDirty(CMountCB& aMount);
1.389 - void DriveInfo(TDriveInfo& anInfo);
1.390 - TInt Volume(TVolumeInfo& aVolume);
1.391 - TInt SetVolume(const TDesC& aName);
1.392 - TInt MkDir(const TDesC& aName);
1.393 - TInt RmDir(const TDesC& aName);
1.394 - TInt Delete(const TDesC& aName);
1.395 - TInt Rename(const TDesC& anOldName,const TDesC& aNewName);
1.396 - TInt Replace(const TDesC& anOldName,const TDesC& aNewName);
1.397 - TInt Entry(const TDesC& aName,TEntry& anEntry);
1.398 - TInt SetEntry(const TDesC& aName,const TTime& aTime,TUint aMask,TUint aVal);
1.399 - TInt FileTemp(CFsRequest* aRequest,TInt& aHandle,const TDesC& aPath,TDes& aName,TUint aMode);
1.400 - TInt FileOpen(CFsRequest* aRequest,TInt& aHandle,const TDesC& aName,TUint aMode,TFileOpen anOpen);
1.401 - TInt DirOpen(CSessionFs* aSession,TInt& aHandle,const TDesC& aName,TUint anAtt,const TUidType& aUidType);
1.402 -
1.403 - TInt CheckDisk();
1.404 - TInt CheckDisk(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1.405 -
1.406 - TInt ScanDrive();
1.407 - TInt ScanDrive(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1.408 -
1.409 - TInt ReadFileSection(const TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage);
1.410 - TInt GetShortName(const TDesC& aLongName,TDes& aShortName);
1.411 - TInt GetLongName(const TDesC& aShortName,TDes& aLongName);
1.412 - TInt IsFileOpen(const TDesC& aFileName,CFileCB*& aFileCB);
1.413 - TInt IsFileInRom(const TDesC& aFileName,TUint8*& aFileStart);
1.414 - TInt LockDevice(TMediaPassword& aOld,TMediaPassword& aNew,TBool aStore);
1.415 - TInt UnlockDevice(TMediaPassword& aPassword,TBool aStore);
1.416 - TInt ClearDevicePassword(TMediaPassword& aPassword);
1.417 - TInt EraseDevicePassword();
1.418 - TInt FreeDiskSpace(TInt64& aFreeDiskSpace);
1.419 - TInt ForceRemountDrive(const TDesC8* aMountInfo,TInt aMountInfoMessageHandle,TUint aFlags);
1.420 - TBool IsWriteProtected();
1.421 - TInt MountExtension(CProxyDriveFactory* aFactory,TBool aIsPrimary);
1.422 - TInt DismountExtension(CProxyDriveFactory* aFactory,TBool aIsPrimary);
1.423 - TInt ExtensionName(TDes& aExtensionName,TInt aPos);
1.424 - TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
1.425 - void SetAtt(TUint aValue);
1.426 - IMPORT_C TUint Att();
1.427 - IMPORT_C TBool GetNotifyUser();
1.428 - IMPORT_C void Dismount();
1.429 - IMPORT_C TBool IsWriteableResource() const;
1.430 - IMPORT_C TBool IsCurrentWriteFunction() const;
1.431 - inline TInt GetReason() const;
1.432 - inline void SetChanged(TBool aValue);
1.433 - inline TBool IsChanged() const;
1.434 - inline TInt DriveNumber() const;
1.435 - inline TBool IsMounted() const;
1.436 - inline TBool IsLocal() const;
1.437 - inline TBool IsRom() const;
1.438 - inline TBool IsRemovable() const;
1.439 - inline TBool IsSubsted() const;
1.440 - inline CMountCB& CurrentMount() const;
1.441 - inline TDrive& SubstedDrive() const;
1.442 - inline void SetSubstedDrive(TDrive* aDrive);
1.443 - inline HBufC& Subst() const;
1.444 - inline void SetSubst(HBufC* aSubst);
1.445 - inline CFsObjectCon& Mount() const;
1.446 - inline CFileSystem& FSys();
1.447 - inline CFileSystem*& GetFSys();
1.448 - inline TDriveExtInfo& ExtInfo();
1.449 - inline void SetNotifyOn();
1.450 - inline void SetNotifyOff();
1.451 - inline TInt ReservedSpace() const;
1.452 - inline void SetReservedSpace(const TInt aReservedSpace);
1.453 -
1.454 - inline void SetRugged(TBool aIsRugged);
1.455 - inline TBool IsRugged() const;
1.456 -
1.457 - inline TBool IsSynchronous() const;
1.458 - inline void SetSynchronous(TBool aIsSynch);
1.459 -
1.460 -public:
1.461 - void DismountLock();
1.462 - TInt DismountUnlock();
1.463 - TInt DismountLocked() const;
1.464 - void SetDismountPending(TBool aPending);
1.465 - TBool DismountPending() const;
1.466 - void ForceDismount();
1.467 - TInt ActiveMounts() const;
1.468 - void ReactivateMounts();
1.469 - TInt ClampFile(const TDesC& aName,TAny* aHandle);
1.470 - TInt UnclampFile(CMountCB* aMount, RFileClamp* aHandle);
1.471 - TInt ClampsOnDrive(TBool aRequestDismount=EFalse, TInt (*aFunc)(TAny*)=NULL,TAny* aParamList=NULL);
1.472 - TInt SetCallbackRequired(TInt (*aFunc)(TAny*),TAny* aParamList);
1.473 - IMPORT_C void FlushOutstandingDismount(TBool *aDismountRequired);
1.474 - TInt ClearDeferredDismount();
1.475 - IMPORT_C void SetClampFlag(TBool aClamped);
1.476 - IMPORT_C TBool ClampFlag();
1.477 - inline void Lock();
1.478 - inline void UnLock();
1.479 - TBool ReMount(CMountCB& aMount);
1.480 -
1.481 - TBool RequestFreeSpaceOnMount(TUint64 aFreeSpaceRequired);
1.482 - TInt MountedVolumeSize(TUint64& aSize);
1.483 -
1.484 -private:
1.485 - void MountMediaL(TBool aForceMount,CMountCB*& aMount);
1.486 - void SetVolumeL(const TDesC& aName,HBufC*& aBuf);
1.487 - void DirOpenL(CSessionFs* aSession,TInt& aHandle,const TDesC& aName,TUint anAtt,const TUidType& aUidType,CDirCB*& aDir);
1.488 - void FileOpenL(CFsRequest* aRequest,TInt& aHandle,const TDesC& aName,TUint aMode,TFileOpen anOpen,CFileCB*& aFileCB,CFileShare*& aFileShare);
1.489 - TInt CheckMountAndEntryNames(const TDesC& anOldName,const TDesC& aNewName);
1.490 - CFileCB* LocateFileByPath(const TDesC& aPath);
1.491 - TInt CheckDirectories(const TDesC& anOldName,const TDesC& aNewName);
1.492 - void DoEntryL(const TDesC& aName,TEntry& anEntry);
1.493 - void ReadSectionL(const TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage);
1.494 - TInt ValidateShare(CFileCB& aFile,TShare aReqShare);
1.495 - TInt CheckAttributes(const TDesC& aName,TUint& aSetAttMask,TUint& aClearAttMask);
1.496 - TBool IsExtensionMounted(CProxyDriveFactory* aFactory);
1.497 - CFileCB* LocateFile(const TDesC& aName);
1.498 - CFileCache* LocateClosedFile(const TDesC& aName, TBool aResurrect = ETrue);
1.499 - TBool ReMount();
1.500 - IMPORT_C TBool IsDriveThread() const;
1.501 - IMPORT_C TBool IsMainThread() const;
1.502 - IMPORT_C void DriveFault(TBool aDriveError) const;
1.503 - void DoDismount();
1.504 -
1.505 -private:
1.506 -
1.507 - //-- intrinsic TDrive flags. Used in iDriveFlags.
1.508 - enum
1.509 - {
1.510 - ENotifyOff = 0x01,
1.511 - EDismountPending = 0x02,
1.512 - ENotRugged = 0x04,
1.513 - EClampPresent = 0x08,
1.514 - EDriveIsSynch = 0x10, //-- is set on mount when the drive is synchronous (doesn't have its own thread)
1.515 - };
1.516 -
1.517 -private:
1.518 - TInt iDriveNumber;
1.519 - TUint iAtt;
1.520 - TBool iChanged;
1.521 - TInt iReason;
1.522 - TInt iMountNumber;
1.523 - CFileSystem* iFSys;
1.524 - CMountCB* iCurrentMount;
1.525 - TDrive* iSubstedDrive;
1.526 - HBufC* iSubst;
1.527 - CFsObjectCon* iMount;
1.528 - RFastLock iLock;
1.529 - TDriveExtInfo iExtInfo;
1.530 - TInt iDriveFlags; ///< intrinsic TDrive flags
1.531 - TInt iReservedSpace;
1.532 - TInt iDismountLock;
1.533 - TInt iMountFailures; // number of times the mount has failed
1.534 - TInt iLastMountError;
1.535 -friend class LocalDrives; // for access to iChanged flag
1.536 - };
1.537 -
1.538 -class CFileCB;
1.539 -class CDirCB;
1.540 -
1.541 -
1.542 -
1.543 -
1.544 -/**
1.545 -@publishedPartner
1.546 -@released
1.547 -
1.548 -A file server interface class representing a mount.
1.549 -
1.550 -An instance of this object is referred to as a mount control block.
1.551 -
1.552 -A mount control block needs to be created for a specific volume (partition) on
1.553 -a drive in order to be able to access that volume. Volumes may be permanent
1.554 -or represent removable media. Note that removable media may also be mounted directly onto
1.555 -a device with no drive. Volumes can be formatted, unlike drives.
1.556 -
1.557 -The volume represented is either a currently mounted volume in the system or,
1.558 -in the case of removable volumes, a volume that has been removed but still has
1.559 -subsession objects open.
1.560 -
1.561 -A plug-in file system implements this class.
1.562 -*/
1.563 -class CMountCB : public CFsDispatchObject
1.564 - {
1.565 -public:
1.566 - IMPORT_C CMountCB();
1.567 - IMPORT_C ~CMountCB();
1.568 - IMPORT_C TBool operator!=(const CMountCB& aMount) const;
1.569 - IMPORT_C TBool MatchEntryAtt(TUint anAtt,TUint aMatt) const;
1.570 - IMPORT_C void SetDiskSpaceChange(TInt64 aFreeDiskSpace);
1.571 - inline TDrive& Drive() const;
1.572 - inline void SetDrive(TDrive* aDrive);
1.573 - inline HBufC& VolumeName() const;
1.574 - inline void SetVolumeName(HBufC* aName);
1.575 - inline TBool GetNotifyUser() const;
1.576 - inline void SetNotifyOn();
1.577 - inline void SetNotifyOff();
1.578 - inline void IncLock();
1.579 - inline void DecLock();
1.580 - inline TInt LockStatus() const;
1.581 - inline TBool IsCurrentMount() const;
1.582 - inline TBool Locked() const;
1.583 - inline TInt64 Size() const;
1.584 - inline TInt LocalDrive(TBusLocalDrive*& aLocalDrive);
1.585 - inline TInt LocalBufferSupport(CFileCB* aFile = NULL);
1.586 - inline TInt AddToCompositeMount(TInt aMountIndex);
1.587 -
1.588 -// Pure virtual
1.589 -
1.590 - /**
1.591 - Attempts to set the mount control block properties using
1.592 - the current mount (i.e. volume) on the associated drive.
1.593 -
1.594 - The function should set the volume name (iVolumeName),
1.595 - the unique ID (iUniqueID) and the volume size (iSize)
1.596 - by reading and processing the current mount.
1.597 -
1.598 - When aForceMount is set to ETrue, the properties of a corrupt volume should
1.599 - be forcibly stored. The classic case of when this is desirable is when
1.600 - a corrupt volume needs to be formatted.
1.601 -
1.602 - The function should leave, on error detection, with an appropriate error code.
1.603 -
1.604 - @param aForceMount Indicates whether the properties of a corrupt
1.605 - volume should be stored.
1.606 -
1.607 - @leave KErrCorrupt The properties of the current mount on the drive were
1.608 - not successfully mounted due to corruption of volume information,
1.609 - assuming that aForceMount is not set.
1.610 - */
1.611 - virtual void MountL(TBool aForceMount) =0;
1.612 -
1.613 -
1.614 - /**
1.615 - Checks whether the mount control block represents the current mount on
1.616 - the associated drive.
1.617 -
1.618 - The function should read mount information from the current volume,
1.619 - and check it against the mount information from this mount - typically
1.620 - iVolumeName and iUniqueID. If the mount information matches, the function
1.621 - should return KErrNone, otherwise it should return KErrGeneral.
1.622 -
1.623 - Called by the associated TDrive object when the drive has no current mounts,
1.624 - which is the case on first access to the drive and following a volume
1.625 - change on a drive associated with removable media. In this circumstance,
1.626 - this function is called systematically on every mount control block owned
1.627 - by the drive. If ReMount() calls for all existing mount
1.628 - control blocks fail, the drive creates a new mount control block and calls
1.629 - CMountCB::MountL() on that object; the new object is added to the list of
1.630 - mount control blocks owned by the drive.
1.631 -
1.632 - @return KErrNone if the mount represented by this object is found to be
1.633 - the current mount;
1.634 - KErrGeneral if this object is found not to represent
1.635 - the current mount;
1.636 - otherwise one of the other sytem wide error codes.
1.637 - */
1.638 - virtual TInt ReMount() =0;
1.639 -
1.640 -
1.641 - /**
1.642 - Carries out any clean-up necessary for a volume dismount.
1.643 -
1.644 - Dismounting a volume will always succeed, so the function does not need
1.645 - to return an error value. Any cached information should be discarded and no
1.646 - attempt should be made to access the volume. For removable media it may be
1.647 - that the media has already been removed. This function is called when
1.648 - a media change is detected.
1.649 - */
1.650 - virtual void Dismounted() =0;
1.651 -
1.652 -
1.653 - /**
1.654 - Gets volume information.
1.655 -
1.656 - The only information that the function has to supply is the free space,
1.657 - TVolumeInfo::iFree, since the remaining members have already been set by
1.658 - the calling function.
1.659 -
1.660 - The function should leave, on error detection, with
1.661 - an appropriate error code.
1.662 -
1.663 - @param aVolume On return, a reference to the filled volume
1.664 - information object.
1.665 - */
1.666 - virtual void VolumeL(TVolumeInfo& aVolume) const =0;
1.667 -
1.668 -
1.669 - /**
1.670 - Sets the volume name for the mount, thus writing the new volume name
1.671 - to the corresponding volume.
1.672 -
1.673 - This function should leave on error detection.
1.674 -
1.675 - @param aName A reference to a descriptor containing the new volume name.
1.676 -
1.677 - @leave KErrBadName If the specified volume name is longer than the maximum
1.678 - allowed length for a volume name
1.679 - */
1.680 - virtual void SetVolumeL(TDes& aName) =0;
1.681 -
1.682 -
1.683 - /**
1.684 - Creates a new directory on the mount.
1.685 -
1.686 - The directory to be created is identified through its full name in aName.
1.687 - The full name is in the form:
1.688 - @code
1.689 - \\dirA\\dirB\\dirC\\dirD
1.690 - @endcode
1.691 - where dirD is the new directory to be created in \\dirA\\dirB\\dirC\\.
1.692 - This means that dirC is the leaf directory in which dirD will be created.
1.693 -
1.694 - The function should leave, on error detection, with an appropriate
1.695 - error code.
1.696 -
1.697 - @param aName A reference to a descriptor containing the full name of
1.698 - the directory to be created.
1.699 -
1.700 - @leave KErrPathNotFound Part of the path in aName does not exist.
1.701 - @leave KErrAlreadyExists dirD already exists in \\dirA\\dirB\\dirC\\
1.702 - @leave KErrAccessDenied dirD already exists but is not a directory.
1.703 - @leave KErrDirFull There is no room in \\dirA\\dirB\\dirC\\ for the new entry,
1.704 - which is especially applicable to the root directory.
1.705 - */
1.706 - virtual void MkDirL(const TDesC& aName) =0;
1.707 -
1.708 -
1.709 - /**
1.710 - Removes the directory specified by aName (its full name) from the volume.
1.711 -
1.712 - The directory specified by aName is in the form:
1.713 - @code
1.714 - \\dirA\\dirB\\dirC\\dirD
1.715 - @endcode
1.716 - where dirD is the directory to be removed from \\dirA\\dirB\\dirC\\.
1.717 - This means that dirC is the leaf directory from which dirD should be removed.
1.718 -
1.719 - The function can assume that the directory exists and is not read-only.
1.720 -
1.721 - The function should leave with a suitable error code if it cannot complete
1.722 - successfully for any reason.
1.723 -
1.724 - @param aName A reference to a descriptor containing the full name of
1.725 - the directory to be removed.
1.726 -
1.727 - @leave KErrInUse dirD contains entries other than the parent (..)
1.728 - and current (.) entries.
1.729 - */
1.730 - virtual void RmDirL(const TDesC& aName) =0;
1.731 -
1.732 -
1.733 - /**
1.734 - Deletes the specified file from the mount.
1.735 -
1.736 - The function can assume that the file is closed.
1.737 -
1.738 - The file name specified by aName is of the form:
1.739 - @code
1.740 - \\dirA\\dirB\\dirC\\file.ext
1.741 - @endcode
1.742 -
1.743 - The extension is optional.
1.744 -
1.745 - The function should leave on error detection, with
1.746 - an appropriate error code.
1.747 -
1.748 - @param aName A reference to a descriptor containing the full path name
1.749 - of the file that will be removed.
1.750 -
1.751 - @leave KErrAccessDenied aName specifies a file whose attributes state that
1.752 - the file is read-only or aName specifies a directory.
1.753 - */
1.754 - virtual void DeleteL(const TDesC& aName) =0;
1.755 -
1.756 -
1.757 - /**
1.758 - Renames or moves a single file or directory on the mount.
1.759 -
1.760 - It can be used to move a file or directory since both
1.761 - anOldName and anNewName specify the respective entries with full names;
1.762 - for example,
1.763 - @code
1.764 - \\dirA\\dirB\\dirC\\oldEntryName
1.765 - @endcode
1.766 -
1.767 - and
1.768 -
1.769 - @code
1.770 - \\dirE\\dirF\\dirG\\newEntryName
1.771 - @endcode
1.772 -
1.773 - If oldEntryName is a file, it can be assumed that it is closed.
1.774 - If oldEntryName is a directory, it can be assumed that there are no
1.775 - open files in this directory. Furthermore, if newEntryName specifies
1.776 - a directory, it can be assumed that it is not a subdirectory of oldEntryName.
1.777 -
1.778 - The function should leave with an appropriate error code if it cannot
1.779 - complete successfully for any reason.
1.780 -
1.781 - @param anOldName A reference to a descriptor containing the full entry
1.782 - name of the entry to be renamed.
1.783 -
1.784 - @param anNewName A reference to a descriptor containing the new full entry
1.785 - name for the entry to be renamed.
1.786 -
1.787 - @leave KErrAlreadyExists The new entry already exists.
1.788 - */
1.789 - virtual void RenameL(const TDesC& anOldName,const TDesC& anNewName) =0;
1.790 -
1.791 -
1.792 - /**
1.793 - Replaces one file on the mount with another.
1.794 -
1.795 - The function can assume that both anOldName and, if it exists, anNewName
1.796 - contain the full file names of files, and that these files are not open.
1.797 -
1.798 - If the file aNewName does not exist it should be created.
1.799 -
1.800 - The file anOldName should have its contents, attributes, and the universal
1.801 - date and time of its last modification, copied to the file aNewName,
1.802 - overwriting any existing contents and attribute details.
1.803 - Finally anOldName should be deleted.
1.804 -
1.805 - The function should leave with an appropriate error code if it cannot
1.806 - complete successfully for any reason.
1.807 -
1.808 - @param anOldName A reference to a descriptor containing the full file name
1.809 - of the file to replace the file specified by anNewName
1.810 - @param anNewName A reference to a descriptor containing the new full file
1.811 - name for the entry to be replaced.
1.812 - */
1.813 - virtual void ReplaceL(const TDesC& anOldName,const TDesC& anNewName) =0;
1.814 -
1.815 -
1.816 - /**
1.817 - Gets the entry details for the specified file or directory.
1.818 -
1.819 - anEntry should be filled with details from the file or directory with the
1.820 - full name aName. aName is of the form
1.821 - @code
1.822 - \\dirA\\dirB\\dirC\\entry.
1.823 - @endcode
1.824 -
1.825 - Note that anEntry.iType (the entry UID) should only be set for a file whose
1.826 - size is greater than or equal to sizeof(TCheckedUid).
1.827 -
1.828 - The function should leave with an appropriate error code if it cannot
1.829 - complete successfully for any reason.
1.830 -
1.831 - @param aName A reference to a descriptor containing the full name of
1.832 - the entry whose details are required.
1.833 - @param anEntry On return, a reference to the filled entry object.
1.834 -
1.835 - @leave KErrPathNotFound The entry, aName, cannot be found.
1.836 - */
1.837 - virtual void EntryL(const TDesC& aName,TEntry& anEntry) const =0;
1.838 -
1.839 -
1.840 - /**
1.841 - Sets entry details for a specified file or directory.
1.842 -
1.843 - The entry identfied by the full name descriptor aName should have
1.844 - its modification time and its attributes mask updated as required.
1.845 -
1.846 - The entry receives a new universal modified time from aTime.
1.847 - The entry attributes are set with aSetAttMask and cleared
1.848 - with aClearAttMask:
1.849 - the bits that are set in aSetAttMask should be set
1.850 - in the entry attribute mask;
1.851 - the bits that are set in aClearAttMask
1.852 - should be cleared from the entry attribute mask.
1.853 -
1.854 - The function can assume that aSetAttMask and aClearAttMask do not change
1.855 - the type of attribute (i.e. volume or directory). Furthermore, if aName
1.856 - specifies a file, it can be assumed that this file is closed.
1.857 -
1.858 - The function should leave with an appropriate error code on error detection.
1.859 -
1.860 - @param aName A reference to a descriptor containing the full name of
1.861 - the entry to be updated.
1.862 - @param aTime A reference to the time object holding the new universal
1.863 - modified time for aName.
1.864 - @param aSetAttMask Attribute mask for setting the entry's attributes.
1.865 - @param aClearAttMask Attribute mask for clearing the entry's attributes.
1.866 - */
1.867 - virtual void SetEntryL(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask) =0;
1.868 -
1.869 -
1.870 - /**
1.871 - Customises the opening of a new or existing file on the mount.
1.872 -
1.873 - The function is called internally (via TDrive::FileOpen()) as a result of
1.874 - a call by the client, and the file is created, if necessary, and opened by
1.875 - the calling function. However this function implements any replacement
1.876 - functionality, as well as any other behaviour particular to the file system.
1.877 -
1.878 - If anOpen specifies EFileReplace (rather than EFileCreate or EFileOpen) then,
1.879 - if replacement functionality is required, the data contained in the file
1.880 - should be discarded, the archive attribute should be set, and the size of
1.881 - the file should be set to zero. Note that it can be assumed that if anOpen
1.882 - specifies EFileReplace then the file already exists.
1.883 -
1.884 - After successful completion of the function, the file control block pointer
1.885 - will be added to the file server's global files container.
1.886 -
1.887 - The function should leave with a suitable error code if it cannot be completed
1.888 - successfully.
1.889 -
1.890 - @param aName The full name of the file that will be opened.
1.891 - @param aMode The file share mode. The following share modes are available:
1.892 - EFileShareExclusive;
1.893 - EFileShareReadersOnly;
1.894 - EFileShareAny;
1.895 - EFileShareReadersOrWriters;
1.896 - EFileStream;
1.897 - EFileStreamText;
1.898 - EFileRead;
1.899 - EFileWrite.
1.900 - @param anOpen IndicatES how the file will be opened. It can be one of
1.901 - the following:
1.902 - EFileOpen;
1.903 - EFileCreate;
1.904 - EFileReplace.
1.905 - @param aFile Pointer to the file control block which will, on success,
1.906 - represent the open file.
1.907 -
1.908 - @leave KErrAccessDenied aName may specify a directory, or the function may
1.909 - be attempting to open a file on a ROM drive.
1.910 - */
1.911 - virtual void FileOpenL(const TDesC& aName,TUint aMode,TFileOpen anOpen,CFileCB* aFile) =0;
1.912 -
1.913 -
1.914 - /**
1.915 - Customises the opening of a directory on the mount.
1.916 -
1.917 - The function is called internally, and the directory will have been created
1.918 - and initialised by the calling function. Any customisation specific to
1.919 - a file system should be implemented in this function.
1.920 -
1.921 - Note that aName is of the form
1.922 - @code
1.923 - \\dirA\\dirB\\dirC\\file.ext
1.924 - @endcode
1.925 -
1.926 - where \\dirA\\dirB\\dirC\\ is the directory to be opened and file.ext is
1.927 - an optional entry name and extension.
1.928 -
1.929 - After successful completion of the function, the directory control block
1.930 - pointer will be added to the file server global directories container.
1.931 -
1.932 - The function should leave with a suitable error code if it cannot complete
1.933 - successfully for any reason.
1.934 -
1.935 - @param aName A reference to a descriptor containing the full name of
1.936 - the directory that will be opened.
1.937 - @param aDir Points to a directory control block which will, on success,
1.938 - represent the open directory.
1.939 - */
1.940 - virtual void DirOpenL(const TDesC& aName,CDirCB* aDir) =0;
1.941 -
1.942 -
1.943 - /**
1.944 - Reads the specified length of data from the specified position on
1.945 - the volume directly into the client thread.
1.946 -
1.947 - It can be assumed that if this function is called,
1.948 - then there has been a successful mount.
1.949 -
1.950 - This function should leave with an appropriate error code when
1.951 - an error is detected.
1.952 -
1.953 - @param aPos Start position in the volume for the read operation,
1.954 - in bytes.
1.955 - @param aLength The number of bytes to be read.
1.956 - @param aTrg A pointer to the buffer into which data is to be read.
1.957 - @param anOffset The offset at which to start adding data to the read buffer.
1.958 - @param aMessage
1.959 - */
1.960 - virtual void RawReadL(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt anOffset,const RMessagePtr2& aMessage) const = 0;
1.961 -
1.962 -
1.963 - /**
1.964 - Writes a specified length of data from the client thread to the volume
1.965 - at the specified position.
1.966 -
1.967 - It can be assumed that if this function is called, then there has been
1.968 - a successful mount.
1.969 -
1.970 - This function should leave with an appropriate error code when
1.971 - an error is detected.
1.972 -
1.973 - @param aPos Start position in the volume for the write operation,
1.974 - in bytes.
1.975 - @param aLength The number of bytes to be written.
1.976 - @param aSrc Pointer to the buffer from which data will be written.
1.977 - @param anOffset The offset in the buffer at which to start writing data.
1.978 - @param aMessage
1.979 - */
1.980 - virtual void RawWriteL(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt anOffset,const RMessagePtr2& aMessage) = 0;
1.981 -
1.982 -
1.983 - /**
1.984 - Gets the short name of the file or directory with the given full name.
1.985 -
1.986 - This function is used in circumstances where a file system mangles
1.987 - Symbian OS natural names, in order to be able to store them on
1.988 - a file system that is not entirely compatible.
1.989 -
1.990 - The function should leave with a suitable error code if it cannot complete
1.991 - successfully for any reason.
1.992 -
1.993 - @param aLongName A reference to a descriptor containing the full name
1.994 - of the entry.
1.995 - @param aShortName On return, a reference to a descriptor containing
1.996 - the short name of the entry.
1.997 -
1.998 - @leave KErrNotFound The entry specified by its long name cannot be found.
1.999 - */
1.1000 - virtual void GetShortNameL(const TDesC& aLongName,TDes& aShortName) = 0;
1.1001 -
1.1002 -
1.1003 - /**
1.1004 - Gets the long name of the file or directory associated with
1.1005 - the given short name.
1.1006 -
1.1007 - This function is used in circumstances where a file system mangles
1.1008 - Symbian OS natural names in order to be able to store them on
1.1009 - a file system that is not entirely compatible.
1.1010 -
1.1011 - The function should leave with a suitable error code if it cannot complete
1.1012 - successfully for any reason.
1.1013 -
1.1014 - @param aShorName A reference to a descriptor containing the short name
1.1015 - of the entry.
1.1016 -
1.1017 - @param aLongName On return, a reference to a descriptor containing
1.1018 - the long name of the entry.
1.1019 -
1.1020 - @leave KErrNotFound The entry specified by its short name cannot be found.
1.1021 - */
1.1022 - virtual void GetLongNameL(const TDesC& aShorName,TDes& aLongName) = 0;
1.1023 -
1.1024 -
1.1025 - /**
1.1026 - Reads a specified section of the file, regardless of the file's lock state.
1.1027 -
1.1028 - The function should leave with a suitable error code if it cannot complete
1.1029 - successfully for any reason.
1.1030 -
1.1031 - @param aName A reference to a descriptor containing the full name of
1.1032 - the file to be read from
1.1033 - @param aPos The byte position to start reading from.
1.1034 - @param aTrg A pointer to the buffer into which data is to be read.
1.1035 - @param aLength The length of data to be read, in bytes.
1.1036 - @param aMessage
1.1037 -
1.1038 - @leave KErrEof aPos is past the end of the file.
1.1039 - */
1.1040 - virtual void ReadSectionL(const TDesC& aName,TInt aPos,TAny* aTrg,TInt aLength,const RMessagePtr2& aMessage)=0;
1.1041 -
1.1042 -
1.1043 - /**
1.1044 - Checks the integrity of the file system on the volume and returns an appropriate error value.
1.1045 - The default implementation must be overridden by a derived class.
1.1046 -
1.1047 - @return KErrNone if the file system is stable; otherwise one of the other system wide error codes.
1.1048 - The default implementation returns KErrNotSupported.
1.1049 - */
1.1050 - virtual TInt CheckDisk() {return(KErrNotSupported);}
1.1051 -
1.1052 - /**
1.1053 - The same as original CheckDisk(), but with some parameters.
1.1054 - @prototype
1.1055 - */
1.1056 - virtual TInt CheckDisk(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1.1057 -
1.1058 -
1.1059 - /**
1.1060 - Scans through and corrects errors found in the volume.
1.1061 -
1.1062 - The default implementation must be overridden by a derived class.
1.1063 -
1.1064 - @return KErrNone if no errors are found or all errors are corrected; otherwise one of the other system wide error codes.
1.1065 - The default implementation returns KErrNotSupported.
1.1066 - */
1.1067 - virtual TInt ScanDrive() {return(KErrNotSupported);}
1.1068 -
1.1069 - /**
1.1070 - The same as original ScanDrive(), but with some parameters.
1.1071 - @prototype
1.1072 - */
1.1073 - virtual TInt ScanDrive(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1.1074 -
1.1075 - IMPORT_C virtual void IsFileInRom(const TDesC& aFileName,TUint8*& aFileStart);
1.1076 -
1.1077 -
1.1078 - /**
1.1079 - Low-level control IO
1.1080 - */
1.1081 - virtual TInt ControlIO( const RMessagePtr2& /*aMessage*/,TInt /*aCommand*/,TAny* /*aParam1*/,TAny* /*aParam2*/) {return(KErrNotSupported);}
1.1082 -
1.1083 -
1.1084 - /**
1.1085 - Locks a media which supports password protection and replaces
1.1086 - the old password with a new one.
1.1087 -
1.1088 - If aStore is set to ETrue, then the new password should be saved to
1.1089 - the password store file, KMediaPWrdFile, using the exported file server
1.1090 - function WriteToDisk().
1.1091 -
1.1092 - The password file is used to initialise the password store on boot up,
1.1093 - so the user does not need to be prompted for the password again if
1.1094 - it is saved here.
1.1095 -
1.1096 - The default implementation must be overridden in a derived class.
1.1097 -
1.1098 - @param aOld A reference to the old password.
1.1099 - @param aNew A reference to the new password.
1.1100 - @param aStore ETrue if the new password is to be saved to
1.1101 - the password file store; EFalse if not.
1.1102 -
1.1103 - @return KErrNone if successful; otherwise another of the system wide
1.1104 - error codes. The default implementation returns KErrNotSupported.
1.1105 - */
1.1106 - virtual TInt Lock(TMediaPassword& /*aOld*/,TMediaPassword& /*aNew*/,TBool /*aStore*/) {return(KErrNotSupported);}
1.1107 -
1.1108 -
1.1109 - /**
1.1110 - Unlocks a media which supports password protection.
1.1111 -
1.1112 - If aStore is set to ETrue then the password should be saved to
1.1113 - the password store file specified by KMediaPWrdFile using the exported file
1.1114 - server function WriteToDisk().
1.1115 -
1.1116 - The password file is used to initialise the password store on boot up,
1.1117 - so the user does not need to be prompted for the password again if
1.1118 - it is saved here.
1.1119 -
1.1120 - The default implementation must be overridden in a derived class.
1.1121 -
1.1122 - @param aPassword A reference to the password.
1.1123 - @param aStore ETrue if the password is to be saved to
1.1124 - the password store file; EFalse otherwise.
1.1125 -
1.1126 - @return KErrNone if successful; otherwise another of the system wide
1.1127 - error codes. The default implementation returns KErrNotSupported.
1.1128 - */
1.1129 - virtual TInt Unlock(TMediaPassword& /*aPassword*/,TBool /*aStore*/) {return(KErrNotSupported);}
1.1130 -
1.1131 -
1.1132 - /**
1.1133 - Clears a password from a media that supports write protection.
1.1134 -
1.1135 - The default implementation must be overridden in a derived class.
1.1136 -
1.1137 - @param aPassword A reference to the password to be cleared.
1.1138 -
1.1139 - @return KErrNone if successful; otherwise another of the system wide
1.1140 - error codes. The default implementation returns KErrNotSupported.
1.1141 - */
1.1142 - virtual TInt ClearPassword(TMediaPassword& /*aPassword*/) {return(KErrNotSupported);}
1.1143 -
1.1144 -
1.1145 - /**
1.1146 - */
1.1147 - virtual TInt ForceRemountDrive(const TDesC8* /*aMountInfo*/,TInt /*aMountInfoMessageHandle*/,TUint /*aFlags*/) {return(KErrNotSupported);}
1.1148 -
1.1149 -
1.1150 - /**
1.1151 - Legacy method: finalise the mount and put it to the consistent state.
1.1152 - */
1.1153 - virtual void FinaliseMountL() {return;}
1.1154 -
1.1155 - /**
1.1156 - finalise the mount and put it to the consistent state.
1.1157 -
1.1158 - @param aOperation describes finalisation operation, see RFs::TFinaliseDrvMode
1.1159 - @param aParam1 not used, for future expansion
1.1160 - @param aParam2 not used, for future expansion
1.1161 - */
1.1162 - virtual void FinaliseMountL(TInt aOperation, TAny* aParam1=NULL, TAny* aParam2=NULL);
1.1163 -
1.1164 -
1.1165 -
1.1166 - /** Mount Control levels or operations to perform */
1.1167 - enum TMntCtlLevel
1.1168 - {
1.1169 - //-- reserved generic mount (CMountCB) control codes
1.1170 -
1.1171 - EMountStateQuery, ///< query mount state, see TMntCtlOption, ESQ_IsMountFinalised
1.1172 - EMountVolParamQuery, ///< mount-specific queries for volume parameters. See ESQ_RequestFreeSpace, ESQ_GetCurrentFreeSpace
1.1173 -
1.1174 -
1.1175 - //-- starting from the next code someone may define some specific mount type control codes, like ESpecificMountCtl+17
1.1176 - ESpecificMountCtl = 0x40000000,
1.1177 -
1.1178 - };
1.1179 -
1.1180 - /** Mount Control options that makes sense only for certain control codes, see TMntCtlLevel */
1.1181 - enum TMntCtlOption
1.1182 - {
1.1183 - //-- reserved generic mount (CMountCB) control options codes
1.1184 -
1.1185 - /**
1.1186 - query if the mount is finalised, corresponds to the EMountStateQuery control code only.
1.1187 - aParam must be a pointer to TBool that will on return be ETrue if the mount is finalised.
1.1188 - */
1.1189 - ESQ_IsMountFinalised,
1.1190 -
1.1191 -
1.1192 - //-----------------------------------------------------------------------------------------------------------------------------
1.1193 -
1.1194 - //-- starting from the next code someone may define some specific mount type control options
1.1195 - ESpecificMountCtlOpt = 0x40000000,
1.1196 -
1.1197 - /**
1.1198 - Corresponds to EMountVolParamQuery. Request a certain amount of free space on the volume.
1.1199 - If _current_ amount of free space is >= than required or it is not being updated in background by the mount, returns immediately;
1.1200 - If mount is still counting free space and If _current_ amount of free space is < than required, the caller will be blocked
1.1201 - until mount finds enough free space or reports that the _final_ amount of free space is less than required.
1.1202 -
1.1203 - aParam must be TUint64* in: number of free bytes on the volume required, out: resulted amount of free space. It can be less than
1.1204 - required if there isn't enough free space on the volume at all.
1.1205 - */
1.1206 - ESQ_RequestFreeSpace,
1.1207 -
1.1208 -
1.1209 - /**
1.1210 - Corresponds to EMountVolParamQuery. A request to obtain the _current_ amount of free space on the volume asynchronously, without blocking.
1.1211 - Some mounts implementations can count volume free space in the background.
1.1212 -
1.1213 - aParam must be TUint64* in: none; out: _current_ amount of free space on the volume.
1.1214 - */
1.1215 - ESQ_GetCurrentFreeSpace,
1.1216 -
1.1217 - /**
1.1218 - Corresponds to EMountVolParamQuery. A request to obtain size of the mounted volume without blocking (CMountCB::VolumeL() can block).
1.1219 - aParam must be TUint64* in: none; out: mounted volume size, same as TVolumeInfo::iSize
1.1220 - */
1.1221 - ESQ_MountedVolumeSize,
1.1222 -
1.1223 - };
1.1224 -
1.1225 - /**
1.1226 - Generic mount control method.
1.1227 - @param aLevel specifies the operation to perfrom on the mount
1.1228 - @param aOption specific option for the given operation
1.1229 - @param aParam pointer to generic parameter, its meaning depends on aLevel and aOption
1.1230 -
1.1231 - @return standard error code. Default imlementation returns KErrNotSupported
1.1232 - */
1.1233 - virtual TInt MountControl(TInt aLevel, TInt aOption, TAny* aParam);
1.1234 -
1.1235 -
1.1236 - /**
1.1237 - Erase a password from a media that supports write protection.
1.1238 -
1.1239 - The default implementation must be overridden in a derived class.
1.1240 -
1.1241 - @return KErrNone if successful; otherwise another of the system wide
1.1242 - error codes. The default implementation returns KErrNotSupported.
1.1243 - */
1.1244 - virtual TInt ErasePassword() {return(KErrNotSupported);}
1.1245 -
1.1246 - /**
1.1247 - An interface class which may optionally be returned by a file system
1.1248 - by calling GetInterface(EFileClamp, ...)
1.1249 - */
1.1250 - class MFileClamp
1.1251 - {
1.1252 - public:
1.1253 - virtual TInt ClampFile(const TInt aDriveNo,const TDesC& aName,TAny* aHandle) = 0;
1.1254 - virtual TInt UnclampFile(RFileClamp* aHandle) = 0;
1.1255 - IMPORT_C virtual TInt IsFileClamped(const TInt64 aUniqueId) = 0;
1.1256 - virtual TInt NoOfClamps() = 0;
1.1257 - virtual TInt SetCallbackRequired(TInt (*aFunc)(TAny*), TAny* aParamList) = 0;
1.1258 - virtual TInt GetCallbackInfo(TInt (**aFunc)(TAny*), TAny*& aParamList) = 0;
1.1259 - virtual TInt ClearCallbackInfo() = 0;
1.1260 - };
1.1261 -
1.1262 - /**
1.1263 - An interface class which may optionally be returned by a file system
1.1264 - by calling GetInterface(EFileAccessor, ...)
1.1265 - */
1.1266 - class MFileAccessor
1.1267 - {
1.1268 - public:
1.1269 - virtual TInt GetFileUniqueId(const TDesC& aName, TInt64& aUniqueId) = 0;
1.1270 - virtual TInt Spare3(TInt aVal, TAny* aPtr1, TAny* aPtr2) = 0;
1.1271 - virtual TInt Spare2(TInt aVal, TAny* aPtr1, TAny* aPtr2) = 0;
1.1272 - virtual TInt Spare1(TInt aVal, TAny* aPtr1, TAny* aPtr2) = 0;
1.1273 - };
1.1274 -
1.1275 -
1.1276 - /**
1.1277 - Enumeration of the aInterfaceIDs used in GetInterface.
1.1278 - */
1.1279 - enum TInterfaceIds
1.1280 - {
1.1281 - EAddFsToCompositeMount = 0,
1.1282 - EGetLocalDrive = 1,
1.1283 - EFileAccessor = 2,
1.1284 - EGetFileSystemSubType = 3,
1.1285 - EGetClusterSize = 4,
1.1286 - ELocalBufferSupport = 5,
1.1287 - EAddToCompositeMount = 6
1.1288 - };
1.1289 -
1.1290 - // File clamping support
1.1291 - TInt ClampFile(const TInt aDriveNo,const TDesC& aName,TAny* aHandle);
1.1292 - TInt UnclampFile(RFileClamp* aHandle);
1.1293 - IMPORT_C TInt IsFileClamped(const TInt64 aUniqueId);
1.1294 - TInt NoOfClamps();
1.1295 - TInt SetCallbackRequired(TInt (*aFunc)(TAny*), TAny* aParamList);
1.1296 - TInt GetCallbackInfo(TInt (**aFunc)(TAny*), TAny*& aParamList);
1.1297 - TInt ClearCallbackInfo();
1.1298 -
1.1299 - // File accessor support
1.1300 - TInt GetFileUniqueId(const TDesC& aName, TInt64& aUniqueId);
1.1301 - TInt Spare3(TInt aVal, TAny* aPtr1, TAny* aPtr2);
1.1302 - TInt Spare2(TInt aVal, TAny* aPtr1, TAny* aPtr2);
1.1303 - TInt Spare1(TInt aVal, TAny* aPtr1, TAny* aPtr2);
1.1304 -
1.1305 - // Extensions of interface
1.1306 - TInt FileSystemSubType(TDes& aName);
1.1307 - TInt FileSystemClusterSize();
1.1308 -
1.1309 -protected:
1.1310 - inline void SetMountNumber(TInt aMountNumber);
1.1311 - inline void SetDismounted(TBool aDismounted=ETrue);
1.1312 - inline TInt MountNumber() const;
1.1313 - inline TBool IsDismounted() const;
1.1314 -
1.1315 - void InitL(TInt aDrvNumber);
1.1316 -
1.1317 -
1.1318 - /**
1.1319 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.1320 - binary compatibility.
1.1321 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.1322 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.1323 - @param aInput An arbitrary input argument.
1.1324 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.1325 - */
1.1326 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.1327 -
1.1328 -protected:
1.1329 -
1.1330 - /**
1.1331 - Unique mount number set by the TDrive object representing the drive on
1.1332 - which the object resides.
1.1333 - */
1.1334 - TInt iMountNumber;
1.1335 -
1.1336 -
1.1337 - /**
1.1338 - Unique ID from the volume. Set in MountL().
1.1339 -
1.1340 - @see CMountCB::MountL
1.1341 - */
1.1342 - TUint iUniqueID;
1.1343 -
1.1344 -
1.1345 - /**
1.1346 - Size of the volume. First set in MountL().
1.1347 -
1.1348 - @see CMountCB::MountL
1.1349 - */
1.1350 - TInt64 iSize;
1.1351 -
1.1352 -
1.1353 - /**
1.1354 - A list of all open files on that mount.
1.1355 - Set by the TDrive object representing the drive of which the mount resides.
1.1356 - */
1.1357 - TDblQue<CFileCB> iMountQ;
1.1358 - friend class TDrive;
1.1359 - friend class TFsAddCompositeMount;
1.1360 -
1.1361 -private:
1.1362 - TInt iLockMount;
1.1363 - TDrive* iDrive;
1.1364 - HBufC* iVolumeName;
1.1365 -//
1.1366 - CMountBody* iBody;
1.1367 - };
1.1368 -
1.1369 -
1.1370 -/**
1.1371 -@internalTechnology
1.1372 -
1.1373 -MFileSystemSubType interface provides extended interface for CMountCB to retrieve sub type
1.1374 -of mounted file systems.
1.1375 -
1.1376 -The interface could be retrieved by calling CMountCB::GetInterface() with EGetFileSystemSubType
1.1377 -as an argument.
1.1378 -
1.1379 -If the file system does not support sub types, MFileSystemSubType cannot be retieved.
1.1380 -Sub classes of CMountCB who does support sub types will need to multiple-inherit with
1.1381 -this class and implement the interface. The implementation of the interface will be
1.1382 -retrieved via GetInterface() and provided to user by non-virtual APIs to avoid breaking
1.1383 -binary compatibility.
1.1384 -
1.1385 -NOTE: Do not try to delete MFileSystemSubType interface pointer!
1.1386 -
1.1387 -@see CMountCB::GetInterface()
1.1388 -*/
1.1389 -class MFileSystemSubType
1.1390 - {
1.1391 -public:
1.1392 - /**
1.1393 - Retrieves file system's sub type name (E.g. FAT16), if the file system does not have sub
1.1394 - types (E.g. Rofs), return the file system's name.
1.1395 - @param aName Returned descriptor contains file system name or sub type name.
1.1396 - @return KErrNone if successful.
1.1397 - */
1.1398 - virtual TInt SubType(TDes& aName) const = 0;
1.1399 - };
1.1400 -
1.1401 -/**
1.1402 -@internalTechnology
1.1403 -
1.1404 -MFileSystemClusterSize interface provides extended interface for CMountCB to retrieve cluster size
1.1405 -of mounted file systems.
1.1406 -
1.1407 -The interface could be retrieved by calling CMountCB::GetInterface() with EGetClusterSize
1.1408 -as an argument.
1.1409 -
1.1410 -If the file system does not support clustering, MFileSystemClusterSize cannot be retieved.
1.1411 -Sub classes of CMountCB who does support clustering will need to multiple-inherit with
1.1412 -this class and implement the interface. The implementation of the interface will be
1.1413 -retrieved via GetInterface() and provided to user by non-virtual APIs to avoid breaking
1.1414 -binary compatibility.
1.1415 -
1.1416 -NOTE: Do not try to delete MFileSystemSubType interface pointer!
1.1417 -
1.1418 -@see CMountCB::GetInterface()
1.1419 -*/
1.1420 -class MFileSystemClusterSize
1.1421 - {
1.1422 -public:
1.1423 - /**
1.1424 - Retrieves file system's cluster size
1.1425 - @return None-zero cluster size if successful.
1.1426 - */
1.1427 - virtual TInt ClusterSize() const = 0;
1.1428 - };
1.1429 -
1.1430 -
1.1431 -class CFileShare;
1.1432 -
1.1433 -/**
1.1434 -@publishedPartner
1.1435 -@released
1.1436 -
1.1437 -File share lock
1.1438 -
1.1439 -The lock specifies the lowest and highest position in the file to be locked.
1.1440 -
1.1441 -Note that files may have many locks on it, but overlapping sections cannot
1.1442 -be locked.
1.1443 -
1.1444 -This is used by a file control block, a CFileCB object.
1.1445 -
1.1446 -@see CFileCB
1.1447 -*/
1.1448 -struct SFileShareLock
1.1449 - {
1.1450 - /**
1.1451 - The owning file share object.
1.1452 - */
1.1453 - CFileShare* owner;
1.1454 -
1.1455 -
1.1456 - /**
1.1457 - The start of the section of the file to be locked.
1.1458 - */
1.1459 - TInt posLow;
1.1460 -
1.1461 -
1.1462 - /**
1.1463 - The end of the section of the file to be locked.
1.1464 - */
1.1465 - TInt posHigh;
1.1466 - };
1.1467 -
1.1468 -
1.1469 -/**
1.1470 -@internalTechnology
1.1471 -*/
1.1472 -class TAsyncReadRequest
1.1473 - {
1.1474 -public:
1.1475 - TAsyncReadRequest(TInt aEndPos, CFileShare* aOwningShareP, CFsRequest* aRequestP);
1.1476 - TBool CompleteIfMatching(CFileShare* aOwningShareP, TRequestStatus* aStatusP, TInt aError);
1.1477 -private:
1.1478 - TAsyncReadRequest();
1.1479 -public:
1.1480 - TInt iEndPos; // The request is completed file length >= iEndPos.
1.1481 - CFileShare* iOwningShareP; // The share that owns this outstanding request.
1.1482 - const TRequestStatus* iStatusP; // Used to identify the request when cancelling.
1.1483 - CSessionFs* iSessionP; // The owning session of the original request.
1.1484 - RMessage2 iMessage; // The message to be completed when data is available.
1.1485 - };
1.1486 -
1.1487 -/**
1.1488 -@publishedPartner
1.1489 -@released
1.1490 -
1.1491 -A file server interface class representing an open file.
1.1492 -
1.1493 -An instance of this object is referred to as a file control block.
1.1494 -
1.1495 -A file control block needs to be created for a specific file to be able to
1.1496 -access that file within a directory.
1.1497 -
1.1498 -A plug-in file system implements this class.
1.1499 -*/
1.1500 -class CFileCB : public CFsDispatchObject
1.1501 - {
1.1502 -public:
1.1503 - IMPORT_C CFileCB();
1.1504 - IMPORT_C ~CFileCB();
1.1505 - IMPORT_C void InitL(TDrive* aDrive,TDrive* aCreatedDrive,HBufC* aName,RArray<SFileShareLock>* aLock);
1.1506 - inline void SetMount(CMountCB * aMount);
1.1507 - inline TDrive& Drive() const;
1.1508 - inline TDrive& CreatedDrive() const;
1.1509 - inline CMountCB& Mount() const;
1.1510 - inline HBufC& FileName() const;
1.1511 - inline HBufC& FileNameF() const;
1.1512 - inline RArray<SFileShareLock>& Lock();
1.1513 - inline TInt UniqueID() const;
1.1514 - TInt FindLock(TInt aPosLow,TInt aPosHigh);
1.1515 - TInt AddLock(CFileShare* aFileShare,TInt aPos,TInt aLength);
1.1516 - TInt RemoveLock(CFileShare* aFileShare,TInt aPos,TInt aLength);
1.1517 - TInt CheckLock(CFileShare* aFileShare,TInt aPos,TInt aLength);
1.1518 - void RemoveLocks(CFileShare* aFileShare);
1.1519 - inline TShare Share() const;
1.1520 - inline void SetShare(TShare aShare);
1.1521 - inline TInt Size() const;
1.1522 - inline void SetSize(TInt aSize);
1.1523 - inline TInt Att() const;
1.1524 - inline void SetAtt(TInt aAtt);
1.1525 - inline TTime Modified() const;
1.1526 - inline void SetModified(TTime aModified);
1.1527 - inline TBool FileCorrupt() const;
1.1528 - inline void SetFileCorrupt(TBool aFileCorrupt);
1.1529 - inline TBool BadPower() const;
1.1530 - inline void SetBadPower(TBool aBadPower);
1.1531 - inline TUint32 NameHash() const;
1.1532 - TInt CheckMount();
1.1533 - inline TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos=-1);
1.1534 - inline TInt LocalDrive(TBusLocalDrive*& aLocalDrive);
1.1535 -
1.1536 - TBool LocalBufferSupport() const;
1.1537 - void SetLocalBufferSupport(TBool aEnabled);
1.1538 -
1.1539 - /** File caching support methods */
1.1540 -
1.1541 - CFileCache* FileCache() const;
1.1542 - TInt FairSchedulingLen() const;
1.1543 - TInt CachedSize() const;
1.1544 - void SetCachedSize(TInt aSize);
1.1545 - void ResetReadAhead();
1.1546 -
1.1547 - void SetNotifyAsyncReadersPending(TBool aNotifyAsyncReadersPending);
1.1548 - TBool NotifyAsyncReadersPending() const;
1.1549 - TInt CancelAsyncReadRequest(CFileShare* aShareP, TRequestStatus* aStatusP);
1.1550 -
1.1551 - /** Extended API support methods */
1.1552 -
1.1553 - TBool ExtendedFileInterfaceSupported();
1.1554 - void ReadL(TInt64 aPos,TInt& aLength,TDes8* aDes,const RMessagePtr2& aMessage, TInt aOffset);
1.1555 - void WriteL(TInt64 aPos,TInt& aLength,const TDesC8* aDes,const RMessagePtr2& aMessage, TInt aOffset);
1.1556 - void SetSizeL(TInt64 aSize);
1.1557 -
1.1558 - /**
1.1559 - Renames the file with the full file name provided.
1.1560 -
1.1561 - Because the full name of the file includes the path, the function can
1.1562 - also be used to move the file.
1.1563 -
1.1564 - It can be assumed that no other sub-session has access to the file:
1.1565 - i.e. the file has not been opened in EFileShareAny share mode.
1.1566 - It can also be assumed that the file has been opened for writing.
1.1567 -
1.1568 - The function should leave with KErrAlreadyExists if aNewName already exists.
1.1569 - An appropriate error code should also be generated if the function leaves
1.1570 - before completion for any other reason.
1.1571 -
1.1572 - @param aNewName The new full name of the file.
1.1573 -
1.1574 - @see CFileCB::iFileName
1.1575 - */
1.1576 - virtual void RenameL(const TDesC& aNewName) =0;
1.1577 -
1.1578 -
1.1579 - /**
1.1580 - Reads a specified number of bytes from the open file starting at
1.1581 - the specified postition, and writes the result into a descriptor.
1.1582 -
1.1583 - It can be assumed that aPos is inside the file and aLength > 0.
1.1584 - The file should only be read up to its end regardless of
1.1585 - the value of aPos + aLength. The number of bytes read should be stored
1.1586 - in aLength on return.
1.1587 -
1.1588 - If the function leaves before completion for any reason it should generate
1.1589 - an appropriate error code, and in this situation,
1.1590 - the arguments are not valid on return.
1.1591 -
1.1592 - @param aPos Represents a position relative to the start of the file
1.1593 - where ReadL() should start to read.
1.1594 - @param aLength On entry, specifies the number of bytes to be read
1.1595 - from the file. On return, this should contain the number
1.1596 - of bytes read, but this is not valid if the function leaves.
1.1597 - @param aDes Pointer to a descriptor into which the data should be written.
1.1598 - @param aMessage
1.1599 - */
1.1600 - virtual void ReadL(TInt aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage) =0;
1.1601 -
1.1602 -
1.1603 - /**
1.1604 - Writes data to the open file.
1.1605 -
1.1606 - iModified and iSize are set by the file server after this function
1.1607 - has completed successfully.
1.1608 -
1.1609 - It can be assumed that aPos is within the file range and aLength > 0.
1.1610 - When aPos + aLength is greater than the file size then the file should
1.1611 - be enlarged using SetSizeL(). The number of bytes written should be
1.1612 - returned through the argument aLength.
1.1613 -
1.1614 - If the function leaves before completion for any reason it should generate
1.1615 - an appropriate error code, and in this situation the arguments are
1.1616 - not valid on return.
1.1617 -
1.1618 - @param aPos Represents a position relative to the start of the file
1.1619 - where WriteL() should start to write.
1.1620 - @param aLength Specifies the number of bytes to be written to the file.
1.1621 - On return, the number of bytes written, but this is not
1.1622 - valid if the function leaves.
1.1623 - @param aDes Pointer to a descriptor containing the data to be written
1.1624 - to the file.
1.1625 - @param aMessage
1.1626 -
1.1627 - @see CFileCB::iModified
1.1628 - @see CFileCB::iSize
1.1629 - @see CFileCB::SetSizeL
1.1630 -
1.1631 - @leave KErrDiskFull The operation cannot be completed because the disk is full.
1.1632 - */
1.1633 - virtual void WriteL(TInt aPos,TInt& aLength,const TAny* aDes,const RMessagePtr2& aMessage) =0;
1.1634 -
1.1635 -
1.1636 - /**
1.1637 - Extends or truncates the file by re-setting the file size.
1.1638 -
1.1639 - The function should not change iModified and iSize attributes of
1.1640 - the file object: this is done by the file server.
1.1641 - If the file is extended, nothing should be written in the extended area.
1.1642 -
1.1643 - The function should leave with a suitable error code on error detection.
1.1644 -
1.1645 - @param aSize The new file size in number of bytes.
1.1646 -
1.1647 - @leave KErrDiskFull The operation cannot be completed because the disk is full.
1.1648 -
1.1649 - @see CFileCB::iModified
1.1650 - @see CFileCB::iSize
1.1651 - */
1.1652 - virtual void SetSizeL(TInt aSize) =0;
1.1653 -
1.1654 -
1.1655 - /**
1.1656 - Sets the attribute mask, iAtt, and the modified time of the file, iModified.
1.1657 -
1.1658 - If aMask|aVal does not equal zero, then aMask should be OR'ed with iAtt,
1.1659 - whilst the inverse of aVal should be AND'ed with iAtt.
1.1660 - If the modified flag is set in aMask then iModified should be set to aTime.
1.1661 -
1.1662 - The function should leave with a suitable error code on error detection.
1.1663 -
1.1664 - @param aTime The new modified time, if the modified flag is set in aMask.
1.1665 - @param aMask Bit mask containing bits set (to 1) that are to be set (to 1)
1.1666 - in iAtt.
1.1667 - @param aVal Bitmask containing bits set (to 1) that are to be unset (to 0)
1.1668 - in iAtt.
1.1669 -
1.1670 - @see CFileCB::iModified
1.1671 - @see CFileCB::iAtt
1.1672 - */
1.1673 - virtual void SetEntryL(const TTime& aTime,TUint aMask,TUint aVal) =0;
1.1674 -
1.1675 -
1.1676 - /**
1.1677 - Flushes, to disk, the cached information necessary for the integrity
1.1678 - of recently written data, such as the file size.
1.1679 -
1.1680 - The function should leave with a suitable error code on error detection.
1.1681 - */
1.1682 - virtual void FlushDataL() =0;
1.1683 -
1.1684 -
1.1685 - /**
1.1686 - Flushes, to disk, all cached file data (e.g. attributes, modification time,
1.1687 - file size).
1.1688 -
1.1689 - The modified bit in the file attributes mask should be cleared if
1.1690 - the flush was successful.
1.1691 -
1.1692 - The function should leave with a suitable error code on error detection.
1.1693 - */
1.1694 - virtual void FlushAllL() =0;
1.1695 - IMPORT_C virtual TInt Address(TInt& aPos) const;
1.1696 - IMPORT_C void SetArchiveAttribute();
1.1697 -
1.1698 - /**
1.1699 - Block Map API interface
1.1700 - */
1.1701 - class MBlockMapInterface
1.1702 - {
1.1703 - public:
1.1704 - virtual TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos)=0;
1.1705 - };
1.1706 -
1.1707 - /**
1.1708 - An interface class which may optionally be returned by a file system
1.1709 - by calling GetInterface(EExtendedFileInterface, ...)
1.1710 - The purpose of this interface is twofold:
1.1711 - - to support fair scheduling (by use of the aOffset parameter)
1.1712 - - to enable large file support
1.1713 - */
1.1714 - class MExtendedFileInterface
1.1715 - {
1.1716 - public:
1.1717 - /**
1.1718 - Functionally equivalent to CFileCB::ReadL(), but supports large files and fair scheduling
1.1719 -
1.1720 - Reads a specified number of bytes from the open file starting at
1.1721 - the specified postition, and writes the result into a descriptor.
1.1722 -
1.1723 - @param aPos Represents a position relative to the start of the file
1.1724 - where ReadL() should start to read.
1.1725 - Note that the filesystem may not support positions above KMaxTInt,
1.1726 - in which case it leaves with KErrNotSupported.
1.1727 - @param aLength On entry, specifies the number of bytes to be read
1.1728 - from the file. On return, this contains the number
1.1729 - of bytes read, this value is not valid if the function leaves.
1.1730 - @param aDes Pointer to a descriptor into which the data is written.
1.1731 - @param aMessage A reference to a client message or an RLocalMessage.
1.1732 - @param aOffset The offset into the descriptor where the data is to be written.
1.1733 - This is non-zero if the read was fair-scheduled
1.1734 -
1.1735 - @see CFileCB::ReadL
1.1736 - @see RLocalMessage
1.1737 - */
1.1738 - virtual void ReadL(TInt64 aPos,TInt& aLength,TDes8* aDes,const RMessagePtr2& aMessage, TInt aOffset) = 0;
1.1739 -
1.1740 - /**
1.1741 - Functionally equivalent to CFileCB::WriteL(), but supports large files and fair scheduling
1.1742 -
1.1743 - Writes data to the open file.
1.1744 -
1.1745 - @param aPos Represents a position relative to the start of the file
1.1746 - where WriteL() starts to write.
1.1747 - Note that the filesystem may not support positions above KMaxTInt,
1.1748 - in which case it leaves with KErrNotSupported.
1.1749 - @param aLength Specifies the number of bytes to be written to the file.
1.1750 - On return this is the number of bytes written, this value is not
1.1751 - valid if the function leaves.
1.1752 - @param aDes Pointer to a descriptor containing the data to be written
1.1753 - to the file.
1.1754 - @param aMessage A reference to a client message or an RLocalMessage
1.1755 - @param aOffset The offset into the descriptor where the data is to be read from.
1.1756 - This is non-zero if the read was fair-scheduled
1.1757 -
1.1758 - @see CFileCB::WriteL
1.1759 - @see RLocalMessage
1.1760 - */
1.1761 - virtual void WriteL(TInt64 aPos,TInt& aLength,const TDesC8* aDes,const RMessagePtr2& aMessage, TInt aOffset) = 0;
1.1762 -
1.1763 - /**
1.1764 - Functionally equivalent to CFileCB::SetSizeL(), but supports large files
1.1765 -
1.1766 - Extends or truncates the file by re-setting the file size.
1.1767 -
1.1768 - The function does not change the iModified and iSize attributes of
1.1769 - the file object: this is done by the file server.
1.1770 - If the file is extended, nothing is written in the extended area.
1.1771 -
1.1772 - The function leaves with a suitable error code when an error is to detected.
1.1773 -
1.1774 - @param aSize The new file size in bytes.
1.1775 -
1.1776 - @leave KErrDiskFull The operation cannot be completed because the disk is full.
1.1777 -
1.1778 - @see CFileCB::SetSizeL
1.1779 - @see CFileCB::iModified
1.1780 - @see CFileCB::iSize
1.1781 - */
1.1782 - virtual void SetSizeL(TInt64 aSize) = 0;
1.1783 - };
1.1784 -
1.1785 -
1.1786 -protected:
1.1787 -
1.1788 - /**
1.1789 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.1790 - binary compatibility.
1.1791 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.1792 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.1793 - @param aInput An arbitrary input argument.
1.1794 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.1795 - */
1.1796 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.1797 -
1.1798 - enum TInterfaceIds
1.1799 - {
1.1800 - EBlockMapInterface = 0,
1.1801 - EGetLocalDrive = 1,
1.1802 - EExtendedFileInterface = 2
1.1803 - };
1.1804 -
1.1805 -private:
1.1806 -
1.1807 - void DemoteShare(CFileShare* aFileShare);
1.1808 - void PromoteShare(CFileShare* aFileShare);
1.1809 -
1.1810 - RArray<TAsyncReadRequest>& AsyncReadRequests();
1.1811 - TInt AddAsyncReadRequest(CFileShare* aFileShareP, TInt aPos, TInt aLength, CFsRequest* aRequestP);
1.1812 - void NotifyAsyncReaders();
1.1813 -
1.1814 -protected:
1.1815 -
1.1816 - /**
1.1817 - Inititally, the mode that the file was opened with, which defines the level
1.1818 - of access allowed to the file. Set by the TDrive object
1.1819 - (representing the drive on which the file resides) when the file
1.1820 - control block is created.
1.1821 - */
1.1822 - TShare iShare;
1.1823 -
1.1824 -
1.1825 - /**
1.1826 - The size of the file.
1.1827 - */
1.1828 - TInt iSize;
1.1829 -
1.1830 -
1.1831 - /**
1.1832 - The attributes of the file.
1.1833 - */
1.1834 - TInt iAtt;
1.1835 -
1.1836 -
1.1837 - /**
1.1838 - The universal time at which the file was last modified.
1.1839 - */
1.1840 - TTime iModified;
1.1841 -
1.1842 -
1.1843 - /**
1.1844 - Indicates whether the file that the object represents is corrupt:
1.1845 - true if it is corrupt, false otherwise.
1.1846 - */
1.1847 - TBool iFileCorrupt;
1.1848 -
1.1849 -
1.1850 - /**
1.1851 - Indicates whether a recent access to the file that the object represents
1.1852 - failed due to KErrBadPower.
1.1853 - */
1.1854 - TBool iBadPower;
1.1855 -
1.1856 -public:
1.1857 -
1.1858 - /**
1.1859 - The full name of the file, including drive and extensions.
1.1860 - */
1.1861 - HBufC* iFileName;
1.1862 -
1.1863 - /**
1.1864 - The full name of the file, including drive and extensions - Folded.
1.1865 - */
1.1866 - HBufC* iFileNameF;
1.1867 -
1.1868 -private:
1.1869 - TUint32 iNameHash;
1.1870 - TDrive* iCreatedDrive;
1.1871 - TDrive* iDrive;
1.1872 - CMountCB* iMount;
1.1873 - RArray<SFileShareLock>* iLock;
1.1874 - TDblQueLink iMountLink;
1.1875 -
1.1876 -private:
1.1877 - CFileBody* iBody;
1.1878 -
1.1879 - friend class TDrive;
1.1880 - friend class CMountCB;
1.1881 - friend class CFileShare;
1.1882 - friend class TFsFileRead;
1.1883 - friend class TFsFileWrite;
1.1884 - friend class TFsFileSetSize;
1.1885 - friend class TFsFileReadCancel;
1.1886 - friend class TFsFileDuplicate;
1.1887 - friend class CCompFileCB;
1.1888 - friend class CFileCache;
1.1889 - };
1.1890 -
1.1891 -
1.1892 -/**
1.1893 -Helper class to construct a dummy RMessage2 object. This allows the file server to
1.1894 -read and write local buffers to a file system's CFileCB-derived interface.
1.1895 -
1.1896 -@internalTechnology
1.1897 -*/
1.1898 -class RLocalMessage : public RMessage2
1.1899 - {
1.1900 -public:
1.1901 - inline RLocalMessage();
1.1902 - };
1.1903 -
1.1904 -
1.1905 -/**
1.1906 -@publishedPartner
1.1907 -@released
1.1908 -
1.1909 -A file server interface class representing an open file that is being shared.
1.1910 -For example multiple reading of the same file.
1.1911 -
1.1912 -@see CFileCB
1.1913 -@see TFileMode
1.1914 -*/
1.1915 -NONSHARABLE_CLASS(CFileShare) : public CFsDispatchObject
1.1916 - {
1.1917 -public:
1.1918 - CFileShare(CFileCB* aFileCB);
1.1919 - ~CFileShare();
1.1920 - TInt CheckMount();
1.1921 - void InitL();
1.1922 - inline CFileCB& File();
1.1923 -
1.1924 - // For serialising aync requests
1.1925 - TBool RequestStart(CFsMessageRequest* aRequest);
1.1926 - void RequestEnd(CFsMessageRequest* aRequest);
1.1927 - TBool RequestInProgress() const;
1.1928 -
1.1929 -
1.1930 -public:
1.1931 - /**
1.1932 - File share mode. The mode in which the file was opened first.
1.1933 - @see TFileMode.
1.1934 - */
1.1935 - TUint iMode;
1.1936 - /**
1.1937 - Current file position. This is the position at which reading and writing takes place.
1.1938 - */
1.1939 - TInt iPos;
1.1940 - /**
1.1941 - Error condition due to flush.
1.1942 - */
1.1943 - TInt iFlushError;
1.1944 -private:
1.1945 - CFileCB* iFile;
1.1946 -
1.1947 - // A pointer to the current request. Used for serializing client
1.1948 - // async read/write requests which might otherwise be processed out
1.1949 - // of order due to fair scheduling
1.1950 - CFsMessageRequest* iCurrentRequest;
1.1951 - };
1.1952 -
1.1953 -
1.1954 -
1.1955 -
1.1956 -/**
1.1957 -@publishedPartner
1.1958 -@released
1.1959 -
1.1960 -A file server interface class representing an open directory
1.1961 -
1.1962 -An instance of this object is referred to as a directory control block.
1.1963 -
1.1964 -A directory control block must be created for a specific directory to access
1.1965 -that directory within a volume.
1.1966 -
1.1967 -A plug-in file system implements this class.
1.1968 -*/
1.1969 -class CDirCB : public CFsDispatchObject
1.1970 - {
1.1971 -public:
1.1972 - IMPORT_C CDirCB();
1.1973 - IMPORT_C ~CDirCB();
1.1974 - TInt CheckMount();
1.1975 - IMPORT_C void InitL(TDrive* aDrive);
1.1976 - inline void SetMount(CMountCB * aMount){iMount=aMount;};
1.1977 - inline TDrive& Drive() const;
1.1978 - inline CMountCB& Mount() const;
1.1979 - inline TBool Pending() const;
1.1980 - inline void SetPending(TBool aPending);
1.1981 -
1.1982 -
1.1983 - /**
1.1984 - Gets information from the first suitable entry in the directory,
1.1985 - starting from the current read position.
1.1986 -
1.1987 - The function should read successive entries until a suitable entry is found.
1.1988 - An entry is suitable if the entry attributes match the criteria set by this
1.1989 - object's attributes, which are set on initialisation.
1.1990 - For example, if the directory control block has the attribute
1.1991 - KEntryAttMaskSupported, and the file has the attribute KEntryAttVolume,
1.1992 - then the entry will be deemed unsuitable and the next entry will be read.
1.1993 -
1.1994 - This function is called by the file server.
1.1995 -
1.1996 - If, on return, the entry's full file name, TEntry::iName, is longer than
1.1997 - the maximum buffer size, then the entry cannot be returned to the client.
1.1998 - In this case the file server will set iPending to true and will call
1.1999 - StoreLongEntryName() before calling this function again.
1.2000 - In this case (when iPending is true), the function should re-read
1.2001 - the last entry to be read; it should also set iPending to false and
1.2002 - should not advance the current read position.
1.2003 -
1.2004 - The time stored in the iModified member of anEntry should not be converted,
1.2005 - but left as UTC time.
1.2006 -
1.2007 - When storing the iName member of anEntry, the current (.),
1.2008 - or parent marker (..) in the directory should not be returned.
1.2009 -
1.2010 - If the KEntryAttAllowUid flag is set in the iAtt member of anEntry, then
1.2011 - the entry UID type of an entry will be read. If, on reading the UID from
1.2012 - a file, KErrCorrupt is generated, because the file is corrupt,
1.2013 - ReadL() should not leave with this error message, but should return
1.2014 - as normal.
1.2015 - If any other errors are raised the function should leave.
1.2016 -
1.2017 - All of the properties of a TEntry, other than the UID types, are always read.
1.2018 -
1.2019 - ReadL() should leave with a suitable error code if it cannot complete
1.2020 - successfully for any reason.
1.2021 -
1.2022 - @param anEntry Entry information object.
1.2023 - */
1.2024 - virtual void ReadL(TEntry& anEntry) =0;
1.2025 -
1.2026 -public:
1.2027 - IMPORT_C virtual void StoreLongEntryNameL(const TDesC& aName);
1.2028 -
1.2029 -protected:
1.2030 - /**
1.2031 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.2032 - binary compatibility.
1.2033 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.2034 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.2035 - @param aInput An arbitrary input argument.
1.2036 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.2037 - */
1.2038 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.2039 -
1.2040 -protected:
1.2041 - /**
1.2042 - Bitmask of the attributes of interest.
1.2043 -
1.2044 - Set using the the TDrive friend class instance representing
1.2045 - the directory's drive after the object is made.
1.2046 - */
1.2047 - TUint iAtt;
1.2048 -
1.2049 -
1.2050 - /**
1.2051 - Set after construction using the TDrive friend class instance representing
1.2052 - the directory's drive.
1.2053 - */
1.2054 - TUidType iUidType;
1.2055 -
1.2056 -
1.2057 - /**
1.2058 - Flag to indicate whether preceding entry details should be returned when
1.2059 - multiple entries are being read.
1.2060 - */
1.2061 - TBool iPending;
1.2062 - friend class TDrive;
1.2063 -private:
1.2064 - TDrive* iDrive;
1.2065 - CMountCB* iMount;
1.2066 - TUint32 iReserved; // Reserved for future expansion
1.2067 - };
1.2068 -
1.2069 -
1.2070 -
1.2071 -
1.2072 -/**
1.2073 -@publishedPartner
1.2074 -@released
1.2075 -
1.2076 -A file server interface class representing a format operation on a disk.
1.2077 -
1.2078 -An instance of this object is referred to as a format control block.
1.2079 -
1.2080 -The type of format operation to be applied depends on the type of disk,
1.2081 -and is stored in iMode. Each format operation has a number of steps and
1.2082 -is kept track of using iCurrentStep.
1.2083 -
1.2084 -A format control block needs to be created for a specific mount control block
1.2085 -for the disk controlled via that mount to be formatted.
1.2086 -
1.2087 -A plug-in file system provides an implementation of this class.
1.2088 -*/
1.2089 -class CFormatCB : public CFsDispatchObject
1.2090 - {
1.2091 -public:
1.2092 - IMPORT_C CFormatCB();
1.2093 - IMPORT_C ~CFormatCB();
1.2094 - IMPORT_C TInt CheckMount();
1.2095 - void InitL(TDrive* aDrive,TFormatMode aMode);
1.2096 - void SetSpecialInfo(const TDesC8& aInfo);
1.2097 - inline TDrive& Drive() const;
1.2098 - inline CMountCB& Mount() const;
1.2099 - inline TFormatMode Mode() const;
1.2100 - inline TInt& CurrentStep();
1.2101 -
1.2102 - /**
1.2103 - Performs a formatting step on the drive.
1.2104 -
1.2105 - The step performed should depend on the values of iMode and iCurrentStep.
1.2106 -
1.2107 - It can be assumed that there are no resources open on the mount,
1.2108 - that the media is formattable, and that the media is not write protected.
1.2109 -
1.2110 - If iMode == EQuickFormat, then only meta data is to be written.
1.2111 - This should be carried out in a single step, with iCurrentStep set
1.2112 - to zero on completion.
1.2113 -
1.2114 - If iMode != EQuickFormat, then the format step performed by
1.2115 - this function should depend on iCurrentStep. When the function
1.2116 - returns with iCurrentStep set to zero, the formatting of the drive is complete.
1.2117 -
1.2118 - On error detection, the function should leave with an appropriate error code.
1.2119 -
1.2120 - @see CFormatCB::iMode
1.2121 - @see CFormatCB::iCurrentStep
1.2122 - */
1.2123 - virtual void DoFormatStepL() =0;
1.2124 -
1.2125 -protected:
1.2126 - /**
1.2127 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.2128 - binary compatibility.
1.2129 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.2130 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.2131 - @param aInput An arbitrary input argument.
1.2132 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.2133 - */
1.2134 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.2135 -
1.2136 -protected:
1.2137 -
1.2138 - /**
1.2139 - The stage the current format operation has reached.
1.2140 - */
1.2141 - TInt iCurrentStep;
1.2142 -
1.2143 -
1.2144 - /**
1.2145 - The mode of the format operation.
1.2146 -
1.2147 - This is set by the file server when the format control block is created.
1.2148 - */
1.2149 - TFormatMode iMode;
1.2150 -
1.2151 - /**
1.2152 - Buffer containing user-specified format parameters.
1.2153 - */
1.2154 - TSpecialFormatInfoBuf iSpecialInfo;
1.2155 -private:
1.2156 - TDrive* iDrive;
1.2157 - CMountCB* iMount;
1.2158 - TUint32 iReserved; // Reserved for future expansion
1.2159 - };
1.2160 -
1.2161 -
1.2162 -
1.2163 -
1.2164 -/**
1.2165 -@publishedPartner
1.2166 -@released
1.2167 -
1.2168 -A file server interface class representing a raw disk.
1.2169 -
1.2170 -An instance of this object is referred to as a raw disk control block.
1.2171 -
1.2172 -This is not an abstract base class and does not need to be derived from
1.2173 -when implementing a file system. This is because direct disk access is
1.2174 -implemented by the file server directly calling RawReadL() and RawWriteL()
1.2175 -from the derived CMountCB object of the file system.
1.2176 -*/
1.2177 -NONSHARABLE_CLASS(CRawDiskCB) : public CFsDispatchObject
1.2178 - {
1.2179 -public:
1.2180 - CRawDiskCB();
1.2181 - ~CRawDiskCB();
1.2182 - void InitL(CMountCB* aMount,TBool aIsWriteProtected);
1.2183 - inline CMountCB& Mount();
1.2184 - inline TDrive& Drive();
1.2185 - inline TBool IsWriteProtected() const;
1.2186 - inline void SetChanged();
1.2187 -private:
1.2188 - enum { EWriteProtected = 1, EChanged = 2 };
1.2189 - inline void SetWriteProtected();
1.2190 - inline TBool IsChanged() const;
1.2191 -private:
1.2192 - CMountCB* iMount;
1.2193 - TUint32 iFlags;
1.2194 - };
1.2195 -
1.2196 -
1.2197 -
1.2198 -
1.2199 -/**
1.2200 -@publishedPartner
1.2201 -@released
1.2202 -
1.2203 -A file server interface class, representing the factory class for a file system.
1.2204 -
1.2205 -A plug-in file system implements this class.
1.2206 -
1.2207 -Creates objects derived from CMountCB, CFileCB, CDirCB and CFormatCB.
1.2208 -
1.2209 -@see CMountCB
1.2210 -@see CFileCB
1.2211 -@see CDirCB
1.2212 -@see CFormatCB
1.2213 -*/
1.2214 -class CFileSystem : public CFsObject
1.2215 - {
1.2216 -public:
1.2217 - IMPORT_C CFileSystem();
1.2218 - IMPORT_C ~CFileSystem();
1.2219 - IMPORT_C virtual TInt Remove();
1.2220 - IMPORT_C virtual TBool QueryVersionSupported(const TVersion& aVer) const;
1.2221 - IMPORT_C virtual TBool IsExtensionSupported() const;
1.2222 - IMPORT_C void SetLibrary(RLibrary aLib);
1.2223 - IMPORT_C RLibrary Library() const;
1.2224 -// Pure virtual
1.2225 -
1.2226 -
1.2227 - /**
1.2228 - Installs the file system.
1.2229 -
1.2230 - The function should set the name of the file system object through a call
1.2231 - to CObject::SetName(), thus making it accessible, internally,
1.2232 - using FileSystems->FindByFullName(). This enables the file server
1.2233 - to find and handle installed file systems.
1.2234 - The function should also set the file system version.
1.2235 - The version is determined by the file system implementation.
1.2236 - It is used in calls to CFileSystem::QueryVersionSupported().
1.2237 -
1.2238 - This function is called as a result of a call to RFs::AddFileSystem().
1.2239 -
1.2240 - @return KErrNone if succesful; otherwise one of the other system-wide error
1.2241 - codes.
1.2242 -
1.2243 - @see RFs::AddFileSystem
1.2244 - @see CObject::SetName
1.2245 - @see RFs
1.2246 - @see CObject
1.2247 - */
1.2248 - virtual TInt Install() =0;
1.2249 -
1.2250 -
1.2251 - /**
1.2252 - Creates a new mount control block, a CMountCB derived object.
1.2253 -
1.2254 - On success, a pointer to the new mount object should be returned,
1.2255 - otherwise the function should leave.
1.2256 -
1.2257 - @return A pointer to the new mount object.
1.2258 -
1.2259 - @see CMountCB
1.2260 - */
1.2261 - virtual CMountCB* NewMountL() const =0;
1.2262 -
1.2263 -
1.2264 - /**
1.2265 - Creates a new file control block, i.e. a CFileCB derived object.
1.2266 -
1.2267 - On success, a pointer to the new file object should be returned,
1.2268 - otherwise the function should leave.
1.2269 -
1.2270 - @return A pointer to the new file object.
1.2271 -
1.2272 - @see CFileCB
1.2273 - */
1.2274 - virtual CFileCB* NewFileL() const =0;
1.2275 -
1.2276 -
1.2277 - /**
1.2278 - Creates a new directory control block, i.e. a CDirCB derived object.
1.2279 -
1.2280 - On success, a pointer to the new directory control block should be returned,
1.2281 - otherwise the function should leave.
1.2282 -
1.2283 - @return A pointer to the new directory object.
1.2284 -
1.2285 - @see CDirCB
1.2286 - */
1.2287 - virtual CDirCB* NewDirL() const =0;
1.2288 -
1.2289 -
1.2290 - /**
1.2291 - Creates a new volume format control block, i.e. a CFormatCB derived object.
1.2292 -
1.2293 - On success, a pointer to the new volume format control block should be returned,
1.2294 - otherwise the function should leave.
1.2295 -
1.2296 - @return A pointer to the new volume format object.
1.2297 -
1.2298 - @see CFormatCB
1.2299 - */
1.2300 - virtual CFormatCB* NewFormatL() const =0;
1.2301 -
1.2302 -
1.2303 - /**
1.2304 - Retrieves drive information.
1.2305 -
1.2306 - The function should set anInfo.iMediaAtt and anInfo.iType according to
1.2307 - the specified drive number.
1.2308 -
1.2309 - Note that anInfo.iDriveAtt and anInfo.iBatteryState will already have been
1.2310 - set by the calling function.
1.2311 -
1.2312 - The function can obtain the necessary information by calling
1.2313 - the appropriate TBusLocalDrive::Caps() function using the argument aDriveNumber.
1.2314 -
1.2315 - @param anInfo On return, contains the drive information.
1.2316 - @param aDriveNumber The drive number.
1.2317 - */
1.2318 - virtual void DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const =0;
1.2319 -
1.2320 -//#ifndef __DATA_CAGING__
1.2321 - virtual TInt DefaultPath(TDes& aPath) const;
1.2322 -//#endif
1.2323 -
1.2324 -protected:
1.2325 - /**
1.2326 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.2327 - binary compatibility.
1.2328 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.2329 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.2330 - @param aInput An arbitrary input argument.
1.2331 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.2332 - */
1.2333 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.2334 -
1.2335 -protected:
1.2336 - TVersion iVersion;
1.2337 -private:
1.2338 - RLibrary iLibrary;
1.2339 - TUint32 iReserved; // Reserved for future expansion
1.2340 - };
1.2341 -
1.2342 -
1.2343 -
1.2344 -
1.2345 -/**
1.2346 -@publishedPartner
1.2347 -@released
1.2348 -
1.2349 -Base abstract class.
1.2350 -Interface between a local plugin file system and a media subsystem.
1.2351 -
1.2352 -@see CLocalProxyDrive
1.2353 -@see CBaseExtProxyDrive
1.2354 -*/
1.2355 -class CProxyDrive : public CBase
1.2356 - {
1.2357 -public:
1.2358 - CProxyDrive(CMountCB* aMount);
1.2359 - ~CProxyDrive();
1.2360 - inline CMountCB* Mount() const;
1.2361 -// virtual
1.2362 - IMPORT_C virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
1.2363 - IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.2364 - IMPORT_C virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset,TInt aFlags);
1.2365 - IMPORT_C virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
1.2366 - IMPORT_C virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
1.2367 - inline TInt LocalBufferSupport();
1.2368 -
1.2369 -// pure virtual
1.2370 -
1.2371 - /**
1.2372 - Initialise the proxy drive.
1.2373 -
1.2374 - Derived class must provide an implementation for it.
1.2375 -
1.2376 - @return KErrNone if successful, otherwise one of the system-wide error codes.
1.2377 - */
1.2378 - virtual TInt Initialise()=0;
1.2379 -
1.2380 - /**
1.2381 - It invokes Dismounted() on the proxy drive.
1.2382 -
1.2383 - Derived class must provide an implementation for it.
1.2384 -
1.2385 - @return KErrNone if successful, otherwise one of the system-wide error codes.
1.2386 - */
1.2387 - virtual TInt Dismounted()=0;
1.2388 -
1.2389 - /**
1.2390 - Increase the size of the proxy drive by the specified length (in bytes).
1.2391 -
1.2392 - Derived class must provide an implementation for it.
1.2393 -
1.2394 - @param aLength The length (in bytes) of which the drive is to be increased by.
1.2395 -
1.2396 - @return KErrNone if successful, otherwise one of the system-wide error codes.
1.2397 - */
1.2398 - virtual TInt Enlarge(TInt aLength)=0;
1.2399 -
1.2400 - /**
1.2401 - Reduce the size of the proxy drive by removing the specified length
1.2402 - (in bytes) starting at the specified position.
1.2403 -
1.2404 - Derived class must provide an implementation for it.
1.2405 -
1.2406 - @param aPos The start position of area to be removed.
1.2407 - @param aLength The length/size (in bytes) by which the drive is to be reduced.
1.2408 -
1.2409 - @return System-wide error codes based on the status of the operation.
1.2410 - */
1.2411 - virtual TInt ReduceSize(TInt aPos, TInt aLength)=0;
1.2412 -
1.2413 - /**
1.2414 - Read from the proxy drive.
1.2415 -
1.2416 - Derived class must provide an implementation for it.
1.2417 -
1.2418 - @param aPos The address from where the read begins.
1.2419 - @param aLength The length of the read.
1.2420 - @param aTrg A descriptor of the memory buffer from which to read.
1.2421 - @param aThreadHandle The handle-number representing the drive thread.
1.2422 - @param aOffset Offset into aTrg to read the data from.
1.2423 -
1.2424 - @return System-wide error codes based on the status of the operation.
1.2425 - */
1.2426 - virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset)=0;
1.2427 -
1.2428 - /**
1.2429 - Read from the proxy drive.
1.2430 -
1.2431 - Derived class must provide an implementation for it.
1.2432 -
1.2433 - @param aPos The address from where the read begins.
1.2434 - @param aLength The length of the read.
1.2435 - @param aTrg A descriptor of the memory buffer from which to read.
1.2436 -
1.2437 - @return System-wide error codes based on the status of the operation.
1.2438 - */
1.2439 - virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg)=0;
1.2440 -
1.2441 - /**
1.2442 - Write to the proxy drive.
1.2443 -
1.2444 - Derived class must provide an implementation for it.
1.2445 -
1.2446 - @param aPos The address from where the write begins.
1.2447 - @param aLength The length of the write.
1.2448 - @param aSrc A descriptor of the memory buffer from which to write.
1.2449 - @param aThreadHandle The handle-number representing the drive thread.
1.2450 - @param aOffset Offset into aSrc to write the data to.
1.2451 -
1.2452 - @return System-wide error codes based on the status of the operation.
1.2453 - */
1.2454 - virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset)=0;
1.2455 -
1.2456 - /**
1.2457 - Write to the proxy drive.
1.2458 -
1.2459 - Derived class must provide an implementation for it.
1.2460 -
1.2461 - @param aPos The address from where the write begins.
1.2462 - @param aSrc A descriptor of the memory buffer from which to write.
1.2463 -
1.2464 - @return System-wide error codes based on the status of the operation.
1.2465 - */
1.2466 - virtual TInt Write(TInt64 aPos,const TDesC8& aSrc)=0;
1.2467 -
1.2468 - /**
1.2469 - Get the proxy drive's capabilities information.
1.2470 -
1.2471 - Derived class must provide an implementation for it.
1.2472 -
1.2473 - @param anInfo A descriptor of the connected drives capabilities.
1.2474 -
1.2475 - @return System-wide error codes based on the status of the operation.
1.2476 - */
1.2477 - virtual TInt Caps(TDes8& anInfo)=0;
1.2478 -
1.2479 - /**
1.2480 - Format the connected drive.
1.2481 -
1.2482 - Derived class must provide an implementation for it.
1.2483 -
1.2484 - @param anInfo Device specific format information.
1.2485 -
1.2486 - @return System-wide error codes based on the status of the operation.
1.2487 - */
1.2488 - virtual TInt Format(TFormatInfo& anInfo)=0;
1.2489 -
1.2490 - /**
1.2491 - Format the proxy drive.
1.2492 -
1.2493 - Derived class must provide an implementation for it.
1.2494 -
1.2495 - @param aPos The position of the data which is being formatted.
1.2496 - @param aLength The length of the data which is being formatted.
1.2497 -
1.2498 - @return System-wide error codes based on the status of the operation.
1.2499 - */
1.2500 - virtual TInt Format(TInt64 aPos,TInt aLength)=0;
1.2501 -
1.2502 - /**
1.2503 - Set the mount information on the proxy drive.
1.2504 -
1.2505 - Derived class must provide an implementation for it.
1.2506 -
1.2507 - @param aMountInfo Information passed down to the media driver.
1.2508 - The meaning of this information depends on the media driver.
1.2509 - @param aMountInfoThreadHandle Message thread handle number.
1.2510 -
1.2511 - @return System-wide error codes based on the status of the operation.
1.2512 - */
1.2513 - virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle)=0;
1.2514 -
1.2515 - /**
1.2516 - Forces a remount on the proxy drive
1.2517 -
1.2518 - Derived class must provide an implementation for it.
1.2519 -
1.2520 - @param aFlags Flags to be passed into the driver.
1.2521 -
1.2522 - @return System-wide error codes based on the status of the operation.
1.2523 - */
1.2524 - virtual TInt ForceRemount(TUint aFlags=0)=0;
1.2525 -
1.2526 - /**
1.2527 - Unlocks a password-enabled proxy drive.
1.2528 -
1.2529 - Derived class must provide an implementation for it.
1.2530 -
1.2531 - @param aPassword A descriptor containing the existing password.
1.2532 - @param aStorePassword If ETrue, the password is added to the password store.
1.2533 -
1.2534 - @return System-wide error codes based on the status of the operation.
1.2535 - */
1.2536 - virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword)=0;
1.2537 -
1.2538 - /**
1.2539 - Locks a password-enabled proxy drive with the new password.
1.2540 -
1.2541 - Derived class must provide an implementation for it.
1.2542 -
1.2543 - @param aOldPassword A descriptor containing the existing password.
1.2544 - @param aNewPassword A descriptor containing the new password.
1.2545 - @param aStorePassword If ETrue, the password is added to the password store.
1.2546 -
1.2547 - @return System-wide error codes based on the status of the operation.
1.2548 - */
1.2549 - virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword)=0;
1.2550 -
1.2551 - /**
1.2552 - Clears a password from a proxy drive - controller sets password to null.
1.2553 -
1.2554 - Derived class must provide an implementation for it.
1.2555 -
1.2556 - @param aPassword A descriptor containing the password.
1.2557 -
1.2558 - @return System-wide error codes based on the status of the operation.
1.2559 - */
1.2560 - virtual TInt Clear(TMediaPassword &aPassword)=0;
1.2561 -
1.2562 - /**
1.2563 - Forcibly unlock a password-enabled proxy drive.
1.2564 -
1.2565 - Derived class must provide an implementation for it.
1.2566 -
1.2567 - @return System-wide error codes based on the status of the operation.
1.2568 - */
1.2569 - virtual TInt ErasePassword()=0;
1.2570 -
1.2571 -// implementation using GetInterface(..)
1.2572 - enum TInterfaceIds
1.2573 - {
1.2574 - EGetLocalDrive,
1.2575 - ELocalBufferSupport
1.2576 - };
1.2577 -
1.2578 - /**
1.2579 - Retrieves TBusLocalDrive object associated with the file.
1.2580 -
1.2581 - @return System-wide error codes based on the status of the operation.
1.2582 - */
1.2583 - IMPORT_C TInt GetLocalDrive(TBusLocalDrive*& aLocDrv);
1.2584 -
1.2585 -protected:
1.2586 - /**
1.2587 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.2588 - binary compatibility.
1.2589 -
1.2590 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.2591 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.2592 - @param aInput An arbitrary input argument.
1.2593 -
1.2594 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.2595 - */
1.2596 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.2597 -
1.2598 -private:
1.2599 - CMountCB* iMount;
1.2600 - TUint32 iReserved; // Reserved for future expansion
1.2601 - };
1.2602 -
1.2603 -
1.2604 -
1.2605 -
1.2606 -/**
1.2607 -@publishedPartner
1.2608 -@released
1.2609 -
1.2610 -Local drive specific mount control block.
1.2611 -*/
1.2612 -class CLocDrvMountCB : public CMountCB
1.2613 - {
1.2614 -public:
1.2615 - IMPORT_C CLocDrvMountCB();
1.2616 - IMPORT_C ~CLocDrvMountCB();
1.2617 - IMPORT_C TInt CreateLocalDrive(TBusLocalDrive& aLocDrv);
1.2618 - IMPORT_C TInt InitLocalDrive();
1.2619 - IMPORT_C void DismountedLocalDrive();
1.2620 - inline CProxyDrive* LocalDrive() const;
1.2621 -
1.2622 -private:
1.2623 - CProxyDrive* iProxyDrive;
1.2624 - };
1.2625 -
1.2626 -
1.2627 -
1.2628 -
1.2629 -
1.2630 -/**
1.2631 -@publishedPartner
1.2632 -@released
1.2633 -
1.2634 -Local drive specific proxy drive interface.
1.2635 -Class passes commands directly to TBusLocalDrive.
1.2636 -
1.2637 -@see CProxyDrive
1.2638 -*/
1.2639 -NONSHARABLE_CLASS(CLocalProxyDrive) : public CProxyDrive
1.2640 - {
1.2641 -public:
1.2642 - static CLocalProxyDrive* New(CMountCB* aMount,TBusLocalDrive& aLocDrv);
1.2643 -// virtual
1.2644 - virtual TInt Initialise();
1.2645 - virtual TInt Dismounted();
1.2646 - virtual TInt Enlarge(TInt aLength);
1.2647 - virtual TInt ReduceSize(TInt aPos, TInt aLength);
1.2648 - virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset, TInt aFlags);
1.2649 - virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
1.2650 - virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
1.2651 - virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.2652 - virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
1.2653 - virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
1.2654 - virtual TInt Caps(TDes8& anInfo);
1.2655 - virtual TInt Format(TFormatInfo& anInfo);
1.2656 - virtual TInt Format(TInt64 aPos,TInt aLength);
1.2657 - virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle);
1.2658 - virtual TInt ForceRemount(TUint aFlags=0);
1.2659 - virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
1.2660 - virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword);
1.2661 - virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword);
1.2662 - virtual TInt Clear(TMediaPassword &aPassword);
1.2663 - virtual TInt ErasePassword();
1.2664 - virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
1.2665 - virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
1.2666 -protected:
1.2667 - virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.2668 -private:
1.2669 - CLocalProxyDrive(CMountCB* aMount,TBusLocalDrive& aLocDrv);
1.2670 -private:
1.2671 - TBusLocalDrive& iLocDrv;
1.2672 - };
1.2673 -
1.2674 -
1.2675 -
1.2676 -
1.2677 -/**
1.2678 -@publishedPartner
1.2679 -@released
1.2680 -
1.2681 -Media subsystem extensions must be derived from this specific class interface.
1.2682 -Objects of this type should be created through use of a derived CProxyDriveFactory class.
1.2683 -
1.2684 -Class passes commands directly to CProxyDrive.
1.2685 -
1.2686 -@see CProxyDrive
1.2687 -@see CProxyDriveFactory
1.2688 -*/
1.2689 -class CBaseExtProxyDrive : public CProxyDrive
1.2690 - {
1.2691 -public:
1.2692 - IMPORT_C CBaseExtProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount);
1.2693 - IMPORT_C ~CBaseExtProxyDrive();
1.2694 - IMPORT_C virtual TInt Initialise();
1.2695 - IMPORT_C virtual TInt Dismounted();
1.2696 - IMPORT_C virtual TInt Enlarge(TInt aLength);
1.2697 - IMPORT_C virtual TInt ReduceSize(TInt aPos, TInt aLength);
1.2698 - IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.2699 - IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
1.2700 - IMPORT_C virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
1.2701 - IMPORT_C virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
1.2702 - IMPORT_C virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
1.2703 - IMPORT_C virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
1.2704 - IMPORT_C virtual TInt Caps(TDes8& anInfo);
1.2705 - IMPORT_C virtual TInt Format(TFormatInfo& anInfo);
1.2706 - IMPORT_C virtual TInt Format(TInt64 aPos,TInt aLength);
1.2707 - IMPORT_C virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle);
1.2708 - IMPORT_C virtual TInt ForceRemount(TUint aFlags=0);
1.2709 - IMPORT_C virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword);
1.2710 - IMPORT_C virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword);
1.2711 - IMPORT_C virtual TInt Clear(TMediaPassword &aPassword);
1.2712 - IMPORT_C virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
1.2713 - IMPORT_C virtual TInt ErasePassword();
1.2714 - IMPORT_C virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
1.2715 - IMPORT_C virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
1.2716 - inline TInt LocalBufferSupport();
1.2717 -
1.2718 -protected:
1.2719 - /**
1.2720 - Return a pointer to a specified interface extension - to allow future extension of this class without breaking
1.2721 - binary compatibility.
1.2722 - @param aInterfaceId Interface identifier of the interface to be retrieved.
1.2723 - @param aInterface A reference to a pointer that retrieves the specified interface.
1.2724 - @param aInput An arbitrary input argument.
1.2725 - @return KErrNone If the interface is supported, KErrNotSupported otherwise.
1.2726 - */
1.2727 - IMPORT_C virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);
1.2728 -private:
1.2729 - CProxyDrive* iProxy;
1.2730 - };
1.2731 -
1.2732 -
1.2733 -
1.2734 -
1.2735 -/**
1.2736 -@publishedPartner
1.2737 -@released
1.2738 -
1.2739 -Abstract base class for Proxy drive factory classes.
1.2740 -
1.2741 -Class is used for the creation of media subsystem extensions CBaseExtProxyDrive.
1.2742 -
1.2743 -@see CBaseExtProxyDrive
1.2744 -*/
1.2745 -class CProxyDriveFactory : public CFsObject
1.2746 - {
1.2747 -public:
1.2748 - IMPORT_C CProxyDriveFactory();
1.2749 - IMPORT_C virtual TInt Remove();
1.2750 - inline void SetLibrary(RLibrary aLib);
1.2751 - inline RLibrary Library() const;
1.2752 -
1.2753 - /**
1.2754 - Installation of the factory object.
1.2755 - @return system wide error code
1.2756 - */
1.2757 - virtual TInt Install() =0;
1.2758 - /**
1.2759 - Instantiates a CProxyDrive object.
1.2760 - @param aProxy Proxy drive to be used.
1.2761 - @param aMount Mount control block.
1.2762 -
1.2763 - @return pointer to Instantiated CProxyDrive object.
1.2764 - */
1.2765 - virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount)=0;
1.2766 -private:
1.2767 - RLibrary iLibrary;
1.2768 - };
1.2769 -
1.2770 -
1.2771 -
1.2772 -
1.2773 -/**
1.2774 -@publishedPartner
1.2775 -@released
1.2776 -
1.2777 -Gets the local bus drive.
1.2778 -
1.2779 -@param aLocalDrive The local drive number.
1.2780 -
1.2781 -@return The local bus drive.
1.2782 -*/
1.2783 -IMPORT_C TBusLocalDrive& GetLocalDrive(TInt aLocalDrive);
1.2784 -
1.2785 -
1.2786 -
1.2787 -
1.2788 -/**
1.2789 -@publishedPartner
1.2790 -@released
1.2791 -
1.2792 -Checks a given drive number is mapped to a local drive.
1.2793 -
1.2794 -@param aDrive The local drive number.
1.2795 -
1.2796 -@return specified drive number is mapped to a local drive.
1.2797 -*/
1.2798 -IMPORT_C TBool IsValidLocalDriveMapping(TInt aDrive);
1.2799 -
1.2800 -
1.2801 -
1.2802 -
1.2803 -/**
1.2804 -@publishedPartner
1.2805 -@released
1.2806 -
1.2807 -Returns the local drive number for a given drive number.
1.2808 -
1.2809 -@param aDrive The drive number.
1.2810 -
1.2811 -@return KDriveInvalid if drive is not mapped to a local drive.
1.2812 - otherwise the local drive number.
1.2813 -*/
1.2814 -IMPORT_C TInt DriveNumberToLocalDriveNumber(TInt aDrive);
1.2815 -
1.2816 -/**
1.2817 -*/
1.2818 -IMPORT_C TInt GetLocalDriveNumber(TBusLocalDrive* aLocDrv);
1.2819 -
1.2820 -
1.2821 -struct TFatUtilityFunctions;
1.2822 -/**
1.2823 -@internalTechnology
1.2824 -*/
1.2825 -IMPORT_C const TFatUtilityFunctions* GetFatUtilityFunctions();
1.2826 -
1.2827 -
1.2828 -
1.2829 -
1.2830 -/**
1.2831 -@publishedPartner
1.2832 -@released
1.2833 -
1.2834 -Copies data to a buffer.
1.2835 -
1.2836 -If necessary, the buffer, a heap descriptor, is allocated or re-allocated
1.2837 -before copying takes place.
1.2838 -
1.2839 -@param aBuf A reference to a pointer to heap descriptor forming the buffer.
1.2840 - This will be allocated if it does not already exist,
1.2841 - or re-allocated if the existing buffer is not large enough.
1.2842 -@param aDes The data to be copied.
1.2843 -*/
1.2844 -IMPORT_C void AllocBufferL(HBufC*& aBuf,const TDesC& aDes);
1.2845 -
1.2846 -
1.2847 -
1.2848 -
1.2849 -
1.2850 -/**
1.2851 -@publishedPartner
1.2852 -@released
1.2853 -
1.2854 -Notifies sessions of a debug event if aFunction has the KDebugNotifyMask set.
1.2855 -
1.2856 -This function can only be used in debug builds or if _DEBUG
1.2857 -or _DEBUG_RELEASE is defined.
1.2858 -
1.2859 -@param aFunction A function.
1.2860 -@param aDrive A drive.
1.2861 -*/
1.2862 -IMPORT_C void DebugNotifySessions(TInt aFunction,TInt aDrive);
1.2863 -
1.2864 -
1.2865 -
1.2866 -
1.2867 -/**
1.2868 -@publishedPartner
1.2869 -@released
1.2870 -
1.2871 -Writes data from a buffer to a file.
1.2872 -
1.2873 -Called by the mount control block lock and the unlock functions.
1.2874 -
1.2875 -@param aFileName The file to be written to.
1.2876 -@param aBuf The data to be written.
1.2877 -*/
1.2878 -IMPORT_C void WriteToDisk(const TDesC& aFileName,const TDesC8& aBuf);
1.2879 -
1.2880 -
1.2881 -
1.2882 -
1.2883 -/**
1.2884 -Create a proxy drive using the local proxy drive passed in
1.2885 -and any extensions that have been added to the drive.
1.2886 -
1.2887 -@param aConcreteDrive local proxy drive
1.2888 -@param aMount local proxy drive mount control block
1.2889 -
1.2890 -@return pointer to instantiated CProxyDrive object.
1.2891 -*/
1.2892 -IMPORT_C CProxyDrive* CreateProxyDriveL(CProxyDrive* aConcreteDrive,CMountCB* aMount);
1.2893 -
1.2894 -
1.2895 -class TDismountParams
1.2896 - {
1.2897 -public:
1.2898 - inline TDismountParams(TInt aDriveNumber, TDrive* aDrivePointer, TBool aForcedDismount, RMessage2* aForcedMessage);
1.2899 -public:
1.2900 - TInt iDriveNumber;
1.2901 - TDrive* iDrivePointer;
1.2902 - TBool iForcedDismount;
1.2903 - RMessage2* iForcedMessage;
1.2904 - };
1.2905 -
1.2906 -
1.2907 -/**
1.2908 -@deprecated 6.1
1.2909 -*/
1.2910 -IMPORT_C TInt CompareFilenames(const TDesC& aFileName1,const TDesC& aFileName2);
1.2911 -//
1.2912 -/**
1.2913 -Lookup a file system by name.
1.2914 -
1.2915 -@param aName file system name.
1.2916 -
1.2917 -@return pointer to instantiated CFileSystem object.
1.2918 -*/
1.2919 -IMPORT_C CFileSystem* GetFileSystem(const TDesC& aName);
1.2920 -
1.2921 -
1.2922 -
1.2923 -/**
1.2924 -@internalTechnology
1.2925 -
1.2926 -A static class for retrieving F32 properties
1.2927 -*/
1.2928 -class F32Properties
1.2929 - {
1.2930 -private:
1.2931 - F32Properties();
1.2932 -public:
1.2933 - IMPORT_C static TBool Initialise(TInt aRomAddress, TInt aLength);
1.2934 - IMPORT_C static TBool GetString(const TDesC8& aSection, const TDesC8& aProperty, TDes8& aPropVal);
1.2935 - IMPORT_C static TBool GetInt(const TDesC8& aSection, const TDesC8& aProperty, TInt32& aPropVal);
1.2936 - IMPORT_C static TBool GetBool(const TDesC8& aSection, const TDesC8& aProperty, TBool& aPropVal);
1.2937 -private:
1.2938 - static TBool iInitialised;
1.2939 - static TInt iRomAddress;
1.2940 - static TInt iRomLength;
1.2941 - };
1.2942 -
1.2943 -#include <f32fsys.inl>
1.2944 -#endif