First public contribution.
1 #ifndef __USB_TEST_DEVICES_H
2 #define __USB_TEST_DEVICES_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 modelleddevices.h
26 #include "testdevicebase.h"
28 namespace NUnitTesting_USBDI
31 _LIT(KVendorDevice,"VendorDevice");
32 _LIT(KTestDeviceB, "TestDeviceB");
33 _LIT(KManufacturer,"Symbian");
34 _LIT(KConfigurationString,"Test Configuration");
37 This class models a simple test device which has one default interface with the default interface setting
38 i.e. a test device that can only connect and disconnect with some basic vendor
39 and product information. There are no extra endpoints for this device
41 class RUsbDeviceVendor : public RUsbTestDevice
45 Constructor, build a default vendor device
46 @param aStatus the pointer to the status object for error reporting
47 @param aSerialNumber the serial number of the vendor device
53 RUsbDeviceVendor(CBaseTestCase* aTestCase);
59 virtual ~RUsbDeviceVendor();
66 void OpenL(const TDesC16& aSerialNumber);
72 virtual void OnStateChangeL(TUsbcDeviceState aNewState);
76 The serial number for the vendor device
78 TBuf16<64> iSerialNumber;
84 Describe a device that models this configuration:
92 [endpoint1] Interrupt in
96 class RUsbDeviceA : public RUsbDeviceVendor
106 RUsbDeviceA(CBaseTestCase* aTestCase);
111 virtual ~RUsbDeviceA();
115 void OpenL(const TDesC& aSerialNumber);
122 virtual void OnStateChangeL(TUsbcDeviceState aNewState);
127 Describe a device that models this configuration:
130 Interface0 [setting0]
138 Interface0 [setting1]
146 Interface0 [setting2]
156 class RUsbDeviceB : public RUsbTestDevice
165 RUsbDeviceB(CBaseTestCase* aTestCase);
169 virtual ~RUsbDeviceB();
173 void OpenL(const TDesC& aSerialNumber);
179 virtual void OnStateChangeL(TUsbcDeviceState aNewState);
183 The serial number for the vendor device
185 TBuf16<64> iSerialNumber;
190 Describe a device that models this configuration:
193 Interface0 [setting0]
194 Interface1 [setting0]
198 [endpoint1] Interrupt in
202 class RUsbDeviceC : public RUsbDeviceVendor
209 RUsbDeviceC(CBaseTestCase* aTestCase);
214 virtual ~RUsbDeviceC();
218 void OpenL(const TDesC& aSerialNumber);
225 virtual void OnStateChangeL(TUsbcDeviceState aNewState);
230 Describe a device that models this configuration:
233 Interface0 [setting0]
234 Interface1 [setting0]
238 [endpoint1] Interrupt in
241 Interface2 [setting0]
249 class RUsbDeviceD : public RUsbDeviceVendor
259 RUsbDeviceD(CBaseTestCase* aTestCase);
264 virtual ~RUsbDeviceD();
268 void OpenL(const TDesC& aSerialNumber);
275 virtual void OnStateChangeL(TUsbcDeviceState aNewState);