sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test/usb/t_usb_device/include/t_usbdev_config.h sl@0: // sl@0: // sl@0: sl@0: #ifndef __CONFIG_H__ sl@0: #define __CONFIG_H__ sl@0: sl@0: enum XMLState sl@0: { sl@0: EEmpty, sl@0: EStartKey, sl@0: EEndKey, sl@0: EAttribute, sl@0: EValue sl@0: }; sl@0: sl@0: struct IFConfig sl@0: { sl@0: struct IFConfig * iPtrNext; sl@0: #ifdef USB_SC sl@0: TUsbcScInterfaceInfo* iInfoPtr; sl@0: #else sl@0: TUsbcInterfaceInfo* iInfoPtr; sl@0: #endif sl@0: TBool iAlternateSetting; sl@0: TBool iEpDMA[KMaxEndpointsPerClient]; sl@0: TBool iEpDoubleBuff[KMaxEndpointsPerClient]; sl@0: TUint8 iNumber; sl@0: TUint32 iBandwidthIn; sl@0: TUint32 iBandwidthOut; sl@0: TUint8 iPortNumber; sl@0: IFConfig (TUint8 aNumber); sl@0: }; sl@0: typedef struct IFConfig IFConfigType; sl@0: typedef IFConfigType* IFConfigPtr; sl@0: sl@0: sl@0: struct LDDConfig sl@0: { sl@0: struct LDDConfig * iPtrNext; sl@0: IFConfigPtr iIFPtr; sl@0: TBuf<50> iName; sl@0: TBool iSoftConnect; sl@0: TBool iSelfPower; sl@0: TBool iRemoteWakeup; sl@0: TBool iHighSpeed; sl@0: TBool iEPStall; sl@0: TUint8 iNumEndpoints; sl@0: TUint8 iNumChannels; sl@0: TUint8 iFeatures; sl@0: TUint8 iMaxPower; sl@0: TUint16 iSpec; sl@0: TUint16 iVid; sl@0: TUint16 iPid; sl@0: TUint16 iRelease; sl@0: TBool iOtg_A; sl@0: TBool iOtg_altA; sl@0: TBool iOtg_altB; sl@0: TDesC16 * iManufacturer; sl@0: TDesC16 * iProduct; sl@0: TDesC16 * iSerialNumber; sl@0: LDDConfig (TPtrC aName); sl@0: }; sl@0: typedef struct LDDConfig LDDConfigType; sl@0: typedef LDDConfigType* LDDConfigPtr; sl@0: sl@0: struct ConfigPtrs sl@0: { sl@0: LDDConfigPtr* iNextLDDPtrPtr; sl@0: LDDConfigPtr iThisLDDPtr; sl@0: IFConfigPtr iThisIFPtr; sl@0: IFConfigPtr* iNextIFPtrPtr; sl@0: ConfigPtrs (LDDConfigPtr* LDDPtrPtr); sl@0: }; sl@0: typedef struct ConfigPtrs ConfigPtrsType; sl@0: typedef ConfigPtrsType* ConfigPtrsPtr; sl@0: sl@0: bool ProcessConfigFile (RFile aConfigFile,CConsoleBase* iConsole, LDDConfigPtr * LDDPtrPtr); sl@0: TBool CheckAttribute (CConsoleBase* iConsole, ConfigPtrsPtr cpPtr,TInt aKeyIndex, TPtrC aDes); sl@0: TBool CheckValue (CConsoleBase* iConsole, ConfigPtrsPtr cpPtr,TInt aKeyIndex, TPtrC aDes); sl@0: TInt CheckXmlKey (TPtrC aKey, TInt aLevel); sl@0: TBool TDesToTUint (TPtrC aDes, TUint * aValue); sl@0: TBool TDesToBool (TPtrC aDes, TBool * aValue); sl@0: sl@0: #endif // __CONFIG_H__