Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
17 // This contains T_RDevUsbcClientData.h
19 #ifndef T_RDEVUSBCLIENT_DATA_H
20 #define T_RDEVUSBCLIENT_DATA_H
24 #include "DataWrapperBase.h"
25 #include "USBConstants.h"
29 #include <e32base.h> // CActive
30 #include <d32usbc.h> // RDevUsbcClient
38 * CT_RDevUsbcClientData class
40 class CT_RDevUsbcClientData : public CDataWrapperBase
43 ~CT_RDevUsbcClientData();
44 static CT_RDevUsbcClientData* NewL();
46 virtual TAny* GetObject();
47 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
48 void RunL(CActive* aActive, TInt aIndex);
50 void Signal(TInt aResult);
53 CT_RDevUsbcClientData();
59 void DoCmdUtilityLoadLogicalDevice(const TTEFSectionName& aSection);
61 void DoCmdDeviceCaps(const TTEFSectionName& aSection);
62 void DoCmdGetDeviceDescriptorSize(const TTEFSectionName& aSection);
63 void DoCmdGetDeviceDescriptor(const TTEFSectionName& aSection);
64 void DoCmdSetDeviceDescriptor(const TTEFSectionName& aSection);
65 void DoCmdUtilitySetEndPointL(const TTEFSectionName& aSection);
66 void DoCmdSetInterface(const TTEFSectionName& aSection);
67 void DoCmdDestructor();
68 void DoCmdEndpointCaps();
70 * Returns current Testclass
72 TInt SetEndpoint(TUint aEndpointType, TUint aEndpointDirection);
76 * Provides handle to USB Driver channel
77 * USB Interface is configured using this channel
79 RDevUsbcClient *iChannel;
82 * Package buffer for a TUsbcInterfaceInfo object. This buffer
83 * is filled prior to a call to RDevUsbcClient::SetInterface
85 TUsbcInterfaceInfoBuf iInterface;
87 /** Data structures for endpoint data, KUsbcMaxEndpoints is defined in d32usbc.h
88 requires both endpoint data container and descripter the data is stored to*/
89 TUsbcEndpointData iEndpointData[KUsbcMaxEndpoints];
92 * Number of currently set endpoints,
93 * maximum is defined in d32usbc.h KMaxEndpointsPerClient
95 TInt iConfiguredEndpoints;
99 * Maximum packet size for sending.
101 TInt iTxMaxPacketSize;
106 TUsbDeviceCaps iCaps;
109 * Active Callback for asynchronous functions
111 CActiveCallback* iActiveCallback;
114 * Buffer for init device.
117 HBufC8* iBuffer_verify;
121 TInt iDeviceDescriptorSize;
123 * Enum for the resources of the Endpoint
125 static const TEnumEntryTable iEUsbcEndpointResource[];
130 #endif // T_RDEVUSBCLIENT_DATA_H