os/graphics/windowing/windowserver/test/t_capability/src/t_wservcapcheckserver.cpp
Update contrib.
1 // Copyright (c) 2008-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.
22 #include "t_wservcapcheckserver.h"
23 #include "t_wservcapchecksteptsizemode.h"
26 CT_WServCapCheckServer* CT_WServCapCheckServer::NewL()
28 * @return - Instance of the test server
29 * Same code for Secure and non-secure variants
30 * Called inside the MainL() function to create and start the
31 * CTestServer derived server.
34 CT_WServCapCheckServer* server = new (ELeave) CT_WServCapCheckServer();
35 CleanupStack::PushL(server);
37 CleanupStack::Pop(server);
41 void CT_WServCapCheckServer::ConstructL()
43 RProcess handle = RProcess();
44 TParsePtrC serverName(handle.FileName());
45 CTestServer::ConstructL(serverName.Name());
51 * Much simpler, uses the new Rendezvous() call to sync with the client
54 RProcess().DataCaging(RProcess::EDataCagingOn);
55 RProcess().SecureApi(RProcess::ESecureApiOn);
57 CActiveScheduler* sched=NULL;
58 sched=new(ELeave) CActiveScheduler;
59 CActiveScheduler::Install(sched);
60 CT_WServCapCheckServer* server = NULL;
62 // Create the CTestServer derived server
63 TRAPD(err,server = CT_WServCapCheckServer::NewL());
66 // Sync with the client and enter the active scheduler
67 RProcess::Rendezvous(KErrNone);
74 GLDEF_C TInt E32Main()
76 * @return - Standard Epoc error code on process exit
78 * Process entry point. Called by client using RProcess Integ
83 CTrapCleanup* cleanup = CTrapCleanup::New();
97 CTestStep* CT_WServCapCheckServer::CreateTestStep(const TDesC& aStepName)
99 * @return - A CTestStep derived instance
100 * Secure and non-secure variants
101 * Implementation of CTestServer pure virtual
104 CTestStep* testStep = NULL;
106 if ( aStepName == KT_WServCapCheckStepTSizeModePos )
108 testStep = new CT_WServCapCheckStepTSizeModePos();
110 if ( aStepName == KT_WServCapCheckStepTSizeModeNeg)
112 testStep = new CT_WServCapCheckStepTSizeModeNeg();