34 a media driver with the local media subsystem. |
34 a media driver with the local media subsystem. |
35 */ |
35 */ |
36 enum TMediaDevice { EFixedMedia0, EFixedMedia1, EFixedMedia2, EFixedMedia3, |
36 enum TMediaDevice { EFixedMedia0, EFixedMedia1, EFixedMedia2, EFixedMedia3, |
37 EFixedMedia4, EFixedMedia5, EFixedMedia6, EFixedMedia7, |
37 EFixedMedia4, EFixedMedia5, EFixedMedia6, EFixedMedia7, |
38 ERemovableMedia0, ERemovableMedia1, ERemovableMedia2, ERemovableMedia3, |
38 ERemovableMedia0, ERemovableMedia1, ERemovableMedia2, ERemovableMedia3, |
39 EInvalidMedia |
39 EInvalidMedia, |
|
40 EMediaExtension0, EMediaExtension1, EMediaExtension2, EMediaExtension3, |
|
41 EMediaExtension4, EMediaExtension5, EMediaExtension6, EMediaExtension7, |
40 }; |
42 }; |
41 |
43 |
42 #define __IS_REMOVABLE(aDevice) (aDevice>=ERemovableMedia0 && aDevice<=ERemovableMedia3) |
44 #define __IS_REMOVABLE(aDevice) (aDevice>=ERemovableMedia0 && aDevice<=ERemovableMedia3) |
43 #define __IS_FIXED(aDevice) ((TUint)aDevice<=EFixedMedia7) |
45 #define __IS_FIXED(aDevice) ((TUint)aDevice<=EFixedMedia7) |
|
46 #define __IS_EXTENSION(aDevice) (aDevice>=EMediaExtension0 && aDevice<=EMediaExtension7) |
|
47 |
44 #define MEDIA_DEVICE_IRAM EFixedMedia0 |
48 #define MEDIA_DEVICE_IRAM EFixedMedia0 |
45 #define MEDIA_DEVICE_LFFS EFixedMedia1 |
49 #define MEDIA_DEVICE_LFFS EFixedMedia1 |
46 #define MEDIA_DEVICE_NAND EFixedMedia2 |
50 #define MEDIA_DEVICE_NAND EFixedMedia2 |
47 #define MEDIA_DEVICE_MMC ERemovableMedia0 |
51 #define MEDIA_DEVICE_MMC ERemovableMedia0 |
48 #define MEDIA_DEVICE_PCCARD ERemovableMedia1 |
52 #define MEDIA_DEVICE_PCCARD ERemovableMedia1 |
49 #define MEDIA_DEVICE_CSA ERemovableMedia2 |
53 #define MEDIA_DEVICE_CSA ERemovableMedia2 |
|
54 #define MEDIA_DEVICE_NFE EMediaExtension0 |
50 |
55 |
51 typedef signed int TSocket; |
56 typedef signed int TSocket; |
52 |
57 |
53 class TLDriveAssignInfo |
58 class TLDriveAssignInfo |
54 /** |
59 /** |
503 public: |
508 public: |
504 TInt iReservoirBlockCount; // number of blocks in replacement reservoir (used & unused) |
509 TInt iReservoirBlockCount; // number of blocks in replacement reservoir (used & unused) |
505 TInt iBadBlockCount; // numer of bad blocks |
510 TInt iBadBlockCount; // numer of bad blocks |
506 }; |
511 }; |
507 typedef TPckgBuf<TPageDeviceInfo> TPageDeviceInfoBuf; |
512 typedef TPckgBuf<TPageDeviceInfo> TPageDeviceInfoBuf; |
|
513 |
|
514 class TLocalDriveFinaliseInfo |
|
515 /** |
|
516 @internalTechnology |
|
517 */ |
|
518 { |
|
519 public: |
|
520 TInt iMode; // @see RFs::TFinaliseDrvMode |
|
521 }; |
|
522 typedef TPckgBuf<TLocalDriveFinaliseInfo> TLocalDriveFinaliseInfoBuf; |
508 |
523 |
509 class RLocalDrive : public RBusLogicalChannel |
524 class RLocalDrive : public RBusLogicalChannel |
510 /** |
525 /** |
511 Interface class to local media |
526 Interface class to local media |
512 |
527 |
548 }; |
563 }; |
549 |
564 |
550 enum TReadWriteFlags |
565 enum TReadWriteFlags |
551 { |
566 { |
552 ELocDrvMetaData = 0x80000000, /**< Set if read/write request is for metadata */ |
567 ELocDrvMetaData = 0x80000000, /**< Set if read/write request is for metadata */ |
553 ELocDrvWholeMedia = 0x40000000 /**< Set to access whole media, rather than partition */ |
568 ELocDrvWholeMedia = 0x40000000, /**< Set to access whole media, rather than partition */ |
554 }; |
569 ELocDrvDirectIO = 0x20000000 |
555 |
570 }; |
|
571 |
|
572 // @see TBusLocalDrive::QueryDevice() |
556 enum TQueryDevice |
573 enum TQueryDevice |
557 { |
574 { |
558 // Symbian publishedPartner range |
575 // Symbian publishedPartner range |
559 EQuerySymbianPublishedPartnerFirst = 0x0000, |
576 EQuerySymbianPublishedPartnerFirst = 0x0000, |
560 EQuerySymbianPublishedPartnerLast = 0x3FFF, |
577 EQuerySymbianPublishedPartnerLast = 0x3FFF, |
565 |
582 |
566 // Licensee range |
583 // Licensee range |
567 EQueryLicenseeFirst = 0x8000, |
584 EQueryLicenseeFirst = 0x8000, |
568 EQueryLicenseeLast = 0xBFFF, |
585 EQueryLicenseeLast = 0xBFFF, |
569 |
586 |
|
587 // Finalize Drive - called as a result of a call to RFs::FinaliseDrives() |
|
588 EQueryFinaliseDrive = EQuerySymbianPublishedPartnerFirst + 0, // @internalTechnology |
|
589 |
570 EQueryPageDeviceInfo = EQuerySymbianTestFirst, /**< @see TPageDeviceInfo */ |
590 EQueryPageDeviceInfo = EQuerySymbianTestFirst, /**< @see TPageDeviceInfo */ |
|
591 |
|
592 // NFE test driver |
|
593 EQuerySymbianNfeTestFirst = EQuerySymbianTestFirst+0x10, |
|
594 EQuerySymbianNfeTestEnd = EQuerySymbianTestFirst+0x1F, |
571 }; |
595 }; |
572 public: |
596 public: |
573 inline TVersion VersionRequired() const; |
597 inline TVersion VersionRequired() const; |
574 inline TInt Connect(TInt aDriveNumber, TBool& aChangedFlag); |
598 inline TInt Connect(TInt aDriveNumber, TBool& aChangedFlag); |
575 inline TInt Enlarge(TInt aLength); |
599 inline TInt Enlarge(TInt aLength); |