mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp
branchRCL_3
changeset 13 4740b34b83ce
parent 12 51035f0751c2
child 24 6c1dfe4da5dd
--- a/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp	Wed Apr 14 16:28:17 2010 +0300
+++ b/mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp	Tue Apr 27 17:09:22 2010 +0300
@@ -194,6 +194,9 @@
     TInt command = KErrNotSupported;
     TInt data = 0;
     TBool clearCache ( EFalse );
+    TBool notify( ETrue );
+    TInt count = iContexts.Count();
+    CMPXCollectionClientContext* context( NULL );
     switch( aMsg )
         {
         case EMcMsgFormatStart:
@@ -207,8 +210,14 @@
             clearCache = ETrue;
             break;
             }
+        case EMcMsgDiskInserted:        	
+            for( TInt i=0; i<count; ++i )
+                {
+                context = iContexts[i];
+                context->NotifyL( aMsg, aData );
+                }
+            notify = EFalse;
         case EMcMsgFormatEnd:
-        case EMcMsgDiskInserted:
         case EMcMsgUSBMassStorageEnd:
             {
             command = EMcReOpenCollection;
@@ -281,15 +290,15 @@
         rfs.Close();
     	}
     
-    TInt count = iContexts.Count();
-    for( TInt i=0; i<count; ++i )
-        {
-        CMPXCollectionClientContext* context;
-        context = iContexts[i];
-        context->NotifyL( aMsg, aData );
-        }
+    if ( notify )
+    	{
+		for( TInt i=0; i<count; ++i )
+			{
+			context = iContexts[i];
+			context->NotifyL( aMsg, aData );
+			}
+    	}
     }
-
 void CMPXCollectionEngine::Command( TMPXCollectionCommand aCmd, TInt aData )
     {
     TArray<CMPXCollectionPlugin*> plugins = iPluginHandler->LoadedPlugins();