natplugins/natpnatfwsdpprovider/tsrc/testconsole/src/nsptestconsolemain.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Exe entry point
       
    15 *
       
    16 */
       
    17 
       
    18 #include <e32svr.h>
       
    19 #include <sdpcodecstringpool.h>
       
    20 #include "nsptestconsoleapp.h"
       
    21 
       
    22 void StartSchedulerL()
       
    23 	{
       
    24 	SdpCodecStringPool::OpenL();
       
    25 	CActiveScheduler* testScheduler = new (ELeave) CActiveScheduler;
       
    26 	CleanupStack::PushL( testScheduler );
       
    27 	CActiveScheduler::Install( testScheduler );
       
    28 	
       
    29 	CNSPTestConsoleApp* appConsole = CNSPTestConsoleApp::NewLC();
       
    30 	appConsole->StartTesting();
       
    31 	CActiveScheduler::Start();
       
    32 	
       
    33     CleanupStack::PopAndDestroy( appConsole );
       
    34     CleanupStack::PopAndDestroy( testScheduler );
       
    35 	SdpCodecStringPool::Close();
       
    36     }
       
    37 
       
    38 // Entry point
       
    39 GLDEF_C TInt E32Main()
       
    40 	{
       
    41 	__UHEAP_MARK;
       
    42     RDebug::Print( _L("E32Main START Cells: %d"), User::CountAllocCells() );
       
    43     
       
    44 	CTrapCleanup* stack = CTrapCleanup::New();
       
    45 	TRAPD( err, StartSchedulerL() );
       
    46 	delete stack;
       
    47 	
       
    48 	RDebug::Print( _L("E32Main TRAPD returned with code: %d"), err );
       
    49     RDebug::Print( _L("E32Main END Cells: %d"), User::CountAllocCells() );
       
    50     
       
    51     __UHEAP_MARKEND;
       
    52 	return err;
       
    53 	}
       
    54