symport/e32/include/d32locd.h
changeset 1 0a7b44b10206
child 2 806186ab5e14
equal deleted inserted replaced
0:c55016431358 1:0a7b44b10206
       
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\d32locd.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __D32LOCD_H__
       
    19 #define __D32LOCD_H__
       
    20 #include <e32cmn.h>
       
    21 #include <partitions.h>
       
    22 
       
    23 
       
    24 /**
       
    25 @publishedPartner
       
    26 @released
       
    27 
       
    28 Local media IDs.
       
    29 
       
    30 A media ID is passed to LocDrv::RegisterMediaDevice() when registering
       
    31 a media driver with the local media subsystem.
       
    32 */
       
    33 enum TMediaDevice { EFixedMedia0, EFixedMedia1, EFixedMedia2, EFixedMedia3,
       
    34 					EFixedMedia4, EFixedMedia5, EFixedMedia6, EFixedMedia7,
       
    35 					ERemovableMedia0, ERemovableMedia1, ERemovableMedia2, ERemovableMedia3,
       
    36 					EInvalidMedia
       
    37 				};
       
    38 
       
    39 #define __IS_REMOVABLE(aDevice) (aDevice>=ERemovableMedia0 && aDevice<=ERemovableMedia3)
       
    40 #define __IS_FIXED(aDevice) ((TUint)aDevice<=EFixedMedia7)
       
    41 #define MEDIA_DEVICE_IRAM EFixedMedia0
       
    42 #define MEDIA_DEVICE_LFFS EFixedMedia1
       
    43 #define MEDIA_DEVICE_NAND EFixedMedia2
       
    44 #define MEDIA_DEVICE_MMC ERemovableMedia0
       
    45 #define MEDIA_DEVICE_PCCARD ERemovableMedia1
       
    46 #define MEDIA_DEVICE_CSA ERemovableMedia2
       
    47 
       
    48 typedef signed int TSocket;
       
    49 
       
    50 class TLDriveAssignInfo
       
    51 /**
       
    52 No longer used
       
    53 @internalComponent
       
    54 @removed
       
    55 */
       
    56 	{
       
    57 public:
       
    58 	TMediaDevice iDevice;
       
    59 	TInt iPriority;
       
    60 	};
       
    61 
       
    62 class TMediaDeviceAssignInfo
       
    63 /**
       
    64 No longer used
       
    65 @internalComponent
       
    66 @removed
       
    67 */
       
    68 	{
       
    69 public:
       
    70 	TInt iFirstMedia;
       
    71 	TInt iLastMedia;	
       
    72 	};
       
    73 
       
    74 class TLocalDriveCaps
       
    75 /**
       
    76 Drives media capabilities fields
       
    77 
       
    78 @publishedPartner
       
    79 @released
       
    80 */
       
    81 	{
       
    82 public:
       
    83 	IMPORT_C TLocalDriveCaps();
       
    84 public:
       
    85 	/**
       
    86 	Size of drive
       
    87 	
       
    88 	Note : This is the size of the partition, not the entire media.
       
    89 		   The entire media size can be obtained from TLocalDriveCapsV4::MediaSizeInBytes()
       
    90 	*/
       
    91 	TInt64 iSize;
       
    92 	/**
       
    93 	Media Type of drive
       
    94 	*/
       
    95 	TMediaType iType;
       
    96 	/**
       
    97 	Indicates state of battery if supported
       
    98 	*/
       
    99 	TBatteryState iBattery;
       
   100 	/**
       
   101 	Attributes of the drive
       
   102 	*/
       
   103 	TUint iDriveAtt;
       
   104 	/**
       
   105 	Attributes of underlying media 
       
   106 	*/
       
   107 	TUint iMediaAtt;
       
   108 	/**
       
   109 	Base address of media
       
   110 	*/
       
   111     TUint8* iBaseAddress;
       
   112 	/**
       
   113 	Identity of the file system used for this media
       
   114 	*/
       
   115 	TUint16 iFileSystemId;
       
   116 	/**
       
   117 	Partition type of media
       
   118 	*/
       
   119 	TUint16	iPartitionType;
       
   120 	};
       
   121 typedef TPckgBuf<TLocalDriveCaps> TLocalDriveCapsBuf;
       
   122 //
       
   123 class TLocalDriveCapsV2 : public TLocalDriveCaps
       
   124 /**
       
   125 Extension to Capabilities fields mainly to support Nor flash
       
   126 
       
   127 @publishedPartner
       
   128 @released
       
   129 */
       
   130 	{
       
   131 public:
       
   132 	/**
       
   133 	Number of hidden sectors on drive
       
   134 	*/
       
   135 	TUint iHiddenSectors;
       
   136 	/**
       
   137 	Size of erase unit on media
       
   138 	*/
       
   139 	TUint iEraseBlockSize;
       
   140     };
       
   141 typedef TPckgBuf<TLocalDriveCapsV2> TLocalDriveCapsV2Buf;
       
   142 //
       
   143 
       
   144 
       
   145 
       
   146 /**
       
   147 Format specification for removable media
       
   148 
       
   149 @publishedPartner
       
   150 @released
       
   151 */
       
   152 class TLDFormatInfo
       
   153 	{
       
   154 public:
       
   155     inline TLDFormatInfo();
       
   156 public:
       
   157 
       
   158     TInt64 iCapacity;				///< Format Capacity
       
   159 	TUint16 iSectorsPerCluster;		///< Specified sectors per cluster
       
   160 	TUint16 iSectorsPerTrack;		///< Specified sectors per track
       
   161 	TUint16 iNumberOfSides;			///< Specified number of sides
       
   162 
       
   163 	enum TFATBits {EFBDontCare, EFB12 = 12, EFB16 = 16, EFB32 = 32};
       
   164 	TFATBits iFATBits;				///< Specified bits per fat table entry
       
   165 
       
   166 	TUint16 iReservedSectors;	///< Reserved sector count, required for SD card compliance
       
   167 	
       
   168 	// Flags field. Allows the number of FAT tables to be specified: set both bits to zero to use the default.
       
   169 	enum TFlags {EOneFatTable = 0x01, ETwoFatTables = 0x02};
       
   170 	TUint8 iFlags;
       
   171 
       
   172 	TUint8 iPad;				///< Padding for offset alignment  between kernel and user code
       
   173 
       
   174 	};
       
   175 typedef TPckgBuf<TLDFormatInfo> TSpecialFormatInfoBuf;
       
   176 
       
   177 
       
   178 //
       
   179 class TLocalDriveCapsV3 : public TLocalDriveCapsV2
       
   180 /**
       
   181 Extension to Capabilities fields mainly to support removable media format specifications
       
   182 
       
   183 @publishedPartner
       
   184 @released
       
   185 */
       
   186 	{
       
   187 public:
       
   188 	/**
       
   189 	Format specification
       
   190 	*/
       
   191 	TLDFormatInfo iFormatInfo;
       
   192 	/**
       
   193 	Set if iFormatInfo is valid
       
   194 	*/
       
   195 	TBool iExtraInfo;
       
   196 	/**
       
   197 	*/
       
   198 	TInt iMaxBytesPerFormat;
       
   199     };
       
   200 //The following ASSERTs checks for offset of any TInt64 member be a multiple of 8 as per DEF045510
       
   201 __ASSERT_COMPILE(_FOFF(TLocalDriveCaps,iSize)%8 == 0);
       
   202 __ASSERT_COMPILE(_FOFF(TLocalDriveCapsV3,iFormatInfo.iCapacity) % 8 == 0);
       
   203 
       
   204 
       
   205 typedef TPckgBuf<TLocalDriveCapsV3> TLocalDriveCapsV3Buf;
       
   206 //
       
   207 class TLocalDriveCapsV4 : public TLocalDriveCapsV3
       
   208 /**
       
   209 Extension to Capabilities fields mainly to support Nand flash
       
   210 
       
   211 @publishedPartner
       
   212 @released
       
   213 */
       
   214 	{
       
   215 public:
       
   216 	union
       
   217 		{
       
   218 		/**
       
   219 		Number of blocks (for NAND flash)
       
   220 		 - The entire capacity of NAND media can be calculated using:
       
   221 		   capacity = iNumOfBlocks * iNumPagesPerBlock * iNumBytesMain
       
   222 		*/
       
   223 		TInt iNumOfBlocks;
       
   224 		/**
       
   225 		Number of sectors (for other types of media)
       
   226 		 - The entire capacity of sector based media can be calculated using:
       
   227 		   capacity = iNumberOfSectors * iSectorSizeInBytes
       
   228 		*/
       
   229 		TUint32 iNumberOfSectors;
       
   230 		};
       
   231 
       
   232 	/**
       
   233 	Number of pages per block
       
   234 	*/
       
   235 	TInt iNumPagesPerBlock;
       
   236 
       
   237 	union
       
   238 		{
       
   239 		/**
       
   240 		Number of Bytes in the main array (for NAND flash)
       
   241 		 - The entire capacity of NAND media can be calculated using:
       
   242 		   capacity = iNumOfBlocks * iNumPagesPerBlock * iNumBytesMain
       
   243 		*/
       
   244 		TInt iNumBytesMain;
       
   245 		/**
       
   246 		Number of Bytes in a sector (for other types of media)
       
   247 		 - The entire capacity of sector based media can be calculated using:
       
   248 		   capacity = iNumberOfSectors * iSectorSizeInBytes
       
   249 		*/
       
   250 		TUint32 iSectorSizeInBytes;
       
   251 		};
       
   252 
       
   253 	/**
       
   254 	Number of Bytes in the spare array
       
   255 	*/
       
   256 	TInt iNumBytesSpare;
       
   257 	/**
       
   258 	Effective usable blocks
       
   259 	*/
       
   260 	TInt iEffectiveBlks;
       
   261 	/**
       
   262 	Start page of drive
       
   263 	*/
       
   264 	TInt iStartPage;
       
   265 public:
       
   266 	inline TInt64 MediaSizeInBytes();
       
   267     };
       
   268 typedef TPckgBuf<TLocalDriveCapsV4> TLocalDriveCapsV4Buf;
       
   269 //
       
   270 #define KMaxSerialNumLength 64
       
   271 typedef TBuf8<KMaxSerialNumLength> TMediaSerialNumber;
       
   272 class TLocalDriveCapsV5 : public TLocalDriveCapsV4
       
   273 /**
       
   274 Add serial number support for certain media.
       
   275 
       
   276 @publishedPartner
       
   277 @released
       
   278 */
       
   279 	{
       
   280 public:
       
   281 	/**
       
   282     Serial number buffer length, 0 if not supported
       
   283 	*/
       
   284     TUint iSerialNumLength;
       
   285 	/**
       
   286     Serial number buffer
       
   287 	*/
       
   288 	TUint8 iSerialNum[KMaxSerialNumLength];
       
   289 	};
       
   290 typedef TPckgBuf<TLocalDriveCapsV5> TLocalDriveCapsV5Buf;
       
   291 
       
   292 //
       
   293 /**
       
   294 Extension to Capabilities fields mainly to support reporting block size 
       
   295 information of underlying media.
       
   296     
       
   297 @publishedPartner
       
   298 @released
       
   299 */
       
   300 class TLocalDriveCapsV6 : public TLocalDriveCapsV5
       
   301 	{
       
   302 public:
       
   303 	/**
       
   304 	Block size information of underlying media is required to assist in chosing 
       
   305 	efficient size of buffers for reading and writing.
       
   306 	This information can also be accessed through the function
       
   307 	- RFs::VolumeIOParam
       
   308 
       
   309 	These functions retrieve this blocksize information by calling the media
       
   310 	driver's Caps() function.
       
   311 	*/
       
   312     TUint 	iBlockSize;
       
   313     
       
   314 private:
       
   315     /**
       
   316     Reserved space for future use.
       
   317     */
       
   318     TUint32	iSpare[4];
       
   319 	};
       
   320 typedef TPckgBuf<TLocalDriveCapsV6> TLocalDriveCapsV6Buf;
       
   321 
       
   322 
       
   323 class TLocalDriveCapsV7 : public TLocalDriveCapsV6
       
   324 /**
       
   325 Add control mode, object mode, partition size for M18 NOR Flash.
       
   326 */
       
   327 	{
       
   328 public:
       
   329     TUint32 iWriteBufferSize;
       
   330 	TUint32 iPartitionSize;
       
   331     TUint32 iControlModeSize;
       
   332     TUint32 iObjectModeSize;
       
   333 	};
       
   334 
       
   335 typedef TPckgBuf<TLocalDriveCapsV7> TLocalDriveCapsV7Buf;
       
   336 
       
   337 //
       
   338 class TFormatInfo
       
   339 /**
       
   340 Format information class
       
   341 
       
   342 @publishedPartner
       
   343 @released
       
   344 */
       
   345 	{
       
   346 public:
       
   347 	IMPORT_C TFormatInfo();
       
   348 public:
       
   349 	TBool iFormatIsCurrent;
       
   350 	TInt i512ByteSectorsFormatted; 
       
   351 	TInt iMaxBytesPerFormat;
       
   352 	};
       
   353 //
       
   354 class TErrorInfo
       
   355 /**
       
   356 @internalTechnology
       
   357   */
       
   358 	{
       
   359 public:
       
   360 	enum TReasonCode
       
   361 		{
       
   362 		ENoError=0,			//No error
       
   363 		EBadSector=1,	//Error due to corrupt sector
       
   364 		};
       
   365 public:
       
   366     TReasonCode iReasonCode;
       
   367 	union
       
   368 		{
       
   369 		// holds position error occurred for KErrCorrupt
       
   370 		// It numerically equals number of bytes succesfully read/written during
       
   371 		// last disk operation.
       
   372 		TInt64 iErrorPos;
       
   373         TInt iOtherInfo;
       
   374 		};
       
   375     };
       
   376 typedef TPckgBuf<TErrorInfo> TErrorInfoBuf;
       
   377 //
       
   378 class TLocalDriveMessageData
       
   379 /**
       
   380 @internalTechnology
       
   381 */
       
   382 	{
       
   383 public:
       
   384 	inline TLocalDriveMessageData()
       
   385 		{}
       
   386 	inline TLocalDriveMessageData(TInt64 aPos, TInt aLength, const TAny* aPtr, TInt aHandle, TInt anOffset, TInt aFlags)
       
   387 		: iPos(aPos), iLength(aLength), iPtr(aPtr), iHandle(aHandle), iOffset(anOffset), iFlags(aFlags)
       
   388 		{}
       
   389 public:
       
   390 	TInt64 iPos;
       
   391 	TInt iLength;
       
   392 	const TAny* iPtr;
       
   393 	TInt iHandle;
       
   394 	TInt iOffset;
       
   395 	TInt iFlags;
       
   396 	};
       
   397 
       
   398 class TLocalDriveControlIOData
       
   399 /**
       
   400 Control IO data class
       
   401 
       
   402 @internalTechnology
       
   403 */
       
   404 	{
       
   405 public:
       
   406 	inline TLocalDriveControlIOData()
       
   407 		{}
       
   408 	inline TLocalDriveControlIOData(TInt aCommand, TAny* aParam1, TAny* aParam2, TInt aHandle)
       
   409 		: iCommand(aCommand), iParam1(aParam1), iParam2(aParam2), iHandle(aHandle)
       
   410 		{}
       
   411 public:
       
   412 	TInt iCommand;
       
   413 	TAny* iParam1;
       
   414 	TAny* iParam2;
       
   415 	TInt iHandle;
       
   416 	};
       
   417 
       
   418 class TLocalDrivePasswordData
       
   419 /**
       
   420 Password store for password protected media
       
   421 
       
   422 @internalTechnology
       
   423 */
       
   424 	{
       
   425 public:
       
   426 	TLocalDrivePasswordData(const TDesC8& aOldPasswd, const TDesC8& aNewPasswd, TBool aStorePasswd)
       
   427 		: iOldPasswd(&aOldPasswd), iNewPasswd(&aNewPasswd), iStorePasswd(aStorePasswd)
       
   428 		{}
       
   429 	TLocalDrivePasswordData()
       
   430 		: iOldPasswd(&KNullDesC8), iNewPasswd(&KNullDesC8), iStorePasswd(EFalse)
       
   431 		{}
       
   432 public:
       
   433 	const TDesC8 *iOldPasswd;
       
   434 	const TDesC8 *iNewPasswd;
       
   435 	TBool iStorePasswd;
       
   436 	};
       
   437 typedef TPckgBuf<TLocalDrivePasswordData> TLocalDrivePasswordDataPckg;
       
   438 
       
   439 
       
   440 class TPasswordStore
       
   441 /**
       
   442 @internalTechnology
       
   443 */
       
   444 	{
       
   445 public:
       
   446 	virtual TInt Init()=0;
       
   447 	virtual TInt ReadPasswordData(TDes8 &aBuf)=0;
       
   448 	virtual TInt WritePasswordData(TDesC8 &aBuf)=0;
       
   449 	virtual TInt PasswordStoreLengthInBytes()=0;
       
   450 	enum {EMaxPasswordLength=1024}; /**< Size of the password store write buffer, which may contain multiple password mappings */
       
   451 	};
       
   452 
       
   453 class TMountInfoData
       
   454 /**
       
   455 @internalTechnology
       
   456 */
       
   457 	{
       
   458 public:
       
   459 	TDesC8* iInfo;
       
   460 	TAny* iThread;
       
   461 	};
       
   462 
       
   463 
       
   464 const TInt KLocalDriveMajorVersion=1;
       
   465 const TInt KLocalDriveMinorVersion=0;
       
   466 const TInt KLocalDriveBuildVersion=160;
       
   467 _LIT(KLitLocalDriveLddName,"LocDrv");
       
   468 
       
   469 const TInt KLocalMessageHandle=-1;
       
   470 
       
   471 
       
   472 enum TMediaPagingStats
       
   473 	{
       
   474 	EMediaPagingStatsRomAndCode,
       
   475 	EMediaPagingStatsRom,
       
   476 	EMediaPagingStatsCode
       
   477 	};
       
   478 
       
   479 
       
   480 class RLocalDrive : public RBusLogicalChannel
       
   481 /**
       
   482 Interface class to local media
       
   483 
       
   484 @internalTechnology
       
   485 */
       
   486 	{
       
   487 public:
       
   488 	enum TControl
       
   489 		{
       
   490 		EControlRead=0,							/**< Read request */
       
   491 		EControlWrite=1,						/**< Write request */
       
   492 		EControlCaps=2,							/**< Caps request */
       
   493 		EControlFormat=3,						/**< Format request */
       
   494 		EControlEnlarge=4,						/**< Enlarge drive request */
       
   495 		EControlReduce=5,						/**< Reduce Drive  request */
       
   496 		EControlForceMediaChange=6,				/**< Force media change request */
       
   497 		EControlMediaDevice=7,					/**< Return the media device request */
       
   498 		EControlPasswordLock=8,					/**< Password lock media request */
       
   499 		EControlPasswordUnlock=9,				/**< Password unlock media request */
       
   500 		EControlPasswordClear=10,				/**< Password clear request */
       
   501 		EControlNotifyChange=11,				/**< Notify change request */
       
   502 		EControlNotifyChangeCancel=12,			/**< Notify change cancel request */
       
   503 		EControlReadPasswordStore=13,			/**< Read password request */
       
   504 		EControlWritePasswordStore=14,			/**< Write password request */
       
   505 		EControlPasswordStoreLengthInBytes=15,	/**< Password request */
       
   506 		EControlIsRemovable=16,					/**< Query removable request */
       
   507 		EControlSetMountInfo=17,				/**< Set mount info request */
       
   508 		EControlControlIO=18,					/**< Control IO request */
       
   509 		EControlPasswordErase=19,				/**< Password erase media request */
       
   510 		EControlDeleteNotify=20,				/**< Delete notification */
       
   511 		EControlGetLastErrorInfo=21,			/**< Get last error info request */
       
   512 		};
       
   513 
       
   514 	enum TRemountFlags
       
   515 		{
       
   516 		ELocDrvRemountNotifyChange	   = 0,		/**< Notify clients of media change but don't remount */
       
   517 		ELocDrvRemountForceMediaChange = 1,		/**< Notify clients of media change and remount	*/
       
   518 		};
       
   519 
       
   520 	enum TReadWriteFlags
       
   521 		{
       
   522 		ELocDrvMetaData					= 0x80000000,	/**< Set if read/write request is for metadata */
       
   523 		ELocDrvWholeMedia				= 0x40000000	/**< Set to access whole media, rather than partition */
       
   524 		};
       
   525 
       
   526 public:
       
   527 	inline TVersion VersionRequired() const;
       
   528 	inline TInt Connect(TInt aDriveNumber, TBool& aChangedFlag);
       
   529 	inline TInt Enlarge(TInt aLength);
       
   530 	inline TInt Reduce(TInt aPos, TInt aLength);
       
   531 	inline TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aMessageHandle, TInt aOffset, TInt aFlags);
       
   532 	inline TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aMessageHandle, TInt anOffset);
       
   533 	inline TInt Read(TInt64 aPos, TInt aLength, TDes8& aTrg);
       
   534 	inline TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aMessageHandle, TInt aOffset, TInt aFlags);
       
   535 	inline TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aMessageHandle, TInt anOffset);
       
   536 	inline TInt Write(TInt64 aPos, const TDesC8& aSrc);
       
   537 	inline TInt Caps(TDes8& anInfo);
       
   538 	inline TInt Format(TInt64 aPos, TInt aLength);
       
   539 	inline TInt ForceMediaChange(TInt aMode=0);
       
   540 	inline void NotifyChange(TRequestStatus* aStatus);
       
   541 	inline void NotifyChangeCancel();
       
   542 	inline TInt SetMountInfo(const TDesC8* aInfo,TInt aMessageHandle);
       
   543 	inline TMediaDevice MediaDevice();
       
   544 	inline TInt IsRemovable(TInt& aSocketNum);
       
   545 	inline TInt ControlIO(TInt aCommand, TAny* aParam1, TAny* aParam2);
       
   546 	inline TInt Unlock(const TDesC8& aPassword, TBool aStorePassword);
       
   547 	inline TInt SetPassword(const TDesC8& aOldPassword, const TDesC8& aNewPassword, TBool aStorePassword);
       
   548 	inline TInt Clear(const TDesC8& aPassword);
       
   549 	inline TInt ErasePassword();
       
   550 	inline TInt ReadPasswordData(TDesC8& aStoreData);
       
   551 	inline TInt WritePasswordData(const TDesC8& aStoreData);
       
   552 	inline TInt PasswordStoreLengthInBytes();
       
   553 	inline TInt DeleteNotify(TInt64 aPos, TInt aLength);
       
   554 	inline TInt GetLastErrorInfo(TDesC8& aErrorInfo);
       
   555 	};
       
   556 //
       
   557 #ifndef __KERNEL_MODE__
       
   558 class TBusLocalDrive : public RLocalDrive
       
   559 /**
       
   560 @internalTechnology
       
   561 */
       
   562 	{
       
   563 public:
       
   564 	IMPORT_C TBusLocalDrive();
       
   565 	IMPORT_C TInt Connect(TInt aDriveNumber, TBool& aChangedFlag);
       
   566 	IMPORT_C void Disconnect();
       
   567 	IMPORT_C TInt Enlarge(TInt aLength);
       
   568 	IMPORT_C TInt ReduceSize(TInt aPos, TInt aLength);
       
   569 	IMPORT_C TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aMessageHandle,TInt aOffset,TInt aFlags);
       
   570 	IMPORT_C TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aMessageHandle,TInt anOffset);
       
   571 	IMPORT_C TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
       
   572 	IMPORT_C TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aMessageHandle,TInt aOffset,TInt aFlags);
       
   573 	IMPORT_C TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aMessageHandle,TInt anOffset);
       
   574 	IMPORT_C TInt Write(TInt64 aPos,const TDesC8& aSrc);
       
   575 	IMPORT_C TInt Caps(TDes8& anInfo);
       
   576 	IMPORT_C TInt Format(TFormatInfo& anInfo);
       
   577 	IMPORT_C TInt Format(TInt64 aPos,TInt aLength);
       
   578 	IMPORT_C TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMessageHandle);
       
   579 	IMPORT_C TInt ForceRemount(TUint aFlags=0);
       
   580 	IMPORT_C TInt ControlIO(TInt aCommand, TAny* aParam1, TAny* aParam2);
       
   581 
       
   582 	IMPORT_C TInt Unlock(const TDesC8& aPassword, TBool aStorePassword);
       
   583 	IMPORT_C TInt SetPassword(const TDesC8& aOldPassword, const TDesC8& aNewPassword, TBool aStorePassword);
       
   584 	IMPORT_C TInt Clear(const TDesC8& aPassword);
       
   585 	IMPORT_C TInt ErasePassword();
       
   586 	IMPORT_C TInt ReadPasswordData(TDes8 &aBuf);
       
   587 	IMPORT_C TInt WritePasswordData(const TDesC8 &aBuf);
       
   588 	IMPORT_C TInt PasswordStoreLengthInBytes();
       
   589 	IMPORT_C TInt DeleteNotify(TInt64 aPos, TInt aLength);
       
   590 	IMPORT_C TInt GetLastErrorInfo(TDes8& aErrorInfo);
       
   591 public:
       
   592 	inline TInt& Status() {return(iStatus);}
       
   593 private:
       
   594 	TInt CheckMount();
       
   595 private:
       
   596 	TInt iStatus;
       
   597 	};
       
   598 #endif
       
   599 
       
   600 #define _LOCKABLE_MEDIA
       
   601 
       
   602 #include <d32locd.inl>
       
   603 #endif
       
   604