usbmgmt/usbmgr/usbman/chargingplugin/src/vbuswatcher.cpp
changeset 25 4ddb65515edd
parent 0 c9bc50fca66e
child 43 012cc2ee6408
equal deleted inserted replaced
14:4285b54b0d2c 25:4ddb65515edd
    46 	CActiveScheduler::Add(this);
    46 	CActiveScheduler::Add(this);
    47 	}
    47 	}
    48 
    48 
    49 void CVBusWatcher::ConstructL()
    49 void CVBusWatcher::ConstructL()
    50 	{
    50 	{
    51 	User::LeaveIfError(iVBusProp.Attach(KUidUsbManCategory, KUsbOtgVBusPoweredProperty));
    51 #ifdef __CHARGING_PLUGIN_TEST_CODE__
       
    52     const TInt8 KPropertyOffsetForChargingTest = 100;
       
    53     User::LeaveIfError(iVBusProp.Attach(KUidUsbManCategory, KUsbOtgVBusPoweredProperty + KPropertyOffsetForChargingTest));
       
    54 #else
       
    55     User::LeaveIfError(iVBusProp.Attach(KUidUsbManCategory, KUsbOtgVBusPoweredProperty));
       
    56 #endif
       
    57 
    52 	iVBusProp.Subscribe(iStatus);
    58 	iVBusProp.Subscribe(iStatus);
    53 	SetActive();
    59 	SetActive();
    54 
    60 
    55 	TInt err = iVBusProp.Get(iVBusState);
    61 	TInt err = iVBusProp.Get(iVBusState);
    56 	if (KErrNone != err)
    62 	if (KErrNone != err)