1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/include/d32locd.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,660 @@
1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32\include\d32locd.h
1.18 +//
1.19 +// WARNING: This file contains some APIs which are internal and are subject
1.20 +// to change without notice. Such APIs should therefore not be used
1.21 +// outside the Kernel and Hardware Services package.
1.22 +//
1.23 +
1.24 +#ifndef __D32LOCD_H__
1.25 +#define __D32LOCD_H__
1.26 +#include <e32cmn.h>
1.27 +#include <partitions.h>
1.28 +
1.29 +
1.30 +/**
1.31 +@publishedPartner
1.32 +@released
1.33 +
1.34 +Local media IDs.
1.35 +
1.36 +A media ID is passed to LocDrv::RegisterMediaDevice() when registering
1.37 +a media driver with the local media subsystem.
1.38 +*/
1.39 +enum TMediaDevice { EFixedMedia0, EFixedMedia1, EFixedMedia2, EFixedMedia3,
1.40 + EFixedMedia4, EFixedMedia5, EFixedMedia6, EFixedMedia7,
1.41 + ERemovableMedia0, ERemovableMedia1, ERemovableMedia2, ERemovableMedia3,
1.42 + EInvalidMedia
1.43 + };
1.44 +
1.45 +#define __IS_REMOVABLE(aDevice) (aDevice>=ERemovableMedia0 && aDevice<=ERemovableMedia3)
1.46 +#define __IS_FIXED(aDevice) ((TUint)aDevice<=EFixedMedia7)
1.47 +#define MEDIA_DEVICE_IRAM EFixedMedia0
1.48 +#define MEDIA_DEVICE_LFFS EFixedMedia1
1.49 +#define MEDIA_DEVICE_NAND EFixedMedia2
1.50 +#define MEDIA_DEVICE_MMC ERemovableMedia0
1.51 +#define MEDIA_DEVICE_PCCARD ERemovableMedia1
1.52 +#define MEDIA_DEVICE_CSA ERemovableMedia2
1.53 +
1.54 +typedef signed int TSocket;
1.55 +
1.56 +class TLDriveAssignInfo
1.57 +/**
1.58 +No longer used
1.59 +@internalComponent
1.60 +@removed
1.61 +*/
1.62 + {
1.63 +public:
1.64 + TMediaDevice iDevice;
1.65 + TInt iPriority;
1.66 + };
1.67 +
1.68 +class TMediaDeviceAssignInfo
1.69 +/**
1.70 +No longer used
1.71 +@internalComponent
1.72 +@removed
1.73 +*/
1.74 + {
1.75 +public:
1.76 + TInt iFirstMedia;
1.77 + TInt iLastMedia;
1.78 + };
1.79 +
1.80 +class TLocalDriveCaps
1.81 +/**
1.82 +Drives media capabilities fields
1.83 +
1.84 +@publishedPartner
1.85 +@released
1.86 +*/
1.87 + {
1.88 +public:
1.89 + IMPORT_C TLocalDriveCaps();
1.90 +public:
1.91 + /**
1.92 + Size of drive
1.93 +
1.94 + Note : This is the size of the partition, not the entire media.
1.95 + The entire media size can be obtained from TLocalDriveCapsV4::MediaSizeInBytes()
1.96 + */
1.97 + TInt64 iSize;
1.98 + /**
1.99 + Media Type of drive
1.100 + */
1.101 + TMediaType iType;
1.102 + /**
1.103 + Connection type used to interface to the media
1.104 + */
1.105 + TConnectionBusType iConnectionBusType;
1.106 + /**
1.107 + Attributes of the drive
1.108 + */
1.109 + TUint iDriveAtt;
1.110 + /**
1.111 + Attributes of underlying media
1.112 + */
1.113 + TUint iMediaAtt;
1.114 + /**
1.115 + Base address of media
1.116 + */
1.117 + TUint8* iBaseAddress;
1.118 + /**
1.119 + Identity of the file system used for this media
1.120 + */
1.121 + TUint16 iFileSystemId;
1.122 + /**
1.123 + Partition type of media
1.124 + */
1.125 + TUint16 iPartitionType;
1.126 + };
1.127 +typedef TPckgBuf<TLocalDriveCaps> TLocalDriveCapsBuf;
1.128 +//
1.129 +class TLocalDriveCapsV2 : public TLocalDriveCaps
1.130 +/**
1.131 +Extension to Capabilities fields mainly to support Nor flash
1.132 +
1.133 +@publishedPartner
1.134 +@released
1.135 +*/
1.136 + {
1.137 +public:
1.138 + /**
1.139 + Number of hidden sectors on drive
1.140 + */
1.141 + TUint iHiddenSectors;
1.142 + /**
1.143 + Size of erase unit on media
1.144 + */
1.145 + TUint iEraseBlockSize;
1.146 + };
1.147 +typedef TPckgBuf<TLocalDriveCapsV2> TLocalDriveCapsV2Buf;
1.148 +//
1.149 +
1.150 +
1.151 +
1.152 +/**
1.153 +This class is used to provide file system-specific parameters for media formatting.
1.154 +@see TInt RFormat::Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount, const TDesC8 &anInfo);"
1.155 +
1.156 +For example, for FAT file system it is possible to specify FAT type(12/16/32),
1.157 +cluster size, number of FATs and number of reserved sectors. Note that not all
1.158 +combinations of custom parameters can be compatible; some media types, like SD
1.159 +can reject formatting with user-defined parameters.
1.160 +
1.161 +@publishedPartner
1.162 +@released
1.163 +
1.164 +*/
1.165 +class TLDFormatInfo
1.166 + {
1.167 +public:
1.168 + inline TLDFormatInfo();
1.169 +public:
1.170 +
1.171 + TInt64 iCapacity; ///< Format Capacity
1.172 + TUint16 iSectorsPerCluster; ///< Specified sectors per cluster
1.173 + TUint16 iSectorsPerTrack; ///< Specified sectors per track
1.174 + TUint16 iNumberOfSides; ///< Specified number of sides
1.175 +
1.176 + enum TFATBits {EFBDontCare, EFB12 = 12, EFB16 = 16, EFB32 = 32};
1.177 + TFATBits iFATBits; ///< Specified bits per fat table entry
1.178 +
1.179 + TUint16 iReservedSectors; ///< Reserved sector count, required for SD card compliance
1.180 +
1.181 + // Flags field. Allows the number of FAT tables to be specified: set both bits to zero to use the default.
1.182 + enum TFlags {EOneFatTable = 0x01, ETwoFatTables = 0x02};
1.183 + TUint8 iFlags;
1.184 +
1.185 + TUint8 iPad; ///< Padding for offset alignment between kernel and user code
1.186 +
1.187 + };
1.188 +typedef TPckgBuf<TLDFormatInfo> TSpecialFormatInfoBuf;
1.189 +
1.190 +
1.191 +//
1.192 +class TLocalDriveCapsV3 : public TLocalDriveCapsV2
1.193 +/**
1.194 +Extension to Capabilities fields mainly to support removable media format specifications
1.195 +
1.196 +@publishedPartner
1.197 +@released
1.198 +*/
1.199 + {
1.200 +public:
1.201 + /**
1.202 + Format specification
1.203 + */
1.204 + TLDFormatInfo iFormatInfo;
1.205 + /**
1.206 + Set if iFormatInfo is valid
1.207 + */
1.208 + TBool iExtraInfo;
1.209 + /**
1.210 + */
1.211 + TInt iMaxBytesPerFormat;
1.212 + };
1.213 +//The following ASSERTs checks for offset of any TInt64 member be a multiple of 8 as per DEF045510
1.214 +__ASSERT_COMPILE(_FOFF(TLocalDriveCaps,iSize)%8 == 0);
1.215 +__ASSERT_COMPILE(_FOFF(TLocalDriveCapsV3,iFormatInfo.iCapacity) % 8 == 0);
1.216 +
1.217 +
1.218 +typedef TPckgBuf<TLocalDriveCapsV3> TLocalDriveCapsV3Buf;
1.219 +//
1.220 +class TLocalDriveCapsV4 : public TLocalDriveCapsV3
1.221 +/**
1.222 +Extension to Capabilities fields mainly to support Nand flash
1.223 +
1.224 +@publishedPartner
1.225 +@released
1.226 +*/
1.227 + {
1.228 +public:
1.229 + union
1.230 + {
1.231 + /**
1.232 + Number of blocks (for NAND flash)
1.233 + - The entire capacity of NAND media can be calculated using:
1.234 + capacity = iNumOfBlocks * iNumPagesPerBlock * iNumBytesMain
1.235 + */
1.236 + TInt iNumOfBlocks;
1.237 + /**
1.238 + Number of sectors (for other types of media)
1.239 + - The entire capacity of sector based media can be calculated using:
1.240 + capacity = iNumberOfSectors * iSectorSizeInBytes
1.241 + */
1.242 + TUint32 iNumberOfSectors;
1.243 + };
1.244 +
1.245 + /**
1.246 + Number of pages per block
1.247 + */
1.248 + TInt iNumPagesPerBlock;
1.249 +
1.250 + union
1.251 + {
1.252 + /**
1.253 + Number of Bytes in the main array (for NAND flash)
1.254 + - The entire capacity of NAND media can be calculated using:
1.255 + capacity = iNumOfBlocks * iNumPagesPerBlock * iNumBytesMain
1.256 + */
1.257 + TInt iNumBytesMain;
1.258 + /**
1.259 + Number of Bytes in a sector (for other types of media)
1.260 + - The entire capacity of sector based media can be calculated using:
1.261 + capacity = iNumberOfSectors * iSectorSizeInBytes
1.262 + */
1.263 + TUint32 iSectorSizeInBytes;
1.264 + };
1.265 +
1.266 + /**
1.267 + Number of Bytes in the spare array
1.268 + */
1.269 + TInt iNumBytesSpare;
1.270 + /**
1.271 + Effective usable blocks
1.272 + */
1.273 + TInt iEffectiveBlks;
1.274 + /**
1.275 + Start page of drive
1.276 + */
1.277 + TInt iStartPage;
1.278 +public:
1.279 + inline TInt64 MediaSizeInBytes();
1.280 + };
1.281 +typedef TPckgBuf<TLocalDriveCapsV4> TLocalDriveCapsV4Buf;
1.282 +//
1.283 +class TLocalDriveCapsV5 : public TLocalDriveCapsV4
1.284 +/**
1.285 +Add serial number support for certain media.
1.286 +
1.287 +@publishedPartner
1.288 +@released
1.289 +*/
1.290 + {
1.291 +public:
1.292 + /**
1.293 + Serial number buffer length, 0 if not supported
1.294 + */
1.295 + TUint iSerialNumLength;
1.296 + /**
1.297 + Serial number buffer
1.298 + */
1.299 + TUint8 iSerialNum[KMaxSerialNumLength];
1.300 + };
1.301 +typedef TPckgBuf<TLocalDriveCapsV5> TLocalDriveCapsV5Buf;
1.302 +
1.303 +//
1.304 +/**
1.305 +Extension to Capabilities fields mainly to support reporting block size
1.306 +information of underlying media.
1.307 +
1.308 +@publishedPartner
1.309 +@released
1.310 +*/
1.311 +class TLocalDriveCapsV6 : public TLocalDriveCapsV5
1.312 + {
1.313 +public:
1.314 + /**
1.315 + Block size information of underlying media is required to assist in chosing
1.316 + efficient size of buffers for reading and writing.
1.317 + This information can also be accessed through the function
1.318 + - RFs::VolumeIOParam
1.319 +
1.320 + These functions retrieve this blocksize information by calling the media
1.321 + driver's Caps() function.
1.322 + */
1.323 + TUint iBlockSize;
1.324 +
1.325 +private:
1.326 + /**
1.327 + Reserved space for future use.
1.328 + */
1.329 + TUint32 iSpare[4];
1.330 + };
1.331 +typedef TPckgBuf<TLocalDriveCapsV6> TLocalDriveCapsV6Buf;
1.332 +
1.333 +
1.334 +class TLocalDriveCapsV7 : public TLocalDriveCapsV6
1.335 +/**
1.336 +Add control mode, object mode, partition size for M18 NOR Flash.
1.337 +*/
1.338 + {
1.339 +public:
1.340 + TUint32 iWriteBufferSize;
1.341 + TUint32 iPartitionSize;
1.342 + TUint32 iControlModeSize;
1.343 + TUint32 iObjectModeSize;
1.344 + };
1.345 +
1.346 +typedef TPckgBuf<TLocalDriveCapsV7> TLocalDriveCapsV7Buf;
1.347 +
1.348 +//
1.349 +class TFormatInfo
1.350 +/**
1.351 +Format information class
1.352 +
1.353 +@publishedPartner
1.354 +@released
1.355 +*/
1.356 + {
1.357 +public:
1.358 + IMPORT_C TFormatInfo();
1.359 +public:
1.360 + TBool iFormatIsCurrent;
1.361 + TInt i512ByteSectorsFormatted;
1.362 + TInt iMaxBytesPerFormat;
1.363 + };
1.364 +//
1.365 +class TErrorInfo
1.366 +/**
1.367 +@internalTechnology
1.368 + */
1.369 + {
1.370 +public:
1.371 + enum TReasonCode
1.372 + {
1.373 + ENoError=0, //No error
1.374 + EBadSector=1, //Error due to corrupt sector
1.375 + };
1.376 +public:
1.377 + TReasonCode iReasonCode;
1.378 + union
1.379 + {
1.380 + // holds position error occurred for KErrCorrupt
1.381 + // It numerically equals number of bytes succesfully read/written during
1.382 + // last disk operation.
1.383 + TInt64 iErrorPos;
1.384 + TInt iOtherInfo;
1.385 + };
1.386 + };
1.387 +typedef TPckgBuf<TErrorInfo> TErrorInfoBuf;
1.388 +//
1.389 +class TLocalDriveMessageData
1.390 +/**
1.391 +@internalTechnology
1.392 +*/
1.393 + {
1.394 +public:
1.395 + inline TLocalDriveMessageData()
1.396 + {}
1.397 + inline TLocalDriveMessageData(TInt64 aPos, TInt aLength, const TAny* aPtr, TInt aHandle, TInt anOffset, TInt aFlags)
1.398 + : iPos(aPos), iLength(aLength), iPtr(aPtr), iHandle(aHandle), iOffset(anOffset), iFlags(aFlags)
1.399 + {}
1.400 +public:
1.401 + TInt64 iPos;
1.402 + TInt iLength;
1.403 + const TAny* iPtr;
1.404 + TInt iHandle;
1.405 + TInt iOffset;
1.406 + TInt iFlags;
1.407 + };
1.408 +
1.409 +class TLocalDriveControlIOData
1.410 +/**
1.411 +Control IO data class
1.412 +
1.413 +@internalTechnology
1.414 +*/
1.415 + {
1.416 +public:
1.417 + inline TLocalDriveControlIOData()
1.418 + {}
1.419 + inline TLocalDriveControlIOData(TInt aCommand, TAny* aParam1, TAny* aParam2, TInt aHandle)
1.420 + : iCommand(aCommand), iParam1(aParam1), iParam2(aParam2), iHandle(aHandle)
1.421 + {}
1.422 + inline TLocalDriveControlIOData(TInt aCommand, TUint8* aBuf, TInt aParam, TInt aLength)
1.423 + : iCommand(aCommand), iParam1(aBuf), iParam2((TAny*) aParam), iHandle(aLength)
1.424 + {}
1.425 +public:
1.426 + TInt iCommand;
1.427 + TAny* iParam1;
1.428 + TAny* iParam2;
1.429 + TInt iHandle;
1.430 + };
1.431 +
1.432 +class TLocalDrivePasswordData
1.433 +/**
1.434 +Password store for password protected media
1.435 +
1.436 +@internalTechnology
1.437 +*/
1.438 + {
1.439 +public:
1.440 + TLocalDrivePasswordData(const TDesC8& aOldPasswd, const TDesC8& aNewPasswd, TBool aStorePasswd)
1.441 + : iOldPasswd(&aOldPasswd), iNewPasswd(&aNewPasswd), iStorePasswd(aStorePasswd)
1.442 + {}
1.443 + TLocalDrivePasswordData()
1.444 + : iOldPasswd(&KNullDesC8), iNewPasswd(&KNullDesC8), iStorePasswd(EFalse)
1.445 + {}
1.446 +public:
1.447 + const TDesC8 *iOldPasswd;
1.448 + const TDesC8 *iNewPasswd;
1.449 + TBool iStorePasswd;
1.450 + };
1.451 +typedef TPckgBuf<TLocalDrivePasswordData> TLocalDrivePasswordDataPckg;
1.452 +
1.453 +
1.454 +class TPasswordStore
1.455 +/**
1.456 +@internalTechnology
1.457 +*/
1.458 + {
1.459 +public:
1.460 + virtual TInt Init()=0;
1.461 + virtual TInt ReadPasswordData(TDes8 &aBuf)=0;
1.462 + virtual TInt WritePasswordData(TDesC8 &aBuf)=0;
1.463 + virtual TInt PasswordStoreLengthInBytes()=0;
1.464 + enum {EMaxPasswordLength=1024}; /**< Size of the password store write buffer, which may contain multiple password mappings */
1.465 + };
1.466 +
1.467 +class TMountInfoData
1.468 +/**
1.469 +@internalTechnology
1.470 +*/
1.471 + {
1.472 +public:
1.473 + TDesC8* iInfo;
1.474 + TAny* iThread;
1.475 + };
1.476 +
1.477 +
1.478 +const TInt KLocalDriveMajorVersion=1;
1.479 +const TInt KLocalDriveMinorVersion=0;
1.480 +const TInt KLocalDriveBuildVersion=160;
1.481 +_LIT(KLitLocalDriveLddName,"LocDrv");
1.482 +
1.483 +const TInt KLocalMessageHandle=-1;
1.484 +
1.485 +
1.486 +enum TMediaPagingStats
1.487 + {
1.488 + EMediaPagingStatsAll,
1.489 + EMediaPagingStatsRomAndCode = EMediaPagingStatsAll, // @deprecated - use EMediaPagingStatsAll instead
1.490 + EMediaPagingStatsRom,
1.491 + EMediaPagingStatsCode,
1.492 + EMediaPagingStatsDataIn,
1.493 + EMediaPagingStatsDataOut,
1.494 + };
1.495 +
1.496 +/**
1.497 +Paging media details - for testing purposes only
1.498 +This is a structure used to communicate paging-related information
1.499 +from the paging media driver to an application.
1.500 +
1.501 +@internalTechnology
1.502 +@prototype
1.503 +*/
1.504 +class TPageDeviceInfo
1.505 + {
1.506 +public:
1.507 + TInt iReservoirBlockCount; // number of blocks in replacement reservoir (used & unused)
1.508 + TInt iBadBlockCount; // numer of bad blocks
1.509 + };
1.510 +typedef TPckgBuf<TPageDeviceInfo> TPageDeviceInfoBuf;
1.511 +
1.512 +class RLocalDrive : public RBusLogicalChannel
1.513 +/**
1.514 +Interface class to local media
1.515 +
1.516 +@internalTechnology
1.517 +*/
1.518 + {
1.519 +public:
1.520 + enum TControl
1.521 + {
1.522 + EControlRead=0, /**< Read request */
1.523 + EControlWrite=1, /**< Write request */
1.524 + EControlCaps=2, /**< Caps request */
1.525 + EControlFormat=3, /**< Format request */
1.526 + EControlEnlarge=4, /**< Enlarge drive request */
1.527 + EControlReduce=5, /**< Reduce Drive request */
1.528 + EControlForceMediaChange=6, /**< Force media change request */
1.529 + EControlMediaDevice=7, /**< Return the media device request */
1.530 + EControlPasswordLock=8, /**< Password lock media request */
1.531 + EControlPasswordUnlock=9, /**< Password unlock media request */
1.532 + EControlPasswordClear=10, /**< Password clear request */
1.533 + EControlNotifyChange=11, /**< Notify change request */
1.534 + EControlNotifyChangeCancel=12, /**< Notify change cancel request */
1.535 + EControlReadPasswordStore=13, /**< Read password request */
1.536 + EControlWritePasswordStore=14, /**< Write password request */
1.537 + EControlPasswordStoreLengthInBytes=15, /**< Password request */
1.538 + EControlIsRemovable=16, /**< Query removable request */
1.539 + EControlSetMountInfo=17, /**< Set mount info request */
1.540 + EControlControlIO=18, /**< Control IO request */
1.541 + EControlPasswordErase=19, /**< Password erase media request */
1.542 + EControlDeleteNotify=20, /**< Delete notification */
1.543 + EControlGetLastErrorInfo=21, /**< Get last error info request */
1.544 + EControlQueryDevice=22, /**< Query device request*/
1.545 + };
1.546 +
1.547 + enum TRemountFlags
1.548 + {
1.549 + ELocDrvRemountNotifyChange = 0, /**< Notify clients of media change but don't remount */
1.550 + ELocDrvRemountForceMediaChange = 1, /**< Notify clients of media change and remount */
1.551 + };
1.552 +
1.553 + enum TReadWriteFlags
1.554 + {
1.555 + ELocDrvMetaData = 0x80000000, /**< Set if read/write request is for metadata */
1.556 + ELocDrvWholeMedia = 0x40000000 /**< Set to access whole media, rather than partition */
1.557 + };
1.558 +
1.559 + enum TQueryDevice
1.560 + {
1.561 + // Symbian publishedPartner range
1.562 + EQuerySymbianPublishedPartnerFirst = 0x0000,
1.563 + EQuerySymbianPublishedPartnerLast = 0x3FFF,
1.564 +
1.565 + // Symbian test range
1.566 + EQuerySymbianTestFirst = 0x4000,
1.567 + EQuerySymbianTestLast = 0x7FFF,
1.568 +
1.569 + // Licensee range
1.570 + EQueryLicenseeFirst = 0x8000,
1.571 + EQueryLicenseeLast = 0xBFFF,
1.572 +
1.573 + EQueryPageDeviceInfo = EQuerySymbianTestFirst, /**< @see TPageDeviceInfo */
1.574 + };
1.575 +public:
1.576 + inline TVersion VersionRequired() const;
1.577 + inline TInt Connect(TInt aDriveNumber, TBool& aChangedFlag);
1.578 + inline TInt Enlarge(TInt aLength);
1.579 + inline TInt Reduce(TInt aPos, TInt aLength);
1.580 + inline TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aMessageHandle, TInt aOffset, TInt aFlags);
1.581 + inline TInt Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aMessageHandle, TInt anOffset);
1.582 + inline TInt Read(TInt64 aPos, TInt aLength, TDes8& aTrg);
1.583 + inline TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aMessageHandle, TInt aOffset, TInt aFlags);
1.584 + inline TInt Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aMessageHandle, TInt anOffset);
1.585 + inline TInt Write(TInt64 aPos, const TDesC8& aSrc);
1.586 + inline TInt Caps(TDes8& anInfo);
1.587 + inline TInt Format(TInt64 aPos, TInt aLength);
1.588 + inline TInt ForceMediaChange(TInt aMode=0);
1.589 + inline void NotifyChange(TRequestStatus* aStatus);
1.590 + inline void NotifyChangeCancel();
1.591 + inline TInt SetMountInfo(const TDesC8* aInfo,TInt aMessageHandle);
1.592 + inline TMediaDevice MediaDevice();
1.593 + inline TInt IsRemovable(TInt& aSocketNum);
1.594 + inline TInt ControlIO(TInt aCommand, TAny* aParam1, TAny* aParam2);
1.595 + inline TInt ControlIO(TInt aCommand, TDes8& aBuf, TInt aParam);
1.596 + inline TInt ControlIO(TInt aCommand, TDesC8& aBuf, TInt aParam);
1.597 + inline TInt ControlIO(TInt aCommand, TInt aParam1, TInt aParam2);
1.598 + inline TInt Unlock(const TDesC8& aPassword, TBool aStorePassword);
1.599 + inline TInt SetPassword(const TDesC8& aOldPassword, const TDesC8& aNewPassword, TBool aStorePassword);
1.600 + inline TInt Clear(const TDesC8& aPassword);
1.601 + inline TInt ErasePassword();
1.602 + inline TInt ReadPasswordData(TDesC8& aStoreData);
1.603 + inline TInt WritePasswordData(const TDesC8& aStoreData);
1.604 + inline TInt PasswordStoreLengthInBytes();
1.605 + inline TInt DeleteNotify(TInt64 aPos, TInt aLength);
1.606 + inline TInt GetLastErrorInfo(TDesC8& aErrorInfo);
1.607 + inline TInt QueryDevice(TQueryDevice aQueryDevice, TDes8 &aBuf);
1.608 + };
1.609 +//
1.610 +#ifndef __KERNEL_MODE__
1.611 +class TBusLocalDrive : public RLocalDrive
1.612 +/**
1.613 +@internalTechnology
1.614 +*/
1.615 + {
1.616 +public:
1.617 + IMPORT_C TBusLocalDrive();
1.618 + IMPORT_C TInt Connect(TInt aDriveNumber, TBool& aChangedFlag);
1.619 + IMPORT_C void Disconnect();
1.620 + IMPORT_C TInt Enlarge(TInt aLength);
1.621 + IMPORT_C TInt ReduceSize(TInt aPos, TInt aLength);
1.622 + IMPORT_C TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aMessageHandle,TInt aOffset,TInt aFlags);
1.623 + IMPORT_C TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aMessageHandle,TInt anOffset);
1.624 + IMPORT_C TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
1.625 + IMPORT_C TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aMessageHandle,TInt aOffset,TInt aFlags);
1.626 + IMPORT_C TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aMessageHandle,TInt anOffset);
1.627 + IMPORT_C TInt Write(TInt64 aPos,const TDesC8& aSrc);
1.628 + IMPORT_C TInt Caps(TDes8& anInfo);
1.629 + IMPORT_C TInt Format(TFormatInfo& anInfo);
1.630 + IMPORT_C TInt Format(TInt64 aPos,TInt aLength);
1.631 + IMPORT_C TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMessageHandle);
1.632 + IMPORT_C TInt ForceRemount(TUint aFlags=0);
1.633 + IMPORT_C TInt ControlIO(TInt aCommand, TAny* aParam1, TAny* aParam2);
1.634 + IMPORT_C TInt ControlIO(TInt aCommand, TDes8& aBuf, TInt aParam);
1.635 + IMPORT_C TInt ControlIO(TInt aCommand, TDesC8& aBuf, TInt aParam);
1.636 + IMPORT_C TInt ControlIO(TInt aCommand, TInt aParam1, TInt aParam2);
1.637 +
1.638 + IMPORT_C TInt Unlock(const TDesC8& aPassword, TBool aStorePassword);
1.639 + IMPORT_C TInt SetPassword(const TDesC8& aOldPassword, const TDesC8& aNewPassword, TBool aStorePassword);
1.640 + IMPORT_C TInt Clear(const TDesC8& aPassword);
1.641 + IMPORT_C TInt ErasePassword();
1.642 + IMPORT_C TInt ReadPasswordData(TDes8 &aBuf);
1.643 + IMPORT_C TInt WritePasswordData(const TDesC8 &aBuf);
1.644 + IMPORT_C TInt PasswordStoreLengthInBytes();
1.645 + IMPORT_C TInt DeleteNotify(TInt64 aPos, TInt aLength);
1.646 + IMPORT_C TInt GetLastErrorInfo(TDes8& aErrorInfo);
1.647 +
1.648 + IMPORT_C TInt QueryDevice(TQueryDevice aQueryDevice, TDes8 &aBuf);
1.649 +
1.650 +public:
1.651 + inline TInt& Status() {return(iStatus);}
1.652 +private:
1.653 + TInt CheckMount();
1.654 +private:
1.655 + TInt iStatus;
1.656 + };
1.657 +#endif
1.658 +
1.659 +#define _LOCKABLE_MEDIA
1.660 +
1.661 +#include <d32locd.inl>
1.662 +#endif
1.663 +