localisation/apparchitecture/tef/T_BackupStep.cpp
branchSymbian3
changeset 57 b8d18c84f71c
parent 6 c108117318cb
equal deleted inserted replaced
56:aa99f2208aad 57:b8d18c84f71c
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 // Performs Tests on Backup server.\n
    14 // Performs Tests on Backup server.\n
    15 // 
    15 // 
    16 //
    16 //
    17 
       
    18 
       
    19 
    17 
    20 /**
    18 /**
    21  @file
    19  @file
    22  @internalComponent - Internal Symbian test code
    20  @internalComponent - Internal Symbian test code
    23 */
    21 */
   547 //vm	
   545 //vm	
   548 	_LIT(KAppRestarterThreadName,"AppRestarterThread");
   546 	_LIT(KAppRestarterThreadName,"AppRestarterThread");
   549 	TRequestStatus status;
   547 	TRequestStatus status;
   550 	gWrapper->CloseAll(MBackupObserver::EReleaseLockNoAccess, status);
   548 	gWrapper->CloseAll(MBackupObserver::EReleaseLockNoAccess, status);
   551 	User::WaitForRequest(status);
   549 	User::WaitForRequest(status);
   552 ///vm
   550 //vm
   553 	if(status != KErrNone)
   551 	if(status != KErrNone)
   554 		{
   552 		{
   555 		return status;
   553 		return status;
   556 		}
   554 		}
   557 
   555 
   558 	const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
   556 	const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
   559 	gWrapper->NotifyBackupOperationL(gEventEnd); 
   557 	gWrapper->NotifyBackupOperationL(gEventEnd); 
   560 ////
   558 //
   561 
   559 
   562 	gWrapper->RestartAll();
   560 	gWrapper->RestartAll();
   563 	gWrapper->RestartAll();
   561 	gWrapper->RestartAll();
   564 	gWrapper->RestartAll();
   562 	gWrapper->RestartAll();
   565 	gWrapper->RestartAll();
   563 	gWrapper->RestartAll();
   664 	User::WaitForRequest(status);
   662 	User::WaitForRequest(status);
   665 
   663 
   666 	INFO_PRINTF1(_L("\nWait."));
   664 	INFO_PRINTF1(_L("\nWait."));
   667 	User::After(1000000);
   665 	User::After(1000000);
   668 	
   666 	
   669 ///vm
   667 //vm
   670 	const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
   668 	const TBackupOperationAttributes gEventEnd(MBackupObserver::ETakeLock, MBackupOperationObserver::EEnd);
   671 	gWrapper->NotifyBackupOperationL(gEventEnd); 
   669 	gWrapper->NotifyBackupOperationL(gEventEnd); 
   672 	
   670 	
   673 ////
   671 //
   674 
   672 
   675 	INFO_PRINTF1(_L("\nGWrapper: Restart all......."));
   673 	INFO_PRINTF1(_L("\nGWrapper: Restart all......."));
   676 	gWrapper->RestartAll();
   674 	gWrapper->RestartAll();
   677 	INFO_PRINTF1(_L("\nGWrapper: Restart all.....Completed"));
   675 	INFO_PRINTF1(_L("\nGWrapper: Restart all.....Completed"));
   678 	INFO_PRINTF1(_L("\nGWrapper: Close all.......Completed."));
   676 	INFO_PRINTF1(_L("\nGWrapper: Close all.......Completed."));
   915 	__UHEAP_MARKEND;
   913 	__UHEAP_MARKEND;
   916 
   914 
   917 	INFO_PRINTF1(_L("Test completed!"));
   915 	INFO_PRINTF1(_L("Test completed!"));
   918 	return TestStepResult();
   916 	return TestStepResult();
   919 }
   917 }
       
   918