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