Revision: 201021
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 14:33:06 +0300
changeset 21 d67598c1c3be
parent 16 7f84d52cdf22
child 23 d417d624aaf3
Revision: 201021 Kit: 2010121
usbmgmt/usbmgr/host/fdf/production/server/public/fdfapi.h
usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/inc/refppdialog.h
usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/inc/refppnotifier.h
usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/src/dialog.rss
usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/src/refppnotifier.cpp
usbmgmt/usbmgr/usbman/chargingplugin/src/idpinwatcher.cpp
usbmgmt/usbmgr/usbman/chargingplugin/src/otgstatewatcher.cpp
usbmgmt/usbmgr/usbman/chargingplugin/src/vbuswatcher.cpp
usbmgmt/usbmgr/usbman/server/SRC/CUsbDevice.cpp
usbmgmt/usbmgr/usbman/server/public/rusb.h
usbmgmt/usbmgrtest/t_charging_emu/src/1020DEA7.rss
--- a/usbmgmt/usbmgr/host/fdf/production/server/public/fdfapi.h	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/host/fdf/production/server/public/fdfapi.h	Thu May 27 14:33:06 2010 +0300
@@ -28,15 +28,15 @@
 #ifdef __OVER_DUMMYUSBDI__
 const TUint32 KUsbFdfTUint = 0x10282B50;
 _LIT(KUsbFdfImg, "fdf_over_dummyusbdi.exe");
+_LIT(KUsbFdfServerName, "!FdfSrv_over_dummyusbdi");
 #else
 const TUint32 KUsbFdfTUint = 0x10282B48;
 _LIT(KUsbFdfImg, "fdf.exe");
+_LIT(KUsbFdfServerName, "!FdfSrv");
 #endif
 
 const TUid KUsbFdfUid = {KUsbFdfTUint};
 
-_LIT(KUsbFdfServerName, "!FdfSrv");
-
 /** Version numbers. */
 const TInt8 KUsbFdfSrvMajorVersionNumber = 1;
 const TInt8 KUsbFdfSrvMinorVersionNumber = 1;
--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/inc/refppdialog.h	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/inc/refppdialog.h	Thu May 27 14:33:06 2010 +0300
@@ -24,7 +24,7 @@
 #define CREFPPDIALOG_H
 
 // INCLUDES
-#include <techview/eikdialg.h>
+#include <eikdialg.h>
 // CLASS DECLARATION
 
 /**
--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/inc/refppnotifier.h	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/inc/refppnotifier.h	Thu May 27 14:33:06 2010 +0300
@@ -23,7 +23,7 @@
 #ifndef REFPPNOTIFIER_H
 #define REFPPNOTIFIER_H
 
-#include <techview/eikdialg.h>
+#include <eikdialg.h>
 #include <eiknotapi.h>
 #include "refppdialog.h"
 
--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/src/dialog.rss	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/src/dialog.rss	Thu May 27 14:33:06 2010 +0300
@@ -21,9 +21,8 @@
  @internalComponent
 */
 
-#include <techview/eikon.rh>
-#include <techview/eikon.rsg>
-#include <techview/techviewctl.rh>
+#include <eikon.rh>
+#include <eikon.rsg>
 #include <eikcoctl.rsg>
 #include "refppnotifier.hrh"
 NAME REFN
--- a/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/src/refppnotifier.cpp	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/host/functiondrivers/ms/msmm/refppnotifier/src/refppnotifier.cpp	Thu May 27 14:33:06 2010 +0300
@@ -23,9 +23,9 @@
 #include "refppnotifier.h"
 #include <ecom/implementationproxy.h>
 #include "refppnotifier.hrh"
-#include <techview/eikinfo.h>
+#include <eikinfo.h>
 #include <dialog.rsg>
-#include <techview/eiklabel.h>
+#include <eiklabel.h>
 #include <usb/hostms/srverr.h>
 #include <usb/hostms/policypluginnotifier.hrh>
 const TUid KMsmmRefNotifierChannel = {0x10009D48}; //0x10208C14
