Update contrib.
1 // Copyright (c) 2005-2009 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 "TScdvServer.h"
24 #include "TScdvScaling.h"
25 #include "TScdvTest.h"
26 #include "TRWindows.h"
28 #if defined(SYMBIAN_GRAPHICS_GCE)
29 #include "TDirectScreenBitmap.h"
30 #include "tscdvdevorientation.h"
31 #endif //SYMBIAN_GRAPHICS_GCE
34 z:\GraphicsTest\scdvtest.script
37 _LIT(KServerName,"TScdvServer");
39 CTScdvServer* CTScdvServer::NewL()
41 @return - Instance of the test server
42 Same code for Secure and non-secure variants
43 Called inside the MainL() function to create and start the
44 CTestServer derived server.
47 CTScdvServer * server = new (ELeave) CTScdvServer();
48 CleanupStack::PushL(server);
49 // CServer base class call
50 server->StartL(KServerName);
51 CleanupStack::Pop(server);
59 // Much simpler, uses the new Rendezvous() call to sync with the client
62 #if (defined __DATA_CAGING__)
63 RProcess().DataCaging(RProcess::EDataCagingOn);
64 RProcess().SecureApi(RProcess::ESecureApiOn);
66 CActiveScheduler* sched=NULL;
67 sched=new(ELeave) CActiveScheduler;
68 CActiveScheduler::Install(sched);
69 CTScdvServer* server = NULL;
70 // Create the CTestServer derived server
71 TRAPD(err,server = CTScdvServer::NewL());
74 // Sync with the client and enter the active scheduler
75 RProcess::Rendezvous(KErrNone);
82 GLDEF_C TInt E32Main()
84 /** @return - Standard Epoc error code on process exit
86 Process entry point. Called by client using RProcess API
90 CTrapCleanup* cleanup = CTrapCleanup::New();
96 // This if statement is here just to shut up RVCT, which would otherwise warn
97 // that err was set but never used
107 CTestStep* CTScdvServer::CreateTestStep(const TDesC& aStepName)
109 @return - A CTestStep derived instance
110 Secure and non-secure variants
111 Implementation of CTestServer pure virtual
114 CTestStep* testStep = NULL;
115 if(aStepName == KTLowLevelStep)
116 testStep = new CTLowLevelStep();
117 else if(aStepName == KTLowLevel1Step)
118 testStep = new CTLowLevel1Step();
119 else if(aStepName == KTRWindowsStep)
120 testStep = new CTRWindowsStep();
121 else if(aStepName == KTScalingStep)
122 testStep = new CTScalingStep();
123 else if(aStepName == KTScdvStep)
124 testStep = new CTScdvStep();
125 #if defined(SYMBIAN_GRAPHICS_GCE)
126 else if (aStepName == KTDevOrientationStep)
127 testStep = new CTDevOrientationStep();
128 else if(aStepName == KTDirectScreenBitmapStep)
129 testStep = new CTDirectScreenBitmapStep();
130 #endif //SYMBIAN_GRAPHICS_GCE