|
1 #ifndef __TEST_CASE_PBASE_T_USBDI_0494_H |
|
2 #define __TEST_CASE_PBASE_T_USBDI_0494_H |
|
3 |
|
4 /* |
|
5 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
6 * All rights reserved. |
|
7 * This component and the accompanying materials are made available |
|
8 * under the terms of the License "Eclipse Public License v1.0" |
|
9 * which accompanies this distribution, and is available |
|
10 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
11 * |
|
12 * Initial Contributors: |
|
13 * Nokia Corporation - initial contribution. |
|
14 * |
|
15 * Contributors: |
|
16 * |
|
17 * Description: |
|
18 * @file PBASE-T_USBDI-0494.h |
|
19 * @internalComponent |
|
20 * |
|
21 * |
|
22 */ |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 #include "BaseBulkTestCase.h" |
|
28 |
|
29 |
|
30 namespace NUnitTesting_USBDI |
|
31 { |
|
32 |
|
33 /** |
|
34 |
|
35 |
|
36 @SYMTestCaseID PBASE-T_USBDI-0494 |
|
37 @SYMTestCaseDesc Test single bulk transfers of 512kB of data |
|
38 @SYMFssID |
|
39 @SYMPREQ 1305 |
|
40 @SYMREQ 7055 [USBD : Bulk transfers] |
|
41 7062 [USBD : ZLP write handling] |
|
42 @SYMTestType UT |
|
43 @SYMTestPriority 1 |
|
44 @SYMTestActions 1. Open interfaces to connected device |
|
45 2. Request a bulk out transfer |
|
46 3. Request a bulk in transfer (expecting data just transferred to peripheral to be sent back) |
|
47 4. Validate round trip data |
|
48 @SYMTestExpectedResults Round trip transfer data is not corrupt |
|
49 @SYMTestStatus Draft |
|
50 |
|
51 |
|
52 */ |
|
53 class CUT_PBASE_T_USBDI_0494 : public CBaseBulkTestCase, |
|
54 public MTransferObserver, |
|
55 public MCommandObserver |
|
56 { |
|
57 public: |
|
58 static CUT_PBASE_T_USBDI_0494* NewL(TBool aHostRole); |
|
59 ~CUT_PBASE_T_USBDI_0494(); |
|
60 |
|
61 public: // From MUsbBusObserver |
|
62 void DeviceInsertedL(TUint aDeviceHandle); |
|
63 |
|
64 public: // From MCommandObserver |
|
65 void Ep0TransferCompleteL(TInt aCompletionCode); |
|
66 |
|
67 public: // From MTransferObserver |
|
68 void TransferCompleteL(TInt aTransferId,TInt aCompletionCode); |
|
69 |
|
70 private: |
|
71 CUT_PBASE_T_USBDI_0494(TBool aHostRole); |
|
72 void ConstructL(); |
|
73 |
|
74 |
|
75 private: |
|
76 |
|
77 enum TCaseStep |
|
78 { |
|
79 EInProgress, |
|
80 EPassed, |
|
81 EFailed, |
|
82 ETransferIn, |
|
83 ETransferOut |
|
84 }; |
|
85 |
|
86 TCaseStep iCaseStep; |
|
87 |
|
88 private: |
|
89 /** |
|
90 The functor for this test case |
|
91 */ |
|
92 const static TFunctorTestCase<CUT_PBASE_T_USBDI_0494,TBool> iFunctor; |
|
93 |
|
94 }; |
|
95 |
|
96 } //end namespace |
|
97 |
|
98 #endif |