kerneltest/e32test/usbho/t_usbdi/inc/PBASE-T_USBDI-0500.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 #ifndef __TEST_CASE_PBASE_T_USBDI_0500_H
       
     2 #define __TEST_CASE_PBASE_T_USBDI_0500_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-0500.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-0500
       
    36 	@SYMTestCaseDesc			Test resilience to halting an endpoint whilst performing  a bulk IN transfer
       
    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 bulk IN transfer
       
    44 								3. Client halts endpoint
       
    45 								4. Host clears halt on endpoint (via control transfer request)
       
    46 								5. Request second bulk IN transfer
       
    47 								6. Validate data from second bulk IN transfer.
       
    48 	@SYMTestExpectedResults 	Round trip transfer data is not corrupt
       
    49 	@SYMTestStatus				Draft
       
    50 	
       
    51 
       
    52 */
       
    53 
       
    54 class CUT_PBASE_T_USBDI_0500 :  public CBaseBulkTestCase,
       
    55 								public MTransferObserver,
       
    56 								public MCommandObserver
       
    57 	
       
    58 	{
       
    59 public:
       
    60 	static CUT_PBASE_T_USBDI_0500* NewL(TBool aHostRole);
       
    61 	~CUT_PBASE_T_USBDI_0500(); 
       
    62 
       
    63 public: // From MUsbBusObserver
       
    64 	void DeviceInsertedL(TUint aDeviceHandle);
       
    65 
       
    66 public: // From MCommandObserver
       
    67 	void Ep0TransferCompleteL(TInt aCompletionCode);
       
    68 
       
    69 public: // From MTransferObserver
       
    70 	void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
       
    71 
       
    72 private:
       
    73 	CUT_PBASE_T_USBDI_0500(TBool aHostRole);
       
    74 	void ConstructL();
       
    75 
       
    76 private:
       
    77 	
       
    78 	enum TCaseStep
       
    79 		{
       
    80 		EInProgress,
       
    81 		EPassed,
       
    82 		EFailed,
       
    83 		ETransferInHalt,
       
    84 		ETransferIn
       
    85 		};
       
    86 
       
    87 		TCaseStep iCaseStep;
       
    88 
       
    89 private:
       
    90 	/**
       
    91 	The functor for this test case
       
    92 	*/
       
    93 	const static TFunctorTestCase<CUT_PBASE_T_USBDI_0500,TBool> iFunctor;
       
    94 	};
       
    95 
       
    96 	} //end namespace
       
    97 
       
    98 #endif