24
|
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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#include <e32test.h>
|
|
17 |
|
|
18 |
#include "TE_EtelMMTestStepBase.h"
|
|
19 |
#include "TE_mmSendMolr.h"
|
|
20 |
#include "testdef.h"
|
|
21 |
|
|
22 |
/**
|
|
23 |
* Client makes its own location request to the network and it waits for the notification of incoming A-GPS assistance data from the TSY.
|
|
24 |
* Location information is computed using the A-GPS assistance data received from the network
|
|
25 |
* and sends the location information report to the network/TSY
|
|
26 |
* On completion of the MOLR request incoming location estimate and velocity estimate is sent to the client
|
|
27 |
*/
|
|
28 |
|
|
29 |
enum TVerdict CTestSendMolr::doTestStepL()
|
|
30 |
{
|
|
31 |
|
|
32 |
INFO_PRINTF1(_L("Successful MO-LR"));
|
|
33 |
|
|
34 |
TRequestStatus molrStatus;
|
|
35 |
TRequestStatus mcontrolStatus;
|
|
36 |
TRequestStatus reqStatus;
|
|
37 |
|
|
38 |
RMobileLocationServices::TStartMolrV7Pckg startMolrPckg(iStartMolr);
|
|
39 |
RMobileLocationServices::TMolrReturnResultV7Pckg molrReturnResultPckg(iMolrReturnResult);
|
|
40 |
|
|
41 |
TInt domain;
|
|
42 |
GetIntFromConfig(ConfigSection(), _L("Domain"), domain);
|
|
43 |
|
|
44 |
TPtrC invalidClientIdFlag;
|
|
45 |
TBool existsInvalidClientIdFlag = GetStringFromConfig(ConfigSection(), _L("InvalidClientIdFlag"), invalidClientIdFlag);
|
|
46 |
// Set Molr parameters before MOLR request
|
|
47 |
SetMolrParams();
|
|
48 |
iLocationSvc.SendMolr(molrStatus,startMolrPckg,molrReturnResultPckg);
|
|
49 |
User::WaitForRequest(molrStatus);
|
|
50 |
TEST(molrStatus == KErrNone);
|
|
51 |
|
|
52 |
if(domain == 2)
|
|
53 |
TEST(iStartMolr.iLcsClientExternalID == DMMTSY_EXTERNAL_CLIENT_ID);
|
|
54 |
if(existsInvalidClientIdFlag)
|
|
55 |
{
|
|
56 |
TEST(iStartMolr.iMolrType==DMMTSY_MOLR_TYPE1 && iMolrReturnResult.iMolrErrors==DMMTSY_MOLR_ERROR_TYPE2 );
|
|
57 |
}
|
|
58 |
else
|
|
59 |
{
|
|
60 |
TEST(iMolrReturnResult.iLocationEstimate == DMMTSY_MOLR_LOCATION_ESTIMATE);
|
|
61 |
TEST(iMolrReturnResult.iVelocityEstimate == DMMTSY_MOLR_VELOCITY_ESTIMATE);
|
|
62 |
}
|
|
63 |
|
|
64 |
INFO_PRINTF2(_L("Test %d - RMobileLocationServices::SendMolr request passed"), iTestCount++);
|
|
65 |
|
|
66 |
return TestStepResult();
|
|
67 |
}
|
|
68 |
|