|
1 // Copyright (c) 2008-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 // Example CTestStep derived implementation |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file tdbtsisuninstallStep.cpp |
|
20 @internalTechnology |
|
21 */ |
|
22 #include "tdbtsisuninstallstep.h" |
|
23 |
|
24 using namespace Swi; |
|
25 |
|
26 CTDBTSisUninstallStep::~CTDBTSisUninstallStep() |
|
27 /** |
|
28 * Destructor |
|
29 */ |
|
30 { |
|
31 } |
|
32 |
|
33 CTDBTSisUninstallStep::CTDBTSisUninstallStep() |
|
34 /** |
|
35 * Constructor |
|
36 */ |
|
37 { |
|
38 SetTestStepName(KTDBTSisUninstallStep); |
|
39 } |
|
40 |
|
41 TVerdict CTDBTSisUninstallStep::doTestStepPreambleL() |
|
42 /** |
|
43 * @return - TVerdict code |
|
44 * Override of base class virtual |
|
45 */ |
|
46 { |
|
47 CTe_LbsSisInstallStepBase::doTestStepPreambleL(); |
|
48 if (TestStepResult()!=EPass) |
|
49 return TestStepResult(); |
|
50 SetTestStepResult(EPass); |
|
51 return TestStepResult(); |
|
52 } |
|
53 |
|
54 |
|
55 TVerdict CTDBTSisUninstallStep::doTestStepL() |
|
56 /** |
|
57 * @return - TVerdict code |
|
58 * Override of base class pure virtual |
|
59 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
60 * not leave. That being the case, the current test result value will be EPass. |
|
61 */ |
|
62 { |
|
63 if (TestStepResult()==EPass) |
|
64 { |
|
65 SetTestStepResult(EPass); |
|
66 TInt aAppId; |
|
67 GetIntFromConfig(ConfigSection(),KTe_LbsSisInstallAppId,aAppId); |
|
68 SISUninstallTestL(TUid::Uid(aAppId)); |
|
69 } |
|
70 return TestStepResult(); |
|
71 } |
|
72 |
|
73 void CTDBTSisUninstallStep::SISUninstallTestL(const TUid& aAppId) |
|
74 { |
|
75 CUISisAdaptor* ui = CUISisAdaptor::NewLC(Logger()); |
|
76 |
|
77 TInt err = Swi::Launcher::Uninstall(*ui, aAppId); |
|
78 |
|
79 CleanupStack::PopAndDestroy(ui); |
|
80 |
|
81 INFO_PRINTF2(_L("Launcher::Uninstall returned %d\n"), err); |
|
82 } |
|
83 |
|
84 TVerdict CTDBTSisUninstallStep::doTestStepPostambleL() |
|
85 /** |
|
86 * @return - TVerdict code |
|
87 * Override of base class virtual |
|
88 */ |
|
89 { |
|
90 return TestStepResult(); |
|
91 } |
|
92 |
|
93 // End of file |