|
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 ctlbslocdatasrc.cpp |
|
15 // This is the class implementation for the step to stop the lbs system |
|
16 // EPOC includes. |
|
17 // LBS includes. |
|
18 // |
|
19 // |
|
20 |
|
21 // LBS test includes. |
|
22 #include "ctlbsstepstoplbs.h" |
|
23 #include <lbstestclient.h> |
|
24 |
|
25 /** |
|
26 * Destructor |
|
27 */ |
|
28 CT_LbsStep_StopLbs::~CT_LbsStep_StopLbs() |
|
29 { |
|
30 } |
|
31 |
|
32 |
|
33 /** |
|
34 * Constructor |
|
35 */ |
|
36 CT_LbsStep_StopLbs::CT_LbsStep_StopLbs(CT_LbsServer& aParent) : CT_LbsStep(aParent) |
|
37 { |
|
38 SetTestStepName(KLbsStep_StopLbs); |
|
39 } |
|
40 |
|
41 |
|
42 /** |
|
43 Static Constructor |
|
44 */ |
|
45 CT_LbsStep_StopLbs* CT_LbsStep_StopLbs::New(CT_LbsServer& aParent) |
|
46 { |
|
47 return new CT_LbsStep_StopLbs(aParent); |
|
48 // Note the lack of ELeave. |
|
49 // This means that having insufficient memory will return NULL; |
|
50 } |
|
51 |
|
52 |
|
53 /** |
|
54 * @return - TVerdict code |
|
55 * Override of base class pure virtual |
|
56 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
57 * not leave. That being the case, the current test result value will be EPass. |
|
58 */ |
|
59 TVerdict CT_LbsStep_StopLbs::doTestStepL() |
|
60 { |
|
61 // Test step used to stop the lbs system |
|
62 INFO_PRINTF1(_L(">>CT_LbsStep_StopLbs::doTestStepL()")); |
|
63 |
|
64 if (TestStepResult() == EPass) |
|
65 { |
|
66 CLbsTestServer* testServer = CLbsTestServer::NewL(); |
|
67 CleanupStack::PushL(testServer); |
|
68 User::LeaveIfError(testServer->StopLbsSystem()); |
|
69 |
|
70 CleanupStack::PopAndDestroy(testServer); |
|
71 } |
|
72 |
|
73 INFO_PRINTF1(_L("<<CT_LbsStep_StopLbs::doTestStepL()")); |
|
74 |
|
75 return TestStepResult(); |
|
76 } |