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 ctlbsstep_createverifymodinfo.cpp
|
|
15 |
// This is the class implementation for the module info tests
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
#include "ctlbsstepcreateverifymodinfo.h"
|
|
20 |
|
|
21 |
#include "tlbsutils.h"
|
|
22 |
|
|
23 |
//module_id in ini file
|
|
24 |
_LIT(KLbsModuleId, "module_id");
|
|
25 |
|
|
26 |
/**
|
|
27 |
* Constructor
|
|
28 |
*/
|
|
29 |
CT_LbsStep_CreateVerifyModInfo::CT_LbsStep_CreateVerifyModInfo(CT_LbsServer& aParent) : CT_LbsStep(aParent)
|
|
30 |
{
|
|
31 |
SetTestStepName(KLbsStep_CreateVerifyModInfo);
|
|
32 |
}
|
|
33 |
|
|
34 |
|
|
35 |
/**
|
|
36 |
Static Constructor
|
|
37 |
*/
|
|
38 |
CT_LbsStep_CreateVerifyModInfo* CT_LbsStep_CreateVerifyModInfo::New(CT_LbsServer& aParent)
|
|
39 |
{
|
|
40 |
return new CT_LbsStep_CreateVerifyModInfo(aParent);
|
|
41 |
// Note the lack of ELeave.
|
|
42 |
// This means that having insufficient memory will return NULL;
|
|
43 |
}
|
|
44 |
|
|
45 |
/**
|
|
46 |
* @return - TVerdict code
|
|
47 |
* Override of base class pure virtual
|
|
48 |
* Our implementation only gets called if the base class doTestStepPreambleL() did
|
|
49 |
* not leave. That being the case, the current test result value will be EPass.
|
|
50 |
*/
|
|
51 |
TVerdict CT_LbsStep_CreateVerifyModInfo::doTestStepL()
|
|
52 |
{
|
|
53 |
// Helper test step used to Create the Verify Mod Information
|
|
54 |
INFO_PRINTF1(_L(">>CT_LbsStep_CreateVerifyModInfo::doTestStepL()"));
|
|
55 |
|
|
56 |
if (TestStepResult() == EPass)
|
|
57 |
{
|
|
58 |
TInt moduleid;
|
|
59 |
TBool moduleid_exists;
|
|
60 |
moduleid_exists = GetIntFromConfig(ConfigSection(), KLbsModuleId, moduleid);
|
|
61 |
if(!moduleid_exists)
|
|
62 |
{
|
|
63 |
INFO_PRINTF1(_L("Could not get module Id from section"));
|
|
64 |
SetTestStepResult(EFail);
|
|
65 |
}
|
|
66 |
|
|
67 |
else
|
|
68 |
{
|
|
69 |
// Access the verify mod info and pass to utils func to be populated.
|
|
70 |
TPositionModuleInfo& modinfo = iParent.iSharedData->iVerifyModuleInfo;
|
|
71 |
T_LbsUtils utils;
|
|
72 |
TPositionModuleId moduleUid = TUid::Uid(moduleid);
|
|
73 |
utils.Create_ModuleInfoL(moduleUid,modinfo);
|
|
74 |
}
|
|
75 |
}
|
|
76 |
|
|
77 |
INFO_PRINTF1(_L("<<CT_LbsStep_CreateVerifyModInfo::doTestStepL()"));
|
|
78 |
|
|
79 |
return TestStepResult();
|
|
80 |
}
|