mpx/collectionframework/collectionengine/src/mpxcollectionengine.cpp
branchRCL_3
changeset 56 63223d4fd956
parent 55 6c1dfe4da5dd
equal deleted inserted replaced
55:6c1dfe4da5dd 56:63223d4fd956
    34 #include <mpxcollectionplugin.h>
    34 #include <mpxcollectionplugin.h>
    35 #include <mpxcollectionmessagedefs.h>
    35 #include <mpxcollectionmessagedefs.h>
    36 #include <mpxmessagegeneraldefs.h>
    36 #include <mpxmessagegeneraldefs.h>
    37 #include <mpxmessagecontainerdefs.h>
    37 #include <mpxmessagecontainerdefs.h>
    38 #include <mpxmessagepluginupdatedefs.h>
    38 #include <mpxmessagepluginupdatedefs.h>
    39 #include <mmf/common/mmfcontrollerpluginresolver.h>
       
    40 
    39 
    41 #include "mpxcollectionpluginhandler.h"
    40 #include "mpxcollectionpluginhandler.h"
    42 #include "mpxcollectioncache.h"
    41 #include "mpxcollectioncache.h"
    43 #include "mpxcollectionengine.h"
    42 #include "mpxcollectionengine.h"
    44 
    43 
   210             // Clear the cache
   209             // Clear the cache
   211             clearCache = ETrue;
   210             clearCache = ETrue;
   212             break;
   211             break;
   213             }
   212             }
   214         case EMcMsgDiskInserted:        	
   213         case EMcMsgDiskInserted:        	
   215             {
       
   216             // inverting the notification order, this to get the message to 
       
   217             // the UI faster.
       
   218             for( TInt i=0; i<count; ++i )
   214             for( TInt i=0; i<count; ++i )
   219                 {
   215                 {
   220                 context = iContexts[i];
   216                 context = iContexts[i];
   221                 context->NotifyL( aMsg, aData );
   217                 context->NotifyL( aMsg, aData );
   222                 }
   218                 }
   223             notify = EFalse;
   219             notify = EFalse;
   224             command = EMcReOpenCollection;
       
   225             data = aData;
       
   226             // Clear the cache
       
   227         	  clearCache = ETrue;
       
   228             break;
       
   229             }
       
   230         case EMcMsgFormatEnd:
   220         case EMcMsgFormatEnd:
   231         case EMcMsgUSBMassStorageEnd:
   221         case EMcMsgUSBMassStorageEnd:
   232             {
   222             {
   233             command = EMcReOpenCollection;
   223             command = EMcReOpenCollection;
   234             data = aData;
   224             data = aData;
   235             
   225             
   236             // Clear the cache
   226             // Clear the cache
   237         	  clearCache = ETrue;
   227         	clearCache = ETrue;
   238             break;
   228             break;
   239             }
   229             }
   240         case EMcMsgUSBMTPStart:
   230         case EMcMsgUSBMTPStart:
   241             {
   231             {
   242             iRefreshing = ETrue;
   232             iRefreshing = ETrue;
   324 // ----------------------------------------------------------------------------
   314 // ----------------------------------------------------------------------------
   325 //
   315 //
   326 EXPORT_C void CMPXCollectionEngine::GetSupportedTypesL(
   316 EXPORT_C void CMPXCollectionEngine::GetSupportedTypesL(
   327                                     RPointerArray<CMPXCollectionType>& aArray )
   317                                     RPointerArray<CMPXCollectionType>& aArray )
   328     {
   318     {
   329     CleanupResetAndDestroyPushL(aArray); 
       
   330     RArray<TUid> uids;
   319     RArray<TUid> uids;
   331     CleanupClosePushL(uids);
   320     CleanupClosePushL(uids);
   332     iPluginHandler->GetPluginUids(uids);
   321     iPluginHandler->GetPluginUids(uids);
   333 
   322 
   334     for (TInt i=0; i<uids.Count();++i)
   323     for (TInt i=0; i<uids.Count();++i)
   349         CleanupStack::PushL(type);
   338         CleanupStack::PushL(type);
   350         aArray.AppendL( type );
   339         aArray.AppendL( type );
   351         CleanupStack::Pop(type);
   340         CleanupStack::Pop(type);
   352         }
   341         }
   353     CleanupStack::PopAndDestroy(&uids);
   342     CleanupStack::PopAndDestroy(&uids);
   354     CleanupStack::Pop(&aArray); 
       
   355     }
   343     }
   356 
   344 
   357 // ----------------------------------------------------------------------------
   345 // ----------------------------------------------------------------------------
   358 // Virtual collection ID to implementation ID lookup
   346 // Virtual collection ID to implementation ID lookup
   359 // ----------------------------------------------------------------------------
   347 // ----------------------------------------------------------------------------