Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test/usb/t_usb_device/include/activerw.h
18 #ifndef __ACTIVERW_H__
19 #define __ACTIVERW_H__
24 class CActiveRW : public CActive
27 static CActiveRW* NewL(CConsoleBase* aConsole, RDEVCLIENT* aPort, RFs aFs, TUint16 aIndex, TBool aLastSetting);
32 void SetTestParams(TestParamPtr aTpPtr);
33 void SetTransferMode(TXferMode aMode);
34 TInt WriteToDisk(TChar aDriveLetter);
35 TInt ReadFromDisk(TChar aDriveLetter, TInt aMaxFileSize);
36 void TestComplete(TBool aResult);
37 void Suspend(TXferType aType);
39 void ResumeAltSetting(TUint aAltSetting);
40 void SendWaitSetting();
41 void StartOrSuspend();
44 CActiveRW(CConsoleBase* aConsole, RDEVCLIENT* aPort, RFs aFs, TUint16 aIndex, TBool aLastSetting);
47 virtual void DoCancel();
48 TBool CompareBuffers();
49 void WriteBufferToDisk(TDes8& aBuffer, TInt aLen);
50 void ReadBufferFromDisk(TDes8& aBuffer, TInt aLen);
51 void ProcessWriteXfer();
52 void ProcessReadXfer();
53 void CActiveRW::Yield();
57 TEndpointBuffer iSCWriteBuf;
58 TEndpointBuffer iSCReadBuf;
65 CConsoleBase* iConsole;
67 CActiveTimer* iTimeoutTimer;
72 TXferType iCurrentXfer;
76 TBool iDiskAccessEnabled;
82 TestParamType iTestParams;
89 #endif // __ACTIVERW_H__