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