Update contrib.
1 // Copyright (c) 2005-2010 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.
19 @internalComponent - Internal Symbian test code
22 #include "TFbsServer.h"
27 #include "tcompressed.h"
29 #include "TFBSDefect.h"
30 #include "TStreamIdCache.h"
31 #include "TSecureFBS.h"
33 #include "TGetAllBitmapsCapability.h"
35 #include "textendedbitmap.h"
36 #include "textendedbitmapnegative.h"
37 #include "textendedbitmaplegacy.h"
38 #include "textendedbitmappanic.h"
40 #include "tfonttableandglyph.h"
41 #include "tfbsglyphdata.h"
42 #include "tfbsglyphdatapanic.h"
43 #include "tfbsglyphdataoutlineshadow.h"
44 #include "tglyphatlas.h"
49 z:\GraphicsTest\fbstest.script
53 CTFbsServer* CTFbsServer::NewL()
55 @return - Instance of the test server
56 Same code for Secure and non-secure variants
57 Called inside the MainL() function to create and start the
58 CTestServer derived server.
61 CTFbsServer * server = new (ELeave) CTFbsServer();
62 CleanupStack::PushL(server);
64 // Get server name from process so we can use SetCap to change the capabilites and use this server with a different filename
65 RProcess handle = RProcess();
66 TParsePtrC serverName(handle.FileName());
68 // CServer base class call
69 server->StartL(serverName.Name());
70 CleanupStack::Pop(server);
78 // Much simpler, uses the new Rendezvous() call to sync with the client
81 RProcess().DataCaging(RProcess::EDataCagingOn);
82 RProcess().SecureApi(RProcess::ESecureApiOn);
84 CActiveScheduler* sched=NULL;
85 sched=new(ELeave) CActiveScheduler;
86 CActiveScheduler::Install(sched);
87 CTFbsServer* server = NULL;
88 // Create the CTestServer derived server
89 TRAPD(err,server = CTFbsServer::NewL());
92 // Sync with the client and enter the active scheduler
93 RProcess::Rendezvous(KErrNone);
100 /** @return - Standard Epoc error code on process exit
102 Process entry point. Called by client using RProcess API
104 GLDEF_C TInt E32Main()
107 CTrapCleanup* cleanup = CTrapCleanup::New();
115 RProcess handle = RProcess();
116 TParsePtrC serverName(handle.FileName());
117 RDebug::Print(_L("CTFbsServer::MainL - Error: %d"), err);
118 User::Panic(serverName.Name(),err);
125 CTestStep* CTFbsServer::CreateTestStep(const TDesC& aStepName)
127 @return - A CTestStep derived instance
128 Secure and non-secure variants
129 Implementation of CTestServer pure virtual
132 CTestStep* testStep = NULL;
134 if(aStepName == KTAllocStep)
136 testStep = new CTAllocStep();
138 else if(aStepName == KTBitmapStep)
140 testStep = new CTBitmapStep();
142 else if(aStepName == KTCleanStep)
144 testStep = new CTCleanStep();
146 else if(aStepName == KTFbsStep)
148 testStep = new CTFbsStep();
150 else if(aStepName == KTCompressedStep)
152 testStep = new CTCompressedStep();
154 else if(aStepName == KTRalcStep)
156 testStep = new CTRalcStep();
158 else if(aStepName == KTFbsDefectStep)
160 testStep = new CTFbsDefectStep();
162 else if(aStepName == KTStreamIdCacheStep)
164 testStep = new CTStreamIdCacheStep();
166 else if(aStepName == KTFbsSecureStep)
168 testStep = new CTFbsSecureStep();
170 else if(aStepName == KTFileStep)
172 testStep = new CTFileStep();
174 else if(aStepName == KTGetAllBitmapsCapabilityStep)
176 testStep = new CTGetAllBitmapsCapabilityStep();
178 else if(aStepName == KTIPCTestStep)
180 testStep = new CTIPCTestStep();
182 else if(aStepName == KTExtendedBitmapStep)
184 testStep = new CTExtendedBitmapStep();
186 else if(aStepName == KTExtendedBitmapNegativeStep)
188 testStep = new CTExtendedBitmapNegativeStep();
190 else if(aStepName == KTExtendedBitmapLegacyStep)
192 testStep = new CTExtendedBitmapLegacyStep();
194 else if(aStepName == KTExtendedBitmapPanicStep)
196 testStep = new CTExtendedBitmapPanicStep();
198 else if(aStepName == KTWDPStep)
200 testStep = new CTWDPStep();
202 else if(aStepName == KTFontTableAndGlyphStep)
204 testStep = new CTFontAndGlyphStep();
206 else if(aStepName == KTFbsGlyphDataStep)
208 testStep = new CTFbsGlyphDataStep();
210 else if(aStepName == KTFbsGlyphDataPanicStep)
212 testStep = new CTFbsGlyphDataPanicStep();
214 else if(aStepName == KTFbsGlyphDataOutlineAndShadowStep)
216 testStep = new CTFbsGlyphDataOutlineAndShadowStep();
218 else if(aStepName == KTGlyphAtlasStep)
220 testStep = new CTGlyphAtlasStep();
222 else if(aStepName == KTFbsOogmStep)
224 testStep = new CTFbsOogmStep();