usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp
branchRCL_3
changeset 27 f6533aee8b2b
parent 21 ff9df6630274
child 79 25fce757be94
--- a/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp	Wed Apr 14 17:02:32 2010 +0300
+++ b/usbengines/usbotgwatcher/src/cusbstatehostundefined.cpp	Tue Apr 27 17:41: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;
+            }
+
+        }
     }
 
 // ---------------------------------------------------------------------------