First public contribution.
1 #ifndef __TEST_CASE_PBASE_T_USBDI_0474_H
2 #define __TEST_CASE_PBASE_T_USBDI_0474_H
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
18 * @file PBASE-T_USBDI-0474.h
27 #include "BaseTestCase.h"
28 #include "TestCaseFactory.h"
29 #include "modelleddevices.h"
31 #include <d32usbdi_hubdriver.h>
34 #include "testdebug.h"
35 #include "controltransferrequests.h"
37 namespace NUnitTesting_USBDI
43 @SYMTestCaseID PBASE-T_USBDI-0474
44 @SYMTestCaseDesc Acceptance of unknown descriptor from USB device.
47 @SYMREQ 7059 - [USBD : Descriptor access: unknown descriptors]
48 7060 - [USBD : Descriptor access: backward compatibility]
52 @SYMTestActions 1. Enumerate
54 3. Compare against reference descriptor tree
55 @SYMTestExpectedResults Descriptor read and processed into tree correctly.
56 @SYMTestStatus Implemented
60 class CUT_PBASE_T_USBDI_0474 : public CBaseTestCase, public MUsbBusObserver, public MCommandObserver
63 static CUT_PBASE_T_USBDI_0474* NewL(TBool aHostRole);
64 ~CUT_PBASE_T_USBDI_0474();
66 public: // From MUsbBusObserver
67 void DeviceInsertedL(TUint aDeviceHandle);
68 void DeviceRemovedL(TUint aDeviceHandle);
69 void BusErrorL(TInt aError);
70 void DeviceStateChangeL(RUsbDevice::TDeviceState aPreviousState,RUsbDevice::TDeviceState aNewState,
71 TInt aCompletionCode);
73 public: // From MCommandObserver
74 void Ep0TransferCompleteL(TInt aCompletionCode);
77 CUT_PBASE_T_USBDI_0474(TBool aHostRole);
79 void ExecuteHostTestCaseL();
80 void ExecuteDeviceTestCaseL();
82 void DeviceDoCancel();
95 CEp0Transfer* iClientAction;
96 RUsbInterface iUsbInterface0;
97 RUsbInterface iUsbInterface1;
101 RUsbDeviceB* iTestDevice;
105 The functor for this test case for the factory
107 const static TFunctorTestCase<CUT_PBASE_T_USBDI_0474,TBool> iFunctor;