equal
deleted
inserted
replaced
11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // |
14 // |
15 |
15 |
|
16 #define __E32TEST_EXTENSION__ |
16 #include <e32std.h> |
17 #include <e32std.h> |
17 #include <e32std_private.h> |
|
18 #include <e32test.h> |
18 #include <e32test.h> |
19 #include <testusbc.h> |
19 #include <testusbc.h> |
20 #include "t_gml_tur_protocol.h" |
20 #include "t_gml_tur_protocol.h" |
21 #include "t_gml_tur_controller.h" |
21 #include "t_gml_tur_controller.h" |
|
22 #include "protocol.h" |
22 #include "cbulkonlytransport.h" |
23 #include "cbulkonlytransport.h" |
23 |
24 |
24 LOCAL_D RTest test(_L("t_gml_tur")); |
25 LOCAL_D RTest test(_L("t_gml_tur")); |
25 |
26 |
26 _LIT(KDriverFileName,"TESTUSBC.LDD"); |
27 _LIT(KDriverFileName,"TESTUSBC.LDD"); |
94 |
95 |
95 CUsbMassStorageController* controller = (CUsbMassStorageController*)aPtr; |
96 CUsbMassStorageController* controller = (CUsbMassStorageController*)aPtr; |
96 gController = controller; |
97 gController = controller; |
97 controller->CreateL(0); |
98 controller->CreateL(0); |
98 |
99 |
99 CBulkOnlyTransport* transport = NULL; |
100 MTransportBase* transport = NULL; |
100 TRAP(err, transport = CBulkOnlyTransport::NewL(numDrives, *controller)); |
101 TRAP(err, transport = CBulkOnlyTransport::NewL(numDrives, *controller)); |
101 if (err != KErrNone) |
102 if (err != KErrNone) |
102 { |
103 { |
103 return err; |
104 return err; |
104 } |
105 } |
215 TRequestStatus* statusPtr = &(controller->iStatus); |
216 TRequestStatus* statusPtr = &(controller->iStatus); |
216 transportThread.RequestComplete(statusPtr, KErrNone); |
217 transportThread.RequestComplete(statusPtr, KErrNone); |
217 //Wait for thread to die |
218 //Wait for thread to die |
218 test.Printf(_L("Waiting for controller thread to die\n")); |
219 test.Printf(_L("Waiting for controller thread to die\n")); |
219 User::WaitForRequest(logonStatus); |
220 User::WaitForRequest(logonStatus); |
220 transportThread.Close(); |
221 transportThread.Close(); |
|
222 |
221 test.Printf(_L("The thread is dead, long live the thread\n")); |
223 test.Printf(_L("The thread is dead, long live the thread\n")); |
222 |
224 |
223 ldd.Close(); |
225 ldd.Close(); |
224 |
226 |
225 test.Printf(_L("Unloading ldd")); |
227 test.Printf(_L("Unloading ldd")); |
226 err = User::FreeLogicalDevice(KLddName); |
228 err = User::FreeLogicalDevice(KLddName); |
227 test(err == KErrNone); |
229 test_KErrNone(err); |
228 |
230 |
229 test.End(); |
231 test.End(); |
230 |
232 |
231 return 0; |
233 return 0; |
232 } |
234 } |