backupandrestore/backuptest/burtestserver/TestSteps/src/t_teststepbackup.cpp
branchRCL_3
changeset 20 4a793f564d72
parent 19 0aa8cc770c8a
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
    15 
    15 
    16 /**
    16 /**
    17  @file
    17  @file
    18  @released
    18  @released
    19 */
    19 */
    20 #include "W32STD.H" 
    20 
    21 #include "t_teststepbackup.h"
    21 #include "t_teststepbackup.h"
    22 
    22 
    23 namespace bur_ts
    23 namespace bur_ts
    24 	{	
    24 	{	
    25 		
    25 		
   143 			{
   143 			{
   144 			_LIT(KLog3, "Preparing for FULL backup...");
   144 			_LIT(KLog3, "Preparing for FULL backup...");
   145 			Log(LOG_LEVEL2, KLog3);
   145 			Log(LOG_LEVEL2, KLog3);
   146 			}
   146 			}
   147 		
   147 		
   148         _LIT(KLog31, "Checking valid registration...");
       
   149         Log(LOG_LEVEL2, KLog31);		
       
   150 		CheckValidRegistrationL();
   148 		CheckValidRegistrationL();
   151 		
   149 		
   152 		_LIT(KLog4, "Saving Data Owners...");
   150 		_LIT(KLog4, "Saving Data Owners...");
   153 		Log(LOG_LEVEL2, KLog4);
   151 		Log(LOG_LEVEL2, KLog4);
   154 		SaveDataOwners();
   152 		SaveDataOwners();
   201 		{
   199 		{
   202 		// system data
   200 		// system data
   203 		BackupSystemBaseDataL();
   201 		BackupSystemBaseDataL();
   204 		BackupSystemSnapshotDataL();
   202 		BackupSystemSnapshotDataL();
   205 		
   203 		
   206 		// do active backup when in partial backup mode
   204 		//active
   207 		if (iIsPartial)
   205 		BackupActiveBaseDataL();
   208 		    {
   206 		BackupActiveSnapshotDataL();
   209             //active
       
   210             BackupActiveBaseDataL();
       
   211             BackupActiveSnapshotDataL();
       
   212 		    }
       
   213 		
   207 		
   214 		//passive
   208 		//passive
   215 		BackupPassiveBaseDataL();
   209 		BackupPassiveBaseDataL();
   216 		BackupPassiveSnapshotDataL();
   210 		BackupPassiveSnapshotDataL();
   217 		}
   211 		}
   242 			
   236 			
   243 		// system data
   237 		// system data
   244 		BackupSystemBaseDataL();
   238 		BackupSystemBaseDataL();
   245 		BackupSystemSnapshotDataL();
   239 		BackupSystemSnapshotDataL();
   246 		
   240 		
   247         // do active backup when in partial backup mode
   241 		// active
   248         if (iIsPartial)
   242 		BackupActiveIncDataL();
   249             {
   243 		BackupActiveSnapshotDataL();
   250             //active
       
   251             BackupActiveIncDataL();
       
   252             BackupActiveSnapshotDataL();
       
   253             }
       
   254 		
   244 		
   255 		//passive
   245 		//passive
   256 		BackupPassiveIncDataL();
   246 		BackupPassiveIncDataL();
   257 		BackupPassiveSnapshotDataL();
   247 		BackupPassiveSnapshotDataL();
   258 		}
   248 		}
   538 		if (transferTypes.Count())
   528 		if (transferTypes.Count())
   539 			{
   529 			{
   540 			TRAPD(error,
   530 			TRAPD(error,
   541 			for (TInt i=0; i < KRetries;)
   531 			for (TInt i=0; i < KRetries;)
   542 				{
   532 				{
   543 			  //
       
   544 			  LogWithNum(LOG_LEVEL3,_L("doActiveBackup-retryies :"), i);
       
   545 			  
       
   546 			  
       
   547 				CheckSIDStatusL(transferTypes, iTransferTypes);													
   533 				CheckSIDStatusL(transferTypes, iTransferTypes);													
   548 				if (iTransferTypes.Count()) // dataowners ready
   534 				if (iTransferTypes.Count()) // dataowners ready
   549 					{
   535 					{
   550 					DoBackupL();
   536 					DoBackupL();
   551 					} 
   537 					} 
   563 			if (transferTypes.Count())
   549 			if (transferTypes.Count())
   564 				{
   550 				{
   565 				iFailures++;
   551 				iFailures++;
   566 				_LIT(KLogNoTrans, "***Error: Some Data Owners were Not Ready or Failed to Connect");
   552 				_LIT(KLogNoTrans, "***Error: Some Data Owners were Not Ready or Failed to Connect");
   567 				Log(LOG_LEVEL3, KLogNoTrans);
   553 				Log(LOG_LEVEL3, KLogNoTrans);
   568 				
   554 				} //if
   569 				
       
   570 				//print the remenant sids
       
   571                 for( TInt kk = 0 ; kk <transferTypes.Count() ; kk++)
       
   572                     {
       
   573                     
       
   574                     CSBSIDTransferType* sidType = CSBSIDTransferType::NewL(transferTypes[kk]);
       
   575                     CleanupStack::PushL(sidType);
       
   576                     TSecureId id = NULL;
       
   577                     id = sidType->SecureIdL();
       
   578                     CleanupStack::PopAndDestroy(sidType);
       
   579                     LogWithSID(LOG_LEVEL3, _L("doActiveBackup-transferTypes, remanent SIDs : "),id.iId);
       
   580                     }
       
   581                	} //if
       
   582 			transferTypes.ResetAndDestroy();
   555 			transferTypes.ResetAndDestroy();
   583 			
   556 			
   584 			User::LeaveIfError(error);
   557 			User::LeaveIfError(error);
   585 			}
   558 			}
   586 		else 
   559 		else