os/ossrv/lowlevellibsandfws/apputils/multipartparser/test/tef/smoketest/src/mppsmoketesttefserver.cpp
First public contribution.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "mppsmoketesttefserver.h"
18 #include "mppsmoketeststeps.h"
21 _LIT(KServerName, "MultiPartParserSmokeTestTefSuite");
23 CMPPSmokeTestTefServer* CMPPSmokeTestTefServer::NewL()
25 * @return - Instance of the test server
26 * Called inside the MainL() function to create and start the
27 * CTestServer derived server.
30 CMPPSmokeTestTefServer * server = new (ELeave) CMPPSmokeTestTefServer();
31 CleanupStack::PushL(server);
32 // CServer base class call
33 server->StartL(KServerName);
34 CleanupStack::Pop(server);
40 * Uses the new Rendezvous() call to sync with the client
43 RProcess().DataCaging(RProcess::EDataCagingOn);
44 RProcess().SecureApi(RProcess::ESecureApiOn);
46 CActiveScheduler* sched=new(ELeave) CActiveScheduler;
47 CActiveScheduler::Install(sched);
48 CMPPSmokeTestTefServer* server = NULL;
49 // Create the CTestServer derived server
50 TRAPD(err,server = CMPPSmokeTestTefServer::NewL());
53 // Sync with the client and enter the active scheduler
54 RProcess::Rendezvous(KErrNone);
62 GLDEF_C TInt E32Main()
64 * @return - Standard Epoc error code on exit
69 CTrapCleanup* cleanup = CTrapCleanup::New();
81 CTestStep* CMPPSmokeTestTefServer::CreateTestStep(const TDesC& aStepName)
83 * @return - A CTestStep derived instance
84 * Implementation of CTestServer pure virtual
87 CTestStep* testStep = NULL;
89 if (aStepName == KCParseBase64Encoding)
91 testStep = new CParseBase64Encoding();