os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0459.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/usbho/t_otgdi/inc/testcase0459.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,91 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// @internalComponent
    1.18 +// 'A' connector detection
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +
    1.23 +#ifndef TESTCASE0459_H
    1.24 +#define TESTCASE0459_H
    1.25 +
    1.26 +
    1.27 +	
    1.28 +//----------------------------------------------------------------------------------------------		
    1.29 +//!	@SYMTestCaseID				PBASE-T_OTGDI-0459
    1.30 +//!	@SYMTestCaseDesc			Get ID_PIN notifications
    1.31 +//!	@SYMFssID 
    1.32 +//!	@SYMPREQ					1782
    1.33 +//!	@SYMREQ						7079
    1.34 +//!	@SYMTestType				UT
    1.35 +//!	@SYMTestPriority			1 
    1.36 +//!	@SYMTestActions 			1. Fetch the OTG controller state (using QueueOtgStateRequest())
    1.37 +//!								2. Register for events with OtgEventNotification()
    1.38 +//!								3. Use internal API to manipulate ID pin state to simulate A plug presence
    1.39 +//!								4. Wait max 5 seconds for insertion event.
    1.40 +//!								5. Fetch the OTG controller state (using QueueOtgStateRequest())
    1.41 +//!	@SYMTestExpectedResults 	1. 
    1.42 +//!								Between 3. and 4., we expect to get an indication of A plug insertion.
    1.43 +//!								5. 
    1.44 +//----------------------------------------------------------------------------------------------	
    1.45 +
    1.46 +	class CTestCase0459 : public CTestCaseRoot
    1.47 +	{
    1.48 +public:
    1.49 +	static CTestCase0459* NewL(TBool aHost);
    1.50 +	virtual ~CTestCase0459(); 	
    1.51 +
    1.52 +	virtual void ExecuteTestCaseL();
    1.53 +	void DoCancel();
    1.54 +
    1.55 +	void RunStepL();
    1.56 +	virtual void DescribePreconditions();
    1.57 +	TInt GetStepIndex()	{ return(iCaseStep); };
    1.58 +		
    1.59 +private:
    1.60 +	CTestCase0459(TBool aHost);
    1.61 +	void ConstructL();
    1.62 +	
    1.63 +	// DATA
    1.64 +public:
    1.65 +
    1.66 +private:
    1.67 +
    1.68 +	TInt iDequeAttempts;
    1.69 +
    1.70 +
    1.71 +	enum TCaseSteps
    1.72 +		{
    1.73 +		EPreconditions,
    1.74 +		ELoadLdd,
    1.75 +		ERegisterForEvents,		// QueueOtgEventRequest( event, status );
    1.76 +		EDriveID_PIN,
    1.77 +		EWait5,
    1.78 +		ETestStateA,
    1.79 +		EUnloadLdd,
    1.80 +		ELastStep	
    1.81 +		};
    1.82 +				
    1.83 +	TCaseSteps iCaseStep;
    1.84 +	
    1.85 +	TTime		iIDcheckStart;	// start of checking for ID_PIN
    1.86 +	TTime		iIDcheckEnd;
    1.87 +	
    1.88 +	const static TTestCaseFactoryReceipt<CTestCase0459> iFactoryReceipt;
    1.89 +	
    1.90 +	
    1.91 +	};
    1.92 +	
    1.93 +	
    1.94 +#endif // TESTCASE0459_H