Update contrib.
1 // Copyright (c) 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.
20 #include <ecom/ecom.h>
22 #include "egltestrefserver.h"
23 #include "egltestrefstep.h"
26 _LIT(KEGLTestServerName,"egltestrefserver");
29 CTestStep* CTestEGLRefServer::CreateTestStep(const TDesC& aStepName)
31 return EglTestStepFactory::GetEglTestStep(aStepName);
34 CTestEGLRefServer* CTestEGLRefServer::NewL()
36 CTestEGLRefServer* server = new(ELeave) CTestEGLRefServer();
37 CleanupStack::PushL(server);
38 // CServer base class call
39 TParsePtrC serverName(RProcess().FileName());
40 server->StartL(serverName.Name());
41 CleanupStack::Pop(server);
47 CActiveScheduler* sched=NULL;
48 sched=new(ELeave) CActiveScheduler;
49 CActiveScheduler::Install(sched);
52 // Construct and destroy a process-wide state object in emulator builds.
53 // This will cause initialisation of PLS for EGL and SgDriver
54 // and allow checking for leaks in tests
55 if(!eglReleaseThread())
57 // Call to eglReleaseThread failed
58 User::Leave(KErrGeneral);
62 CTestEGLRefServer* server = NULL;
63 // Create the CTestServer derived server
64 TRAPD(err, server = CTestEGLRefServer::NewL());
67 // Sync with the client and enter the active scheduler
68 RProcess::Rendezvous(KErrNone);
76 @return Standard Epoc error code on process exit
77 Process entry point. Called by client using RProcess API
82 CTrapCleanup* cleanup = CTrapCleanup::New();
91 RDebug::Print(_L("CTestEGLRefServer::MainL - Error: %d"), err);
92 User::Panic(KEGLTestServerName,err);
96 REComSession::FinalClose();