usbengines/usbwatcher/src/cusbactivestate.cpp
branchGCC_SURGE
changeset 63 ef2686f7597e
parent 8 7e15987c4500
parent 38 218231f2b3b3
equal deleted inserted replaced
40:e84fb4c9218b 63:ef2686f7597e
    54     LOG1( "Intial UsbDeviceState = %d" , iCurrentState );
    54     LOG1( "Intial UsbDeviceState = %d" , iCurrentState );
    55         
    55         
    56     // start USB if cable is pluged-in at bootup
    56     // start USB if cable is pluged-in at bootup
    57     if( EUsbDeviceStateUndefined != iCurrentState )
    57     if( EUsbDeviceStateUndefined != iCurrentState )
    58         {
    58         {
    59         iOwner.StateChangeNotify( iPreviousState, iCurrentState );
    59         iOwner.StateChangeNotifyL( iPreviousState, iCurrentState );
    60         iPreviousState = iCurrentState;
    60         iPreviousState = iCurrentState;
    61         }
    61         }
    62     iUsbMan.DeviceStateNotification( KUsbAllStates, iCurrentState, iStatus );
    62     iUsbMan.DeviceStateNotification( KUsbAllStates, iCurrentState, iStatus );
    63     SetActive();
    63     SetActive();
    64     }
    64     }
   104     // Notify only if there is a change
   104     // Notify only if there is a change
   105     if ( newState != iPreviousState )
   105     if ( newState != iPreviousState )
   106         {
   106         {
   107         LOG2( "USB device state changed: %d ==> %d", iPreviousState,
   107         LOG2( "USB device state changed: %d ==> %d", iPreviousState,
   108             newState );
   108             newState );
   109         iOwner.StateChangeNotify( iPreviousState, newState );
   109         iOwner.StateChangeNotifyL( iPreviousState, newState );
   110         iPreviousState = newState;
   110         iPreviousState = newState;
   111         }
   111         }
   112      else
   112      else
   113         {
   113         {
   114         LOG2("USB device change ignored: %d -> %d", iPreviousState,
   114         LOG2("USB device change ignored: %d -> %d", iPreviousState,