os/security/cryptomgmtlibs/securitytestfw/test/securityframeworktestserver/src/securityframeworktestserver.cpp
Update contrib.
2 * Copyright (c) 2008-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.
22 #include "securityframeworktestserver.h"
23 #include "nooperationteststep.h"
25 _LIT(KServerName,"SecurityFrameworkTestServer");
27 CSecurityFrameworkTestServer* CSecurityFrameworkTestServer::NewL()
29 * @return - Instance of the test server
30 * Called inside the MainL() function to create and start the
31 * CTestServer derived server.
34 CSecurityFrameworkTestServer * server = new (ELeave) CSecurityFrameworkTestServer();
35 CleanupStack::PushL(server);
37 server-> ConstructL(KServerName);
38 CleanupStack::Pop(server);
45 * Much simpler, uses the new Rendezvous() call to sync with the client
48 // Leave the hooks in for platform security
49 #if (defined __DATA_CAGING__)
50 RProcess().DataCaging(RProcess::EDataCagingOn);
51 RProcess().SecureApi(RProcess::ESecureApiOn);
53 CActiveScheduler* sched=NULL;
54 sched=new(ELeave) CActiveScheduler;
55 CActiveScheduler::Install(sched);
56 CSecurityFrameworkTestServer* server = NULL;
57 TRAPD(err,server = CSecurityFrameworkTestServer::NewL());
60 // Sync with the client and enter the active scheduler
61 RProcess::Rendezvous(KErrNone);
69 GLDEF_C TInt E32Main()
71 * @return - Standard Epoc error code on exit
74 CTrapCleanup* cleanup = CTrapCleanup::New();
85 CTestStep* CSecurityFrameworkTestServer::CreateTestStep(const TDesC& aStepName)
87 * @return - A CTestStep derived instance
88 * Implementation of CTestServer pure virtual
91 CTestStep* testStep = NULL;
93 if(aStepName == KNoOperationTestStep)
94 testStep = new CNoOperationTestStep();