mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledp.cpp
branchRCL_3
changeset 14 60a94a45d437
parent 6 f8e15b44d440
child 47 63cf70d3ecd8
equal deleted inserted replaced
12:8b094906a049 14:60a94a45d437
   134     }
   134     }
   135     
   135     
   136 void CMTPFileDataProvider::StartObjectEnumerationL(TUint32 aStorageId, TBool /*aPersistentFullEnumeration*/)
   136 void CMTPFileDataProvider::StartObjectEnumerationL(TUint32 aStorageId, TBool /*aPersistentFullEnumeration*/)
   137     {
   137     {
   138     __FLOG(_L8("StartObjectEnumerationL - Entry"));
   138     __FLOG(_L8("StartObjectEnumerationL - Entry"));
   139 
       
   140     iPendingEnumerations.AppendL(aStorageId);
   139     iPendingEnumerations.AppendL(aStorageId);
   141     if (iPendingEnumerations.Count() == 1)
   140     CMTPDataProviderController& dpController(iSingletons.DpController());
   142         {
   141     //must read this NeedEnumeratingPhase2 before this function return
   143 		CMTPDataProviderController& dpController(iSingletons.DpController());
   142     TBool bScanAll = dpController.NeedEnumeratingPhase2();
   144 		TBool bOnlyScanRoot = ( (dpController.EnumerateState() == CMTPDataProviderController::EEnumeratingFrameworkObjects) && (dpController.NeedEnumeratingPhase2()) );
   143     iFileEnumerator->StartL(iPendingEnumerations[KActiveEnumeration], bScanAll);
   145 		iFileEnumerator->StartL(iPendingEnumerations[KActiveEnumeration], bOnlyScanRoot);
       
   146         }
       
   147     __FLOG(_L8("StartObjectEnumerationL - Exit"));
   144     __FLOG(_L8("StartObjectEnumerationL - Exit"));
   148     }
   145     }
   149     
   146     
   150 void CMTPFileDataProvider::StartStorageEnumerationL()
   147 void CMTPFileDataProvider::StartStorageEnumerationL()
   151     {
   148     {
   220     __FLOG_VA((_L8("Enumeration of storage 0x%08X completed with error status %d"), aStorageId, aError));
   217     __FLOG_VA((_L8("Enumeration of storage 0x%08X completed with error status %d"), aStorageId, aError));
   221     __ASSERT_DEBUG((aStorageId == iPendingEnumerations[KActiveEnumeration]), User::Invariant());
   218     __ASSERT_DEBUG((aStorageId == iPendingEnumerations[KActiveEnumeration]), User::Invariant());
   222     
   219     
   223     Framework().ObjectEnumerationCompleteL(iPendingEnumerations[KActiveEnumeration]);
   220     Framework().ObjectEnumerationCompleteL(iPendingEnumerations[KActiveEnumeration]);
   224     iPendingEnumerations.Remove(KActiveEnumeration);
   221     iPendingEnumerations.Remove(KActiveEnumeration);
   225     if (iPendingEnumerations.Count())
       
   226         {
       
   227 		CMTPDataProviderController& dpController(iSingletons.DpController());
       
   228 		TBool bOnlyScanRoot = ( (dpController.EnumerateState() == CMTPDataProviderController::EEnumeratingFrameworkObjects) && (dpController.NeedEnumeratingPhase2()) );
       
   229         iFileEnumerator->StartL(iPendingEnumerations[KActiveEnumeration], bOnlyScanRoot);
       
   230         }
       
   231     __FLOG(_L8("HandleEnumerationCompletedL - Exit"));
   222     __FLOG(_L8("HandleEnumerationCompletedL - Exit"));
   232     }
   223     }
   233     
   224     
   234 /**
   225 /**
   235 Standard C++ constructor
   226 Standard C++ constructor