os/textandloc/charconvfw/charconvplugins/test/rtest/tsrc/main/t_charconvpluginserver.cpp
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.
19 #include "t_charconvpluginserver.h"
22 #include "t_autodetect.h"
23 #include "t_win1250.h"
24 #include "t_win1251.h"
25 #include "t_win1253.h"
26 #include "t_win1254.h"
27 #include "t_win1255.h"
28 #include "t_win1256.h"
29 #include "t_win1257.h"
30 #include "t_win1258.h"
33 #include "t_turkishsingle.h"
34 #include "t_turkishlockingsingle.h"
35 #include "t_turkishlocking.h"
36 #include "t_tis_620.h"
37 #include "t_spanishgsmsingle.h"
39 #include "t_replacement.h"
40 #include "t_portugueselockingsingle.h"
41 #include "t_portugueselocking.h"
42 #include "t_portuguesesingle.h"
43 #include "t_iso8859x.h"
48 #include "t_extendedsms.h"
51 #include "t_gb18030.h"
52 #include "t_multi_plugins.h"
53 #include "t_generalforeign.h"
55 #include "t_builtin.h"
56 #include "t_j5_kddiau.h"
57 #include "t_j5_docomo.h"
58 #include "t_eucjpdirectmap.h"
59 #include "t_shiftjisdirectmap.h"
60 #include "t_eucjp_packed.h"
61 #include "t_eucjp_packed_2.h"
62 #include "t_iso2022jp.h"
63 #include "t_iso2022jp_2.h"
64 #include "t_iso2022jp1_2.h"
65 #include "t_shiftjis_kddiau.h"
66 #include "t_shiftjis_docomo.h"
70 c:\z:\t_TEF\t_TEF_All.script
74 _LIT(KServerName,"t_charconvpluginserver");
76 CT_CharconvPluginsServer *CT_CharconvPluginsServer::NewL()
78 CT_CharconvPluginsServer * server = new (ELeave) CT_CharconvPluginsServer();
79 CleanupStack::PushL(server);
80 server->StartL(KServerName);
81 CleanupStack::Pop(server);
88 #if (defined __DATA_CAGING__)
89 RProcess().DataCaging(RProcess::EDataCagingOn);
90 RProcess().SecureApi(RProcess::ESecureApiOn);
92 CActiveScheduler* sched=NULL;
93 sched=new(ELeave) CActiveScheduler;
94 CActiveScheduler::Install(sched);
95 CT_CharconvPluginsServer *server = NULL;
96 TRAPD(err,server = CT_CharconvPluginsServer::NewL());
99 // Sync with the client and enter the active scheduler
100 RProcess::Rendezvous(KErrNone);
108 GLDEF_C TInt E32Main()
111 CTrapCleanup* cleanup = CTrapCleanup::New();
117 // This if statement is here just to shut up RVCT, which would otherwise warn
118 // that err was set but never used
128 CTestStep *CT_CharconvPluginsServer::CreateTestStep(const TDesC& aStepName)
130 if(aStepName == KTestStep_T_BIG5)
132 return new CT_BIG5();
134 else if(aStepName == KTestStep_T_CP949)
136 return new CT_CP949();
138 else if(aStepName == KTestStep_T_AUTODETECT)
140 return new CT_AUTODETECT();
143 else if(aStepName == KTestStep_T_WIN1250)
145 return new CT_WIN1250();
147 else if(aStepName == KTestStep_T_WIN1251)
149 return new CT_WIN1251();
151 else if(aStepName == KTestStep_T_WIN1253)
153 return new CT_WIN1253();
155 else if(aStepName == KTestStep_T_WIN1254)
157 return new CT_WIN1254();
159 else if(aStepName == KTestStep_T_WIN1255)
161 return new CT_WIN1255();
163 else if(aStepName == KTestStep_T_WIN1256)
165 return new CT_WIN1256();
167 else if(aStepName == KTestStep_T_WIN1257)
169 return new CT_WIN1257();
171 else if(aStepName == KTestStep_T_WIN1258)
173 return new CT_WIN1258();
175 else if(aStepName == KTestStep_T_WIN874)
177 return new CT_WIN874();
179 else if(aStepName == KTestStep_T_UCS2)
181 return new CT_UCS2();
183 else if(aStepName == KTestStep_T_TURKISHSINGLE)
185 return new CT_TURKISHSINGLE();
187 else if(aStepName == KTestStep_T_TURKISHLOCKINGSINGLE)
189 return new CT_TURKISHLOCKINGSINGLE();
191 else if(aStepName == KTestStep_T_TURKISHLOCKING)
193 return new CT_TURKISHLOCKING();
195 else if(aStepName == KTestStep_T_TIS_620)
197 return new CT_TIS_620();
199 else if(aStepName == KTestStep_T_SPANISHGSMSINGLE)
201 return new CT_SPANISHGSMSINGLE();
203 else if(aStepName == KTestStep_T_SNM)
207 else if(aStepName == KTestStep_T_REPLACEMENT)
209 return new CT_REPLACEMENT();
211 else if(aStepName == KTestStep_T_PORTUGUESELOCKINGSINGLE)
213 return new CT_PORTUGUESELOCKINGSINGLE();
215 else if(aStepName == KTestStep_T_PORTUGUESELOCKING)
217 return new CT_PORTUGUESELOCKING();
219 else if(aStepName == KTestStep_T_PORTUGUESESINGLE)
221 return new CT_PORTUGUESESINGLE();
223 else if(aStepName == KTestStep_T_ISO8859X)
225 return new CT_ISO8859X();
227 else if(aStepName == KTestStep_T_ISCII)
229 return new CT_ISCII();
231 else if(aStepName == KTestStep_T_GB2312)
233 return new CT_GB2312();
235 else if(aStepName == KTestStep_T_GBK)
239 else if(aStepName == KTestStep_T_HZ)
243 else if(aStepName == KTestStep_T_EXTENDEDSMS)
245 return new CT_EXTENDEDSMS();
247 else if(aStepName == KTestStep_T_KOI8R)
249 return new CT_KOI8R();
251 else if(aStepName == KTestStep_T_KOI8U)
253 return new CT_KOI8U();
255 else if(aStepName == KTestStep_T_GB18030)
257 return new CT_GB18030();
259 else if(aStepName == KTestStep_T_MULTI_PLUGINS)
261 return new CT_MULTI_PLUGINS();
263 else if(aStepName == KTestStep_T_GENERALFOREIGN)
265 return new CT_GENERALFOREIGN();
267 else if(aStepName == KTestStep_T_JIS)
271 else if(aStepName == KTestStep_T_BUILTIN)
273 return new CT_BUILTIN();
275 else if(aStepName == KTestStep_T_J5_KDDIAU)
277 return new CT_J5_KDDIAU();
279 else if(aStepName == KTestStep_T_J5_DOCOMO)
281 return new CT_J5_DOCOMO();
283 else if(aStepName == KTestStep_T_EUCJPDIRECTMAP)
285 return new CT_EUCJPDIRECTMAP();
287 else if(aStepName == KTestStep_T_SHIFTJISDIRECTMAP)
289 return new CT_SHIFTJISDIRECTMAP();
291 else if(aStepName == KTestStep_T_EUCJP_PACKED)
293 return new CT_EUCJP_PACKED();
295 else if(aStepName == KTestStep_T_EUCJP_PACKED_2)
297 return new CT_EUCJP_PACKED_2();
299 else if(aStepName == KTestStep_T_ISO2022JP)
301 return new CT_ISO2022JP();
303 else if(aStepName == KTestStep_T_ISO2022JP_2)
305 return new CT_ISO2022JP_2();
307 else if(aStepName == KTestStep_T_ISO2022JP1_2)
309 return new CT_ISO2022JP1_2();
311 else if(aStepName == KTestStep_T_SHIFTJIS_KDDIAU)
313 return new CT_SHIFTJIS_KDDIAU();
315 else if(aStepName == KTestStep_T_SHIFTJIS_DOCOMO)
317 return new CT_SHIFTJIS_DOCOMO();