epoc32/include/f32file.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // 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
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 
    15 
    16 
       
    17 
       
    18 /**
    16 /**
    19  @file
    17  @file
    20  @publishedAll
    18  @publishedAll
    21  @released
    19  @released
    22 */
    20 */
    26 
    24 
    27 #if !defined(__E32BASE_H__)
    25 #if !defined(__E32BASE_H__)
    28 #include <e32base.h>
    26 #include <e32base.h>
    29 #endif
    27 #endif
    30 
    28 
       
    29 #ifndef SYMBIAN_ENABLE_PUBLIC_PLATFORM_HEADER_SPLIT
       
    30 // Old implementation including platform e32svr.h (which includes the several other platform headers)...
    31 #if !defined(__E32SVR_H__)
    31 #if !defined(__E32SVR_H__)
    32 #include <e32svr.h>
    32 #include <e32svr.h>
    33 #endif
    33 #endif
    34 
       
    35 #include <e32ldr.h>
    34 #include <e32ldr.h>
       
    35 #else
       
    36 // New implementation including only the public headers needed for f32file.h...
       
    37 #include <e32ldr.h>
       
    38 // And the public headers previously included via e32svr.h but otherwise not needed for f32file.h...
       
    39 #include <e32def.h>
       
    40 #include <e32event.h>
       
    41 #include <e32debug.h>
       
    42 #include <e32keys.h> 
       
    43 #endif
    36 
    44 
    37 
    45 
    38 /**
    46 /**
    39 @publishedAll
    47 @publishedAll
    40 @released
    48 @released
   124 @released
   132 @released
   125 
   133 
   126 The maximum number of available drives.
   134 The maximum number of available drives.
   127 */
   135 */
   128 const TInt KMaxDrives=26;
   136 const TInt KMaxDrives=26;
       
   137 
       
   138 
       
   139 /**
       
   140 @publishedAll
       
   141 @released
       
   142 
       
   143 The maximum number of available proxy drives.
       
   144 */
       
   145 const TInt KMaxProxyDrives=KMaxDrives-KMaxLocalDrives;
   129 
   146 
   130 
   147 
   131 /**
   148 /**
   132 @publishedAll
   149 @publishedAll
   133 @released
   150 @released
   345 	20 - File System Specific
   362 	20 - File System Specific
   346 	22 - File System Specific
   363 	22 - File System Specific
   347 	22 - File System Specific
   364 	22 - File System Specific
   348 	23 - File System Specific
   365 	23 - File System Specific
   349 	
   366 	
   350 	24 - Reserved
   367 	24 - KEntryAttPacked
   351 	25 - Reserved
   368 	25 - Reserved
   352 	26 - Reserved
   369 	26 - Reserved
   353 	27 - KEntryAttMatchExclude
   370 	27 - KEntryAttMatchExclude
   354 	
   371 	
   355 	28 - KEntryAttAllowUid
   372 	28 - KEntryAttAllowUid
   477 
   494 
   478 
   495 
   479 
   496 
   480 
   497 
   481 /**
   498 /**
   482 @publishedPartner
   499 @publishedAll
   483 @released
   500 @released
   484 
   501 
   485 Bit mask used when evaluating whether or not a session gets notified of a 
   502 Indicates that a TEntry (that is generally returned from a TEntryArray) is
   486 debug event.
   503 stored in packed format where the iSizeHigh and iReserved fields follow the
   487 
   504 valid characters of the name string.  Before accessing the aforementioned
   488 @see DebugNotifySessions
   505 members, the entry must be unpacked.
   489 */
   506 
   490 const TUint KDebugNotifyMask=0xFF000000; // Reserved for debug notification
   507 */
   491 
   508 const TUint KEntryAttPacked = 0x01000000;
   492 /**
   509 
   493    
   510 
       
   511 /**
       
   512 @publishedAll
       
   513 @released
   494 */
   514 */
   495 const TUint KMaxMapsPerCall = 0x8;
   515 const TUint KMaxMapsPerCall = 0x8;
   496 
       
   497 
       
   498 
       
   499 
       
   500 /** 
       
   501 @publishedPartner 
       
   502 @released 
       
   503 
       
   504 The default blocksize value.
       
   505 
       
   506 This value is returned when you query the blocksize for a media type that does not 
       
   507 support the concept of 'block' (e.g. NOR flash media).
       
   508 
       
   509 @see TVolumeIOParamInfo 
       
   510 */
       
   511 const TUint KDefaultVolumeBlockSize = 512;
       
   512 
   516 
   513 
   517 
   514 
   518 
   515 
   519 
   516 enum TNotifyType
   520 enum TNotifyType
   575 	Change resulting from the RRawDisk::Write() request.
   579 	Change resulting from the RRawDisk::Write() request.
   576 	*/
   580 	*/
   577 	ENotifyDisk=0x40
   581 	ENotifyDisk=0x40
   578 	};
   582 	};
   579 
   583 
       
   584 /**
       
   585     @publishedAll
       
   586     @released
       
   587 
       
   588     Notification modes for safe media removal notification API
       
   589 
       
   590     @see RFs::NotifyDismount
       
   591 */
   580 enum TNotifyDismountMode
   592 enum TNotifyDismountMode
   581 /**
   593 	{
   582 @publishedAll
   594 	/** Used by a client to register for notification of pending dismount. This is the default behaviour for RFs::NotifyDismount*/
   583 @released
       
   584 
       
   585 Notification modes for safe media removal notification API
       
   586 
       
   587 @see RFs::NotifyDismount
       
   588 */
       
   589 	{
       
   590 	/**
       
   591 	Used by a client to register for notification of pending dismount.
       
   592 		- This is the default behaviour for RFs::NotifyDismount
       
   593 	*/
       
   594 	EFsDismountRegisterClient=0x01,
   595 	EFsDismountRegisterClient=0x01,
   595 	
   596 	
   596 	/**
   597 	/** 
   597 	Used to notify clients of a pending dismount.
   598     Used for graceful file system dismounting with notifying clients of a pending dismount. 
   598 	*/
   599     If all clients have responded by RFs::AllowDismount(), the file system will be dismounted. 
       
   600     */
   599 	EFsDismountNotifyClients=0x02,
   601 	EFsDismountNotifyClients=0x02,
   600 	
   602 	
   601 	/**
   603 	/**  Used to forcibly dismount the file system without notifying clients. */
   602 	Used to forcibly dismount the file system without notifying clients.
       
   603 	*/
       
   604 	EFsDismountForceDismount=0x03,
   604 	EFsDismountForceDismount=0x03,
   605 	};
   605 	};
   606 
   606 
   607 
   607 
   608 enum TFileCacheFlags
   608 enum TFileCacheFlags
   609 /**
   609 /**
   610 @publishedPartner
   610 @publishedAll
   611 @released
   611 @released
   612 
   612 
   613 Flags used to enable file server drive-specific caching 
   613 Flags used to enable file server drive-specific caching 
   614 */
   614 */
   615 	{
   615 	{
   642 	Enable write caching for all files, regardless of file open mode
   642 	Enable write caching for all files, regardless of file open mode
   643 	*/
   643 	*/
   644 	EFileCacheWriteOn = 0x20,	
   644 	EFileCacheWriteOn = 0x20,	
   645 	};
   645 	};
   646 
   646 
   647 
   647 /**
   648 enum TStartupConfigurationCmd
   648 @publishedAll
   649 /**
       
   650 @publishedPartner
       
   651 @released
       
   652 
       
   653 Command used to set file server configuration at startup.
       
   654 
       
   655 @see RFs::SetStartupConfiguration()
       
   656 */
       
   657     {
       
   658     /**
       
   659     Set loader thread priority
       
   660     */
       
   661     ELoaderPriority,
       
   662 
       
   663     /**
       
   664     Set TDrive flags. Value should be ETrue or EFalse
       
   665     */
       
   666     ESetRugged,
       
   667     /**
       
   668     Command upper boundary
       
   669     */
       
   670     EMaxStartupConfigurationCmd
       
   671     };
       
   672 
       
   673 /**
       
   674 @publishedPartner
       
   675 @released
   649 @released
   676 
   650 
   677 Commands to query specific volume information.
   651 Commands to query specific volume information.
   678 
   652 
   679 @see TVolumeIOParamInfo
   653 @see TVolumeIOParamInfo
   775 	
   749 	
   776 	When no value is provided, value KErrNotSupported is returned.
   750 	When no value is provided, value KErrNotSupported is returned.
   777 	*/
   751 	*/
   778 	TInt iRecWriteBufSize;
   752 	TInt iRecWriteBufSize;
   779 
   753 
       
   754 
       
   755     /** 
       
   756     The maximum file size that is supported by the file system mounted on this volume. 
       
   757     Not all file system may provide this parameter;  The value KMaxTUint64 (0xffffffffffffffff) means that this particular file system hasn't 
       
   758     provided this information.
       
   759     */
       
   760     TUint64 iMaxSupportedFileSize;
       
   761 
   780 private:
   762 private:
   781 	/*
   763 	/*
   782 	Reserved space for future use
   764 	Reserved space for future use
   783 	*/
   765 	*/
   784 	TInt iReserved[4];
   766 	TInt iReserved[2];
   785 	};
   767 	};
   786 
   768 
   787 enum TDriveNumber
   769 enum TDriveNumber
   788 /**
   770 /**
   789 @publishedAll
   771 @publishedAll
  1143 	EFileReadAheadOn	=0x00008000,
  1125 	EFileReadAheadOn	=0x00008000,
  1144 
  1126 
  1145 	/**
  1127 	/**
  1146 	Disables read ahead.
  1128 	Disables read ahead.
  1147 	*/
  1129 	*/
  1148 	EFileReadAheadOff	=0x00010000
  1130 	EFileReadAheadOff	=0x00010000,
       
  1131 
       
  1132 	/**
       
  1133 	Enable delete on close
       
  1134 	*/
       
  1135 	EDeleteOnClose		=0x00020000,
       
  1136 	
       
  1137 	/**
       
  1138 	Enables operations on large files.
       
  1139 	
       
  1140 	@internalTechnology
       
  1141 	
       
  1142 	*/
       
  1143 	EFileBigFile        =0x00040000
       
  1144 
  1149 	};
  1145 	};
  1150 
  1146 
  1151 
  1147 
  1152 
  1148 
  1153 
  1149 
  1172 The format method.
  1168 The format method.
  1173 */
  1169 */
  1174 	{
  1170 	{
  1175 	/**
  1171 	/**
  1176 	Indicates a high density floppy disk to be formatted.
  1172 	Indicates a high density floppy disk to be formatted.
       
  1173 	
       
  1174 	Obsolete.
       
  1175 	
       
  1176 	Can be ORed with EFullFormat or EQuickFormat, but does not
       
  1177 	have any effect.
  1177 	*/
  1178 	*/
  1178 	EHighDensity,
  1179 	EHighDensity,
  1179     
  1180     
  1180     
  1181     
  1181     /**
  1182     /**
  1182     Indicates a standard floppy disk to be formatted.
  1183     Indicates a low density floppy disk to be formatted.
       
  1184 	
       
  1185 	Obsolete. 
       
  1186 	
       
  1187 	Can be ORed with EFullFormat or EQuickFormat, but does not
       
  1188 	have any effect.
  1183 	*/
  1189 	*/
  1184 	ELowDensity,
  1190 	ELowDensity,
  1185 
  1191 
  1186 
  1192 
  1187 	/**
  1193 	/**
  1188 	Performs a full format, erasing existing content and resetting the FAT
  1194 	Performs a full format, erasing whole media content and creating 
  1189 	and root directory.
  1195 	new file system layout.
  1190 	
  1196 	
  1191 	This is the default, and can be ORed with bit EHighDensity or ELowDensity.
  1197 	This is the default mode.
  1192 	*/
  1198 	*/
  1193 	EFullFormat=0,
  1199 	EFullFormat=0,
  1194 
  1200 
  1195 
  1201 
  1196     /**
  1202     /**
  1197     Does the minimum required to format the device, only resetting the FAT
  1203     Performs a quick media format, erasing only required minimum media content. 
  1198     and root directory.
  1204 	For example, for FAT file system it resets FAT and root directory content. 
  1199     
  1205 	Also preserves bad sectors if there are some on the volume.
  1200     This is the default, and can be ORed with bit EHighDensity or ELowDensity.
       
  1201 	*/
  1206 	*/
  1202 	EQuickFormat=0x100,
  1207 	EQuickFormat=0x100,
  1203 	
  1208 	
  1204 	
  1209 	
  1205 	/**
  1210 	/**
  1206 	Indicates a custom formatting mode.
  1211 	Indicates a custom formatting mode. In this mode some optional file system 
       
  1212 	specific parameters may be passed to RFormat::Open().
       
  1213 	
       
  1214 	@see TLDFormatInfo
       
  1215 	@see TInt RFormat::Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo);
  1207 	*/
  1216 	*/
  1208 	ESpecialFormat=0x200,
  1217 	ESpecialFormat=0x200,
  1209 
  1218 
  1210 	/**
  1219 	/**
  1211 	Forced erase of locked media
  1220 	Forced erase of locked media
  1212 	*/
  1221 	*/
  1213 	EForceErase=0x400
  1222 	EForceErase=0x400,
       
  1223 
       
  1224     /** 
       
  1225     This flag enables formatting the volume even if it has files or directories opened on it.
       
  1226     If this flag is specified, the volume will be forcedly dismounted before performing media formatting.
       
  1227  
       
  1228     Even with this flag the RFormat::Open() can fail with KErrInUse in following cases:
       
  1229         1. if there are clamped files on the volume.
       
  1230         2. there are opened "disk access" objects, like RFormat or RRawDisk on the volume.
       
  1231     */
       
  1232     EForceFormat = 0x800,
       
  1233 
  1214 	};
  1234 	};
  1215 
  1235 
  1216 
  1236 
  1217 
  1237 
  1218 
  1238 
  1254 	*/
  1274 	*/
  1255 	ESeekEnd
  1275 	ESeekEnd
  1256 	};
  1276 	};
  1257 
  1277 
  1258 /**
  1278 /**
       
  1279 @publishedAll
       
  1280 @released
  1259 
  1281 
  1260 */
  1282 */
  1261 class TBlockMapEntry : public TBlockMapEntryBase
  1283 class TBlockMapEntry : public TBlockMapEntryBase
  1262 	{
  1284 	{
  1263 public:
  1285 public:
  1265 	IMPORT_C void SetNumberOfBlocks( TUint aNumberOfBlocks );
  1287 	IMPORT_C void SetNumberOfBlocks( TUint aNumberOfBlocks );
  1266 	IMPORT_C void SetStartBlock( TUint aStartBlock );
  1288 	IMPORT_C void SetStartBlock( TUint aStartBlock );
  1267 	};
  1289 	};
  1268 
  1290 
  1269 /**
  1291 /**
  1270    
  1292 @publishedAll
       
  1293 @released
       
  1294 
  1271 */
  1295 */
  1272 typedef TBuf8<KMaxMapsPerCall*sizeof(TBlockMapEntry)> TBlockArrayDes;
  1296 typedef TBuf8<KMaxMapsPerCall*sizeof(TBlockMapEntry)> TBlockArrayDes;
  1273 
  1297 
  1274 struct SBlockMapInfo : public SBlockMapInfoBase
  1298 struct SBlockMapInfo : public SBlockMapInfoBase
  1275 	{
  1299 	{
  1276 	TBlockArrayDes iMap;
  1300 	TBlockArrayDes iMap;
  1277 	};
  1301 	};
  1278 
  1302 
  1279 /**
  1303 /**
  1280 
  1304 @publishedAll
       
  1305 @released
  1281 */
  1306 */
  1282 enum TBlockMapUsage
  1307 enum TBlockMapUsage
  1283 	{
  1308 	{
  1284 	/* */
  1309 	/* */
  1285 	EBlockMapUsagePaging,
  1310 	EBlockMapUsagePaging,
  1325 	IMPORT_C TBool IsArchive() const;
  1350 	IMPORT_C TBool IsArchive() const;
  1326 	inline const TUid& operator[](TInt anIndex) const;
  1351 	inline const TUid& operator[](TInt anIndex) const;
  1327 	inline TBool IsUidPresent(TUid aUid) const;
  1352 	inline TBool IsUidPresent(TUid aUid) const;
  1328 	inline TBool IsTypeValid() const;
  1353 	inline TBool IsTypeValid() const;
  1329 	inline TUid MostDerivedUid() const;
  1354 	inline TUid MostDerivedUid() const;
       
  1355 	IMPORT_C TInt64 FileSize() const;
       
  1356 	inline void SetFileSize(TInt64 aFileSize);
       
  1357 
       
  1358 private:
       
  1359 	inline void Copy(const TEntry& aEntry);
       
  1360 	inline void Unpack();
       
  1361 
  1330 public:
  1362 public:
  1331     /**
  1363     /**
  1332     The individual bits within this byte indicate which attributes
  1364     The individual bits within this byte indicate which attributes
  1333     have been set.
  1365     have been set.
  1334 
  1366 
  1366 	@see KMaxFileName
  1398 	@see KMaxFileName
  1367 	*/
  1399 	*/
  1368 	TBufC<KMaxFileName> iName;
  1400 	TBufC<KMaxFileName> iName;
  1369 	
  1401 	
  1370 private:	
  1402 private:	
       
  1403 	TUint32 iSizeHigh; 
  1371 	/**
  1404 	/**
  1372 	Reserved for future expansion
  1405 	Reserved for future expansion
  1373 	*/
  1406 	*/
  1374 	TUint32 iReserved[2];
  1407 	TUint32 iReserved;
  1375 	};
  1408 	};
  1376 
  1409 
  1377 
  1410 
  1378 
  1411 
  1379 
  1412 
  1402 	TInt iIndex;
  1435 	TInt iIndex;
  1403 	const TEntry* iPos;
  1436 	const TEntry* iPos;
  1404 	TBuf8<KEntryArraySize> iBuf;
  1437 	TBuf8<KEntryArraySize> iBuf;
  1405 	friend class RDir;
  1438 	friend class RDir;
  1406 	friend class RFs;
  1439 	friend class RFs;
       
  1440 	friend class TRawEntryArray;
  1407 	};
  1441 	};
  1408 
  1442 
  1409 
  1443 
  1410 
  1444 
  1411 
  1445 
  1422 public:
  1456 public:
  1423     /**
  1457     /**
  1424     The type of media mounted on the drive.
  1458     The type of media mounted on the drive.
  1425     */
  1459     */
  1426 	TMediaType iType;
  1460 	TMediaType iType;
  1427  
  1461 
  1428  
  1462 
  1429     /**
  1463     /**
  1430     Indicates whether the drive supports a battery, and if so, its state.
  1464     Indicates whether the drive supports a battery, and if so, its state.
  1431     */
  1465     */
  1432     TBatteryState iBattery;
  1466     TBatteryState iBattery;
  1433  
  1467 
  1434  
  1468 
  1435     /**
  1469     /**
  1436     The drive attributes.
  1470     The drive attributes.
  1437     
  1471     
  1438     @see KDriveAttLocal
  1472     @see KDriveAttLocal
  1439     @see KDriveAttRom
  1473     @see KDriveAttRom
  1440     @see KDriveAttRedirected
  1474     @see KDriveAttRedirected
  1441     @see KDriveAttSubsted
  1475     @see KDriveAttSubsted
  1442     @see KDriveAttInternal
  1476     @see KDriveAttInternal
  1443     @see KDriveAttRemovable
  1477     @see KDriveAttRemovable 
       
  1478     @see KDriveAttExternal 
  1444     */
  1479     */
  1445 	TUint iDriveAtt;
  1480 	TUint iDriveAtt;
  1446  
  1481  
  1447  
  1482  
  1448     /**
  1483     /**
  1454     @see KMediaAttWriteProtected
  1489     @see KMediaAttWriteProtected
  1455     @see KMediaAttLockable
  1490     @see KMediaAttLockable
  1456     @see KMediaAttLocked
  1491     @see KMediaAttLocked
  1457     */
  1492     */
  1458 	TUint iMediaAtt;
  1493 	TUint iMediaAtt;
  1459 private:	
  1494 
  1460 	/**
  1495 
  1461 	Reserved for future expansion
  1496 	/**
  1462 	*/
  1497 	The type of interface used to connect to the media.
  1463 	TUint32 iReserved;	
  1498 	*/
       
  1499 	TConnectionBusType iConnectionBusType;
  1464 	};
  1500 	};
  1465 
  1501 
  1466 
  1502 
  1467 
  1503 
  1468 
  1504 
  1529 	Flags which define the default file-caching behaviour for this volume
  1565 	Flags which define the default file-caching behaviour for this volume
  1530 
  1566 
  1531 	@see TFileCacheFlags
  1567 	@see TFileCacheFlags
  1532 	*/
  1568 	*/
  1533 	TFileCacheFlags iFileCacheFlags;
  1569 	TFileCacheFlags iFileCacheFlags;
  1534 
  1570     
  1535     /**
  1571     /**
  1536     @prototype
  1572     @prototype
  1537     @internalTechnology
  1573     @internalTechnology
  1538     Internal flag, used in the case of non-blocking getting volume information. 
  1574     Internal flag, used in the case of non-blocking getting volume information. 
  1539     @see RFs::Volume(TVolumeInfo& aVol,TInt aDrive, TRequestStatus& aStat)
  1575     @see RFs::Volume(TVolumeInfo& aVol,TInt aDrive, TRequestStatus& aStat)
  1784 	friend class RFs;
  1820 	friend class RFs;
  1785 	friend class TOpenFileScan;
  1821 	friend class TOpenFileScan;
  1786 	};
  1822 	};
  1787 	
  1823 	
  1788 	
  1824 	
  1789 	
  1825 #if defined SYMBIAN_PRIVATE_EFSRV
       
  1826 	#define EFSRV_EXPORT_C
       
  1827 	#define EFSRV_IMPORT_C 
       
  1828 #else
       
  1829 	#define EFSRV_EXPORT_C EXPORT_C
       
  1830 	#define EFSRV_IMPORT_C IMPORT_C
       
  1831 #endif
       
  1832 	
       
  1833 // forward declarations from e32ldr_private.h
       
  1834 class RFileClamp;
  1790 
  1835 
  1791 class RFs : public RSessionBase
  1836 class RFs : public RSessionBase
  1792 /**
  1837 /**
  1793 @publishedAll
  1838 @publishedAll
  1794 @released
  1839 @released
  1858    the path are illegal, although there may be spaces between other
  1903    the path are illegal, although there may be spaces between other
  1859    path components, for instance between directories.
  1904    path components, for instance between directories.
  1860 */
  1905 */
  1861 	{
  1906 	{
  1862 public:
  1907 public:
  1863 	IMPORT_C TInt Connect(TInt aMessageSlots=KFileServerDefaultMessageSlots);
  1908 	EFSRV_IMPORT_C TInt Connect(TInt aMessageSlots=KFileServerDefaultMessageSlots);
  1864 	IMPORT_C TVersion Version() const;
  1909 	EFSRV_IMPORT_C void Close();
  1865 	IMPORT_C TInt AddFileSystem(const TDesC& aFileName) const;
  1910 	EFSRV_IMPORT_C TVersion Version() const;
  1866 	IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const;
  1911 	EFSRV_IMPORT_C TInt AddFileSystem(const TDesC& aFileName) const;
  1867 	IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,TInt aDrive, TBool aIsSync) const;
  1912 	EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const;
  1868 	IMPORT_C TInt MountFileSystemAndScan(const TDesC& aFileSystemName,TInt aDrive,TBool& aIsMountSuccess) const;
  1913 	EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,TInt aDrive, TBool aIsSync) const;
  1869 	IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive);
  1914 	EFSRV_IMPORT_C TInt MountFileSystemAndScan(const TDesC& aFileSystemName,TInt aDrive,TBool& aIsMountSuccess) const;
  1870 	IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive, TBool aIsSync);
  1915 	EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive);
  1871 	IMPORT_C TInt MountFileSystemAndScan(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive,TBool& aIsMountSuccess) const;
  1916 	EFSRV_IMPORT_C TInt MountFileSystem(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive, TBool aIsSync);
  1872 	IMPORT_C TInt DismountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const;
  1917 	EFSRV_IMPORT_C TInt MountFileSystemAndScan(const TDesC& aFileSystemName,const TDesC& aExtensionName,TInt aDrive,TBool& aIsMountSuccess) const;
  1873 	IMPORT_C TInt RemoveFileSystem(const TDesC& aFileSystemName) const;
  1918 	EFSRV_IMPORT_C TInt DismountFileSystem(const TDesC& aFileSystemName,TInt aDrive) const;
  1874 	IMPORT_C TInt FileSystemName(TDes& aName,TInt aDrive) const;
  1919 	EFSRV_IMPORT_C TInt RemoveFileSystem(const TDesC& aFileSystemName) const;
  1875 	IMPORT_C TInt AddExtension(const TDesC& aFileName);
  1920 	EFSRV_IMPORT_C TInt FileSystemName(TDes& aName,TInt aDrive) const;
  1876 	IMPORT_C TInt MountExtension(const TDesC& aExtensionName,TInt aDrive);
  1921 	EFSRV_IMPORT_C TInt AddExtension(const TDesC& aFileName);
  1877 	IMPORT_C TInt DismountExtension(const TDesC& aExtensionName,TInt aDrive);
  1922 	EFSRV_IMPORT_C TInt MountExtension(const TDesC& aExtensionName,TInt aDrive);
  1878 	IMPORT_C TInt RemoveExtension(const TDesC& aExtensionName);
  1923 	EFSRV_IMPORT_C TInt DismountExtension(const TDesC& aExtensionName,TInt aDrive);
  1879 	IMPORT_C TInt ExtensionName(TDes& aExtensionName,TInt aDrive,TInt aPos);
  1924 	EFSRV_IMPORT_C TInt RemoveExtension(const TDesC& aExtensionName);
  1880 	IMPORT_C TInt RemountDrive(TInt aDrive,const TDesC8* aMountInfo=NULL,TUint aFlags=0);
  1925 	EFSRV_IMPORT_C TInt ExtensionName(TDes& aExtensionName,TInt aDrive,TInt aPos);
  1881 	IMPORT_C void NotifyChange(TNotifyType aType,TRequestStatus& aStat);
  1926 	EFSRV_IMPORT_C TInt RemountDrive(TInt aDrive,const TDesC8* aMountInfo=NULL,TUint aFlags=0);
  1882 	IMPORT_C void NotifyChange(TNotifyType aType,TRequestStatus& aStat,const TDesC& aPathName);
  1927 	EFSRV_IMPORT_C void NotifyChange(TNotifyType aType,TRequestStatus& aStat);
  1883 	IMPORT_C void NotifyChangeCancel();
  1928 	EFSRV_IMPORT_C void NotifyChange(TNotifyType aType,TRequestStatus& aStat,const TDesC& aPathName);
  1884 	IMPORT_C void NotifyChangeCancel(TRequestStatus& aStat);
  1929 	EFSRV_IMPORT_C void NotifyChangeCancel();
  1885 	IMPORT_C void NotifyDiskSpace(TInt64 aThreshold,TInt aDrive,TRequestStatus& aStat);
  1930 	EFSRV_IMPORT_C void NotifyChangeCancel(TRequestStatus& aStat);
  1886 	IMPORT_C void NotifyDiskSpaceCancel(TRequestStatus& aStat);
  1931 	EFSRV_IMPORT_C void NotifyDiskSpace(TInt64 aThreshold,TInt aDrive,TRequestStatus& aStat);
  1887 	IMPORT_C void NotifyDiskSpaceCancel();
  1932 	EFSRV_IMPORT_C void NotifyDiskSpaceCancel(TRequestStatus& aStat);
  1888 	IMPORT_C TInt DriveList(TDriveList& aList) const;
  1933 	EFSRV_IMPORT_C void NotifyDiskSpaceCancel();
  1889 	IMPORT_C TInt DriveList(TDriveList& aList, TUint aFlags) const;
  1934 	EFSRV_IMPORT_C TInt DriveList(TDriveList& aList) const;
  1890 	IMPORT_C TInt Drive(TDriveInfo& anInfo,TInt aDrive=KDefaultDrive) const;
  1935 	EFSRV_IMPORT_C TInt DriveList(TDriveList& aList, TUint aFlags) const;
  1891 	IMPORT_C TInt Volume(TVolumeInfo& aVol,TInt aDrive=KDefaultDrive) const;
  1936 	EFSRV_IMPORT_C TInt Drive(TDriveInfo& anInfo,TInt aDrive=KDefaultDrive) const;
  1892     IMPORT_C void Volume(TVolumeInfo& aVol,TInt aDrive, TRequestStatus& aStat) const;
  1937     EFSRV_IMPORT_C TInt Volume(TVolumeInfo& aVol,TInt aDrive=KDefaultDrive) const;
  1893 	IMPORT_C TInt SetVolumeLabel(const TDesC& aName,TInt aDrive=KDefaultDrive);
  1938     EFSRV_IMPORT_C void Volume(TVolumeInfo& aVol,TInt aDrive, TRequestStatus& aStat) const;
  1894 	IMPORT_C TInt Subst(TDes& aPath,TInt aDrive=KDefaultDrive) const;
  1939 	EFSRV_IMPORT_C TInt SetVolumeLabel(const TDesC& aName,TInt aDrive=KDefaultDrive);
  1895 	IMPORT_C TInt SetSubst(const TDesC& aPath,TInt aDrive=KDefaultDrive);
  1940 	EFSRV_IMPORT_C TInt Subst(TDes& aPath,TInt aDrive=KDefaultDrive) const;
  1896 	IMPORT_C TInt RealName(const TDesC& aName,TDes& aResult) const;
  1941 	EFSRV_IMPORT_C TInt SetSubst(const TDesC& aPath,TInt aDrive=KDefaultDrive);
  1897     IMPORT_C TInt GetMediaSerialNumber(TMediaSerialNumber& aSerialNum, TInt aDrive);
  1942 	EFSRV_IMPORT_C TInt RealName(const TDesC& aName,TDes& aResult) const;
  1898 	IMPORT_C TInt SessionPath(TDes& aPath) const;
  1943     EFSRV_IMPORT_C TInt GetMediaSerialNumber(TMediaSerialNumber& aSerialNum, TInt aDrive);
  1899 	IMPORT_C TInt SetSessionPath(const TDesC& aPath);
  1944 	EFSRV_IMPORT_C TInt SessionPath(TDes& aPath) const;
  1900 	IMPORT_C TInt Parse(const TDesC& aName,TParse& aParse) const;
  1945 	EFSRV_IMPORT_C TInt SetSessionPath(const TDesC& aPath);
  1901 	IMPORT_C TInt Parse(const TDesC& aName,const TDesC& aRelated,TParse& aParse) const;
  1946 	EFSRV_IMPORT_C TInt Parse(const TDesC& aName,TParse& aParse) const;
  1902 	IMPORT_C TInt MkDir(const TDesC& aPath);
  1947 	EFSRV_IMPORT_C TInt Parse(const TDesC& aName,const TDesC& aRelated,TParse& aParse) const;
  1903 	IMPORT_C TInt MkDirAll(const TDesC& aPath);
  1948 	EFSRV_IMPORT_C TInt MkDir(const TDesC& aPath);
  1904 	IMPORT_C TInt RmDir(const TDesC& aPath);
  1949 	EFSRV_IMPORT_C TInt MkDirAll(const TDesC& aPath);
  1905 	IMPORT_C TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList) const;
  1950 	EFSRV_IMPORT_C TInt RmDir(const TDesC& aPath);
  1906 	IMPORT_C TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,CDir*& aDirList) const;
  1951 	EFSRV_IMPORT_C TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList) const;
  1907 	IMPORT_C TInt GetDir(const TDesC& aName,const TUidType& anEntryUid,TUint anEntrySortKey,CDir*& aFileList) const;
  1952 	EFSRV_IMPORT_C TInt GetDir(const TDesC& aName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,CDir*& aDirList) const;
  1908 	IMPORT_C TInt Delete(const TDesC& aName);
  1953 	EFSRV_IMPORT_C TInt GetDir(const TDesC& aName,const TUidType& anEntryUid,TUint anEntrySortKey,CDir*& aFileList) const;
  1909 	IMPORT_C TInt Rename(const TDesC& anOldName,const TDesC& aNewName);
  1954 	EFSRV_IMPORT_C TInt Delete(const TDesC& aName);
  1910 	IMPORT_C TInt Replace(const TDesC& anOldName,const TDesC& aNewName);
  1955 	EFSRV_IMPORT_C TInt Rename(const TDesC& anOldName,const TDesC& aNewName);
  1911 	IMPORT_C TInt Att(const TDesC& aName,TUint& aAttValue) const;
  1956 	EFSRV_IMPORT_C TInt Replace(const TDesC& anOldName,const TDesC& aNewName);
  1912 	IMPORT_C TInt SetAtt(const TDesC& aName,TUint aSetAttMask,TUint aClearAttMask);
  1957 	EFSRV_IMPORT_C TInt Att(const TDesC& aName,TUint& aAttValue) const;
  1913 	IMPORT_C TInt Modified(const TDesC& aName,TTime& aTime) const;
  1958 	EFSRV_IMPORT_C TInt SetAtt(const TDesC& aName,TUint aSetAttMask,TUint aClearAttMask);
  1914 	IMPORT_C TInt SetModified(const TDesC& aName,const TTime& aTime);
  1959 	EFSRV_IMPORT_C TInt Modified(const TDesC& aName,TTime& aTime) const;
  1915 	IMPORT_C TInt Entry(const TDesC& aName,TEntry& anEntry) const;
  1960 	EFSRV_IMPORT_C TInt SetModified(const TDesC& aName,const TTime& aTime);
  1916 	IMPORT_C TInt SetEntry(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
  1961 	EFSRV_IMPORT_C TInt Entry(const TDesC& aName,TEntry& anEntry) const;
  1917 	IMPORT_C TInt ReadFileSection(const TDesC& aName,TInt aPos,TDes8& aDes,TInt aLength) const;
  1962 	EFSRV_IMPORT_C TInt SetEntry(const TDesC& aName,const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
  1918 	IMPORT_C static TBool IsValidDrive(TInt aDrive);
  1963 private:
  1919 	IMPORT_C static TInt CharToDrive(TChar aChar,TInt& aDrive);
  1964 	EFSRV_IMPORT_C TInt ReadFileSection_RESERVED(const TDesC& aName,TInt aPos,TDes8& aDes,TInt aLength) const;
  1920 	IMPORT_C static TInt DriveToChar(TInt aDrive,TChar& aChar);
  1965 public:
  1921 	IMPORT_C static TBool IsRomAddress(TAny* aAny);
  1966 	EFSRV_IMPORT_C static TBool IsValidDrive(TInt aDrive);
  1922 	IMPORT_C static TDriveNumber GetSystemDrive();
  1967 	EFSRV_IMPORT_C static TInt CharToDrive(TChar aChar,TInt& aDrive);
  1923 	IMPORT_C static TChar GetSystemDriveChar();
  1968 	EFSRV_IMPORT_C static TInt DriveToChar(TInt aDrive,TChar& aChar);
  1924 	IMPORT_C TInt SetSystemDrive(TDriveNumber aSystemDrive);
  1969 	EFSRV_IMPORT_C static TBool IsRomAddress(TAny* aAny);
  1925 	IMPORT_C void ResourceCountMarkStart() const;
  1970 	EFSRV_IMPORT_C static TDriveNumber GetSystemDrive();
  1926 	IMPORT_C void ResourceCountMarkEnd() const;
  1971 	EFSRV_IMPORT_C static TChar GetSystemDriveChar();
  1927 	IMPORT_C TInt ResourceCount() const;
  1972 	EFSRV_IMPORT_C TInt SetSystemDrive(TDriveNumber aSystemDrive);
  1928 	IMPORT_C TInt IsFileOpen(const TDesC& aFile,TBool& anAnswer) const;
  1973 	EFSRV_IMPORT_C void ResourceCountMarkStart() const;
  1929 	IMPORT_C TInt CheckDisk(const TDesC& aDrive) const;
  1974 	EFSRV_IMPORT_C void ResourceCountMarkEnd() const;
  1930 	IMPORT_C TInt ScanDrive(const TDesC& aDrive) const;
  1975 	EFSRV_IMPORT_C TInt ResourceCount() const;
  1931 	IMPORT_C TInt GetShortName(const TDesC& aLongName,TDes& aShortName) const;
  1976 	EFSRV_IMPORT_C TInt IsFileOpen(const TDesC& aFile,TBool& anAnswer) const;
  1932 	IMPORT_C TInt GetLongName(const TDesC& aShortName,TDes& aLongName) const;
  1977 	EFSRV_IMPORT_C TInt CheckDisk(const TDesC& aDrive) const;
  1933 	IMPORT_C TBool GetNotifyUser();
  1978 	EFSRV_IMPORT_C TInt ScanDrive(const TDesC& aDrive) const;
  1934 	IMPORT_C void SetNotifyUser(TBool aValue);
  1979 	EFSRV_IMPORT_C TInt GetShortName(const TDesC& aLongName,TDes& aShortName) const;
  1935 	IMPORT_C TUint8* IsFileInRom(const TDesC& aFileName) const;
  1980 	EFSRV_IMPORT_C TInt GetLongName(const TDesC& aShortName,TDes& aLongName) const;
  1936 	IMPORT_C TBool IsValidName(const TDesC& anEntryName) const;
  1981 	EFSRV_IMPORT_C TBool GetNotifyUser();
  1937 	IMPORT_C TBool IsValidName(const TDesC& aFileName,TText& aBadChar) const;
  1982 	EFSRV_IMPORT_C void SetNotifyUser(TBool aValue);
  1938 	IMPORT_C TInt GetDriveName(TInt aDrive,TDes& aDriveName) const;
  1983 	EFSRV_IMPORT_C TUint8* IsFileInRom(const TDesC& aFileName) const;
  1939 	IMPORT_C TInt SetDriveName(TInt aDrive,const TDesC& aDriveName);
  1984 	EFSRV_IMPORT_C TBool IsValidName(const TDesC& anEntryName) const;
  1940 	IMPORT_C TInt LoaderHeapFunction(TInt aFunction, TAny *aArg1=NULL, TAny *aArg2=NULL);
  1985 	EFSRV_IMPORT_C TBool IsValidName(const TDesC& aFileName,TText& aBadChar) const;
       
  1986 	EFSRV_IMPORT_C TInt GetDriveName(TInt aDrive,TDes& aDriveName) const;
       
  1987 	EFSRV_IMPORT_C TInt SetDriveName(TInt aDrive,const TDesC& aDriveName);
       
  1988 	EFSRV_IMPORT_C TInt LoaderHeapFunction(TInt aFunction, TAny *aArg1=NULL, TAny *aArg2=NULL);
  1941 	IMPORT_C TInt SetErrorCondition(TInt anError,TInt aCount=0);
  1989 	IMPORT_C TInt SetErrorCondition(TInt anError,TInt aCount=0);
  1942 	IMPORT_C TInt SetDebugRegister(TInt aVal);
  1990 	EFSRV_IMPORT_C TInt SetDebugRegister(TInt aVal);
  1943 	IMPORT_C TInt SetAllocFailure(TInt aAllocNum);
  1991 	EFSRV_IMPORT_C TInt SetAllocFailure(TInt aAllocNum);
  1944 	IMPORT_C void DebugNotify(TInt aDrive,TUint aNotifyType,TRequestStatus& aStat);
  1992 	EFSRV_IMPORT_C void DebugNotify(TInt aDrive,TUint aNotifyType,TRequestStatus& aStat);
  1945 	IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand);
  1993 	EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand);
  1946 	IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TDes8& aParam1);
  1994 	EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TDes8& aParam1);
  1947 	IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TDes8& aParam1,TDes8& aParam2);
  1995 	EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TDes8& aParam1,TDes8& aParam2);
  1948 	IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TAny* aParam1,TAny* aParam2);
  1996 	EFSRV_IMPORT_C TInt ControlIo(TInt aDrive,TInt aCommand,TAny* aParam1,TAny* aParam2);
  1949 	IMPORT_C TInt LockDrive(TInt aDrv, const TMediaPassword &aOld, const TMediaPassword &aNew, TBool aStr);
  1997 	EFSRV_IMPORT_C TInt LockDrive(TInt aDrv, const TMediaPassword &aOld, const TMediaPassword &aNew, TBool aStr);
  1950 	IMPORT_C TInt UnlockDrive(TInt aDrv, const TMediaPassword &Pswd, TBool aStr);
  1998 	EFSRV_IMPORT_C TInt UnlockDrive(TInt aDrv, const TMediaPassword &Pswd, TBool aStr);
  1951 	IMPORT_C TInt ClearPassword(TInt aDrv, const TMediaPassword &aPswd);
  1999 	EFSRV_IMPORT_C TInt ClearPassword(TInt aDrv, const TMediaPassword &aPswd);
  1952 	IMPORT_C TInt ErasePassword(TInt aDrv);
  2000 	EFSRV_IMPORT_C TInt ErasePassword(TInt aDrv);
  1953 	IMPORT_C TInt SetSessionToPrivate(TInt aDrive);
  2001 	EFSRV_IMPORT_C TInt SetSessionToPrivate(TInt aDrive);
  1954 	IMPORT_C TInt PrivatePath(TDes& aPath);
  2002 	EFSRV_IMPORT_C TInt PrivatePath(TDes& aPath);
  1955 	IMPORT_C TInt CreatePrivatePath(TInt aDrive);	
  2003 	EFSRV_IMPORT_C TInt CreatePrivatePath(TInt aDrive);	
  1956 	IMPORT_C void StartupInitComplete(TRequestStatus& aStat);
  2004 	EFSRV_IMPORT_C void StartupInitComplete(TRequestStatus& aStat);
  1957 	IMPORT_C TInt SetLocalDriveMapping(const TDesC8& aMapping);
  2005 	EFSRV_IMPORT_C TInt SetLocalDriveMapping(const TDesC8& aMapping);
  1958 
  2006 
  1959 	IMPORT_C TInt FinaliseDrives();
  2007 	EFSRV_IMPORT_C TInt FinaliseDrives();
  1960     
  2008     
  1961     /** specifies drive finalisation modes */
  2009     /** specifies drive finalisation modes */
  1962     enum TFinaliseDrvMode
  2010     enum TFinaliseDrvMode
  1963         {
  2011         {
  1964         EFinal_RW,      ///< after successful finalisation the drive remains writable and will become "not finalised" after the first write operation.
  2012         EFinal_RW,      ///< after successful finalisation the drive remains writable and will become "not finalised" after the first write operation.
  1965         EFinal_RO,      ///< after successful finalisation the drive becomes read-only
  2013         EFinal_RO,      ///< after successful finalisation the drive becomes read-only
  1966         EForceUnfinalise///< @internalComponent  mark the drive as "not finalised" can result in KErrAbort if the dive is in inconsistent state.
  2014         EForceUnfinalise///< @internalComponent  mark the drive as "not finalised" can result in KErrAbort if the dive is in inconsistent state.
  1967         };
  2015         };
  1968 
  2016 
  1969     IMPORT_C TInt FinaliseDrive(TInt aDriveNo, TFinaliseDrvMode aMode) const;
  2017     EFSRV_IMPORT_C TInt FinaliseDrive(TInt aDriveNo, TFinaliseDrvMode aMode) const;
  1970 
  2018 
  1971 	IMPORT_C TInt SwapFileSystem(const TDesC& aOldFileSystemName,const TDesC& aNewFileSystemName,TInt aDrive) const;
  2019 	EFSRV_IMPORT_C TInt SwapFileSystem(const TDesC& aOldFileSystemName,const TDesC& aNewFileSystemName,TInt aDrive) const;
  1972 	IMPORT_C TInt ReserveDriveSpace(TInt aDriveNo, TInt aSpace);
  2020 	EFSRV_IMPORT_C TInt ReserveDriveSpace(TInt aDriveNo, TInt aSpace);
  1973 	IMPORT_C TInt GetReserveAccess(TInt aDriveNo);
  2021 	EFSRV_IMPORT_C TInt GetReserveAccess(TInt aDriveNo);
  1974 	IMPORT_C TInt ReleaseReserveAccess(TInt aDriveNo);
  2022 	EFSRV_IMPORT_C TInt ReleaseReserveAccess(TInt aDriveNo);
  1975 
  2023 
  1976 	IMPORT_C TInt AddPlugin(const TDesC& aFileName) const;
  2024 	EFSRV_IMPORT_C TInt AddPlugin(const TDesC& aFileName) const;
  1977 	IMPORT_C TInt RemovePlugin(const TDesC& aPluginName) const;
  2025 	EFSRV_IMPORT_C TInt RemovePlugin(const TDesC& aPluginName) const;
  1978 	IMPORT_C TInt PluginName(TDes& aPluginName,TInt aDrive,TInt aPos);
  2026 	EFSRV_IMPORT_C TInt PluginName(TDes& aPluginName,TInt aDrive,TInt aPos);
  1979 
  2027 
  1980 	IMPORT_C TInt MountPlugin(const TDesC& aPluginName) const;
  2028 	EFSRV_IMPORT_C TInt MountPlugin(const TDesC& aPluginName) const;
  1981 	IMPORT_C TInt MountPlugin(const TDesC& aPluginName,TInt aDrive) const;
  2029 	EFSRV_IMPORT_C TInt MountPlugin(const TDesC& aPluginName,TInt aDrive) const;
  1982 	IMPORT_C TInt MountPlugin(const TDesC& aPluginName,TInt aDrive, TInt aPos) const;
  2030 	EFSRV_IMPORT_C TInt MountPlugin(const TDesC& aPluginName,TInt aDrive, TInt aPos) const;
  1983 	
  2031 	
  1984 	IMPORT_C TInt DismountPlugin(const TDesC& aPluginName) const;
  2032 	EFSRV_IMPORT_C TInt DismountPlugin(const TDesC& aPluginName) const;
  1985 	IMPORT_C TInt DismountPlugin(const TDesC& aPluginName,TInt aDrive) const;
  2033 	EFSRV_IMPORT_C TInt DismountPlugin(const TDesC& aPluginName,TInt aDrive) const;
  1986 	IMPORT_C TInt DismountPlugin(const TDesC& aPluginName,TInt aDrive,TInt aPos) const;
  2034 	EFSRV_IMPORT_C TInt DismountPlugin(const TDesC& aPluginName,TInt aDrive,TInt aPos) const;
  1987 
  2035 
  1988 	IMPORT_C void NotifyDismount(TInt aDrive, TRequestStatus& aStat, TNotifyDismountMode aMode=EFsDismountRegisterClient) const;
  2036 	EFSRV_IMPORT_C void NotifyDismount(TInt aDrive, TRequestStatus& aStat, TNotifyDismountMode aMode=EFsDismountRegisterClient) const;
  1989 	IMPORT_C void NotifyDismountCancel(TRequestStatus& aStat) const;
  2037 	EFSRV_IMPORT_C void NotifyDismountCancel(TRequestStatus& aStat) const;
  1990 	IMPORT_C void NotifyDismountCancel() const;
  2038 	EFSRV_IMPORT_C void NotifyDismountCancel() const;
  1991 	IMPORT_C TInt AllowDismount(TInt aDrive) const;
  2039 	EFSRV_IMPORT_C TInt AllowDismount(TInt aDrive) const;
  1992     IMPORT_C TInt SetStartupConfiguration(TInt aCommand,TAny* aParam1,TAny* aParam2) const;
  2040     EFSRV_IMPORT_C TInt SetStartupConfiguration(TInt aCommand,TAny* aParam1,TAny* aParam2) const;
  1993 	IMPORT_C TInt AddCompositeMount(const TDesC& aFileSystemName,TInt aLocalDriveToMount,TInt aCompositeDrive, TBool aSync) const;
  2041 	EFSRV_IMPORT_C TInt AddCompositeMount(const TDesC& aFileSystemName,TInt aLocalDriveToMount,TInt aCompositeDrive, TBool aSync) const;
  1994 	IMPORT_C TInt SetNotifyChange(TBool aNotifyChange);
  2042 	EFSRV_IMPORT_C TInt SetNotifyChange(TBool aNotifyChange);
  1995 	IMPORT_C TInt QueryVolumeInfoExt(TInt aDrive, TQueryVolumeInfoExtCmd aCommand, TDes8& aInfo) const;
  2043 	EFSRV_IMPORT_C TInt QueryVolumeInfoExt(TInt aDrive, TQueryVolumeInfoExtCmd aCommand, TDes8& aInfo) const;
  1996 	IMPORT_C TInt VolumeIOParam(TInt aDriveNo, TVolumeIOParamInfo& aParamInfo) const;
  2044 	EFSRV_IMPORT_C TInt VolumeIOParam(TInt aDriveNo, TVolumeIOParamInfo& aParamInfo) const;
  1997 	IMPORT_C TInt FileSystemSubType(TInt aDriveNo, TDes& aName) const;
  2045 	EFSRV_IMPORT_C TInt FileSystemSubType(TInt aDriveNo, TDes& aName) const;
  1998 	IMPORT_C TInt InitialisePropertiesFile(const TPtrC8& aPtr) const;
  2046 	EFSRV_IMPORT_C TInt InitialisePropertiesFile(const TPtrC8& aPtr) const;
  1999 
  2047 	
       
  2048 	IMPORT_C TInt AddProxyDrive(const TDesC& aFileName);
       
  2049 	IMPORT_C TInt RemoveProxyDrive(const TDesC& aDriveName);
       
  2050 	
       
  2051 	template <class T0,class T1> inline TInt MountProxyDrive(const TUint aDrive, const TDesC& aName, T0 a0, T1 a1)
       
  2052 		{ return(DoMountProxyDrive(TIpcArgs(aDrive, &aName, a0, a1))); };
       
  2053 	IMPORT_C TInt DismountProxyDrive(const TUint aDrive);
       
  2054 	
  2000 	TInt Unclamp(const RFileClamp& aHandle);
  2055 	TInt Unclamp(const RFileClamp& aHandle);
       
  2056 	
       
  2057 	EFSRV_IMPORT_C TInt ReadFileSection(const TDesC& aName,TInt64 aPos,TDes8& aDes,TInt aLength) const;
       
  2058 	
       
  2059     /**
       
  2060 	This class is used to for returning meaningful error code values to users of RFs::IsValidName(const TDesC& ,TNameValidParam& ) 
       
  2061 	@see TError
       
  2062 	*/
       
  2063 	class TNameValidParam
       
  2064 		{
       
  2065 		public:
       
  2066 			/** Initialises the members of the class. By default iUseSessionPath is set to EFalse, however one could set it to ETrue.*/
       
  2067   			inline TNameValidParam(TBool aUseSessionPath = EFalse);
       
  2068   				
       
  2069  		/** possible error codes */
       
  2070  		enum TError
       
  2071  			{
       
  2072 			ErrNone,            ///< no error.
       
  2073  			ErrBadCharacter,    ///< aName contains a bad character; and its position is in iInvalidCharPos.
       
  2074  			ErrBadName,         ///< aName isn't a valid file or directory name.
       
  2075  			ErrNameTooLong      ///< aName length or aName + session path length (see iUseSessionPath) is longer than 256 characters.
       
  2076  			};
       
  2077 		
       
  2078 		inline TError ErrorCode() const;
       
  2079  		inline void   UseSessionPath(TBool aUseSessionPath);
       
  2080  		inline TUint  InvalidCharPos() const;
       
  2081  		friend class TFsIsValidName;
       
  2082 		private:
       
  2083  			TError iError;          ///< the reason why aName is invalid, see TError
       
  2084  			TBool  iUseSessionPath; ///< if ETrue, and if aName isn't fully specified, missing parts will be taken from the session path
       
  2085  			TUint  iInvalidCharPos; ///< may contain invalid character position if error is ErrBadCharacter,else 0.
       
  2086  		};
       
  2087 	EFSRV_IMPORT_C TBool IsValidName(const TDesC& aName, TNameValidParam& aParam );
       
  2088 
       
  2089     /** Special enumerator values for the SupportedFileSystemName() API */
       
  2090     enum 
       
  2091         {
       
  2092         KRootFileSystem  = 0x00800000,  ///< specifies "root" file system. The result will be the same as for FileSystemName() API call
       
  2093         KFirstChildFileSystem = 0       ///< specifies the first child file system number, the second will be KFirstChildFileSystem+1 etc.
       
  2094         };
       
  2095 
       
  2096     EFSRV_IMPORT_C TInt SupportedFileSystemName(TDes& aName, TInt aDrive, TInt aFsEnumerator) const;
       
  2097 
       
  2098 protected:
       
  2099 	TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
  2001 
  2100 
  2002 private:
  2101 private:
  2003 	void GetDirL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,CDir*& aDirList,RDir& aDir) const;
  2102 	void GetDirL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,CDir*& aDirList,RDir& aDir) const;
  2004 	void GetDirL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
  2103 	void GetDirL(const TDesC& aMatchName,TUint anEntryAttMask,TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
  2005 	void GetDirL(const TDesC& aMatchName,const TUidType& aUidType,TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
  2104 	void GetDirL(const TDesC& aMatchName,const TUidType& aUidType,TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
  2006 	void DoGetDirL(TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
  2105 	void DoGetDirL(TUint anEntrySortKey,CDir*& anEntryList,RDir& aDir) const;
  2007 	TInt GetOpenFileList(TInt& aSessionNum,TInt& aLocalPos,TThreadId& aThreadId,TEntryArray& anArray) const;
  2106 	TInt GetOpenFileList(TInt& aSessionNum,TInt& aLocalPos,TThreadId& aThreadId,TEntryArray& anArray) const;
       
  2107 	
       
  2108 	IMPORT_C TInt DoMountProxyDrive(const TIpcArgs& ipcArgs);
       
  2109 	
  2008 	friend class TOpenFileScan;
  2110 	friend class TOpenFileScan;
  2009 	};
  2111 	friend class RFsPlugin;
  2010 
  2112 	};
  2011 
  2113 
  2012 
  2114 
  2013 
  2115 //-------------------------------------------------------------------------------------------------------------------
  2014 
  2116 
  2015 
  2117 /** 
  2016 
  2118 
       
  2119     Base class for volume formatting parameters. This class package buffer, TVolFormatParamBuf or
       
  2120     packaged buffer of the derived class can be passed to the RFormat::Open() in order to provide
       
  2121     file system-specific formatting parameters.
       
  2122     Each file system that supports such formatting parameters shall have this class specialisation (e.g. TVolFormatParam_FAT)
       
  2123     All classes, derived from this one must have the same size as the base class.  
       
  2124     In order to use formatting parameters the format mode shall have ESpecialFormat bit flag set.
       
  2125 
       
  2126 
       
  2127     @see    RFormat::Open(RFs&,const TDesC&,TUint,TInt& ,const TDesC8& anInfo);
       
  2128     @see    TVolFormatParamBuf
       
  2129 
       
  2130     @publishedAll
       
  2131     @released
       
  2132 */ 
       
  2133 class TVolFormatParam
       
  2134     {
       
  2135 public:
       
  2136     inline TVolFormatParam();
       
  2137     inline void Init();
       
  2138     
       
  2139     inline void SetFileSystemName(const TDesC& aFsName);
       
  2140 
       
  2141     static inline TUint32 CalcFSNameHash(const TDesC& aFsName);
       
  2142     inline TUint32 FSNameHash() const;
       
  2143 
       
  2144     inline TBool SomeParamsSet() const;
       
  2145 
       
  2146 
       
  2147 protected:
       
  2148    
       
  2149     
       
  2150     enum {KMaxDataSlots = 64}; ///< the size of data array iData
       
  2151 
       
  2152     inline void SetVal(TUint aIndex, TUint32 aVal);
       
  2153     inline TUint32 GetVal(TUint aIndex) const;
       
  2154 
       
  2155 
       
  2156 public:
       
  2157     enum {KUId = 0x820116A2}; ///< this value shell be in iUid field to identify this class object
       
  2158 
       
  2159     /** 
       
  2160     This class tree UID. Used to distinguish the object of this class from TLDFormatInfo and other possible data structures.
       
  2161     For this and derived classes this field must be KUId. This field offset in the class must be 0
       
  2162     */
       
  2163     const TUint32 iUId;    
       
  2164                             
       
  2165 private:
       
  2166     TUint32 iFSysNameHash;          ///< Up-cased file system name hash (crc32) used to designate the file system. 0 means "not set"
       
  2167     TBool   iParamsSet : 1;         ///< ETrue if any parameter was set (SetVal() called). Gets reset to EFalse by Init()    
       
  2168     TUint32 iData[KMaxDataSlots];   ///< used as a pool for various data. The derived classes are free to use it by SetVal()/GetVal()
       
  2169     }; 
       
  2170 
       
  2171 __ASSERT_COMPILE(_FOFF(TVolFormatParam, iUId) == 0);
       
  2172 
       
  2173 
       
  2174 /** package buffer for the objects of class TVolFormatParamBuf */
       
  2175 typedef TPckgBuf<TVolFormatParam> TVolFormatParamBuf;
       
  2176 
       
  2177 
       
  2178 
       
  2179 
       
  2180 #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2017 /**
  2181 /**
  2018 @publishedAll
  2182 @publishedAll
  2019 @released
  2183 @released
  2020 
  2184 
  2021 Creates and opens a file, and performs all operations on a single open file.
  2185 Creates and opens a file, and performs all operations on a single open file.
  2067 as binary and byte descriptors are used (TDes8, TDesC8).
  2231 as binary and byte descriptors are used (TDes8, TDesC8).
  2068 
  2232 
  2069 @see TDes8
  2233 @see TDes8
  2070 @see TDesC8
  2234 @see TDesC8
  2071 */
  2235 */
       
  2236 #else
       
  2237 /**
       
  2238 @publishedAll
       
  2239 @released
       
  2240 
       
  2241 Creates and opens a file, and performs all operations on a single open file.
       
  2242 
       
  2243 These include:
       
  2244 
       
  2245 - reading from and writing to the file
       
  2246 
       
  2247 - seeking to a position within the file
       
  2248 
       
  2249 - locking and unlocking within the file
       
  2250 
       
  2251 - setting file attributes
       
  2252 
       
  2253 Before using any of these services, a connection to a file server session must
       
  2254 have been made, and the file must be open.
       
  2255 
       
  2256 Opening Files:
       
  2257 
       
  2258 -  use Open() to open an existing file for reading or writing; an error is
       
  2259    returned if it does not already exist.
       
  2260    To open an existing file for reading only, use Open() with an access mode of
       
  2261    EFileRead, and a share mode of EFileShareReadersOnly.
       
  2262 
       
  2263 -  use Create() to create and open a new file for writing; an error is returned
       
  2264    if it already exists.
       
  2265 
       
  2266 -  use Replace() to open a file for writing, replacing any existing file of
       
  2267    the same name if one exists, or creating a new file if one does not exist.
       
  2268    Note that if a file exists, its length is reset to zero.
       
  2269 
       
  2270 -  use Temp() to create and open a temporary file with a unique name,
       
  2271    for writing and reading.
       
  2272 
       
  2273 When opening a file, you must specify the file server session to use for
       
  2274 operations with that file. If you do not close the file explicitly, it is
       
  2275 closed when the server session associated with it is closed.
       
  2276 
       
  2277 Reading and Writing:
       
  2278 
       
  2279 There are several variants of both Read() and Write().
       
  2280 The basic Read(TDes8& aDes) and Write(const TDesC8& aDes) are supplemented
       
  2281 by variants allowing the descriptor length to be overridden, or the seek
       
  2282 position of the first byte to be specified, or asynchronous completion,
       
  2283 or any combination.
       
  2284 
       
  2285 Reading transfers data from a file to a descriptor, and writing transfers
       
  2286 data from a descriptor to a file. In all cases, the file data is treated
       
  2287 as binary and byte descriptors are used (TDes8, TDesC8).
       
  2288 
       
  2289 RFile class supports operations on files of size less than or equal to 2GB - 1.
       
  2290 If the file size is greater than 2GB - 1 (large file), use of class RFile64 is 
       
  2291 recommended for following operations:
       
  2292 	1. Opening a large file
       
  2293 	2. Creating a file which can grow beyond 2GB - 1 by size
       
  2294 	3. Creating a temporary file which can grow beyond 2GB - 1 by size
       
  2295 	4. Replacing an existing file after which it can grow beyond 2GB - 1 by size
       
  2296 	5. Adopting a large file handle from client
       
  2297 	6. Adopting a large file handle from server
       
  2298 	7. Adopting a large file handle from another process
       
  2299 	8. Read from a position greater than 2GB - 1
       
  2300 	9. Writing to a file by which the size can grow beyond 2GB - 1
       
  2301 	10. Seek to a position greater than 2GB - 1
       
  2302 	11. Setting a size greater than 2GB - 1
       
  2303 	12. Querying the file size (greater than 2GB - 1)
       
  2304 	13. Locking and unlocking a position and length that is beyond 2GB - 1
       
  2305 
       
  2306 @see TDes8
       
  2307 @see TDesC8
       
  2308 
       
  2309 @see RFile64
       
  2310 
       
  2311 */
       
  2312 
       
  2313 #endif
       
  2314 
       
  2315 
  2072 class RFile : public RSubSessionBase
  2316 class RFile : public RSubSessionBase
  2073 	{
  2317 	{
  2074 public:
  2318 public:
  2075 	IMPORT_C TInt Open(RFs& aFs,const TDesC& aName,TUint aFileMode);
  2319 	EFSRV_IMPORT_C TInt Open(RFs& aFs,const TDesC& aName,TUint aFileMode);
  2076 	IMPORT_C void Close();
  2320 	EFSRV_IMPORT_C void Close();
  2077 	IMPORT_C TInt Create(RFs& aFs,const TDesC& aName,TUint aFileMode);
  2321 	EFSRV_IMPORT_C TInt Create(RFs& aFs,const TDesC& aName,TUint aFileMode);
  2078 	IMPORT_C TInt Replace(RFs& aFs,const TDesC& aName,TUint aFileMode);
  2322 	EFSRV_IMPORT_C TInt Replace(RFs& aFs,const TDesC& aName,TUint aFileMode);
  2079 	IMPORT_C TInt Temp(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode);
  2323 	EFSRV_IMPORT_C TInt Temp(RFs& aFs,const TDesC& aPath,TFileName& aName,TUint aFileMode);
  2080 	IMPORT_C TInt Read(TDes8& aDes) const;
  2324 	EFSRV_IMPORT_C TInt Read(TDes8& aDes) const;
  2081 	IMPORT_C void Read(TDes8& aDes,TRequestStatus& aStatus) const;
  2325 	EFSRV_IMPORT_C void Read(TDes8& aDes,TRequestStatus& aStatus) const;
  2082 	IMPORT_C TInt Read(TDes8& aDes,TInt aLength) const;
  2326 	EFSRV_IMPORT_C TInt Read(TDes8& aDes,TInt aLength) const;
  2083 	IMPORT_C void Read(TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const;
  2327 	EFSRV_IMPORT_C void Read(TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const;
  2084 	IMPORT_C TInt Read(TInt aPos,TDes8& aDes) const;
  2328 	EFSRV_IMPORT_C TInt Read(TInt aPos,TDes8& aDes) const;
  2085 	IMPORT_C void Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus) const;
  2329 	EFSRV_IMPORT_C void Read(TInt aPos,TDes8& aDes,TRequestStatus& aStatus) const;
  2086 	IMPORT_C TInt Read(TInt aPos,TDes8& aDes,TInt aLength) const;
  2330 	EFSRV_IMPORT_C TInt Read(TInt aPos,TDes8& aDes,TInt aLength) const;
  2087 	IMPORT_C void Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const;
  2331 	EFSRV_IMPORT_C void Read(TInt aPos,TDes8& aDes,TInt aLength,TRequestStatus& aStatus) const;
  2088 	IMPORT_C void ReadCancel(TRequestStatus& aStatus) const;
  2332 	EFSRV_IMPORT_C void ReadCancel(TRequestStatus& aStatus) const;
  2089 	IMPORT_C void ReadCancel() const;
  2333 	EFSRV_IMPORT_C void ReadCancel() const;
  2090 	IMPORT_C TInt Write(const TDesC8& aDes);
  2334 	EFSRV_IMPORT_C TInt Write(const TDesC8& aDes);
  2091 	IMPORT_C void Write(const TDesC8& aDes,TRequestStatus& aStatus);
  2335 	EFSRV_IMPORT_C void Write(const TDesC8& aDes,TRequestStatus& aStatus);
  2092 	IMPORT_C TInt Write(const TDesC8& aDes,TInt aLength);
  2336 	EFSRV_IMPORT_C TInt Write(const TDesC8& aDes,TInt aLength);
  2093 	IMPORT_C void Write(const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus);
  2337 	EFSRV_IMPORT_C void Write(const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus);
  2094 	IMPORT_C TInt Write(TInt aPos,const TDesC8& aDes);
  2338 	EFSRV_IMPORT_C TInt Write(TInt aPos,const TDesC8& aDes);
  2095 	IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus);
  2339 	EFSRV_IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TRequestStatus& aStatus);
  2096 	IMPORT_C TInt Write(TInt aPos,const TDesC8& aDes,TInt aLength);
  2340 	EFSRV_IMPORT_C TInt Write(TInt aPos,const TDesC8& aDes,TInt aLength);
  2097 	IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus);
  2341 	EFSRV_IMPORT_C void Write(TInt aPos,const TDesC8& aDes,TInt aLength,TRequestStatus& aStatus);
  2098 	IMPORT_C TInt Lock(TInt aPos,TInt aLength) const;
  2342 	EFSRV_IMPORT_C TInt Lock(TInt aPos,TInt aLength) const;
  2099 	IMPORT_C TInt UnLock(TInt aPos,TInt aLength) const;
  2343 	EFSRV_IMPORT_C TInt UnLock(TInt aPos,TInt aLength) const;
  2100 	IMPORT_C TInt Seek(TSeek aMode,TInt& aPos) const;
  2344 	EFSRV_IMPORT_C TInt Seek(TSeek aMode,TInt& aPos) const;
  2101 	IMPORT_C TInt Flush();
  2345 	EFSRV_IMPORT_C TInt Flush();
  2102 	IMPORT_C void Flush(TRequestStatus& aStatus);
  2346 	EFSRV_IMPORT_C void Flush(TRequestStatus& aStatus);
  2103 	IMPORT_C TInt Size(TInt& aSize) const;
  2347 	EFSRV_IMPORT_C TInt Size(TInt& aSize) const;
  2104 	IMPORT_C TInt SetSize(TInt aSize);
  2348 	EFSRV_IMPORT_C TInt SetSize(TInt aSize);
  2105 	IMPORT_C TInt Att(TUint& aAttValue) const;
  2349 	EFSRV_IMPORT_C TInt Att(TUint& aAttValue) const;
  2106 	IMPORT_C TInt SetAtt(TUint aSetAttMask,TUint aClearAttMask);
  2350 	EFSRV_IMPORT_C TInt SetAtt(TUint aSetAttMask,TUint aClearAttMask);
  2107 	IMPORT_C TInt Modified(TTime& aTime) const;
  2351 	EFSRV_IMPORT_C TInt Modified(TTime& aTime) const;
  2108 	IMPORT_C TInt SetModified(const TTime& aTime);
  2352 	EFSRV_IMPORT_C TInt SetModified(const TTime& aTime);
  2109 	IMPORT_C TInt Set(const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
  2353 	EFSRV_IMPORT_C TInt Set(const TTime& aTime,TUint aSetAttMask,TUint aClearAttMask);
  2110 	IMPORT_C TInt ChangeMode(TFileMode aNewMode);
  2354 	EFSRV_IMPORT_C TInt ChangeMode(TFileMode aNewMode);
  2111 	IMPORT_C TInt Rename(const TDesC& aNewName);
  2355 	EFSRV_IMPORT_C TInt Rename(const TDesC& aNewName);
  2112 	IMPORT_C TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const;
  2356 	EFSRV_IMPORT_C TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const;
  2113 	IMPORT_C TInt Adopt(RFs& aFs, TInt aHandle);
  2357 	EFSRV_IMPORT_C TInt Adopt(RFs& aFs, TInt aHandle);
  2114 	IMPORT_C TInt AdoptFromClient(const RMessage2& aMsg, TInt aFsHandleIndex, TInt aFileHandleIndex);
  2358 	EFSRV_IMPORT_C TInt AdoptFromClient(const RMessage2& aMsg, TInt aFsHandleIndex, TInt aFileHandleIndex);
  2115 	IMPORT_C TInt AdoptFromServer(TInt aFsHandle, TInt aFileHandle);
  2359 	EFSRV_IMPORT_C TInt AdoptFromServer(TInt aFsHandle, TInt aFileHandle);
  2116 	IMPORT_C TInt AdoptFromCreator(TInt aFsIndex, TInt aFileHandleIndex);
  2360 	EFSRV_IMPORT_C TInt AdoptFromCreator(TInt aFsIndex, TInt aFileHandleIndex);
  2117 	IMPORT_C TInt Name(TDes& aName) const;
  2361 	EFSRV_IMPORT_C TInt Name(TDes& aName) const;
  2118 	IMPORT_C TInt TransferToServer(TIpcArgs& aIpcArgs, TInt aFsHandleIndex, TInt aFileHandleIndex) const;
  2362 	EFSRV_IMPORT_C TInt TransferToServer(TIpcArgs& aIpcArgs, TInt aFsHandleIndex, TInt aFileHandleIndex) const;
  2119 	IMPORT_C TInt TransferToClient(const RMessage2& aMsg, TInt aFileHandleIndex) const;
  2363 	EFSRV_IMPORT_C TInt TransferToClient(const RMessage2& aMsg, TInt aFileHandleIndex) const;
  2120 	IMPORT_C TInt TransferToProcess(RProcess& aProcess, TInt aFsHandleIndex, TInt aFileHandleIndex) const;
  2364 	EFSRV_IMPORT_C TInt TransferToProcess(RProcess& aProcess, TInt aFsHandleIndex, TInt aFileHandleIndex) const;
  2121 	IMPORT_C TInt Duplicate(const RFile& aFile, TOwnerType aType=EOwnerProcess);
  2365 	EFSRV_IMPORT_C TInt Duplicate(const RFile& aFile, TOwnerType aType=EOwnerProcess);
  2122 	IMPORT_C TInt FullName(TDes& aName) const;
  2366 	EFSRV_IMPORT_C TInt FullName(TDes& aName) const;
  2123 	IMPORT_C TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos=-1, TInt aBlockMapusage=EBlockMapUsagePaging) const;
  2367 	EFSRV_IMPORT_C TInt BlockMap(SBlockMapInfo& aInfo, TInt64& aStartPos, TInt64 aEndPos=-1, TInt aBlockMapusage=EBlockMapUsagePaging) const;
  2124 //	IMPORT_C TInt Clamp(RFileClamp& aHandle);
       
  2125 	TInt Clamp(RFileClamp& aHandle);
  2368 	TInt Clamp(RFileClamp& aHandle);
  2126 
  2369 
  2127 private:
  2370 protected:
       
  2371 	// RSubSessionBase overrides
       
  2372 	TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs);
       
  2373 	void CloseSubSession(TInt aFunction);
       
  2374 	TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
       
  2375 
  2128 	TInt DuplicateHandle(TInt& aSubSessionHandle) const;
  2376 	TInt DuplicateHandle(TInt& aSubSessionHandle) const;
  2129 	};
  2377 
  2130 
  2378 	friend class RFilePlugin;
  2131 
  2379 	};
       
  2380 
       
  2381 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
       
  2382 #include <f32file64.h>
       
  2383 #endif
  2132 
  2384 
  2133 class RDir : public RSubSessionBase
  2385 class RDir : public RSubSessionBase
  2134 /**
  2386 /**
  2135 @publishedAll
  2387 @publishedAll
  2136 @released
  2388 @released
  2160 
  2412 
  2161 @see RFs
  2413 @see RFs
  2162 */
  2414 */
  2163 	{
  2415 	{
  2164 public:
  2416 public:
  2165 	IMPORT_C TInt Open(RFs& aFs,const TDesC& aMatchName,const TUidType& aUidType);
  2417 	EFSRV_IMPORT_C TInt Open(RFs& aFs,const TDesC& aMatchName,const TUidType& aUidType);
  2166 	IMPORT_C TInt Open(RFs& aFs,const TDesC& aMatchName,TUint anAttMask);
  2418 	EFSRV_IMPORT_C TInt Open(RFs& aFs,const TDesC& aMatchName,TUint anAttMask);
  2167 	IMPORT_C void Close();
  2419 	EFSRV_IMPORT_C void Close();
  2168 	IMPORT_C TInt Read(TEntryArray& anArray) const;
  2420 	EFSRV_IMPORT_C TInt Read(TEntryArray& anArray) const;
  2169 	IMPORT_C void Read(TEntryArray& anArray,TRequestStatus& aStatus) const;
  2421 	EFSRV_IMPORT_C void Read(TEntryArray& anArray,TRequestStatus& aStatus) const;
  2170 	IMPORT_C TInt Read(TEntry& anEntry) const;
  2422 	EFSRV_IMPORT_C TInt Read(TEntry& anEntry) const;
  2171 	IMPORT_C void Read(TPckg<TEntry>& anEntry,TRequestStatus& aStatus) const;
  2423 	EFSRV_IMPORT_C void Read(TPckg<TEntry>& anEntry,TRequestStatus& aStatus) const;
       
  2424 
       
  2425 private:
       
  2426 	// RSubSessionBase overrides
       
  2427 	TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
       
  2428 
       
  2429 	friend class RDirPlugin;
  2172 	};
  2430 	};
  2173 
  2431 
  2174 
  2432 
  2175 class RFormat : public RSubSessionBase
  2433 class RFormat : public RSubSessionBase
  2176 /**
  2434 /**
  2521 these functions act upon files contained in the single top level source
  2779 these functions act upon files contained in the single top level source
  2522 directory only. Recursion is set or unset using the switch parameter to
  2780 directory only. Recursion is set or unset using the switch parameter to
  2523 these functions.
  2781 these functions.
  2524 
  2782 
  2525 This class is not intended for user derivation.
  2783 This class is not intended for user derivation.
       
  2784 
       
  2785 Note: 
       
  2786 
       
  2787 To support wildcard, CFileMan needs to store the entire directory entry 
       
  2788 information. Therefore, in a extreme condition, if a directory contains 
       
  2789 a huge number of files (e.g. more than 15000 files with 10 characters' long file 
       
  2790 names), user may encounter KErrNoMemory errors. Developers who have a need to handle 
       
  2791 this rare case should increase the heap size limitation of their applications. 
       
  2792 
       
  2793 For more information about heap size configuration, please refer following 
       
  2794 section in Symbian Developer Library:
       
  2795 Symbian OS build guide >> Build Tools Reference >> MMP file syntax >> epocheapsize   
  2526 
  2796 
  2527 @see MFileManObserver
  2797 @see MFileManObserver
  2528 */
  2798 */
  2529 	{
  2799 	{
  2530 public:
  2800 public:
  2720 	TInt CheckRenameAllowed(const TDesC& aSrcName,const TDesC& aTrgName);
  2990 	TInt CheckRenameAllowed(const TDesC& aSrcName,const TDesC& aTrgName);
  2721 	TInt SetupMoveOnSameDrive(TUint aSwitches, TBool& aComplete);
  2991 	TInt SetupMoveOnSameDrive(TUint aSwitches, TBool& aComplete);
  2722 	TInt SetupMoveAcrossDrives(TUint aSwitches);
  2992 	TInt SetupMoveAcrossDrives(TUint aSwitches);
  2723 	TInt SetupTargetDirectory(TBool aOverWrite, TBool& aComplete);
  2993 	TInt SetupTargetDirectory(TBool aOverWrite, TBool& aComplete);
  2724 	TBool SrcTrgDrivesIdentical();
  2994 	TBool SrcTrgDrivesIdentical();
  2725 	TBool SetupDirectoryForMove();
  2995 	TInt SetupDirectoryForMove(TBool& aSrcIsDir);
  2726 private:
  2996 private:
  2727 	void DoAttribsL();
  2997 	void DoAttribsL();
  2728 	void DoCopyOrMoveL();
  2998 	void DoCopyOrMoveL();
  2729 	void DoDeleteL();
  2999 	void DoDeleteL();
  2730 	void DoRenameL();
  3000 	void DoRenameL();
  2731 	void DoRmDirL();
  3001 	void DoRmDirL();
  2732 	void DoCopyFromHandleL();
  3002 	void DoCopyFromHandleL();
       
  3003 #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2733 	TInt DoCopy(const RFile& aSrcFile, RFile& aDstFile, TInt& aRet);
  3004 	TInt DoCopy(const RFile& aSrcFile, RFile& aDstFile, TInt& aRet);
       
  3005 #else
       
  3006 	TInt DoCopy(const RFile64& aSrcFile, RFile64& aDstFile, TInt& aRet);
       
  3007 #endif
  2734 private:
  3008 private:
  2735 	TParse iTrgFile;
  3009 	TParse iTrgFile;
  2736 	TInternalAction iAction;
  3010 	TInternalAction iAction;
  2737 	TUint iSetMask;
  3011 	TUint iSetMask;
  2738 	TUint iClearMask;
  3012 	TUint iClearMask;
  2739 	TTime iTime;
  3013 	TTime iTime;
  2740 	TInt iBytesTransferred;
  3014 	TInt iBytesTransferred;
       
  3015 #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2741 	RFile iSrcFileHandle;
  3016 	RFile iSrcFileHandle;
       
  3017 #else
       
  3018 	RFile64 iSrcFileHandle;
       
  3019 #endif
  2742 	TBool iMovingContents;
  3020 	TBool iMovingContents;
  2743 	TEntry iTmpEntry;
  3021 	TEntry iTmpEntry;
  2744 	TParse iTmpParse;
  3022 	TParse iTmpParse;
  2745 	TFileName iTmpName1;
  3023 	TFileName iTmpName1;
  2746 	TFileName iTmpName2;
  3024 	TFileName iTmpName2;
  2859 @released
  3137 @released
  2860 
  3138 
  2861 Reads and writes single lines of text to or from a Unicode file.
  3139 Reads and writes single lines of text to or from a Unicode file.
  2862 */
  3140 */
  2863 	{
  3141 	{
  2864 public:
  3142 private:
  2865     /**
       
  2866     @internalComponent
       
  2867     */
       
  2868 	enum TFileState
  3143 	enum TFileState
  2869 		{
  3144 		{
  2870 		EStartOfFile,
  3145 		EStartOfFile,
  2871 		ENormal,
  3146 		ENormal,
  2872 		EReverse
  3147 		EReverse
  2883 	TInt FillBuffer();
  3158 	TInt FillBuffer();
  2884 private:
  3159 private:
  2885 	const TText* iNext;
  3160 	const TText* iNext;
  2886 	const TText* iEnd;
  3161 	const TText* iEnd;
  2887 	TFileState iState;
  3162 	TFileState iState;
       
  3163 #ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2888 	RFile iFile;
  3164 	RFile iFile;
       
  3165 #else
       
  3166 	RFile64 iFile;
       
  3167 #endif
  2889 	TBuf8<0x100> iReadBuf; 
  3168 	TBuf8<0x100> iReadBuf; 
  2890 	};
  3169 	};
  2891 
  3170 
  2892 
  3171 
  2893 
  3172 
  2896 @publishedAll
  3175 @publishedAll
  2897 @released
  3176 @released
  2898 */
  3177 */
  2899 IMPORT_C TBool FileNamesIdentical(const TDesC& aFileName1,const TDesC& aFileName2);
  3178 IMPORT_C TBool FileNamesIdentical(const TDesC& aFileName1,const TDesC& aFileName2);
  2900 
  3179 
  2901 
       
  2902 
       
  2903 /**
       
  2904 Local drive mapping list - passed as argument to RFs::SetLocalDriveMapping().
       
  2905 
       
  2906 @publishedPartner
       
  2907 @released
       
  2908 */
       
  2909 class TLocalDriveMappingInfo
       
  2910 	{
       
  2911 public:
       
  2912 	enum TDrvMapOperation {EWriteMappingsAndSet=0,EWriteMappingsNoSet=1,ESwapIntMappingAndSet=2};	
       
  2913 public:
       
  2914 	TInt iDriveMapping[KMaxLocalDrives];
       
  2915 	TDrvMapOperation iOperation;
       
  2916     };
       
  2917 typedef TPckgBuf<TLocalDriveMappingInfo> TLocalDriveMappingInfoBuf;
       
  2918 
       
  2919 /**
       
  2920 Client side plugin API.
       
  2921 
       
  2922 @publishedPartner
       
  2923 @released
       
  2924 */
       
  2925 class RPlugin : public RSubSessionBase
       
  2926 	{
       
  2927 public:
       
  2928 	IMPORT_C TInt Open(RFs& aFs, TInt aPos);
       
  2929 	IMPORT_C void Close();
       
  2930 protected:
       
  2931 	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus) const;
       
  2932 	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1) const;
       
  2933 	IMPORT_C void DoRequest(TInt aReqNo,TRequestStatus& aStatus,TDes8& a1,TDes8& a2) const;
       
  2934 	IMPORT_C TInt DoControl(TInt aFunction) const;
       
  2935 	IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1) const;
       
  2936 	IMPORT_C TInt DoControl(TInt aFunction,TDes8& a1,TDes8& a2) const;
       
  2937 	IMPORT_C void DoCancel(TUint aReqMask) const;
       
  2938 	};
       
  2939 
       
  2940 /**
       
  2941 @publishedPartner
       
  2942 @released
       
  2943 
       
  2944 Specifies that a plugin should determine for itself which drives it attaches to.
       
  2945 
       
  2946 @see RFs::MountPlugin
       
  2947 @see RFs::DismountPlugin
       
  2948 */
       
  2949 const TInt KPluginAutoAttach = 0x19;
       
  2950 
       
  2951 /**
       
  2952 @publishedPartner
       
  2953 @released
       
  2954 
       
  2955 Specifies that a plugin should determine its own position in the plugin stack.
       
  2956 
       
  2957 @see RFs::MountPlugin
       
  2958 @see RFs::DismountPlugin
       
  2959 */
       
  2960 const TInt KPluginAutoLocate = 0xC8;
       
  2961 
       
  2962 /**
  3180 /**
  2963 @publishedAll
  3181 @publishedAll
  2964 @released
  3182 @released
  2965 
  3183 
  2966 The UID of the File Server process
  3184 The UID of the File Server process
  2967 */
  3185 */
  2968 const TInt KFileServerUidValue = 0x100039e3;
  3186 const TInt KFileServerUidValue = 0x100039e3;
  2969 
  3187 
  2970 enum TSessionFlags
  3188 
  2971 /**
  3189 #include <f32file.inl>
  2972 @internalTechnology
  3190 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2973 
  3191 #include <f32file64.inl>
  2974 A set of session specific configuration flags.
       
  2975 */
       
  2976 	{
       
  2977 	/**
       
  2978 	Notify the user or write failures
       
  2979 	*/
       
  2980 	EFsSessionNotifyUser	= KBit0,
       
  2981 	
       
  2982 	/**
       
  2983 	Notify clients registered for change notification
       
  2984 	*/
       
  2985 	EFsSessionNotifyChange	= KBit1,
       
  2986 
       
  2987 	/**	
       
  2988 	Enables all session flags
       
  2989 	*/
       
  2990 	EFsSessionFlagsAll		= KSet32,
       
  2991 	};
       
  2992 
       
  2993 /**
       
  2994 @internalTechnology
       
  2995 */
       
  2996 struct SBlockMapArgs
       
  2997 	{
       
  2998 	TInt64 iStartPos;
       
  2999 	TInt64 iEndPos;
       
  3000 	};
       
  3001 	
       
  3002 	
       
  3003 /**
       
  3004 @internalTechnology
       
  3005 
       
  3006 Validates the mask used to match drive attributes.
       
  3007 
       
  3008 @see RFs::DriveList
       
  3009 @see TFindFile::SetFindMask
       
  3010 */	
       
  3011 TInt ValidateMatchMask( TUint aMask);
       
  3012 
       
  3013 
       
  3014 	
       
  3015 
       
  3016 #include "f32file.inl"
       
  3017 #endif
  3192 #endif
       
  3193 
       
  3194 #ifdef SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION	
       
  3195 #include <f32notification.h>
       
  3196 #endif
       
  3197 
       
  3198 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
  3199 #include <f32file_private.h>
       
  3200 #endif
       
  3201 
       
  3202 #endif