filemanager/bkupengine/src/CMMCScBkupEngineImpl.cpp
branchRCL_3
changeset 13 5181328fad28
parent 0 6a9f87576119
equal deleted inserted replaced
11:649c558486f0 13:5181328fad28
  1005         }
  1005         }
  1006     }
  1006     }
  1007     
  1007     
  1008     
  1008     
  1009 // ---------------------------------------------------------------------------
  1009 // ---------------------------------------------------------------------------
       
  1010 // CMMCScBkupEngineImpl::ResetAndDestroyArchives
       
  1011 // ---------------------------------------------------------------------------
       
  1012 // 
       
  1013 void CMMCScBkupEngineImpl::ResetAndDestroyArchives( TAny* aPtr )
       
  1014     {
       
  1015     RPointerArray< CMMCScBkupArchiveInfo >* archive = 
       
  1016         static_cast< RPointerArray< CMMCScBkupArchiveInfo >* >( aPtr );
       
  1017     archive->ResetAndDestroy();
       
  1018     archive->Close();
       
  1019     }
       
  1020 
       
  1021 // ---------------------------------------------------------------------------
  1010 // CMMCScBkupEngineImpl::ListArchivesL()
  1022 // CMMCScBkupEngineImpl::ListArchivesL()
  1011 // 
  1023 // 
  1012 // Provide a list of valid (both content and category do match) archives 
  1024 // Provide a list of valid (both content and category do match) archives 
  1013 // available on all drives' backup folder
  1025 // available on all drives' backup folder
  1014 // ---------------------------------------------------------------------------
  1026 // ---------------------------------------------------------------------------
  1018         const TUint32 aDriveAttMatch,
  1030         const TUint32 aDriveAttMatch,
  1019         const TInt aDriveMatch )
  1031         const TInt aDriveMatch )
  1020     {
  1032     {
  1021     __LOG("CMMCScBkupEngineImpl::ListArchivesL() - START");
  1033     __LOG("CMMCScBkupEngineImpl::ListArchivesL() - START");
  1022 
  1034 
       
  1035     TCleanupItem cleanupItem( ResetAndDestroyArchives, &aArchives );
       
  1036     CleanupStack::PushL( cleanupItem );
       
  1037     
  1023     for(TInt i = 0; i < KMaxDrives; i++)
  1038     for(TInt i = 0; i < KMaxDrives; i++)
  1024         {
  1039         {
  1025         // Check is drive number allowed
  1040         // Check is drive number allowed
  1026         if ( aDriveMatch != KErrNotFound && aDriveMatch != i )
  1041         if ( aDriveMatch != KErrNotFound && aDriveMatch != i )
  1027             {
  1042             {
  1095                 }
  1110                 }
  1096             }
  1111             }
  1097             
  1112             
  1098         CleanupStack::PopAndDestroy(pFiles);
  1113         CleanupStack::PopAndDestroy(pFiles);
  1099         }
  1114         }
  1100 
  1115     CleanupStack::Pop( &aArchives );
  1101     __LOG("CMMCScBkupEngineImpl::ListArchivesL() - END");
  1116     __LOG("CMMCScBkupEngineImpl::ListArchivesL() - END");
  1102     }
  1117     }
  1103 
  1118 
  1104 
  1119 
  1105 #ifdef DEBUGGING_DATA_TRANSFER
  1120 #ifdef DEBUGGING_DATA_TRANSFER