diff -r d0791faffa3f -r f8e15b44d440 mtpfws/mtpfw/dataproviders/devdp/src/cmtpstoragewatcher.cpp --- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpstoragewatcher.cpp Tue Feb 02 01:11:40 2010 +0200 +++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpstoragewatcher.cpp Fri Feb 19 23:40:44 2010 +0200 @@ -24,7 +24,6 @@ #include "cmtpstoragemgr.h" #include "cmtpobjectmgr.h" #include "cmtpstoragewatcher.h" -#include "rmtpdevicedpsingletons.h" #include "cmtpdevicedpconfigmgr.h" @@ -61,6 +60,7 @@ iDpSingletons.Close(); iDrivesExcluded.Close(); iFrameworkSingletons.Close(); + iDevDpSingletons.Close(); __FLOG(_L8("~CMTPStorageWatcher - Exit")); __FLOG_CLOSE; } @@ -278,13 +278,10 @@ iFrameworkSingletons.OpenL(); iFrameworkSingletons.FrameworkConfig().GetValueL(CMTPFrameworkConfig::ELogicalStorageIdsAllocationEnable, iAllocateLogicalStorages); - RMTPDeviceDpSingletons devSingletons; - devSingletons.OpenL(iFramework); - CleanupClosePushL(devSingletons); - iDpSingletons.OpenL(iFramework); - iFolderExclusionList = devSingletons.ConfigMgr().GetArrayValueL(CMTPDeviceDpConfigMgr::EFolderExclusionList); - CleanupStack::PopAndDestroy(&devSingletons); + iDevDpSingletons.OpenL(iFramework); + iFolderExclusionList = iDevDpSingletons.ConfigMgr().GetArrayValueL(CMTPDeviceDpConfigMgr::EFolderExclusionList); + __FLOG(_L8("ConstructL - Exit")); } @@ -475,6 +472,11 @@ { TMTPNotificationParamsStorageChange params = {physical}; iFrameworkSingletons.DpController().NotifyDataProvidersL(EMTPStorageAdded, static_cast(¶ms)); + + if(iFrameworkSingletons.DpController().EnumerateState() == CMTPDataProviderController::EEnumeratingSubDirFiles) + { + iDevDpSingletons.PendingStorages().InsertInOrder(logical); + } } // Notify any connected Initiator(s). @@ -515,6 +517,12 @@ TMTPNotificationParamsStorageChange params = {physical}; iFrameworkSingletons.DpController().NotifyDataProvidersL(EMTPStorageRemoved, static_cast(¶ms)); + TInt index = iDevDpSingletons.PendingStorages().FindInOrder( logical); + if(KErrNotFound != index) + { + iDevDpSingletons.PendingStorages().Remove(index); + } + // Notify any connected Initiator(s). if (iAllocateLogicalStorages) {