--- a/usbmgmt/usbmgr/usbman/chargingplugin/src/idpinwatcher.cpp	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/chargingplugin/src/idpinwatcher.cpp	Thu May 27 14:33:06 2010 +0300
@@ -48,7 +48,13 @@
 
 void CIdPinWatcher::ConstructL()
 	{
-	User::LeaveIfError(iIdPinProp.Attach(KUidUsbManCategory, KUsbOtgIdPinPresentProperty));
+#ifdef __CHARGING_PLUGIN_TEST_CODE__
+    const TInt8 KPropertyOffsetForChargingTest = 100;
+    User::LeaveIfError(iIdPinProp.Attach(KUidUsbManCategory, KUsbOtgIdPinPresentProperty + KPropertyOffsetForChargingTest));
+#else
+    User::LeaveIfError(iIdPinProp.Attach(KUidUsbManCategory, KUsbOtgIdPinPresentProperty));
+#endif
+    
 	iIdPinProp.Subscribe(iStatus);
 	SetActive();
 
--- a/usbmgmt/usbmgr/usbman/chargingplugin/src/otgstatewatcher.cpp	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/chargingplugin/src/otgstatewatcher.cpp	Thu May 27 14:33:06 2010 +0300
@@ -48,7 +48,13 @@
 
 void COtgStateWatcher::ConstructL()
 	{
-	User::LeaveIfError(iOtgStateProp.Attach(KUidUsbManCategory, KUsbOtgStateProperty));
+#ifdef __CHARGING_PLUGIN_TEST_CODE__
+    const TInt8 KPropertyOffsetForChargingTest = 100;
+    User::LeaveIfError(iOtgStateProp.Attach(KUidUsbManCategory, KUsbOtgStateProperty + KPropertyOffsetForChargingTest));
+#else
+    User::LeaveIfError(iOtgStateProp.Attach(KUidUsbManCategory, KUsbOtgStateProperty));
+#endif
+
 	iOtgStateProp.Subscribe(iStatus);
 	SetActive();
 
--- a/usbmgmt/usbmgr/usbman/chargingplugin/src/vbuswatcher.cpp	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/chargingplugin/src/vbuswatcher.cpp	Thu May 27 14:33:06 2010 +0300
@@ -48,7 +48,13 @@
 
 void CVBusWatcher::ConstructL()
 	{
-	User::LeaveIfError(iVBusProp.Attach(KUidUsbManCategory, KUsbOtgVBusPoweredProperty));
+#ifdef __CHARGING_PLUGIN_TEST_CODE__
+    const TInt8 KPropertyOffsetForChargingTest = 100;
+    User::LeaveIfError(iVBusProp.Attach(KUidUsbManCategory, KUsbOtgVBusPoweredProperty + KPropertyOffsetForChargingTest));
+#else
+    User::LeaveIfError(iVBusProp.Attach(KUidUsbManCategory, KUsbOtgVBusPoweredProperty));
+#endif
+
 	iVBusProp.Subscribe(iStatus);
 	SetActive();
 
--- a/usbmgmt/usbmgr/usbman/server/SRC/CUsbDevice.cpp	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/server/SRC/CUsbDevice.cpp	Thu May 27 14:33:06 2010 +0300
@@ -118,6 +118,7 @@
 	// the observers themselves.
 	iObservers.Reset();
 
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 	LOGTEXT2(_L8("about to delete device state watcher @ %08x"), (TUint32) iDeviceStateWatcher);
 	delete iDeviceStateWatcher;
@@ -133,6 +134,7 @@
 		{
 		LOGTEXT2(_L8("     User::FreeLogicalDevice returned %d"),err);
 		}
+#endif
 #endif	
 
 	delete iDefaultSerialNumber;
@@ -164,6 +166,7 @@
 
 	iUsbClassControllerIterator = new(ELeave) CUsbClassControllerIterator(iSupportedClasses);
 
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 	LOGTEXT(_L8("About to load LDD"));
 	TInt err = User::LoadLogicalDevice(KUsbLDDName);
@@ -229,6 +232,7 @@
 
 	LOGTEXT(_L8("UsbDevice::ConstructL() finished"));
 #endif
+#endif
 	
 #ifndef __OVER_DUMMYUSBDI__
 	InstantiateExtensionPluginsL();
@@ -491,6 +495,7 @@
 
 	if (iDeviceState != state)
 		{
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 		if (iDeviceState == EUsbDeviceStateUndefined &&
 			iUdcSupportsCableDetectWhenUnpowered &&
@@ -502,7 +507,8 @@
 			// it up (so long as usbman is fully started).
 			(void)PowerUpAndConnect(); // We don't care about any errors here.
 			}
-#endif // __WINS__
+#endif
+#endif // __OVER_DUMMYUSBDI__
 		// Change state straight away in case any of the clients check it
 		TUsbDeviceState oldState = iDeviceState;
 		iDeviceState = state;
@@ -610,6 +616,7 @@
 	case EUsbServiceStarting:
 		if (iUsbClassControllerIterator->Next() == KErrNotFound)
 			{
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 			if (!iUdcSupportsCableDetectWhenUnpowered || iDeviceState != EUsbDeviceStateUndefined)
 				{
@@ -623,6 +630,7 @@
 				(void)PowerUpAndConnect();
 				}
 #endif
+#endif
 			// If we're not running on target, we can just go to "started".
 			SetServiceState(EUsbServiceStarted);
 			}
@@ -636,6 +644,7 @@
 		if (iUsbClassControllerIterator->Previous() == KErrNotFound)
 			{
 			// if stopping classes, hide the USB interface from the host
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 			iLdd.DeviceDisconnectFromHost();
 
@@ -650,7 +659,8 @@
 				TInt res = iLdd.RemoveSerialNumberStringDescriptor();
 				LOGTEXT2(_L8("Remove serial number res = %d"), res);
 				}
-				
+
+#endif				
 #endif			
 			SetServiceState(EUsbServiceIdle);
 			}
@@ -793,7 +803,7 @@
 	{
 	LOG_FUNC
 
-#ifndef __WINS__
+#if !defined(__OVER_DUMMYUSBDI__) && !defined(__WINS__)
 
 	TInt desSize = 0;
 	iLdd.GetDeviceDescriptorSize(desSize);
@@ -821,7 +831,7 @@
 	TUsbDeviceDescriptor descriptor;
 	TUsbDeviceDescriptor* deviceDescriptor = &descriptor;
 	
-#endif // __WINS__
+#endif // __OVER_DUMMYUSBDI__ && _WINS_
 
 	if (iPersonalityCfged)
 		{
@@ -832,6 +842,7 @@
 	SetUsbDeviceSettingsL(*deviceDescriptor);
 		}
 	
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 	ret = iLdd.SetDeviceDescriptor(devicePtr);
 
@@ -843,7 +854,8 @@
 
 	CleanupStack::PopAndDestroy(deviceBuf);
 
-#endif // __WINS__
+#endif
+#endif // __OVER_DUMMYUSBDI__
 	}
 
 void CUsbDevice::SetUsbDeviceSettingsDefaultsL(CUsbDevice::TUsbDeviceDescriptor& aDeviceDescriptor)
@@ -932,6 +944,7 @@
 	
 	// If we succesfully read the manufacturer or device name from SysUtil API
 	// then set these results, otherwise use the values defined in resource file
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 	if (gotSysUtilManuName == KErrNone)
 		{
@@ -950,7 +963,9 @@
 		{
 		LEAVEIFERRORL(iLdd.SetProductStringDescriptor(productString));
 		}
-#endif // __WINS__
+		
+#endif
+#endif // __OVER_DUMMYUSBDI__
 
 #ifdef __FLOG_ACTIVE
 	PrintDescriptor(aDeviceDescriptor);	
@@ -961,6 +976,7 @@
 	LOGTEXT2(_L8("Product is: '%S'"), &narrowString);
 #endif // __FLOG_ACTIVE
 
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__	
 	//Read the published serial number. The key is the UID KUidUsbmanServer = 0x101FE1DB
 	TBuf16<KUsbStringDescStringMaxSize> serNum;
@@ -982,7 +998,9 @@
 		LOGTEXT(_L8("SerialNumber has not been published"));	
 		}
 #endif // __FLOG_ACTIVE
-#endif // __WINS__
+
+#endif
+#endif // __OVER_DUMMYUSBDI__
 
 
 	CleanupStack::PopAndDestroy(4, &fs); //  deviceInfo, id, resource, fs
@@ -1012,6 +1030,7 @@
 	aDeviceDescriptor.iSerialNumber			= deviceDes.iSerialNumber;
 	aDeviceDescriptor.iNumConfigurations	= deviceDes.iNumConfigurations;
 
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 	LEAVEIFERRORL(iLdd.SetManufacturerStringDescriptor(*(iCurrentPersonality->Manufacturer())));
 	LEAVEIFERRORL(iLdd.SetProductStringDescriptor(*(iCurrentPersonality->Product())));
@@ -1036,12 +1055,15 @@
 		LOGTEXT(_L8("SerialNumber has not been published"));	
 		}
 #endif // __FLOG_ACTIVE
-#endif // __WINS__
+
+#endif
+#endif // __OVER_DUMMYUSBDI__
 
 
 #ifdef __FLOG_ACTIVE
 	PrintDescriptor(aDeviceDescriptor);		
 
+#ifndef __OVER_DUMMYUSBDI__
 #ifndef __WINS__
 	TBuf16<KUsbStringDescStringMaxSize> wideString;
 	TBuf8<KUsbStringDescStringMaxSize> narrowString;
@@ -1049,7 +1071,8 @@
 	LEAVEIFERRORL(iLdd.GetConfigurationStringDescriptor(wideString));
 	narrowString.Copy(wideString);
 	LOGTEXT2(_L8("Configuration is: '%S'"), &narrowString);
-#endif // __WINS__
+#endif
+#endif // __OVER_DUMMYUSBDI__
 
 #endif // __FLOG_ACTIVE
 	}
--- a/usbmgmt/usbmgr/usbman/server/public/rusb.h	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/server/public/rusb.h	Thu May 27 14:33:06 2010 +0300
@@ -35,7 +35,11 @@
 
 const TInt KUsbMaxSupportedPersonalities = 64;	// Max number of supported personalities
 
+#ifndef __OVER_DUMMYUSBDI__
 _LIT(KUsbServerName, "!usbman");
+#else
+_LIT(KUsbServerName, "!usbman_over_dummyusbdi");
+#endif
 
 enum TUsbMessages
 	{
--- a/usbmgmt/usbmgrtest/t_charging_emu/src/1020DEA7.rss	Fri May 14 17:40:49 2010 +0300
+++ b/usbmgmt/usbmgrtest/t_charging_emu/src/1020DEA7.rss	Thu May 27 14:33:06 2010 +0300
@@ -29,7 +29,7 @@
 		{
 		INTERFACE_INFO
 			{
-			interface_uid = 0x10208DD6;
+			interface_uid = 0xE0208DD6;
 			implementations =
 				{
 				IMPLEMENTATION_INFO