sl@0: #ifndef __TEST_CASE_PBASE_T_USBDI_0498_H sl@0: #define __TEST_CASE_PBASE_T_USBDI_0498_H sl@0: sl@0: /* sl@0: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * @file PBASE-T_USBDI-0498.h sl@0: * @internalComponent sl@0: * sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: #include "BaseBulkTestCase.h" sl@0: sl@0: sl@0: namespace NUnitTesting_USBDI sl@0: { sl@0: const TUint8 KNumOutTransfersPerInterface = 2; //number of queued OUT transfers in used for each interface sl@0: const TUint8 KNumInTransfersPerInterface = 2; //number of queued IN transfers used for each interface sl@0: const TUint8 KNumInitialRequests = 4; sl@0: /** sl@0: sl@0: sl@0: @SYMTestCaseID PBASE-T_USBDI-0498 sl@0: @SYMTestCaseDesc Test use of multiple concurrent bulk transfers on two interfaces sl@0: @SYMFssID sl@0: @SYMPREQ 1305 sl@0: @SYMREQ 7055 [USBD : Bulk transfers] sl@0: @SYMTestType UT sl@0: @SYMTestPriority 1 sl@0: @SYMTestActions 1. Open interfaces to connected device sl@0: 2. Queue two bulk OUT transfer requests on each interface sl@0: 3. Queue two bulk IN transfer requests on each interface sl@0: 4. Validate data sent and data received sl@0: 5. Compare completion times for each bulk transfer sl@0: @SYMTestExpectedResults Round trip transfer data is not corrupt sl@0: @SYMTestStatus Draft sl@0: sl@0: sl@0: */ sl@0: sl@0: class CUT_PBASE_T_USBDI_0498 : public CBaseBulkTestCase, sl@0: public MTransferObserver, sl@0: public MCommandObserver sl@0: sl@0: { sl@0: public: sl@0: static CUT_PBASE_T_USBDI_0498* NewL(TBool aHostRole); sl@0: ~CUT_PBASE_T_USBDI_0498(); sl@0: sl@0: public: // From MUsbBusObserver sl@0: void DeviceInsertedL(TUint aDeviceHandle); sl@0: sl@0: public: // From MCommandObserver sl@0: void Ep0TransferCompleteL(TInt aCompletionCode); sl@0: sl@0: public: // From MTransferObserver sl@0: void TransferCompleteL(TInt aTransferId,TInt aCompletionCode); sl@0: sl@0: private: sl@0: CUT_PBASE_T_USBDI_0498(TBool aHostRole); sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: sl@0: enum TCaseStep sl@0: { sl@0: EInProgress, sl@0: EPassed, sl@0: EFailed, sl@0: ERequestDeviceIFC1Read, sl@0: ERequestDeviceIFC2Read, sl@0: ERequestDeviceIFC1Write, sl@0: ERequestDeviceIFC2Write, sl@0: ETransfer, sl@0: ERequestDeviceValidateIFC1, sl@0: ERequestDeviceValidateIFC2, sl@0: ERequestDeviceValidationResultIFC1, sl@0: ERequestDeviceValidationResultIFC2 sl@0: }; sl@0: sl@0: CBulkTransfer* iIfc1InTransfer[KNumInTransfersPerInterface]; sl@0: CBulkTransfer* iIfc1OutTransfer[KNumOutTransfersPerInterface]; sl@0: sl@0: CBulkTransfer* iIfc2InTransfer[KNumInTransfersPerInterface]; sl@0: CBulkTransfer* iIfc2OutTransfer[KNumOutTransfersPerInterface]; sl@0: sl@0: TCaseStep iCaseStep; sl@0: TPtr8 iRequestDeviceValidationResultPtr; sl@0: sl@0: private: sl@0: /** sl@0: The functor for this test case sl@0: */ sl@0: const static TFunctorTestCase iFunctor; sl@0: }; sl@0: sl@0: } //end namespace sl@0: sl@0: #endif