equal
deleted
inserted
replaced
128 NFE_KEY(aNfeDrive, KNfeProgressToUiKey), |
128 NFE_KEY(aNfeDrive, KNfeProgressToUiKey), |
129 *(TInt*) &aProgress); |
129 *(TInt*) &aProgress); |
130 return r; |
130 return r; |
131 } |
131 } |
132 |
132 |
133 void DisplayNfeDeviceInfo(TInt aNfeDrive, TNfeDeviceInfo& aDeviceInfo) |
133 void DisplayNfeDeviceInfo(TInt aNfeDrive, TNfeDeviceInfo& aDeviceInfo, TBool (&aNfeDrives)[KMaxLocalDrives]) |
134 { |
134 { |
135 test.Printf(_L("Stats: \n")); |
135 // test.Printf(_L("Stats: \n")); |
136 |
136 |
137 RLocalDrive d; |
137 RLocalDrive d; |
138 TBool change = EFalse; |
138 TBool change = EFalse; |
139 TInt r = d.Connect(aNfeDrive, change); |
139 TInt r = d.Connect(aNfeDrive, change); |
140 test (r == KErrNone); |
140 test (r == KErrNone); |
150 test.Printf(_L("iMediaSizeInBytes %lx\n"), aDeviceInfo.iMediaSizeInBytes); |
150 test.Printf(_L("iMediaSizeInBytes %lx\n"), aDeviceInfo.iMediaSizeInBytes); |
151 |
151 |
152 for (TInt i=0; i<aDeviceInfo.iDriveCount; i++) |
152 for (TInt i=0; i<aDeviceInfo.iDriveCount; i++) |
153 { |
153 { |
154 TNfeDriveInfo& di = aDeviceInfo.iDrives[i]; |
154 TNfeDriveInfo& di = aDeviceInfo.iDrives[i]; |
|
155 |
|
156 TInt localDriveNum = di.iLocalDriveNum; |
|
157 test_Value(localDriveNum, di.iLocalDriveNum < KMaxLocalDrives); |
|
158 |
|
159 if (aNfeDrives[localDriveNum]) |
|
160 continue; |
|
161 aNfeDrives[localDriveNum] = 1; |
155 |
162 |
156 test.Printf(_L("*** drive index %d ***\n"), i); |
163 test.Printf(_L("*** drive index %d ***\n"), i); |
157 test.Printf(_L("iLocalDriveNum %x\n"), di.iLocalDriveNum); |
164 test.Printf(_L("iLocalDriveNum %x\n"), di.iLocalDriveNum); |
158 test.Printf(_L("iDriveLetter %c\n"), di.iDriveLetter >= 0 && di.iDriveLetter <= 25 ? di.iDriveLetter +'A' : '?'); |
165 test.Printf(_L("iDriveLetter %c\n"), di.iDriveLetter >= 0 && di.iDriveLetter <= 25 ? di.iDriveLetter +'A' : '?'); |
159 test.Printf(_L("iState %d\n"), di.Status()); |
166 test.Printf(_L("iState %d\n"), di.Status()); |
387 test.Next(_L("Waiting for finish")); |
394 test.Next(_L("Waiting for finish")); |
388 WaitForFinish(drive, TheEncryptDriveFlag); |
395 WaitForFinish(drive, TheEncryptDriveFlag); |
389 } |
396 } |
390 |
397 |
391 |
398 |
|
399 TBool nfeDrives[KMaxLocalDrives]; |
|
400 memclr(nfeDrives, sizeof(nfeDrives)); |
|
401 |
392 for(TInt nfeDrive = FindNfeDrive(0); nfeDrive != KErrNotFound; nfeDrive = FindNfeDrive(++nfeDrive)) |
402 for(TInt nfeDrive = FindNfeDrive(0); nfeDrive != KErrNotFound; nfeDrive = FindNfeDrive(++nfeDrive)) |
393 { |
403 { |
394 TNfeDeviceInfo deviceInfo; |
404 TNfeDeviceInfo deviceInfo; |
395 DisplayNfeDeviceInfo(nfeDrive, deviceInfo); |
405 DisplayNfeDeviceInfo(nfeDrive, deviceInfo, nfeDrives); |
396 } |
406 } |
397 |
407 |
398 fs.Close(); |
408 fs.Close(); |
399 |
409 |
400 test.End(); |
410 test.End(); |