diff -r d3e8e7d462dd -r f92a4f87e424 usbmgmt/usbmgr/usbman/server/INC/CUsbDevice.h --- a/usbmgmt/usbmgr/usbman/server/INC/CUsbDevice.h Thu Jul 15 20:42:20 2010 +0300 +++ b/usbmgmt/usbmgr/usbman/server/INC/CUsbDevice.h Tue Aug 31 17:01:47 2010 +0300 @@ -1,5 +1,5 @@ /** -* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -35,12 +35,16 @@ #include #include + + class CUsbDeviceStateWatcher; class CUsbClassControllerBase; class CUsbServer; class MUsbDeviceNotify; class CPersonality; class CUsbmanExtensionPlugin; +class CUsbManCenRepManager; + const TUid KUidUsbPlugIns = {0x101fbf21}; @@ -74,14 +78,24 @@ TUint8 iDeviceProtocol; TUint8 iMaxPacketSize; TUint16 iIdVendor; - TUint16 iIdProduct; + TUint16 iProductId; TUint16 iBcdDevice; TUint8 iManufacturer; TUint8 iProduct; TUint8 iSerialNumber; TUint8 iNumConfigurations; }; - + + /** + * See Central Repository + */ + class TUsbDeviceConfiguration + { + public: + TUint16 iVendorId; + HBufC* iManufacturerName; + HBufC* iProductName; + }; public: static CUsbDevice* NewL(CUsbServer& aUsbServer); virtual ~CUsbDevice(); @@ -115,6 +129,7 @@ void ReadPersonalitiesL(); void SetDefaultPersonalityL(); void LoadFallbackClassControllersL(); + void ConvertUidsL(const TDesC& aStr, RArray& aUidArray); public: // From CActive void RunL(); @@ -137,22 +152,20 @@ private: void SetDeviceDescriptorL(); - void SetUsbDeviceSettingsL(TUsbDeviceDescriptor& aDeviceDescriptor); void SetUsbDeviceSettingsDefaultsL(TUsbDeviceDescriptor& aDeviceDescriptor); void SelectClassControllersL(); void SetCurrentPersonalityL(TInt aPersonalityId); void SetUsbDeviceSettingsFromPersonalityL(CUsbDevice::TUsbDeviceDescriptor& aDeviceDescriptor); void ResourceFileNameL(TFileName& aFileName); void CreateClassControllersL(const RArray& aClassUids); - void ConvertUidsL(const TDesC& aStr, RArray& aUidArray); TInt PowerUpAndConnect(); -#ifdef __FLOG_ACTIVE +#ifdef _DEBUG void PrintDescriptor(CUsbDevice::TUsbDeviceDescriptor& aDeviceDescriptor); #endif void InstantiateExtensionPluginsL(); private: RPointerArray iSupportedClasses; - RPointerArray iObservers; + RPointerArray iObservers; RPointerArray iExtensionPlugins; TUsbDeviceState iDeviceState; TUsbServiceState iServiceState; @@ -167,6 +180,8 @@ TBool iPersonalityCfged; TBool iUdcSupportsCableDetectWhenUnpowered; HBufC16* iDefaultSerialNumber; + CUsbManCenRepManager* iCenRepManager; // Own CenRepManager instance + TUsbDeviceConfiguration iDeviceConfiguration; REComSession* iEcom; // Not to be deleted, only closed! };