networksecurity/ipsec/te_ipsec_selector_confilict/src/te_ipsectestserver.cpp
branchRCL_3
changeset 22 8d540f55e491
parent 20 7e41d162e158
equal deleted inserted replaced
21:abbed5a4b42a 22:8d540f55e491
       
     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 the License "Symbian Foundation License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 //local includes here
       
    19 #include "te_ipsectestserver.h"
       
    20 
       
    21 //system includes here
       
    22 
       
    23 //implementation for the classes
       
    24 CT_LoadPolicyTestServer* CT_LoadPolicyTestServer::NewL()
       
    25 	{
       
    26 	CT_LoadPolicyTestServer* server = new (ELeave) CT_LoadPolicyTestServer();
       
    27 	CleanupStack::PushL(server);
       
    28 	server->ConstructL();
       
    29 	CleanupStack::Pop(server);
       
    30 	return server;
       
    31 	}
       
    32 
       
    33 LOCAL_C void MainL()
       
    34 	{
       
    35 #if (defined __DATA_CAGING__)
       
    36 	RProcess().DataCaging(RProcess::EDataCagingOn);
       
    37 	RProcess().SecureApi(RProcess::ESecureApiOn);
       
    38 #endif
       
    39 	CActiveScheduler* sched=NULL;
       
    40 	sched=new(ELeave) CActiveScheduler;
       
    41 	CActiveScheduler::Install(sched);
       
    42 	CT_LoadPolicyTestServer* server = NULL;
       
    43 	TRAPD(err, server = CT_LoadPolicyTestServer::NewL());
       
    44 	if(!err)
       
    45 		{
       
    46 		RProcess::Rendezvous(KErrNone);
       
    47 		sched->Start();
       
    48 		}
       
    49 	delete server;
       
    50 	delete sched;
       
    51 	}
       
    52 
       
    53 GLDEF_C TInt E32Main()
       
    54 	{
       
    55 	CTrapCleanup* cleanup = CTrapCleanup::New();
       
    56 	if(cleanup == NULL)
       
    57 		{
       
    58 		return KErrNoMemory;
       
    59 		}
       
    60 	TRAP_IGNORE(MainL());
       
    61 	delete cleanup;
       
    62 	return KErrNone;
       
    63     }
       
    64