author | sl@SLION-WIN7.fritz.box |
Fri, 15 Jun 2012 03:10:57 +0200 | |
changeset 0 | bde4ae8d615e |
permissions | -rw-r--r-- |
sl@0 | 1 |
/* |
sl@0 | 2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
sl@0 | 3 |
* All rights reserved. |
sl@0 | 4 |
* This component and the accompanying materials are made available |
sl@0 | 5 |
* under the terms of "Eclipse Public License v1.0" |
sl@0 | 6 |
* which accompanies this distribution, and is available |
sl@0 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
sl@0 | 8 |
* |
sl@0 | 9 |
* Initial Contributors: |
sl@0 | 10 |
* Nokia Corporation - initial contribution. |
sl@0 | 11 |
* |
sl@0 | 12 |
* Contributors: |
sl@0 | 13 |
* |
sl@0 | 14 |
* Description: |
sl@0 | 15 |
* |
sl@0 | 16 |
*/ |
sl@0 | 17 |
|
sl@0 | 18 |
|
sl@0 | 19 |
#include "t_charconvpluginserver.h" |
sl@0 | 20 |
#include "t_big5.h" |
sl@0 | 21 |
#include "t_cp949.h" |
sl@0 | 22 |
#include "t_autodetect.h" |
sl@0 | 23 |
#include "t_win1250.h" |
sl@0 | 24 |
#include "t_win1251.h" |
sl@0 | 25 |
#include "t_win1253.h" |
sl@0 | 26 |
#include "t_win1254.h" |
sl@0 | 27 |
#include "t_win1255.h" |
sl@0 | 28 |
#include "t_win1256.h" |
sl@0 | 29 |
#include "t_win1257.h" |
sl@0 | 30 |
#include "t_win1258.h" |
sl@0 | 31 |
#include "t_win874.h" |
sl@0 | 32 |
#include "t_ucs2.h" |
sl@0 | 33 |
#include "t_turkishsingle.h" |
sl@0 | 34 |
#include "t_turkishlockingsingle.h" |
sl@0 | 35 |
#include "t_turkishlocking.h" |
sl@0 | 36 |
#include "t_tis_620.h" |
sl@0 | 37 |
#include "t_spanishgsmsingle.h" |
sl@0 | 38 |
#include "t_snm.h" |
sl@0 | 39 |
#include "t_replacement.h" |
sl@0 | 40 |
#include "t_portugueselockingsingle.h" |
sl@0 | 41 |
#include "t_portugueselocking.h" |
sl@0 | 42 |
#include "t_portuguesesingle.h" |
sl@0 | 43 |
#include "t_iso8859x.h" |
sl@0 | 44 |
#include "t_iscii.h" |
sl@0 | 45 |
#include "t_gb2312.h" |
sl@0 | 46 |
#include "t_gbk.h" |
sl@0 | 47 |
#include "t_hz.h" |
sl@0 | 48 |
#include "t_extendedsms.h" |
sl@0 | 49 |
#include "t_koi8r.h" |
sl@0 | 50 |
#include "t_koi8u.h" |
sl@0 | 51 |
#include "t_gb18030.h" |
sl@0 | 52 |
#include "t_multi_plugins.h" |
sl@0 | 53 |
#include "t_generalforeign.h" |
sl@0 | 54 |
#include "t_jis.h" |
sl@0 | 55 |
#include "t_builtin.h" |
sl@0 | 56 |
#include "t_j5_kddiau.h" |
sl@0 | 57 |
#include "t_j5_docomo.h" |
sl@0 | 58 |
#include "t_eucjpdirectmap.h" |
sl@0 | 59 |
#include "t_shiftjisdirectmap.h" |
sl@0 | 60 |
#include "t_eucjp_packed.h" |
sl@0 | 61 |
#include "t_eucjp_packed_2.h" |
sl@0 | 62 |
#include "t_iso2022jp.h" |
sl@0 | 63 |
#include "t_iso2022jp_2.h" |
sl@0 | 64 |
#include "t_iso2022jp1_2.h" |
sl@0 | 65 |
#include "t_shiftjis_kddiau.h" |
sl@0 | 66 |
#include "t_shiftjis_docomo.h" |
sl@0 | 67 |
|
sl@0 | 68 |
/* Path to the script |
sl@0 | 69 |
|
sl@0 | 70 |
c:\z:\t_TEF\t_TEF_All.script |
sl@0 | 71 |
|
sl@0 | 72 |
*/ |
sl@0 | 73 |
|
sl@0 | 74 |
_LIT(KServerName,"t_charconvpluginserver"); |
sl@0 | 75 |
|
sl@0 | 76 |
CT_CharconvPluginsServer *CT_CharconvPluginsServer::NewL() |
sl@0 | 77 |
{ |
sl@0 | 78 |
CT_CharconvPluginsServer * server = new (ELeave) CT_CharconvPluginsServer(); |
sl@0 | 79 |
CleanupStack::PushL(server); |
sl@0 | 80 |
server->StartL(KServerName); |
sl@0 | 81 |
CleanupStack::Pop(server); |
sl@0 | 82 |
return server; |
sl@0 | 83 |
} |
sl@0 | 84 |
|
sl@0 | 85 |
|
sl@0 | 86 |
LOCAL_C void MainL() |
sl@0 | 87 |
{ |
sl@0 | 88 |
#if (defined __DATA_CAGING__) |
sl@0 | 89 |
RProcess().DataCaging(RProcess::EDataCagingOn); |
sl@0 | 90 |
RProcess().SecureApi(RProcess::ESecureApiOn); |
sl@0 | 91 |
#endif |
sl@0 | 92 |
CActiveScheduler* sched=NULL; |
sl@0 | 93 |
sched=new(ELeave) CActiveScheduler; |
sl@0 | 94 |
CActiveScheduler::Install(sched); |
sl@0 | 95 |
CT_CharconvPluginsServer *server = NULL; |
sl@0 | 96 |
TRAPD(err,server = CT_CharconvPluginsServer::NewL()); |
sl@0 | 97 |
if(!err) |
sl@0 | 98 |
{ |
sl@0 | 99 |
// Sync with the client and enter the active scheduler |
sl@0 | 100 |
RProcess::Rendezvous(KErrNone); |
sl@0 | 101 |
sched->Start(); |
sl@0 | 102 |
} |
sl@0 | 103 |
delete server; |
sl@0 | 104 |
delete sched; |
sl@0 | 105 |
} |
sl@0 | 106 |
|
sl@0 | 107 |
|
sl@0 | 108 |
GLDEF_C TInt E32Main() |
sl@0 | 109 |
{ |
sl@0 | 110 |
__UHEAP_MARK; |
sl@0 | 111 |
CTrapCleanup* cleanup = CTrapCleanup::New(); |
sl@0 | 112 |
if(cleanup == NULL) |
sl@0 | 113 |
{ |
sl@0 | 114 |
return KErrNoMemory; |
sl@0 | 115 |
} |
sl@0 | 116 |
TRAPD(err,MainL()); |
sl@0 | 117 |
// This if statement is here just to shut up RVCT, which would otherwise warn |
sl@0 | 118 |
// that err was set but never used |
sl@0 | 119 |
if (err) |
sl@0 | 120 |
{ |
sl@0 | 121 |
err = KErrNone; |
sl@0 | 122 |
} |
sl@0 | 123 |
delete cleanup; |
sl@0 | 124 |
__UHEAP_MARKEND; |
sl@0 | 125 |
return KErrNone; |
sl@0 | 126 |
} |
sl@0 | 127 |
|
sl@0 | 128 |
CTestStep *CT_CharconvPluginsServer::CreateTestStep(const TDesC& aStepName) |
sl@0 | 129 |
{ |
sl@0 | 130 |
if(aStepName == KTestStep_T_BIG5) |
sl@0 | 131 |
{ |
sl@0 | 132 |
return new CT_BIG5(); |
sl@0 | 133 |
} |
sl@0 | 134 |
else if(aStepName == KTestStep_T_CP949) |
sl@0 | 135 |
{ |
sl@0 | 136 |
return new CT_CP949(); |
sl@0 | 137 |
} |
sl@0 | 138 |
else if(aStepName == KTestStep_T_AUTODETECT) |
sl@0 | 139 |
{ |
sl@0 | 140 |
return new CT_AUTODETECT(); |
sl@0 | 141 |
} |
sl@0 | 142 |
|
sl@0 | 143 |
else if(aStepName == KTestStep_T_WIN1250) |
sl@0 | 144 |
{ |
sl@0 | 145 |
return new CT_WIN1250(); |
sl@0 | 146 |
} |
sl@0 | 147 |
else if(aStepName == KTestStep_T_WIN1251) |
sl@0 | 148 |
{ |
sl@0 | 149 |
return new CT_WIN1251(); |
sl@0 | 150 |
} |
sl@0 | 151 |
else if(aStepName == KTestStep_T_WIN1253) |
sl@0 | 152 |
{ |
sl@0 | 153 |
return new CT_WIN1253(); |
sl@0 | 154 |
} |
sl@0 | 155 |
else if(aStepName == KTestStep_T_WIN1254) |
sl@0 | 156 |
{ |
sl@0 | 157 |
return new CT_WIN1254(); |
sl@0 | 158 |
} |
sl@0 | 159 |
else if(aStepName == KTestStep_T_WIN1255) |
sl@0 | 160 |
{ |
sl@0 | 161 |
return new CT_WIN1255(); |
sl@0 | 162 |
} |
sl@0 | 163 |
else if(aStepName == KTestStep_T_WIN1256) |
sl@0 | 164 |
{ |
sl@0 | 165 |
return new CT_WIN1256(); |
sl@0 | 166 |
} |
sl@0 | 167 |
else if(aStepName == KTestStep_T_WIN1257) |
sl@0 | 168 |
{ |
sl@0 | 169 |
return new CT_WIN1257(); |
sl@0 | 170 |
} |
sl@0 | 171 |
else if(aStepName == KTestStep_T_WIN1258) |
sl@0 | 172 |
{ |
sl@0 | 173 |
return new CT_WIN1258(); |
sl@0 | 174 |
} |
sl@0 | 175 |
else if(aStepName == KTestStep_T_WIN874) |
sl@0 | 176 |
{ |
sl@0 | 177 |
return new CT_WIN874(); |
sl@0 | 178 |
} |
sl@0 | 179 |
else if(aStepName == KTestStep_T_UCS2) |
sl@0 | 180 |
{ |
sl@0 | 181 |
return new CT_UCS2(); |
sl@0 | 182 |
} |
sl@0 | 183 |
else if(aStepName == KTestStep_T_TURKISHSINGLE) |
sl@0 | 184 |
{ |
sl@0 | 185 |
return new CT_TURKISHSINGLE(); |
sl@0 | 186 |
} |
sl@0 | 187 |
else if(aStepName == KTestStep_T_TURKISHLOCKINGSINGLE) |
sl@0 | 188 |
{ |
sl@0 | 189 |
return new CT_TURKISHLOCKINGSINGLE(); |
sl@0 | 190 |
} |
sl@0 | 191 |
else if(aStepName == KTestStep_T_TURKISHLOCKING) |
sl@0 | 192 |
{ |
sl@0 | 193 |
return new CT_TURKISHLOCKING(); |
sl@0 | 194 |
} |
sl@0 | 195 |
else if(aStepName == KTestStep_T_TIS_620) |
sl@0 | 196 |
{ |
sl@0 | 197 |
return new CT_TIS_620(); |
sl@0 | 198 |
} |
sl@0 | 199 |
else if(aStepName == KTestStep_T_SPANISHGSMSINGLE) |
sl@0 | 200 |
{ |
sl@0 | 201 |
return new CT_SPANISHGSMSINGLE(); |
sl@0 | 202 |
} |
sl@0 | 203 |
else if(aStepName == KTestStep_T_SNM) |
sl@0 | 204 |
{ |
sl@0 | 205 |
return new CT_SNM(); |
sl@0 | 206 |
} |
sl@0 | 207 |
else if(aStepName == KTestStep_T_REPLACEMENT) |
sl@0 | 208 |
{ |
sl@0 | 209 |
return new CT_REPLACEMENT(); |
sl@0 | 210 |
} |
sl@0 | 211 |
else if(aStepName == KTestStep_T_PORTUGUESELOCKINGSINGLE) |
sl@0 | 212 |
{ |
sl@0 | 213 |
return new CT_PORTUGUESELOCKINGSINGLE(); |
sl@0 | 214 |
} |
sl@0 | 215 |
else if(aStepName == KTestStep_T_PORTUGUESELOCKING) |
sl@0 | 216 |
{ |
sl@0 | 217 |
return new CT_PORTUGUESELOCKING(); |
sl@0 | 218 |
} |
sl@0 | 219 |
else if(aStepName == KTestStep_T_PORTUGUESESINGLE) |
sl@0 | 220 |
{ |
sl@0 | 221 |
return new CT_PORTUGUESESINGLE(); |
sl@0 | 222 |
} |
sl@0 | 223 |
else if(aStepName == KTestStep_T_ISO8859X) |
sl@0 | 224 |
{ |
sl@0 | 225 |
return new CT_ISO8859X(); |
sl@0 | 226 |
} |
sl@0 | 227 |
else if(aStepName == KTestStep_T_ISCII) |
sl@0 | 228 |
{ |
sl@0 | 229 |
return new CT_ISCII(); |
sl@0 | 230 |
} |
sl@0 | 231 |
else if(aStepName == KTestStep_T_GB2312) |
sl@0 | 232 |
{ |
sl@0 | 233 |
return new CT_GB2312(); |
sl@0 | 234 |
} |
sl@0 | 235 |
else if(aStepName == KTestStep_T_GBK) |
sl@0 | 236 |
{ |
sl@0 | 237 |
return new CT_GBK(); |
sl@0 | 238 |
} |
sl@0 | 239 |
else if(aStepName == KTestStep_T_HZ) |
sl@0 | 240 |
{ |
sl@0 | 241 |
return new CT_HZ(); |
sl@0 | 242 |
} |
sl@0 | 243 |
else if(aStepName == KTestStep_T_EXTENDEDSMS) |
sl@0 | 244 |
{ |
sl@0 | 245 |
return new CT_EXTENDEDSMS(); |
sl@0 | 246 |
} |
sl@0 | 247 |
else if(aStepName == KTestStep_T_KOI8R) |
sl@0 | 248 |
{ |
sl@0 | 249 |
return new CT_KOI8R(); |
sl@0 | 250 |
} |
sl@0 | 251 |
else if(aStepName == KTestStep_T_KOI8U) |
sl@0 | 252 |
{ |
sl@0 | 253 |
return new CT_KOI8U(); |
sl@0 | 254 |
} |
sl@0 | 255 |
else if(aStepName == KTestStep_T_GB18030) |
sl@0 | 256 |
{ |
sl@0 | 257 |
return new CT_GB18030(); |
sl@0 | 258 |
} |
sl@0 | 259 |
else if(aStepName == KTestStep_T_MULTI_PLUGINS) |
sl@0 | 260 |
{ |
sl@0 | 261 |
return new CT_MULTI_PLUGINS(); |
sl@0 | 262 |
} |
sl@0 | 263 |
else if(aStepName == KTestStep_T_GENERALFOREIGN) |
sl@0 | 264 |
{ |
sl@0 | 265 |
return new CT_GENERALFOREIGN(); |
sl@0 | 266 |
} |
sl@0 | 267 |
else if(aStepName == KTestStep_T_JIS) |
sl@0 | 268 |
{ |
sl@0 | 269 |
return new CT_JIS(); |
sl@0 | 270 |
} |
sl@0 | 271 |
else if(aStepName == KTestStep_T_BUILTIN) |
sl@0 | 272 |
{ |
sl@0 | 273 |
return new CT_BUILTIN(); |
sl@0 | 274 |
} |
sl@0 | 275 |
else if(aStepName == KTestStep_T_J5_KDDIAU) |
sl@0 | 276 |
{ |
sl@0 | 277 |
return new CT_J5_KDDIAU(); |
sl@0 | 278 |
} |
sl@0 | 279 |
else if(aStepName == KTestStep_T_J5_DOCOMO) |
sl@0 | 280 |
{ |
sl@0 | 281 |
return new CT_J5_DOCOMO(); |
sl@0 | 282 |
} |
sl@0 | 283 |
else if(aStepName == KTestStep_T_EUCJPDIRECTMAP) |
sl@0 | 284 |
{ |
sl@0 | 285 |
return new CT_EUCJPDIRECTMAP(); |
sl@0 | 286 |
} |
sl@0 | 287 |
else if(aStepName == KTestStep_T_SHIFTJISDIRECTMAP) |
sl@0 | 288 |
{ |
sl@0 | 289 |
return new CT_SHIFTJISDIRECTMAP(); |
sl@0 | 290 |
} |
sl@0 | 291 |
else if(aStepName == KTestStep_T_EUCJP_PACKED) |
sl@0 | 292 |
{ |
sl@0 | 293 |
return new CT_EUCJP_PACKED(); |
sl@0 | 294 |
} |
sl@0 | 295 |
else if(aStepName == KTestStep_T_EUCJP_PACKED_2) |
sl@0 | 296 |
{ |
sl@0 | 297 |
return new CT_EUCJP_PACKED_2(); |
sl@0 | 298 |
} |
sl@0 | 299 |
else if(aStepName == KTestStep_T_ISO2022JP) |
sl@0 | 300 |
{ |
sl@0 | 301 |
return new CT_ISO2022JP(); |
sl@0 | 302 |
} |
sl@0 | 303 |
else if(aStepName == KTestStep_T_ISO2022JP_2) |
sl@0 | 304 |
{ |
sl@0 | 305 |
return new CT_ISO2022JP_2(); |
sl@0 | 306 |
} |
sl@0 | 307 |
else if(aStepName == KTestStep_T_ISO2022JP1_2) |
sl@0 | 308 |
{ |
sl@0 | 309 |
return new CT_ISO2022JP1_2(); |
sl@0 | 310 |
} |
sl@0 | 311 |
else if(aStepName == KTestStep_T_SHIFTJIS_KDDIAU) |
sl@0 | 312 |
{ |
sl@0 | 313 |
return new CT_SHIFTJIS_KDDIAU(); |
sl@0 | 314 |
} |
sl@0 | 315 |
else if(aStepName == KTestStep_T_SHIFTJIS_DOCOMO) |
sl@0 | 316 |
{ |
sl@0 | 317 |
return new CT_SHIFTJIS_DOCOMO(); |
sl@0 | 318 |
} |
sl@0 | 319 |
return NULL; |
sl@0 | 320 |
} |
sl@0 | 321 |