1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/haitest/bspsvs/suite/e32/inc/T_RDevUsbcClientData.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,131 @@
1.4 +/*
1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +// This contains T_RDevUsbcClientData.h
1.21 +
1.22 +#ifndef T_RDEVUSBCLIENT_DATA_H
1.23 +#define T_RDEVUSBCLIENT_DATA_H
1.24 +
1.25 +
1.26 +// User Includes
1.27 +#include "DataWrapperBase.h"
1.28 +#include "USBConstants.h"
1.29 +
1.30 +
1.31 +// System includes
1.32 +#include <e32base.h> // CActive
1.33 +#include <d32usbc.h> // RDevUsbcClient
1.34 +#include <e32debug.h>
1.35 +#include <f32file.h>
1.36 +#include <e32cmn.h>
1.37 +
1.38 +
1.39 +
1.40 +/**
1.41 + * CT_RDevUsbcClientData class
1.42 + */
1.43 +class CT_RDevUsbcClientData : public CDataWrapperBase
1.44 + {
1.45 +public:
1.46 + ~CT_RDevUsbcClientData();
1.47 + static CT_RDevUsbcClientData* NewL();
1.48 +
1.49 + virtual TAny* GetObject();
1.50 + virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
1.51 + void RunL(CActive* aActive, TInt aIndex);
1.52 + void DoCancel();
1.53 + void Signal(TInt aResult);
1.54 + void DestroyData();
1.55 +protected:
1.56 + CT_RDevUsbcClientData();
1.57 +
1.58 + void ConstructL();
1.59 +
1.60 +private:
1.61 + void DoCmdNewL();
1.62 + void DoCmdUtilityLoadLogicalDevice(const TTEFSectionName& aSection);
1.63 + void DoCmdOpen();
1.64 + void DoCmdDeviceCaps(const TTEFSectionName& aSection);
1.65 + void DoCmdGetDeviceDescriptorSize(const TTEFSectionName& aSection);
1.66 + void DoCmdGetDeviceDescriptor(const TTEFSectionName& aSection);
1.67 + void DoCmdSetDeviceDescriptor(const TTEFSectionName& aSection);
1.68 + void DoCmdUtilitySetEndPointL(const TTEFSectionName& aSection);
1.69 + void DoCmdSetInterface(const TTEFSectionName& aSection);
1.70 + void DoCmdDestructor();
1.71 + void DoCmdEndpointCaps();
1.72 + /**
1.73 + * Returns current Testclass
1.74 + */
1.75 + TInt SetEndpoint(TUint aEndpointType, TUint aEndpointDirection);
1.76 +
1.77 +private:
1.78 +/**
1.79 + * Provides handle to USB Driver channel
1.80 + * USB Interface is configured using this channel
1.81 + */
1.82 + RDevUsbcClient *iChannel;
1.83 +
1.84 + /**
1.85 + * Package buffer for a TUsbcInterfaceInfo object. This buffer
1.86 + * is filled prior to a call to RDevUsbcClient::SetInterface
1.87 + */
1.88 + TUsbcInterfaceInfoBuf iInterface;
1.89 +
1.90 + /** Data structures for endpoint data, KUsbcMaxEndpoints is defined in d32usbc.h
1.91 + requires both endpoint data container and descripter the data is stored to*/
1.92 + TUsbcEndpointData iEndpointData[KUsbcMaxEndpoints];
1.93 +
1.94 + /**
1.95 + * Number of currently set endpoints,
1.96 + * maximum is defined in d32usbc.h KMaxEndpointsPerClient
1.97 + */
1.98 + TInt iConfiguredEndpoints;
1.99 +
1.100 +
1.101 + /**
1.102 + * Maximum packet size for sending.
1.103 + */
1.104 + TInt iTxMaxPacketSize;
1.105 +
1.106 + /**
1.107 + * Capabilities
1.108 + */
1.109 + TUsbDeviceCaps iCaps;
1.110 +
1.111 + /**
1.112 + * Active Callback for asynchronous functions
1.113 + */
1.114 + CActiveCallback* iActiveCallback;
1.115 +
1.116 + /**
1.117 + * Buffer for init device.
1.118 + */
1.119 + HBufC8* iBuffer;
1.120 + HBufC8* iBuffer_verify;
1.121 + /**
1.122 + * Descriptor size.
1.123 + */
1.124 + TInt iDeviceDescriptorSize;
1.125 + /**
1.126 + * Enum for the resources of the Endpoint
1.127 + */
1.128 + static const TEnumEntryTable iEUsbcEndpointResource[];
1.129 +
1.130 + };
1.131 +
1.132 +
1.133 +#endif // T_RDEVUSBCLIENT_DATA_H
1.134 +