Update contrib.
2 * Copyright (c) 2007-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.
19 #include "tupsintegserver.h"
20 #include "tupsclientstep.h"
22 #include "tupspropertystep.h"
23 #include "tups_utils.h"
24 #include "tups_minortests.h"
25 #include "tupsdbmanagementstep.h"
26 #include "tupscoordinatorstep.h"
29 CTUpsSuite* CTUpsSuite::NewL(const TDesC& aName)
31 * @return - Instance of the test server
34 CTUpsSuite * server = new (ELeave) CTUpsSuite();
35 CleanupStack::PushL(server);
36 server->ConstructL(aName);
37 CleanupStack::Pop(server);
48 CActiveScheduler* sched=NULL;
49 sched=new(ELeave) CActiveScheduler;
50 CActiveScheduler::Install(sched);
51 CTUpsSuite* server = NULL;
53 // gets name of executable, this will allow correct cloning with SETCAP
54 CCommandLineArguments* args = CCommandLineArguments::NewLC();
55 TPtrC exeName = args->Arg(0);
57 fullName.Set(exeName, NULL, NULL);
58 CleanupStack::PopAndDestroy(args);
60 // Create the CTestServer derived server
61 TRAPD(err,server = CTUpsSuite::NewL(fullName.Name()));
64 // Sync with the client and enter the active scheduler
65 RProcess::Rendezvous(KErrNone);
74 GLDEF_C TInt E32Main()
76 * @return - Standard Epoc error code on process exit
77 * Process entry point. Called by client using RProcess API
81 CTrapCleanup* cleanup = CTrapCleanup::New();
93 CTestStep* CTUpsSuite::CreateTestStep(const TDesC& aStepName)
95 * @return - A CTestStep derived instance
98 CTestStep* testStep = NULL;
99 if(aStepName == KUPSClientStep)
100 testStep = new CUpsClientStep();
101 else if (aStepName == KPropertyStep)
102 testStep = new CPropertyStep();
103 else if (aStepName == KCloseUps)
104 testStep = new CCloseUpsStep();
105 else if (aStepName == KProtServAuthorisationStep)
106 testStep = new CNonProtServAuthorisation();
107 else if (aStepName == KUPSDbManagementStep)
108 testStep = new CUPSDbManagementStep();
109 else if (aStepName == KUPSCoordinatorStep)
110 testStep = new CUPSCoordinatorStep();
111 else if (aStepName == KDyingClientStep)
112 testStep = new CDyingClient();
113 else if (aStepName == KCancelPromptStep)
114 testStep = new CCancelUpsPrompt();
115 else if (aStepName == KSimpleRequestStep)
116 testStep = new CSimpleUpsRequest();
117 else if (aStepName == KMultithreadStep)
118 testStep = new CMultiTread();