sl@0: // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\d32locd.h sl@0: // sl@0: // WARNING: This file contains some APIs which are internal and are subject sl@0: // to change without notice. Such APIs should therefore not be used sl@0: // outside the Kernel and Hardware Services package. sl@0: // sl@0: sl@0: #ifndef __D32LOCD_H__ sl@0: #define __D32LOCD_H__ sl@0: #include sl@0: #include sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Local media IDs. sl@0: sl@0: A media ID is passed to LocDrv::RegisterMediaDevice() when registering sl@0: a media driver with the local media subsystem. sl@0: */ sl@0: enum TMediaDevice { EFixedMedia0, EFixedMedia1, EFixedMedia2, EFixedMedia3, sl@0: EFixedMedia4, EFixedMedia5, EFixedMedia6, EFixedMedia7, sl@0: ERemovableMedia0, ERemovableMedia1, ERemovableMedia2, ERemovableMedia3, sl@0: EInvalidMedia sl@0: }; sl@0: sl@0: #define __IS_REMOVABLE(aDevice) (aDevice>=ERemovableMedia0 && aDevice<=ERemovableMedia3) sl@0: #define __IS_FIXED(aDevice) ((TUint)aDevice<=EFixedMedia7) sl@0: #define MEDIA_DEVICE_IRAM EFixedMedia0 sl@0: #define MEDIA_DEVICE_LFFS EFixedMedia1 sl@0: #define MEDIA_DEVICE_NAND EFixedMedia2 sl@0: #define MEDIA_DEVICE_MMC ERemovableMedia0 sl@0: #define MEDIA_DEVICE_PCCARD ERemovableMedia1 sl@0: #define MEDIA_DEVICE_CSA ERemovableMedia2 sl@0: sl@0: typedef signed int TSocket; sl@0: sl@0: class TLDriveAssignInfo sl@0: /** sl@0: No longer used sl@0: @internalComponent sl@0: @removed sl@0: */ sl@0: { sl@0: public: sl@0: TMediaDevice iDevice; sl@0: TInt iPriority; sl@0: }; sl@0: sl@0: class TMediaDeviceAssignInfo sl@0: /** sl@0: No longer used sl@0: @internalComponent sl@0: @removed sl@0: */ sl@0: { sl@0: public: sl@0: TInt iFirstMedia; sl@0: TInt iLastMedia; sl@0: }; sl@0: sl@0: class TLocalDriveCaps sl@0: /** sl@0: Drives media capabilities fields sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: { sl@0: public: sl@0: IMPORT_C TLocalDriveCaps(); sl@0: public: sl@0: /** sl@0: Size of drive sl@0: sl@0: Note : This is the size of the partition, not the entire media. sl@0: The entire media size can be obtained from TLocalDriveCapsV4::MediaSizeInBytes() sl@0: */ sl@0: TInt64 iSize; sl@0: /** sl@0: Media Type of drive sl@0: */ sl@0: TMediaType iType; sl@0: /** sl@0: Connection type used to interface to the media sl@0: */ sl@0: TConnectionBusType iConnectionBusType; sl@0: /** sl@0: Attributes of the drive sl@0: */ sl@0: TUint iDriveAtt; sl@0: /** sl@0: Attributes of underlying media sl@0: */ sl@0: TUint iMediaAtt; sl@0: /** sl@0: Base address of media sl@0: */ sl@0: TUint8* iBaseAddress; sl@0: /** sl@0: Identity of the file system used for this media sl@0: */ sl@0: TUint16 iFileSystemId; sl@0: /** sl@0: Partition type of media sl@0: */ sl@0: TUint16 iPartitionType; sl@0: }; sl@0: typedef TPckgBuf TLocalDriveCapsBuf; sl@0: // sl@0: class TLocalDriveCapsV2 : public TLocalDriveCaps sl@0: /** sl@0: Extension to Capabilities fields mainly to support Nor flash sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: { sl@0: public: sl@0: /** sl@0: Number of hidden sectors on drive sl@0: */ sl@0: TUint iHiddenSectors; sl@0: /** sl@0: Size of erase unit on media sl@0: */ sl@0: TUint iEraseBlockSize; sl@0: }; sl@0: typedef TPckgBuf TLocalDriveCapsV2Buf; sl@0: // sl@0: sl@0: sl@0: sl@0: /** sl@0: This class is used to provide file system-specific parameters for media formatting. sl@0: @see TInt RFormat::Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo);" sl@0: sl@0: For example, for FAT file system it is possible to specify FAT type(12/16/32), sl@0: cluster size, number of FATs and number of reserved sectors. Note that not all sl@0: combinations of custom parameters can be compatible; some media types, like SD sl@0: can reject formatting with user-defined parameters. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: sl@0: */ sl@0: class TLDFormatInfo sl@0: { sl@0: public: sl@0: inline TLDFormatInfo(); sl@0: public: sl@0: sl@0: TInt64 iCapacity; ///< Format Capacity sl@0: TUint16 iSectorsPerCluster; ///< Specified sectors per cluster sl@0: TUint16 iSectorsPerTrack; ///< Specified sectors per track sl@0: TUint16 iNumberOfSides; ///< Specified number of sides sl@0: sl@0: enum TFATBits {EFBDontCare, EFB12 = 12, EFB16 = 16, EFB32 = 32}; sl@0: TFATBits iFATBits; ///< Specified bits per fat table entry sl@0: sl@0: TUint16 iReservedSectors; ///< Reserved sector count, required for SD card compliance sl@0: sl@0: // Flags field. Allows the number of FAT tables to be specified: set both bits to zero to use the default. sl@0: enum TFlags {EOneFatTable = 0x01, ETwoFatTables = 0x02}; sl@0: TUint8 iFlags; sl@0: sl@0: TUint8 iPad; ///< Padding for offset alignment between kernel and user code sl@0: sl@0: }; sl@0: typedef TPckgBuf TSpecialFormatInfoBuf; sl@0: sl@0: sl@0: // sl@0: class TLocalDriveCapsV3 : public TLocalDriveCapsV2 sl@0: /** sl@0: Extension to Capabilities fields mainly to support removable media format specifications sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: { sl@0: public: sl@0: /** sl@0: Format specification sl@0: */ sl@0: TLDFormatInfo iFormatInfo; sl@0: /** sl@0: Set if iFormatInfo is valid sl@0: */ sl@0: TBool iExtraInfo; sl@0: /** sl@0: */ sl@0: TInt iMaxBytesPerFormat; sl@0: }; sl@0: //The following ASSERTs checks for offset of any TInt64 member be a multiple of 8 as per DEF045510 sl@0: __ASSERT_COMPILE(_FOFF(TLocalDriveCaps,iSize)%8 == 0); sl@0: __ASSERT_COMPILE(_FOFF(TLocalDriveCapsV3,iFormatInfo.iCapacity) % 8 == 0); sl@0: sl@0: sl@0: typedef TPckgBuf TLocalDriveCapsV3Buf; sl@0: // sl@0: class TLocalDriveCapsV4 : public TLocalDriveCapsV3 sl@0: /** sl@0: Extension to Capabilities fields mainly to support Nand flash sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: { sl@0: public: sl@0: union sl@0: { sl@0: /** sl@0: Number of blocks (for NAND flash) sl@0: - The entire capacity of NAND media can be calculated using: sl@0: capacity = iNumOfBlocks * iNumPagesPerBlock * iNumBytesMain sl@0: */ sl@0: TInt iNumOfBlocks; sl@0: /** sl@0: Number of sectors (for other types of media) sl@0: - The entire capacity of sector based media can be calculated using: sl@0: capacity = iNumberOfSectors * iSectorSizeInBytes sl@0: */ sl@0: TUint32 iNumberOfSectors; sl@0: }; sl@0: sl@0: /** sl@0: Number of pages per block sl@0: */ sl@0: TInt iNumPagesPerBlock; sl@0: sl@0: union sl@0: { sl@0: /** sl@0: Number of Bytes in the main array (for NAND flash) sl@0: - The entire capacity of NAND media can be calculated using: sl@0: capacity = iNumOfBlocks * iNumPagesPerBlock * iNumBytesMain sl@0: */ sl@0: TInt iNumBytesMain; sl@0: /** sl@0: Number of Bytes in a sector (for other types of media) sl@0: - The entire capacity of sector based media can be calculated using: sl@0: capacity = iNumberOfSectors * iSectorSizeInBytes sl@0: */ sl@0: TUint32 iSectorSizeInBytes; sl@0: }; sl@0: sl@0: /** sl@0: Number of Bytes in the spare array sl@0: */ sl@0: TInt iNumBytesSpare; sl@0: /** sl@0: Effective usable blocks sl@0: */ sl@0: TInt iEffectiveBlks; sl@0: /** sl@0: Start page of drive sl@0: */ sl@0: TInt iStartPage; sl@0: public: sl@0: inline TInt64 MediaSizeInBytes(); sl@0: }; sl@0: typedef TPckgBuf TLocalDriveCapsV4Buf; sl@0: // sl@0: class TLocalDriveCapsV5 : public TLocalDriveCapsV4 sl@0: /** sl@0: Add serial number support for certain media. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: { sl@0: public: sl@0: /** sl@0: Serial number buffer length, 0 if not supported sl@0: */ sl@0: TUint iSerialNumLength; sl@0: /** sl@0: Serial number buffer sl@0: */ sl@0: TUint8 iSerialNum[KMaxSerialNumLength]; sl@0: }; sl@0: typedef TPckgBuf TLocalDriveCapsV5Buf; sl@0: sl@0: // sl@0: /** sl@0: Extension to Capabilities fields mainly to support reporting block size sl@0: information of underlying media. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class TLocalDriveCapsV6 : public TLocalDriveCapsV5 sl@0: { sl@0: public: sl@0: /** sl@0: Block size information of underlying media is required to assist in chosing sl@0: efficient size of buffers for reading and writing. sl@0: This information can also be accessed through the function sl@0: - RFs::VolumeIOParam sl@0: sl@0: These functions retrieve this blocksize information by calling the media sl@0: driver's Caps() function. sl@0: */ sl@0: TUint iBlockSize; sl@0: sl@0: private: sl@0: /** sl@0: Reserved space for future use. sl@0: */ sl@0: TUint32 iSpare[4]; sl@0: }; sl@0: typedef TPckgBuf TLocalDriveCapsV6Buf; sl@0: sl@0: sl@0: class TLocalDriveCapsV7 : public TLocalDriveCapsV6 sl@0: /** sl@0: Add control mode, object mode, partition size for M18 NOR Flash. sl@0: */ sl@0: { sl@0: public: sl@0: TUint32 iWriteBufferSize; sl@0: TUint32 iPartitionSize; sl@0: TUint32 iControlModeSize; sl@0: TUint32 iObjectModeSize; sl@0: }; sl@0: sl@0: typedef TPckgBuf TLocalDriveCapsV7Buf; sl@0: sl@0: // sl@0: class TFormatInfo sl@0: /** sl@0: Format information class sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: { sl@0: public: sl@0: IMPORT_C TFormatInfo(); sl@0: public: sl@0: TBool iFormatIsCurrent; sl@0: TInt i512ByteSectorsFormatted; sl@0: TInt iMaxBytesPerFormat; sl@0: }; sl@0: // sl@0: class TErrorInfo sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: enum TReasonCode sl@0: { sl@0: ENoError=0, //No error sl@0: EBadSector=1, //Error due to corrupt sector sl@0: }; sl@0: public: sl@0: TReasonCode iReasonCode; sl@0: union sl@0: { sl@0: // holds position error occurred for KErrCorrupt sl@0: // It numerically equals number of bytes succesfully read/written during sl@0: // last disk operation. sl@0: TInt64 iErrorPos; sl@0: TInt iOtherInfo; sl@0: }; sl@0: }; sl@0: typedef TPckgBuf TErrorInfoBuf; sl@0: // sl@0: class TLocalDriveMessageData sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: inline TLocalDriveMessageData() sl@0: {} sl@0: inline TLocalDriveMessageData(TInt64 aPos, TInt aLength, const TAny* aPtr, TInt aHandle, TInt anOffset, TInt aFlags) sl@0: : iPos(aPos), iLength(aLength), iPtr(aPtr), iHandle(aHandle), iOffset(anOffset), iFlags(aFlags) sl@0: {} sl@0: public: sl@0: TInt64 iPos; sl@0: TInt iLength; sl@0: const TAny* iPtr; sl@0: TInt iHandle; sl@0: TInt iOffset; sl@0: TInt iFlags; sl@0: }; sl@0: sl@0: class TLocalDriveControlIOData sl@0: /** sl@0: Control IO data class sl@0: sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: inline TLocalDriveControlIOData() sl@0: {} sl@0: inline TLocalDriveControlIOData(TInt aCommand, TAny* aParam1, TAny* aParam2, TInt aHandle) sl@0: : iCommand(aCommand), iParam1(aParam1), iParam2(aParam2), iHandle(aHandle) sl@0: {} sl@0: inline TLocalDriveControlIOData(TInt aCommand, TUint8* aBuf, TInt aParam, TInt aLength) sl@0: : iCommand(aCommand), iParam1(aBuf), iParam2((TAny*) aParam), iHandle(aLength) sl@0: {} sl@0: public: sl@0: TInt iCommand; sl@0: TAny* iParam1; sl@0: TAny* iParam2; sl@0: TInt iHandle; sl@0: }; sl@0: sl@0: class TLocalDrivePasswordData sl@0: /** sl@0: Password store for password protected media sl@0: sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: TLocalDrivePasswordData(const TDesC8& aOldPasswd, const TDesC8& aNewPasswd, TBool aStorePasswd) sl@0: : iOldPasswd(&aOldPasswd), iNewPasswd(&aNewPasswd), iStorePasswd(aStorePasswd) sl@0: {} sl@0: TLocalDrivePasswordData() sl@0: : iOldPasswd(&KNullDesC8), iNewPasswd(&KNullDesC8), iStorePasswd(EFalse) sl@0: {} sl@0: public: sl@0: const TDesC8 *iOldPasswd; sl@0: const TDesC8 *iNewPasswd; sl@0: TBool iStorePasswd; sl@0: }; sl@0: typedef TPckgBuf TLocalDrivePasswordDataPckg; sl@0: sl@0: sl@0: class TPasswordStore sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: virtual TInt Init()=0; sl@0: virtual TInt ReadPasswordData(TDes8 &aBuf)=0; sl@0: virtual TInt WritePasswordData(TDesC8 &aBuf)=0; sl@0: virtual TInt PasswordStoreLengthInBytes()=0; sl@0: enum {EMaxPasswordLength=1024}; /**< Size of the password store write buffer, which may contain multiple password mappings */ sl@0: }; sl@0: sl@0: class TMountInfoData sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: TDesC8* iInfo; sl@0: TAny* iThread; sl@0: }; sl@0: sl@0: sl@0: const TInt KLocalDriveMajorVersion=1; sl@0: const TInt KLocalDriveMinorVersion=0; sl@0: const TInt KLocalDriveBuildVersion=160; sl@0: _LIT(KLitLocalDriveLddName,"LocDrv"); sl@0: sl@0: const TInt KLocalMessageHandle=-1; sl@0: sl@0: sl@0: enum TMediaPagingStats sl@0: { sl@0: EMediaPagingStatsAll, sl@0: EMediaPagingStatsRomAndCode = EMediaPagingStatsAll, // @deprecated - use EMediaPagingStatsAll instead sl@0: EMediaPagingStatsRom, sl@0: EMediaPagingStatsCode, sl@0: EMediaPagingStatsDataIn, sl@0: EMediaPagingStatsDataOut, sl@0: }; sl@0: sl@0: /** sl@0: Paging media details - for testing purposes only sl@0: This is a structure used to communicate paging-related information sl@0: from the paging media driver to an application. sl@0: sl@0: @internalTechnology sl@0: @prototype sl@0: */ sl@0: class TPageDeviceInfo sl@0: { sl@0: public: sl@0: TInt iReservoirBlockCount; // number of blocks in replacement reservoir (used & unused) sl@0: TInt iBadBlockCount; // numer of bad blocks sl@0: }; sl@0: typedef TPckgBuf TPageDeviceInfoBuf; sl@0: sl@0: class RLocalDrive : public RBusLogicalChannel sl@0: /** sl@0: Interface class to local media sl@0: sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: enum TControl sl@0: { sl@0: EControlRead=0, /**< Read request */ sl@0: EControlWrite=1, /**< Write request */ sl@0: EControlCaps=2, /**< Caps request */ sl@0: EControlFormat=3, /**< Format request */ sl@0: EControlEnlarge=4, /**< Enlarge drive request */ sl@0: EControlReduce=5, /**< Reduce Drive request */ sl@0: EControlForceMediaChange=6, /**< Force media change request */ sl@0: EControlMediaDevice=7, /**< Return the media device request */ sl@0: EControlPasswordLock=8, /**< Password lock media request */ sl@0: EControlPasswordUnlock=9, /**< Password unlock media request */ sl@0: EControlPasswordClear=10, /**< Password clear request */ sl@0: EControlNotifyChange=11, /**< Notify change request */ sl@0: EControlNotifyChangeCancel=12, /**< Notify change cancel request */ sl@0: EControlReadPasswordStore=13, /**< Read password request */ sl@0: EControlWritePasswordStore=14, /**< Write password request */ sl@0: EControlPasswordStoreLengthInBytes=15, /**< Password request */ sl@0: EControlIsRemovable=16, /**< Query removable request */ sl@0: EControlSetMountInfo=17, /**< Set mount info request */ sl@0: EControlControlIO=18, /**< Control IO request */ sl@0: EControlPasswordErase=19, /**< Password erase media request */ sl@0: EControlDeleteNotify=20, /**< Delete notification */ sl@0: EControlGetLastErrorInfo=21, /**< Get last error info request */ sl@0: EControlQueryDevice=22, /**< Query device request*/ sl@0: }; sl@0: sl@0: enum TRemountFlags sl@0: { sl@0: ELocDrvRemountNotifyChange = 0, /**< Notify clients of media change but don't remount */ sl@0: ELocDrvRemountForceMediaChange = 1, /**< Notify clients of media change and remount */ sl@0: }; sl@0: sl@0: enum TReadWriteFlags sl@0: { sl@0: ELocDrvMetaData = 0x80000000, /**< Set if read/write request is for metadata */ sl@0: ELocDrvWholeMedia = 0x40000000 /**< Set to access whole media, rather than partition */ sl@0: }; sl@0: sl@0: enum TQueryDevice sl@0: { sl@0: // Symbian publishedPartner range sl@0: EQuerySymbianPublishedPartnerFirst = 0x0000, sl@0: EQuerySymbianPublishedPartnerLast = 0x3FFF, sl@0: sl@0: // Symbian test range sl@0: EQuerySymbianTestFirst = 0x4000, sl@0: EQuerySymbianTestLast = 0x7FFF, sl@0: sl@0: // Licensee range sl@0: EQueryLicenseeFirst = 0x8000, sl@0: EQueryLicenseeLast = 0xBFFF, sl@0: sl@0: EQueryPageDeviceInfo = EQuerySymbianTestFirst, /**< @see TPageDeviceInfo */ sl@0: }; sl@0: public: sl@0: inline TVersion VersionRequired() const; sl@0: inline TInt Connect(TInt aDriveNumber, TBool& aChangedFlag); sl@0: inline TInt Enlarge(TInt aLength); sl@0: inline TInt Reduce(TInt aPos, TInt aLength); sl@0: inline TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aMessageHandle, TInt aOffset, TInt aFlags); sl@0: inline TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aMessageHandle, TInt anOffset); sl@0: inline TInt Read(TInt64 aPos, TInt aLength, TDes8& aTrg); sl@0: inline TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aMessageHandle, TInt aOffset, TInt aFlags); sl@0: inline TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aMessageHandle, TInt anOffset); sl@0: inline TInt Write(TInt64 aPos, const TDesC8& aSrc); sl@0: inline TInt Caps(TDes8& anInfo); sl@0: inline TInt Format(TInt64 aPos, TInt aLength); sl@0: inline TInt ForceMediaChange(TInt aMode=0); sl@0: inline void NotifyChange(TRequestStatus* aStatus); sl@0: inline void NotifyChangeCancel(); sl@0: inline TInt SetMountInfo(const TDesC8* aInfo,TInt aMessageHandle); sl@0: inline TMediaDevice MediaDevice(); sl@0: inline TInt IsRemovable(TInt& aSocketNum); sl@0: inline TInt ControlIO(TInt aCommand, TAny* aParam1, TAny* aParam2); sl@0: inline TInt ControlIO(TInt aCommand, TDes8& aBuf, TInt aParam); sl@0: inline TInt ControlIO(TInt aCommand, TDesC8& aBuf, TInt aParam); sl@0: inline TInt ControlIO(TInt aCommand, TInt aParam1, TInt aParam2); sl@0: inline TInt Unlock(const TDesC8& aPassword, TBool aStorePassword); sl@0: inline TInt SetPassword(const TDesC8& aOldPassword, const TDesC8& aNewPassword, TBool aStorePassword); sl@0: inline TInt Clear(const TDesC8& aPassword); sl@0: inline TInt ErasePassword(); sl@0: inline TInt ReadPasswordData(TDesC8& aStoreData); sl@0: inline TInt WritePasswordData(const TDesC8& aStoreData); sl@0: inline TInt PasswordStoreLengthInBytes(); sl@0: inline TInt DeleteNotify(TInt64 aPos, TInt aLength); sl@0: inline TInt GetLastErrorInfo(TDesC8& aErrorInfo); sl@0: inline TInt QueryDevice(TQueryDevice aQueryDevice, TDes8 &aBuf); sl@0: }; sl@0: // sl@0: #ifndef __KERNEL_MODE__ sl@0: class TBusLocalDrive : public RLocalDrive sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: { sl@0: public: sl@0: IMPORT_C TBusLocalDrive(); sl@0: IMPORT_C TInt Connect(TInt aDriveNumber, TBool& aChangedFlag); sl@0: IMPORT_C void Disconnect(); sl@0: IMPORT_C TInt Enlarge(TInt aLength); sl@0: IMPORT_C TInt ReduceSize(TInt aPos, TInt aLength); sl@0: IMPORT_C TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aMessageHandle,TInt aOffset,TInt aFlags); sl@0: IMPORT_C TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aMessageHandle,TInt anOffset); sl@0: IMPORT_C TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg); sl@0: IMPORT_C TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aMessageHandle,TInt aOffset,TInt aFlags); sl@0: IMPORT_C TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aMessageHandle,TInt anOffset); sl@0: IMPORT_C TInt Write(TInt64 aPos,const TDesC8& aSrc); sl@0: IMPORT_C TInt Caps(TDes8& anInfo); sl@0: IMPORT_C TInt Format(TFormatInfo& anInfo); sl@0: IMPORT_C TInt Format(TInt64 aPos,TInt aLength); sl@0: IMPORT_C TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMessageHandle); sl@0: IMPORT_C TInt ForceRemount(TUint aFlags=0); sl@0: IMPORT_C TInt ControlIO(TInt aCommand, TAny* aParam1, TAny* aParam2); sl@0: IMPORT_C TInt ControlIO(TInt aCommand, TDes8& aBuf, TInt aParam); sl@0: IMPORT_C TInt ControlIO(TInt aCommand, TDesC8& aBuf, TInt aParam); sl@0: IMPORT_C TInt ControlIO(TInt aCommand, TInt aParam1, TInt aParam2); sl@0: sl@0: IMPORT_C TInt Unlock(const TDesC8& aPassword, TBool aStorePassword); sl@0: IMPORT_C TInt SetPassword(const TDesC8& aOldPassword, const TDesC8& aNewPassword, TBool aStorePassword); sl@0: IMPORT_C TInt Clear(const TDesC8& aPassword); sl@0: IMPORT_C TInt ErasePassword(); sl@0: IMPORT_C TInt ReadPasswordData(TDes8 &aBuf); sl@0: IMPORT_C TInt WritePasswordData(const TDesC8 &aBuf); sl@0: IMPORT_C TInt PasswordStoreLengthInBytes(); sl@0: IMPORT_C TInt DeleteNotify(TInt64 aPos, TInt aLength); sl@0: IMPORT_C TInt GetLastErrorInfo(TDes8& aErrorInfo); sl@0: sl@0: IMPORT_C TInt QueryDevice(TQueryDevice aQueryDevice, TDes8 &aBuf); sl@0: sl@0: public: sl@0: inline TInt& Status() {return(iStatus);} sl@0: private: sl@0: TInt CheckMount(); sl@0: private: sl@0: TInt iStatus; sl@0: }; sl@0: #endif sl@0: sl@0: #define _LOCKABLE_MEDIA sl@0: sl@0: #include sl@0: #endif sl@0: