usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp
changeset 93 2dc695882abd
parent 47 878846f7623e
child 79 25fce757be94
--- a/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp	Wed Oct 13 13:08:34 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp	Mon Oct 25 13:20:29 2010 +0300
@@ -15,6 +15,7 @@
  *
  */
 
+#include <d32otgdi_errors.h>
 #include "cusbotgwatcher.h"
 #include "cusbstatehostundefined.h"
 
@@ -168,7 +169,8 @@
 // 
 // ---------------------------------------------------------------------------
 //
-void CUsbStateHostUndefined::DriverLoadPartialSuccessL(TDeviceEventInformation)
+void CUsbStateHostUndefined::DriverLoadPartialSuccessL(
+        TDeviceEventInformation)
     {
     LOG_FUNC
     }
@@ -208,7 +210,25 @@
 void CUsbStateHostUndefined::MessageNotificationReceivedL(TInt aMessage)
     {
     LOG_FUNC
-    LOG1( "Unhandled message aMessage = %d" , aMessage);
+    LOG1( "aMessage = %d" , aMessage);
+
+    switch (aMessage)
+        {
+        // OTGDI
+        case KErrUsbOtgBadDeviceAttached:
+            {
+            LOG( "BadDeviceAttached" );
+            HandleL(EUsbWatcherErrUnsupportedDevice,
+                    EUsbStateHostHandleDropping);
+            break;
+            }
+        default:
+            {
+            LOG1( "Unhandled message = %d" , aMessage);
+            break;
+            }
+
+        }
     }
 
 // ---------------------------------------------------------------------------