Update contrib.
1 #ifndef __TEST_CASE_PBASE_T_USBDI_0472_H
2 #define __TEST_CASE_PBASE_T_USBDI_0472_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-0472.h
27 #include "BaseTestCase.h"
28 #include "TestCaseFactory.h"
30 #include "modelleddevices.h"
32 #include "controltransferrequests.h"
34 namespace NUnitTesting_USBDI
40 @SYMTestCaseID PBASE-T_USBDI-0472
41 @SYMTestCaseDesc Test for device attachement notification
44 @SYMREQ 7072 [USBD : Device attachment notification]
45 7073 [USBD : Device removal notification]
46 7058 [USBD : Descriptor access]
49 @SYMTestActions 1. Monitor for USB device connections
50 2. Once a device is connected wait for notification of removal
51 3. Monitor for device connection again and then succesfully cancel
53 @SYMTestExpectedResults Notification of correct device attached
54 @SYMTestStatus Implemented
58 class CUT_PBASE_T_USBDI_0472 : public CBaseTestCase, public MUsbBusObserver, public MCommandObserver
61 static CUT_PBASE_T_USBDI_0472* NewL(TBool aHostRole);
62 ~CUT_PBASE_T_USBDI_0472();
64 public: // From MDeviceNotifier
65 void DeviceInsertedL(TUint aDeviceHandle);
66 void DeviceRemovedL(TUint aDeviceHandle);
67 void BusErrorL(TInt aError);
68 void DeviceStateChangeL(RUsbDevice::TDeviceState aPreviousState,RUsbDevice::TDeviceState aNewState,
69 TInt aCompletionCode);
71 public: // From MCommandObserver
72 void Ep0TransferCompleteL(TInt aCompletionCode);
75 CUT_PBASE_T_USBDI_0472(TBool aHostRole);
77 void ExecuteHostTestCaseL();
78 void ExecuteDeviceTestCaseL();
80 void DeviceDoCancel();
94 RUsbDeviceVendor* iTestDevice;
96 RUsbInterface iInterface0;
97 CEp0Transfer* iClientAction;
102 The functor for this test case for the factory
104 const static TFunctorTestCase<CUT_PBASE_T_USBDI_0472,TBool> iFunctor;
109 #endif // __TEST_CASE_PBASE_T_USBDI_0472_H