os/kernelhwsrv/kerneltest/e32test/usbho/t_usbdi/inc/PBASE-T_USBDI-0475.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_0475_H
     2 #define __TEST_CASE_PBASE_T_USBDI_0475_H
     3 
     4 /*
     5 * Copyright (c) 2007-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-0475.h
    19 * @internalComponent
    20 * 
    21 *
    22 */
    23 
    24 
    25 
    26  
    27 #include "basetestcase.h"
    28 #include "testcasefactory.h"
    29 #include "FDFActor.h"
    30 #include <d32usbc.h>
    31 #include <e32debug.h>
    32 #include "hosttransfers.h"
    33 
    34 namespace NUnitTesting_USBDI
    35 	{
    36 
    37 /**
    38 
    39 	
    40 	@SYMTestCaseID				PBASE-T_USBDI-0475
    41 	@SYMTestCaseDesc			Validation of ill-formed USB descriptors
    42 	@SYMFssID 
    43 	@SYMPREQ					1782
    44 	@SYMREQ						7058 - [USBD : Descriptor access]
    45                                 7060 - [USBD : Descriptor access: backward compatibility]
    46 	@SYMTestType				UT
    47 	@SYMTestPriority			1 
    48 	@SYMTestActions 			1. Parse descriptors using a raw data set.	
    49                                 2. Process descriptor 	
    50                                 3. Compare generated trees to reference ones	
    51 	@SYMTestExpectedResults 	No errors
    52 	@SYMTestStatus				Implemented
    53 	
    54 
    55 */
    56 class CUT_PBASE_T_USBDI_0475 : public CBaseTestCase
    57 	{
    58 public:
    59 	static CUT_PBASE_T_USBDI_0475* NewL(TBool aHostRole);
    60 	~CUT_PBASE_T_USBDI_0475(); 
    61 
    62 public: // From MUsbBusObserver
    63 	void DeviceInsertedL(TUint aDeviceHandle);
    64 	void DeviceRemovedL(TUint aDeviceHandle);
    65 	void BusErrorL(TInt aError);
    66 	void DeviceStateChangeL(RUsbDevice::TDeviceState aPreviousState,RUsbDevice::TDeviceState aNewState,
    67 		TInt aCompletionCode);
    68 	
    69 public: // From MTransferObserver
    70 	void TransferCompleteL(TInt aTransferId,TInt aCompletionCode);
    71 	
    72 private:
    73 	CUT_PBASE_T_USBDI_0475(TBool aHostRole);
    74 	void ConstructL();
    75 	void ExecuteHostTestCaseL();
    76 	void ExecuteDeviceTestCaseL();
    77 	void HostDoCancel();
    78 	void DeviceDoCancel();
    79 	void HostRunL();
    80 	void DeviceRunL();
    81 
    82 private:
    83 	
    84 	enum TCaseStep
    85 		{
    86 		EInProgress,
    87 		EPassed,
    88 		EFailed
    89 		};
    90 
    91 	TCaseStep iCaseStep;
    92 
    93 private:
    94 	/**
    95 	The functor for this test case for the factory
    96 	*/
    97 	const static TFunctorTestCase<CUT_PBASE_T_USBDI_0475,TBool> iFunctor;
    98 	};
    99 
   100 	}
   101 
   102 
   103 #endif