os/textandloc/charconvfw/fatfilenameconversionplugins/test/T_FatCharsetConvServer.cpp
Update contrib.
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.
21 #include "T_FatCharsetConvServer.h"
36 #include "T_CP54936.h"
40 c:\z:\t_TEF\t_TEF_All.script
44 _LIT(KServerName,"T_FatCharsetConvServer");
46 CT_FatCharsetConvServer *CT_FatCharsetConvServer::NewL()
48 @return - Instance of the test server
49 Same code for Secure and non-secure variants
50 Called inside the MainL() function to create and start the
51 CTestServer derived server.
54 CT_FatCharsetConvServer * server = new (ELeave) CT_FatCharsetConvServer();
55 CleanupStack::PushL(server);
56 // CServer base class call
57 server->StartL(KServerName);
58 CleanupStack::Pop(server);
66 // Much simpler, uses the new Rendezvous() call to sync with the client
69 #if (defined __DATA_CAGING__)
70 RProcess().DataCaging(RProcess::EDataCagingOn);
71 RProcess().SecureApi(RProcess::ESecureApiOn);
73 CActiveScheduler* sched=NULL;
74 sched=new(ELeave) CActiveScheduler;
75 CActiveScheduler::Install(sched);
76 CT_FatCharsetConvServer *server = NULL;
77 // Create the CTestServer derived server
78 TRAPD(err,server = CT_FatCharsetConvServer::NewL());
81 // Sync with the client and enter the active scheduler
82 RProcess::Rendezvous(KErrNone);
89 /** @return - Standard Epoc error code on process exit
91 Process entry point. Called by client using RProcess API
93 GLDEF_C TInt E32Main()
96 CTrapCleanup* cleanup = CTrapCleanup::New();
102 // This if statement is here just to shut up RVCT, which would otherwise warn
103 // that err was set but never used
113 CTestStep *CT_FatCharsetConvServer::CreateTestStep(const TDesC& aStepName)
115 @return - A CTestStep derived instance
116 Secure and non-secure variants
117 Implementation of CTestServer pure virtual
120 if(aStepName == KTestStep_T_CP874)
122 return new CT_CP874();
124 else if(aStepName == KTestStep_T_CP932)
126 return new CT_CP932();
128 else if(aStepName == KTestStep_T_CP936)
130 return new CT_CP936();
132 else if(aStepName == KTestStep_T_CP949)
134 return new CT_CP949();
136 else if(aStepName == KTestStep_T_CP950)
138 return new CT_CP950();
140 else if(aStepName == KTestStep_T_CP1250)
142 return new CT_CP1250();
144 else if(aStepName == KTestStep_T_CP1251)
146 return new CT_CP1251();
148 else if(aStepName == KTestStep_T_CP1252)
150 return new CT_CP1252();
152 else if(aStepName == KTestStep_T_CP1253)
154 return new CT_CP1253();
156 else if(aStepName == KTestStep_T_CP1254)
158 return new CT_CP1254();
160 else if(aStepName == KTestStep_T_CP1255)
162 return new CT_CP1255();
164 else if(aStepName == KTestStep_T_CP1256)
166 return new CT_CP1256();
168 else if(aStepName == KTestStep_T_CP1257)
170 return new CT_CP1257();
172 else if(aStepName == KTestStep_T_CP1258)
174 return new CT_CP1258();
176 else if(aStepName == KTestStep_T_CP54936)
178 return new CT_CP54936();