backupandrestore/backuptest/burtestserver/TestSteps/src/t_teststepbackup.cpp
branchRCL_3
changeset 19 0aa8cc770c8a
parent 0 d0791faffa3f
child 20 4a793f564d72
equal deleted inserted replaced
18:453dfc402455 19:0aa8cc770c8a
    15 
    15 
    16 /**
    16 /**
    17  @file
    17  @file
    18  @released
    18  @released
    19 */
    19 */
    20 
    20 #include "W32STD.H" 
    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);		
   148 		CheckValidRegistrationL();
   150 		CheckValidRegistrationL();
   149 		
   151 		
   150 		_LIT(KLog4, "Saving Data Owners...");
   152 		_LIT(KLog4, "Saving Data Owners...");
   151 		Log(LOG_LEVEL2, KLog4);
   153 		Log(LOG_LEVEL2, KLog4);
   152 		SaveDataOwners();
   154 		SaveDataOwners();
   199 		{
   201 		{
   200 		// system data
   202 		// system data
   201 		BackupSystemBaseDataL();
   203 		BackupSystemBaseDataL();
   202 		BackupSystemSnapshotDataL();
   204 		BackupSystemSnapshotDataL();
   203 		
   205 		
   204 		//active
   206 		// do active backup when in partial backup mode
   205 		BackupActiveBaseDataL();
   207 		if (iIsPartial)
   206 		BackupActiveSnapshotDataL();
   208 		    {
       
   209             //active
       
   210             BackupActiveBaseDataL();
       
   211             BackupActiveSnapshotDataL();
       
   212 		    }
   207 		
   213 		
   208 		//passive
   214 		//passive
   209 		BackupPassiveBaseDataL();
   215 		BackupPassiveBaseDataL();
   210 		BackupPassiveSnapshotDataL();
   216 		BackupPassiveSnapshotDataL();
   211 		}
   217 		}
   236 			
   242 			
   237 		// system data
   243 		// system data
   238 		BackupSystemBaseDataL();
   244 		BackupSystemBaseDataL();
   239 		BackupSystemSnapshotDataL();
   245 		BackupSystemSnapshotDataL();
   240 		
   246 		
   241 		// active
   247         // do active backup when in partial backup mode
   242 		BackupActiveIncDataL();
   248         if (iIsPartial)
   243 		BackupActiveSnapshotDataL();
   249             {
       
   250             //active
       
   251             BackupActiveIncDataL();
       
   252             BackupActiveSnapshotDataL();
       
   253             }
   244 		
   254 		
   245 		//passive
   255 		//passive
   246 		BackupPassiveIncDataL();
   256 		BackupPassiveIncDataL();
   247 		BackupPassiveSnapshotDataL();
   257 		BackupPassiveSnapshotDataL();
   248 		}
   258 		}
   528 		if (transferTypes.Count())
   538 		if (transferTypes.Count())
   529 			{
   539 			{
   530 			TRAPD(error,
   540 			TRAPD(error,
   531 			for (TInt i=0; i < KRetries;)
   541 			for (TInt i=0; i < KRetries;)
   532 				{
   542 				{
       
   543 			  //
       
   544 			  LogWithNum(LOG_LEVEL3,_L("doActiveBackup-retryies :"), i);
       
   545 			  
       
   546 			  
   533 				CheckSIDStatusL(transferTypes, iTransferTypes);													
   547 				CheckSIDStatusL(transferTypes, iTransferTypes);													
   534 				if (iTransferTypes.Count()) // dataowners ready
   548 				if (iTransferTypes.Count()) // dataowners ready
   535 					{
   549 					{
   536 					DoBackupL();
   550 					DoBackupL();
   537 					} 
   551 					} 
   549 			if (transferTypes.Count())
   563 			if (transferTypes.Count())
   550 				{
   564 				{
   551 				iFailures++;
   565 				iFailures++;
   552 				_LIT(KLogNoTrans, "***Error: Some Data Owners were Not Ready or Failed to Connect");
   566 				_LIT(KLogNoTrans, "***Error: Some Data Owners were Not Ready or Failed to Connect");
   553 				Log(LOG_LEVEL3, KLogNoTrans);
   567 				Log(LOG_LEVEL3, KLogNoTrans);
   554 				} //if
   568 				
       
   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
   555 			transferTypes.ResetAndDestroy();
   582 			transferTypes.ResetAndDestroy();
   556 			
   583 			
   557 			User::LeaveIfError(error);
   584 			User::LeaveIfError(error);
   558 			}
   585 			}
   559 		else 
   586 		else