Update contrib.
1 #ifndef __TEST_CASE_PBASE_T_USBDI_1234_H
2 #define __TEST_CASE_PBASE_T_USBDI_1234_H
5 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
12 * Initial Contributors:
13 * Nokia Corporation - initial contribution.
18 * @file PBASE-T_USBDI-1234.h
26 #include "BaseBulkTestCase.h"
27 #include "basicwatcher.h"
29 namespace NUnitTesting_USBDI
34 @SYMTestCaseID PBASE-T_USBDI-1234
35 @SYMTestCaseDesc Device suspend and resume only depend on the RUsbInterface
40 @SYMTestActions 1. after device suspended,call resume interface and immediately do some bulk transfer operation
41 @SYMTestExpectedResults Correct suspension and device resumption can be established
42 @SYMTestStatus Implemented
45 class CUT_PBASE_T_USBDI_1234 : public CBaseBulkTestCase,
46 public MTransferObserver, public MCommandObserver
50 static CUT_PBASE_T_USBDI_1234* NewL(TBool aHostRole);
51 ~CUT_PBASE_T_USBDI_1234();
53 static TInt Interface0ResumedL(TAny* aPtr);
54 static TInt Interface1ResumedL(TAny* aPtr);
55 static TInt Interface2ResumedL(TAny* aPtr);
62 EValidateResumebyInterface,
63 EBulkTransferOutWhenResume,
64 EValidBulkTransfeOut, // tranfer in read
69 enum TDeviceInsertedError
77 // From MUsbBusObserver
78 void DeviceInsertedL(TUint aDeviceHandle);
79 void DeviceStateChangeL(RUsbDevice::TDeviceState aPreviousState,
80 RUsbDevice::TDeviceState aNewState, TInt aCompletionCode);
83 // From MCommandObserver
84 void Ep0TransferCompleteL(TInt aCompletionCode);
87 // From MTransferObserver
88 void TransferCompleteL(TInt aTransferId, TInt aCompletionCode);
92 CUT_PBASE_T_USBDI_1234(TBool aHostRole);
94 void ExecuteHostTestCaseL();
102 void TrySuspendDeviceByInterfaces();
104 void SendEpRequest();
105 void SendEpTransferRequest();
107 TInt DoBulkOutTransfer(TInt aTransferId, TInt aCompletionCode,
109 void TryResumeTransferImmediately(RUsbDevice::TDeviceState aState);
114 CInterfaceWatcher* iInterface0Watcher;
115 CInterfaceWatcher* iInterface1Watcher;
116 CInterfaceWatcher* iInterface2Watcher;
122 TCaseSteps iCaseStep;
127 The functor for this test case for the factory
129 const static TFunctorTestCase<CUT_PBASE_T_USBDI_1234,TBool> iFunctor;