os/security/authorisation/userpromptservice/database/test/tupsdb/source/tupsdb.cpp
Update contrib.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 #include "tupsdb.h" // TEF Test Server
24 #include "tupsdbstep.h" // TEF Steps Test Code
27 CTUpsDbServer* CTUpsDbServer::NewL()
29 * @return - Instance of the test server
30 * Called inside the MainL() function to create and start the
31 * CTestServer derived server.
34 CTUpsDbServer * server = new (ELeave) CTUpsDbServer();
35 CleanupStack::PushL(server);
37 server->ConstructL(KDbServerName);
38 CleanupStack::Pop(server);
46 * Much simpler, uses the new Rendezvous() call to sync with the client
50 CActiveScheduler *sched = new(ELeave) CActiveScheduler;
51 CActiveScheduler::Install(sched);
53 CTUpsDbServer* server = NULL;
55 // Create the CTestServer derived server
56 TRAPD(err,server = CTUpsDbServer::NewL());
59 // Sync with the client and enter the active scheduler
60 RProcess::Rendezvous(KErrNone);
68 GLDEF_C TInt E32Main()
70 * @return - Standard Epoc error code on process exit
71 * Process entry point. Called by client using RProcess API
75 CTrapCleanup* cleanup = CTrapCleanup::New();
87 CTestStep* CTUpsDbServer::CreateTestStep(const TDesC& aStepName)
89 // Initialise test step object to NULL if no TEF steps are assigned
90 CTestStep* testStep = NULL;
92 if(aStepName == KStepPerformance)
93 testStep = new CUpsDbStepPerformance();
94 else if (aStepName == KStepUnitTest)
95 testStep = new CUpsDbStepUnitTest();