os/persistentdata/traceservices/tracefw/ulogger/unit_test/te-createconfig/te_createconfigserver.cpp
First public contribution.
1 // Copyright (c) 2006-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.
18 #include "te_createconfigserver.h"
19 #include "te_createconfigemptystep.h"
20 #include "te_createconfigfullstep.h"
22 _LIT(KServerName,"te_createconfigsuite");
26 * Creates an instance of CTestCreateConfigServer object
27 * @return a pointer to the new created CTestCreateConfigServer Object
30 CTestCreateConfigServer* CTestCreateConfigServer::NewL()
32 CTestCreateConfigServer* tracer = new (ELeave) CTestCreateConfigServer();
33 CleanupStack::PushL(tracer);
34 tracer->ConstructL(KServerName);
35 CleanupStack::Pop(tracer);
40 * Creates an instance of CTestStep object
41 * @return a CTestStep derived instance
42 * @param Test step name
45 CTestStep* CTestCreateConfigServer::CreateTestStep(const TDesC& aStepName)
47 CTestStep* testStep = NULL;
48 if(aStepName == KCreateConfigEmptyStep)
49 testStep = new CCreateConfigEmptyTestStep();
50 else if(aStepName == KCreateConfigFullStep)
51 testStep = new CCreateConfigFUllTestStep();
56 * Creates installs and starts the active scheduler
61 CActiveScheduler* sched=NULL;
62 sched=new(ELeave) CActiveScheduler;
63 CActiveScheduler::Install(sched);
65 CTestCreateConfigServer* server = NULL;
66 TRAPD(err,server = CTestCreateConfigServer::NewL());
70 RProcess::Rendezvous(KErrNone);
79 * Entrypoint method, creates a cleanup trap and calls
80 * the application start method.
81 * @return Standard error code on exit.
83 GLDEF_C TInt E32Main()
86 CTrapCleanup* cleanup = CTrapCleanup::New();