os/kernelhwsrv/kerneltest/e32test/usbho/t_usbdi/inc/PBASE-T_USBDI-0492.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 #ifndef __TEST_CASE_PBASE_T_USBDI_0492_H
     2 #define __TEST_CASE_PBASE_T_USBDI_0492_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-0492.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 	@SYMTestCaseID				PBASE-T_USBDI-0492
    36 	@SYMTestCaseDesc			Test use of multiple bulk transfers
    37 	@SYMFssID 
    38 	@SYMPREQ					1305
    39 	@SYMREQ						7055 [USBD : Bulk transfers]
    40 	@SYMTestType				UT
    41 	@SYMTestPriority			1 
    42 	@SYMTestActions 			1. Open interfaces to connected device
    43 								2. Request three bulk OUT transfers
    44 								3. Request three bulk IN transfers (expecting data just transferred to peripheral to be sent back)
    45 								4. Validate round trip data
    46 	@SYMTestExpectedResults 	Round trip transfer data is not corrupt
    47 	@SYMTestStatus				Draft
    48 	
    49 
    50 */
    51 
    52 class CUT_PBASE_T_USBDI_0492 :  public CBaseBulkTestCase,
    53 								public MTransferObserver,
    54 								public MCommandObserver
    55 	
    56 	{
    57 public:
    58 	static CUT_PBASE_T_USBDI_0492* NewL(TBool aHostRole);
    59 	~CUT_PBASE_T_USBDI_0492(); 
    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_0492(TBool aHostRole);
    72 	void ConstructL();
    73 
    74 private:
    75 	
    76 	enum TCaseStep
    77 		{
    78 		EInProgress,
    79 		EPassed,
    80 		EFailed,
    81 		ETransferIn,
    82 		ETransferOut
    83 		};
    84 
    85 		TCaseStep iCaseStep;
    86 
    87 private:
    88 	/**
    89 	The functor for this test case
    90 	*/
    91 	const static TFunctorTestCase<CUT_PBASE_T_USBDI_0492,TBool> iFunctor;
    92 	};
    93 
    94 	} //end namespace
    95 
    96 #endif