equal
deleted
inserted
replaced
90 return (KErrNone); |
90 return (KErrNone); |
91 } |
91 } |
92 |
92 |
93 void CTestFileSystem::DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const |
93 void CTestFileSystem::DriveInfo(TDriveInfo& anInfo,TInt aDriveNumber) const |
94 // |
94 // |
95 // Return drive info - iDriveAtt and iBatteryState are already set |
95 // Return drive info |
96 // |
96 // |
97 { |
97 { |
98 if(!IsValidLocalDriveMapping(aDriveNumber)) |
98 CFileSystem::DriveInfo(anInfo, aDriveNumber); |
99 return; |
|
100 |
|
101 TLocalDriveCapsV2Buf localDriveCaps; |
|
102 |
|
103 // is the drive local? |
|
104 if (!IsProxyDrive(aDriveNumber)) |
|
105 { |
|
106 // if not valid local drive, use default values in localDriveCaps |
|
107 // if valid local drive and not locked, use TBusLocalDrive::Caps() values |
|
108 // if valid drive and locked, hard-code attributes |
|
109 (void)GetLocalDrive(aDriveNumber).Caps(localDriveCaps); |
|
110 } |
|
111 else // this need to be made a bit nicer |
|
112 { |
|
113 CExtProxyDrive* pD = GetProxyDrive(aDriveNumber); |
|
114 if(pD) |
|
115 { |
|
116 (void)pD->Caps(localDriveCaps); |
|
117 } |
|
118 } |
|
119 |
|
120 anInfo.iMediaAtt=localDriveCaps().iMediaAtt; |
|
121 anInfo.iType=localDriveCaps().iType; |
|
122 anInfo.iDriveAtt=localDriveCaps().iDriveAtt; |
|
123 |
99 |
124 // hijack the iBattery member to report back the number of times MountL() has been called |
100 // hijack the iBattery member to report back the number of times MountL() has been called |
125 anInfo.iBattery = (TBatteryState) iMountAttempts; |
101 anInfo.iBattery = (TBatteryState) iMountAttempts; |
126 } |
102 } |
127 |
103 |