os/security/cryptomgmtlibs/securitytestfw/test/testhandler_on_testexecute/testexecuteinterface.cpp
First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 #include "testexecuteinterface.h"
27 namespace TestExecuteInterface
32 TMain(TScriptTests* aTestTypes, const TDesC& aServerName);
39 TScriptTests* iTestTypes;
45 using namespace TestExecuteInterface;
47 EXPORT_C TInt TestExecuteInterface::StartWinsEka1Thread(
48 TInt (*)(), const TDesC&)
50 // EKA2 version or hardware versions do not implement this
54 EXPORT_C void TestExecuteInterface::StartWithTestExecuteL(TScriptTests theTestTypes[],
55 const TDesC& aServerName)
57 TMain(theTestTypes, aServerName).MainL();
60 TMain::TMain(TScriptTests* aTestTypes, const TDesC& aServerName)
61 : iTestTypes(aTestTypes), iServerName(aServerName)
67 CActiveScheduler* sched=NULL;
68 sched=new (ELeave) CActiveScheduler;
69 CleanupStack::PushL(sched);
70 CActiveScheduler::Install(sched);
71 CServer* server = new CServer (iTestTypes);
74 CleanupStack::PushL(server);
75 server->StartL(iServerName);
77 CleanupStack::Pop(server);
80 CleanupStack::Pop(sched);
85 void TMain::SignalClientL()
87 RProcess::Rendezvous(KErrNone);