Update contrib.
1 // Copyright (c) 2006-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 "tsurfaceupdatetestserver.h"
23 #include "tsurfaceupdate.h"
25 _LIT(KServerName,"TSurfaceUpdateTestServer");
27 CTSurfaceUpdateServer* CTSurfaceUpdateServer::NewL()
29 CTSurfaceUpdateServer * server = new (ELeave) CTSurfaceUpdateServer();
30 CleanupStack::PushL(server);
31 // CServer base class call
32 server->StartL(KServerName);
33 CleanupStack::Pop(server);
39 RProcess().DataCaging(RProcess::EDataCagingOn);
40 RProcess().SecureApi(RProcess::ESecureApiOn);
41 CActiveScheduler* sched=NULL;
42 sched=new(ELeave) CActiveScheduler;
43 CActiveScheduler::Install(sched);
44 CTSurfaceUpdateServer* server = NULL;
45 // Create the CTestServer derived server
46 TRAPD(err,server = CTSurfaceUpdateServer::NewL());
49 // Sync with the client and enter the active scheduler
50 RProcess::Rendezvous(KErrNone);
57 GLDEF_C TInt E32Main()
60 CTrapCleanup* cleanup = CTrapCleanup::New();
68 RDebug::Print(_L("TSurfaceUpdateServer::MainL - Error: %d"), err);
69 User::Panic(KServerName,err);
76 CTestStep* CTSurfaceUpdateServer::CreateTestStep(const TDesC& aStepName)
78 CTestStep* testStep = NULL;
80 if(aStepName == KTSurfaceUpdateStep)
82 testStep = new CTSurfaceUpdateStep();