748
|
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 the License "Symbian Foundation License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// @file CT_LbsServer.cpp
|
|
15 |
// This is the class implementation for the LBS Test Server
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
// User includes
|
|
20 |
#include "ctlbsserver.h"
|
|
21 |
|
|
22 |
// System includes
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <rsshared.h>
|
|
25 |
|
|
26 |
// Header files of LBS API Test Steps
|
|
27 |
#include "ctlbsstepinstallscheduler.h"
|
|
28 |
#include "ctlbsstepcreateverifymoduledata.h"
|
|
29 |
#include "ctlbsstepcreateverifyposinfos.h"
|
|
30 |
#include "ctlbsstepverifyposinfos.h"
|
|
31 |
#include "ctlbsstepverifyroughposinfos.h"
|
|
32 |
#include "ctlbsstepverifymodinfo.h"
|
|
33 |
#include "ctlbsstepverifyloginfo.h"
|
|
34 |
#include "ctlbsstepverifymodstatus.h"
|
|
35 |
#include "ctlbsstepsetautonomousmode.h"
|
|
36 |
#include "ctlbsstepsetprivhandler.h"
|
|
37 |
#include "ctlbsstepresetdefaultadmin.h"
|
|
38 |
#include "ctlbsstepstartlbs.h"
|
|
39 |
#include "ctlbsstepstoplbs.h"
|
|
40 |
#include "ctlbsstepcreateverifymodinfo.h"
|
|
41 |
#include "ctlbsstepclearlog.h"
|
|
42 |
#include "ctlbsstepconfighybridmodule.h"
|
|
43 |
#include "ctlbsstepsetupstandaloneprivacymode.h"
|
|
44 |
#include "ctlbsstepsetupstandaloneprivacyandsimplectlr.h"
|
|
45 |
#include "ctlbsstepsetupstandaloneprivacywithnoctlr.h"
|
|
46 |
#include "ctlbsstepsetbehaviourmodeoriginal.h"
|
|
47 |
#include "ctlbsstepsetptamode.h"
|
|
48 |
#include "ctlbsstepsetatamode.h"
|
|
49 |
#include "ctlbsstepsetptbmode.h"
|
|
50 |
|
|
51 |
CT_LbsServer::~CT_LbsServer()
|
|
52 |
{
|
|
53 |
delete iSharedData;
|
|
54 |
delete iScheduler;
|
|
55 |
}
|
|
56 |
|
|
57 |
|
|
58 |
/**
|
|
59 |
Function : CT_LbsServer
|
|
60 |
Description : Constructor
|
|
61 |
@internalTechnology
|
|
62 |
@param :
|
|
63 |
@return : N/A
|
|
64 |
@precondition : none
|
|
65 |
@postcondition : none
|
|
66 |
*/
|
|
67 |
CT_LbsServer::CT_LbsServer()
|
|
68 |
{
|
|
69 |
}
|
|
70 |
|
|
71 |
/**
|
|
72 |
Function : ConstructL
|
|
73 |
Description :
|
|
74 |
@internalTechnology
|
|
75 |
@param :
|
|
76 |
@return : N/A
|
|
77 |
@precondition : none
|
|
78 |
@postcondition : none
|
|
79 |
*/
|
|
80 |
void CT_LbsServer::ConstructL(const TDesC& aName)
|
|
81 |
{
|
|
82 |
CTestServer::ConstructL(aName);
|
|
83 |
|
|
84 |
iScheduler = new (ELeave) CActiveScheduler();
|
|
85 |
|
|
86 |
// check what this does, do we need it...
|
|
87 |
Logger().ShareAuto(); // enable the log system for all test threads via iParent.Logger()
|
|
88 |
}
|
|
89 |
|
|
90 |
|
|
91 |
/**
|
|
92 |
Function : CreateTestStep
|
|
93 |
Description : Creates a test step based on the step name read from the script file
|
|
94 |
@internalTechnology
|
|
95 |
@param : aStepName The step name which needs to be created
|
|
96 |
@return : Created object of type CTestStep
|
|
97 |
@precondition : none
|
|
98 |
@postcondition : none
|
|
99 |
*/
|
|
100 |
CTestStep* CT_LbsServer::CreateTestStep(const TDesC& aStepName)
|
|
101 |
{
|
|
102 |
// NULL if insufficient memory. This suits the API.
|
|
103 |
|
|
104 |
// Common test steps, used by many different test cases.
|
|
105 |
if (aStepName == KLbsStep_InstallScheduler)
|
|
106 |
{
|
|
107 |
return CT_LbsStep_InstallScheduler::New(*this);
|
|
108 |
}
|
|
109 |
|
|
110 |
if (aStepName == KLbsStep_CreateVerifyModuleData)
|
|
111 |
{
|
|
112 |
return CT_LbsStep_CreateVerifyModuleData::New(*this);
|
|
113 |
}
|
|
114 |
|
|
115 |
if (aStepName == KLbsStep_CreateVerifyPosInfos)
|
|
116 |
{
|
|
117 |
return CT_LbsStep_CreateVerifyPosInfos::New(*this);
|
|
118 |
}
|
|
119 |
|
|
120 |
if (aStepName == KLbsStep_CreateVerifyModInfo)
|
|
121 |
{
|
|
122 |
return CT_LbsStep_CreateVerifyModInfo::New(*this);
|
|
123 |
}
|
|
124 |
|
|
125 |
if (aStepName == KLbsStep_VerifyPosInfos)
|
|
126 |
{
|
|
127 |
return CT_LbsStep_VerifyPosInfos::New(*this);
|
|
128 |
}
|
|
129 |
|
|
130 |
if (aStepName == KLbsStep_VerifyRoughPosInfos)
|
|
131 |
{
|
|
132 |
return CT_LbsStep_VerifyRoughPosInfos::New(*this);
|
|
133 |
}
|
|
134 |
|
|
135 |
if(aStepName == KLbsStep_VerifyModInfo)
|
|
136 |
{
|
|
137 |
return CT_LbsStep_VerifyModInfo::New(*this);
|
|
138 |
}
|
|
139 |
|
|
140 |
if (aStepName == KLbsStep_VerifyLogInfo)
|
|
141 |
{
|
|
142 |
return CT_LbsStep_VerifyLogInfo::New(*this);
|
|
143 |
}
|
|
144 |
|
|
145 |
if (aStepName == KLbsStep_VerifyModuleStatus)
|
|
146 |
{
|
|
147 |
return CT_LbsStep_VerifyModStatus::New(*this);
|
|
148 |
}
|
|
149 |
|
|
150 |
if (aStepName == KLbsStep_StartLbs)
|
|
151 |
{
|
|
152 |
return CT_LbsStep_StartLbs::New(*this);
|
|
153 |
}
|
|
154 |
|
|
155 |
if (aStepName == KLbsStep_StopLbs)
|
|
156 |
{
|
|
157 |
return CT_LbsStep_StopLbs::New(*this);
|
|
158 |
}
|
|
159 |
|
|
160 |
if (aStepName == KLbsStep_SetAutonomousMode)
|
|
161 |
{
|
|
162 |
return CT_LbsStep_SetAutonomousMode::New(*this);
|
|
163 |
}
|
|
164 |
|
|
165 |
if (aStepName == KLbsStep_SetPrivacyHandler)
|
|
166 |
{
|
|
167 |
return CT_LbsStep_SetPrivacyHandler::New(*this);
|
|
168 |
}
|
|
169 |
|
|
170 |
if (aStepName == KLbsStep_ResetDefaultAdmin)
|
|
171 |
{
|
|
172 |
return CT_LbsStep_ResetDefaultAdmin::New(*this);
|
|
173 |
}
|
|
174 |
|
|
175 |
if (aStepName == KLbsStep_ClearLog)
|
|
176 |
{
|
|
177 |
return CT_LbsStep_ClearLog::New(*this);
|
|
178 |
}
|
|
179 |
|
|
180 |
if (aStepName == KLbsStep_SetBehaviourModeOriginal)
|
|
181 |
{
|
|
182 |
return CT_LbsStep_SetBehaviourModeOriginal::New(*this);
|
|
183 |
}
|
|
184 |
|
|
185 |
if (aStepName == KLbsStep_SetPTAMode)
|
|
186 |
{
|
|
187 |
return CT_LbsStep_SetPTAMode::New(*this);
|
|
188 |
}
|
|
189 |
|
|
190 |
if (aStepName == KLbsStep_ConfigHybridModule)
|
|
191 |
{
|
|
192 |
return CT_LbsStep_ConfigHybridModule::New(*this);
|
|
193 |
}
|
|
194 |
|
|
195 |
if (aStepName == KLbsStep_SetupStandalonePrivacyMode)
|
|
196 |
{
|
|
197 |
return CT_LbsStep_SetupStandalonePrivacyMode::New(*this);
|
|
198 |
}
|
|
199 |
|
|
200 |
if (aStepName == KLbsStep_SetupStandalonePrivacyAndSimpleCtlr)
|
|
201 |
{
|
|
202 |
return CT_LbsStep_SetupStandalonePrivacyAndSimpleCtlr::New(*this);
|
|
203 |
}
|
|
204 |
|
|
205 |
if (aStepName == KLbsStep_SetupStandalonePrivacyWithNoCtlr)
|
|
206 |
{
|
|
207 |
return CT_LbsStep_SetupStandalonePrivacyWithNoCtlr::New(*this);
|
|
208 |
}
|
|
209 |
|
|
210 |
if (aStepName == KLbsStep_SetATAMode)
|
|
211 |
{
|
|
212 |
return CT_LbsStep_SetATAMode::New(*this);
|
|
213 |
}
|
|
214 |
|
|
215 |
if (aStepName == KLbsStep_SetPTBMode)
|
|
216 |
{
|
|
217 |
return CT_LbsStep_SetPTBMode::New(*this);
|
|
218 |
}
|
|
219 |
|
|
220 |
return NULL;
|
|
221 |
}
|