First public contribution.
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "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.
20 #include "tformserver.h"
21 #include "tcustomcharmapping.h"
22 #include "ttagmaimp.h"
23 #include "ttmsource.h"
24 #include "tbidicursorpos.h"
28 #include "tinterpreter.h"
30 #include "tinlinetext.h"
31 #include "tgraphemeiterator.h"
32 #include "tformbenchmark.h"
34 #include "tformhindi.h"
36 _LIT(KServerName,"TFormServer");
38 CTFormServer* CTFormServer::NewL()
40 CTFormServer * server = new (ELeave) CTFormServer();
41 CleanupStack::PushL(server);
42 // CServer base class call
43 server->StartL(KServerName);
44 CleanupStack::Pop(server);
52 // Much simpler, uses the new Rendezvous() call to sync with the client
55 #if (defined __DATA_CAGING__)
56 RProcess().DataCaging(RProcess::EDataCagingOn);
57 RProcess().SecureApi(RProcess::ESecureApiOn);
59 CActiveScheduler* sched=NULL;
60 sched=new(ELeave) CActiveScheduler;
61 CActiveScheduler::Install(sched);
62 CTFormServer *server = NULL;
63 // Create the CTestServer derived server
64 TRAPD(err,server = CTFormServer::NewL());
67 // Sync with the client and enter the active scheduler
68 RProcess::Rendezvous(KErrNone);
75 /** @return - Standard Epoc error code on process exit
77 Process entry point. Called by client using RProcess API
79 GLDEF_C TInt E32Main()
82 CTrapCleanup* cleanup = CTrapCleanup::New();
88 // This if statement is here just to shut up RVCT, which would otherwise warn
89 // that err was set but never used
99 CTestStep *CTFormServer::CreateTestStep(const TDesC& aStepName)
101 @return - A CTestStep derived instance
102 Secure and non-secure variants
103 Implementation of CTestServer pure virtual
106 if(aStepName == KTestStep_T_CustomCharMapping)
108 return new CTCustomCharMappingStep();
110 else if(aStepName == KTestStep_T_TagmaImp)
112 return new CTTagmaImpStep();
114 else if(aStepName == KTestStep_T_TmSource)
116 return new CTTmSourceStep();
118 else if(aStepName == KTestStep_T_BidiCursorPos)
120 return new CTBidiCursorPosStep();
122 else if(aStepName == KTestStep_T_TmCode)
124 return new CTTmCodeStep();
126 else if(aStepName == KTestStep_T_Unique)
128 return new CTUniqueStep();
130 else if(aStepName == KTestStep_T_Undo)
132 return new CTUndoStep();
134 else if(aStepName == KTestStep_T_Interpreter)
136 return new CTInterpreterStep();
138 else if(aStepName == KTestStep_T_Format)
140 return new CTFormatStep();
142 else if(aStepName == KTestStep_T_InLineText)
144 return new CTInLineTextStep();
146 else if(aStepName == KTestStep_T_GraphemeIterator)
148 return new CTGraphemeIteratorStep();
150 else if(aStepName == KTestStep_T_FormBenchmark)
152 return new CTFormBenchmarkStep();
154 else if(aStepName == KTestStep_T_LinePag)
156 return new CTLinePagStep();
158 else if(aStepName == KTestStep_T_FormHindi)
160 return new CTFormHindiStep();