multimediacommscontroller/tsrc/TestConsoles/McpSubThreads/ClientTests/Src/TestConsoleMain.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    
       
    15 **
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include "TestConsole.h"
       
    22 
       
    23 
       
    24 // ActiveScheduler trap harness
       
    25 void startSchedulerL()
       
    26     {
       
    27     if( !CActiveScheduler::Current() )
       
    28         {
       
    29 	    CActiveScheduler* testScheduler = new(ELeave)CActiveScheduler;
       
    30 
       
    31 	    CleanupStack::PushL(testScheduler);
       
    32 	    CActiveScheduler::Install(testScheduler);
       
    33         }
       
    34 
       
    35     //Enter Active Object
       
    36 	CTestAppConsole* appConsole = CTestAppConsole::NewL();
       
    37 	CleanupStack::PushL(appConsole);
       
    38 
       
    39 	appConsole->StartTesting();
       
    40 	CActiveScheduler::Start();
       
    41 	
       
    42 	CleanupStack::PopAndDestroy(); // appConsole*/
       
    43 	CleanupStack::PopAndDestroy(); // testScheduler
       
    44     }
       
    45 
       
    46 
       
    47 // Prog entry point
       
    48 GLDEF_C TInt E32Main()
       
    49 	{
       
    50 	__UHEAP_MARK;
       
    51 
       
    52 	CTrapCleanup* stack = CTrapCleanup::New(); 
       
    53 	TRAPD(err, startSchedulerL());
       
    54 	delete stack;
       
    55 
       
    56 	__UHEAP_MARKEND;
       
    57 	return 0;
       
    58 	}