systemhealthmanagement/systemhealthmgr/test/tsysmon/src/tsysmon_app_startupregeiof.cpp
changeset 0 4e1aa6a622a0
child 21 ccb4f6b3db21
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code   
       
    20 */
       
    21 
       
    22 #include "sysmontesthelper.h"
       
    23 
       
    24 void MainL()
       
    25 	{
       
    26 	RProcess::Rendezvous(KErrNone);
       
    27 	User::After(500000); // 0.5 seconds
       
    28 	CSysMonTestHelper* helper = CSysMonTestHelper::NewLC();	
       
    29 
       
    30 
       
    31 	helper->WriteResultL(0);
       
    32 
       
    33 	CleanupStack::PopAndDestroy(helper);
       
    34 	
       
    35 	for (;;)
       
    36 		{
       
    37 		User::After(5000000); // 5 seconds
       
    38 		}	
       
    39 
       
    40 	}
       
    41 
       
    42 
       
    43 //  Global Functions
       
    44 
       
    45 GLDEF_C TInt E32Main()
       
    46 	{
       
    47 	// Create cleanup stack
       
    48 	RDebug::Print(_L("appfwk-sysmon-0043: E32Main"));
       
    49 	__UHEAP_MARK;
       
    50 	CTrapCleanup* cleanup = CTrapCleanup::New();
       
    51 
       
    52 	// Run application code inside TRAP harness
       
    53 	TRAPD(testError, MainL());
       
    54 	if (testError)
       
    55 		{
       
    56 		User::Panic(_L("Test failure"), testError);
       
    57 		}
       
    58 
       
    59 	delete cleanup;
       
    60 	__UHEAP_MARKEND;
       
    61 	return KErrNone;
       
    62 	} //lint -e714 Suppress 'not referenced'