usbengines/usbotgwatcher/src/cusbstatehosthandledropping.cpp
branchRCL_3
changeset 7 ff9df6630274
parent 6 a15c582fbf97
child 10 f6533aee8b2b
--- a/usbengines/usbotgwatcher/src/cusbstatehosthandledropping.cpp	Fri Mar 12 15:48:40 2010 +0200
+++ b/usbengines/usbotgwatcher/src/cusbstatehosthandledropping.cpp	Mon Mar 15 12:44:42 2010 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
  * All rights reserved.
  * This component and the accompanying materials are made available
  * under the terms of "Eclipse Public License v1.0"
@@ -18,7 +18,9 @@
 #include <usbuinotif.h>
 #include <d32usbdi_errors.h>
 
+#include "cusbotgwatcher.h"
 #include "cusbstatehosthandledropping.h"
+
 #ifndef STIF
 #include "cusbnotifmanager.h"
 #else
@@ -160,7 +162,8 @@
             // no break here                     
             }
 
-            // no break statement for following cases    
+            // no break statement for following cases 
+        case EUsbWatcherNoMemory:
         case EUsbWatcherIdPinError:
         case EUsbWatcherVBusObserverError:
         case EUsbWatcherHostEventNotificationError:
@@ -178,7 +181,7 @@
         default:
             {
             LOG1("Unexpected situation to be handled iWhat = %d" , iWhat );
-            Panic( EUnexpectedSituationToHandle);
+            PANIC( EUnexpectedSituationToHandle);
             break;
             }
 
@@ -253,6 +256,13 @@
                     EUsbOtgErrorInConnection, this);
             break;
             }
+        case EUsbWatcherNoMemory:
+            {
+            LOG("EUsbWatcherNoMemory" );
+            iWatcher.NotifManager()->ShowNotifierL(KUsbUiNotifOtgError,
+                    EUsbOtgErrorNoMemory, this);
+            break;
+            }
         case EUsbWatcherCanNotStartUsbServices:
             {
             LOG("EUsbWatcherCanNotStartUsbServices" );
@@ -277,7 +287,7 @@
         default:
             {
             LOG1("Unexpected situation to be handled iWhat = %d", iWhat );
-            Panic( EUnexpectedSituationToHandle);
+            PANIC( EUnexpectedSituationToHandle);
             break;
             }
         }
@@ -309,6 +319,16 @@
 // 
 // ---------------------------------------------------------------------------
 //
+void CUsbStateHostHandleDropping::AVBusErrorL()
+    {
+    LOG_FUNC
+    iWatcher.Usb().BusClearError();
+    }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
 void CUsbStateHostHandleDropping::DeviceAttachedL(
         TDeviceEventInformation aDevEventInfo)
     {
@@ -380,3 +400,13 @@
 
         }
     }
+
+// ---------------------------------------------------------------------------
+// 
+// ---------------------------------------------------------------------------
+//
+void CUsbStateHostHandleDropping::VBusErrorL()
+    {
+    LOG_FUNC
+    iWatcher.Usb().BusClearError();
+    }