Update contrib.
1 // Copyright (c) 2006-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 "TBitgdiServer.h"
28 #include "TAccelerator.h"
32 #include "TBitgdiScaling.h"
33 #include "TAlphaBlend.h"
34 #include "tfontselect.h"
36 #include "toutlineandshadowfonts.h"
37 #include "textendedbitmap.h"
38 #include "tmultiplescreens.h"
42 _LIT(KServerName,"TBitgdiServer");
44 CTBitgdiServer* CTBitgdiServer::NewL()
46 CTBitgdiServer * server = new (ELeave) CTBitgdiServer();
47 CleanupStack::PushL(server);
48 // CServer base class call
49 server->StartL(KServerName);
50 CleanupStack::Pop(server);
57 RProcess().DataCaging(RProcess::EDataCagingOn);
58 RProcess().SecureApi(RProcess::ESecureApiOn);
59 CActiveScheduler* sched=NULL;
60 sched=new(ELeave) CActiveScheduler;
61 CActiveScheduler::Install(sched);
62 CTBitgdiServer* server = NULL;
63 // Create the CTestServer derived server
64 TRAPD(err,server = CTBitgdiServer::NewL());
67 // Sync with the client and enter the active scheduler
68 RProcess::Rendezvous(KErrNone);
75 GLDEF_C TInt E32Main()
78 CTrapCleanup* cleanup = CTrapCleanup::New();
86 RDebug::Print(_L("TBitgdiServer::MainL - Error: %d"), err);
87 User::Panic(KServerName,err);
96 CTestStep* CTBitgdiServer::CreateTestStep(const TDesC& aStepName)
98 CTestStep* testStep = NULL;
100 if(aStepName == KTAutoStep)
102 testStep = new CTAutoStep();
104 else if(aStepName == KTGdiStep)
106 testStep = new CTGdiStep();
108 else if(aStepName == KTClipStep)
110 testStep = new CTClipStep();
112 else if(aStepName == KTClip2Step)
114 testStep = new CTClip2Step();
116 else if(aStepName == KTParamStep)
118 testStep = new CTParamStep();
120 else if(aStepName == KTSwitchStep)
122 testStep = new CTSwitchStep();
124 else if(aStepName == KTAcceleratorStep)
126 testStep = new CTAcceleratorStep();
128 else if(aStepName == KTDefectStep)
130 testStep = new CTDefectStep();
132 else if(aStepName == KTDefect2Step)
134 testStep = new CTDefect2Step();
136 else if(aStepName == KTBitBltStep)
138 testStep = new CTBitBltStep();
140 else if(aStepName == KTBitgdiScalingStep)
142 testStep = new CTBitgdiScalingStep();
144 else if(aStepName == KTAlphaBlendingStep)
146 testStep = new CTAlphaBlendingStep();
148 else if(aStepName == KTFontSelectStep)
150 testStep = new CTFontSelectStep();
152 else if(aStepName == KTFontStep)
154 testStep = new CTFontStep();
156 else if(aStepName == KTOutlineAndShadowFontsStep)
158 testStep = new CTOutlineAndShadowFontsStep();
160 else if(aStepName == KTExtendedBitmapStep)
162 testStep = new CTExtendedBitmapStep();
164 else if(aStepName == KTExtendedBitmapNegativeStep)
166 testStep = new CTExtendedBitmapNegativeStep();
168 else if(aStepName == KTMultipleScreensStep)
170 testStep = new CTMultipleScreensStep();
173 _LIT(KBitgdi,"BITGDI Test %S ");
174 _LIT(KSucess,"created sucessfully.");
175 _LIT(KFail,"failed to create.");
176 log.Format(KBitgdi,&aStepName);