os/kernelhwsrv/kerneltest/e32test/usbho/t_usbdi/inc/PBASE-T_USBDI-0491.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 #ifndef __TEST_CASE_PBASE_T_USBDI_0491_H
     2 #define __TEST_CASE_PBASE_T_USBDI_0491_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-0491.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 	
    36 	@SYMTestCaseID				PBASE-T_USBDI-0491
    37 	@SYMTestCaseDesc			Test for bulk transfers requiring more than one packet
    38 	@SYMFssID 
    39 	@SYMPREQ					1305
    40 	@SYMREQ						7055 [USBD : Bulk transfers]
    41 	@SYMTestType				UT
    42 	@SYMTestPriority			1 
    43 	@SYMTestActions 			1. Open interfaces to connected device
    44 								2. Request a bulk out transfer
    45 								3. Request a bulk in transfer (expecting data just transferred to peripheral to be sent back)
    46 								4. Validate round trip data
    47 	@SYMTestExpectedResults 	Round trip transfer data is not corrupt
    48 	@SYMTestStatus				Draft
    49 	
    50 
    51 */
    52 	class CUT_PBASE_T_USBDI_0491 :  public CBaseBulkTestCase,
    53 	public MTransferObserver,
    54 	public MCommandObserver
    55 	{
    56 public:
    57 	static CUT_PBASE_T_USBDI_0491* NewL(TBool aHostRole);
    58 	~CUT_PBASE_T_USBDI_0491(); 
    59 
    60 public: // From MUsbBusObserver
    61 	void DeviceInsertedL(TUint aDeviceHandle);
    62 
    63 public: // From MCommandObserver
    64 	void Ep0TransferCompleteL(TInt aCompletionCode);
    65 
    66 public: // From MTransferObserver
    67 	void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
    68 
    69 private:
    70 	CUT_PBASE_T_USBDI_0491(TBool aHostRole);
    71 	void ConstructL();
    72 
    73 private:
    74 	
    75 	enum TCaseStep
    76 		{
    77 		EInProgress,
    78 		EPassed,
    79 		EFailed,
    80 		ETransferIn,
    81 		ETransferOut
    82 		};
    83 
    84 	TCaseStep iCaseStep;
    85 
    86 private:
    87 	/**
    88 	The functor for this test case
    89 	*/
    90 	const static TFunctorTestCase<CUT_PBASE_T_USBDI_0491,TBool> iFunctor;
    91 	};
    92 
    93 	} //end namespace
    94 
    95 #endif