1 /* |
|
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalTechnology |
|
22 */ |
|
23 |
|
24 #if (!defined TSIFOPERATIONSTEP_H) |
|
25 #define TSIFOPERATIONSTEP_H |
|
26 #include <test/testexecutestepbase.h> |
|
27 #include "tsifsuitestepbase.h" |
|
28 #include <usif/sif/sif.h> |
|
29 |
|
30 namespace Usif |
|
31 { |
|
32 class CSifOperationStep : public CSifSuiteStepBase |
|
33 { |
|
34 public: |
|
35 CSifOperationStep(); |
|
36 ~CSifOperationStep(); |
|
37 virtual void ImplTestStepPreambleL(); |
|
38 virtual void ImplTestStepPostambleL(); |
|
39 #ifdef _DEBUG |
|
40 virtual RScsClientBase* ClientHandle() { return &(iSif.iTransport);} |
|
41 #endif |
|
42 // Used by a non-member function |
|
43 void ClearOpaqueParams(); |
|
44 |
|
45 protected: |
|
46 TBool CompareOpaqueResultsL(); |
|
47 TBool CheckOpaqueResultsL(); |
|
48 void PrintOpaqueParamsL(const COpaqueNamedParams& aOpaqueParams); |
|
49 void CancelableWait(); |
|
50 |
|
51 void LoadExclusiveOperationFlagFromConfigL(); |
|
52 void LoadFileNameFromConfigL(); |
|
53 void LoadComponentIdFromConfigL(); |
|
54 void LoadComponentInfoFromConfigL(); |
|
55 void LoadPluginOpaqueParamsFromConfigL(const TDesC& aNamePattern, const TDesC& aTypePattern, const TDesC& aValuePattern, Usif::COpaqueNamedParams& aOpaqueParams); |
|
56 void LoadOpaqueParamsL(); |
|
57 |
|
58 TBool iUseEnhancedApi; |
|
59 TBool iExclusiveOperation; |
|
60 TPtrC iFileName; |
|
61 Usif::TComponentId iComponentId; |
|
62 Usif::CComponentInfo* iComponentInfo; |
|
63 Usif::COpaqueNamedParams* iPluginOpaqueArguments; |
|
64 Usif::COpaqueNamedParams* iPluginOpaqueResults; |
|
65 Usif::COpaqueNamedParams* iPluginRefOpaqueResults; |
|
66 |
|
67 Usif::RSoftwareInstall iSif; |
|
68 TRequestStatus iStatus; |
|
69 |
|
70 private: |
|
71 TInt iCancelAfter; |
|
72 }; |
|
73 |
|
74 class CSifGetComponentInfoStep : public CSifOperationStep |
|
75 { |
|
76 public: |
|
77 CSifGetComponentInfoStep(); |
|
78 ~CSifGetComponentInfoStep(); |
|
79 virtual void ImplTestStepPreambleL(); |
|
80 virtual void ImplTestStepL(); |
|
81 |
|
82 private: |
|
83 void LoadComponentInfoL(); |
|
84 TPtrC LoadCompInfoNodeStringParamL(const TDesC& aNodePrefix, const TDesC& aParamName); |
|
85 TInt LoadCompInfoNodeIntParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory = ETrue); |
|
86 TBool LoadCompInfoNodeBoolParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory = ETrue); |
|
87 CComponentInfo::CNode* LoadCompInfoNodeLC(const TDesC& aNodeName); |
|
88 TBool CompareCompInfoNodeL(const CComponentInfo::CNode& aExpectedNode, const CComponentInfo::CNode& aObtainedNode); |
|
89 TBool CompareAppInfoL(const CComponentInfo::CNode& aExpectedNode, const CComponentInfo::CNode& aObtainedNode); |
|
90 TBool iOperationByFileHandle; |
|
91 TBool iCompareMaxInstalledSize; |
|
92 TBool iCompareIconFileSize; |
|
93 RArray<TInt> iIconFileSizes; |
|
94 TInt iconIndex; |
|
95 }; |
|
96 |
|
97 class CSifInstallStep : public CSifOperationStep |
|
98 { |
|
99 public: |
|
100 CSifInstallStep(); |
|
101 ~CSifInstallStep(); |
|
102 virtual void ImplTestStepPreambleL(); |
|
103 virtual void ImplTestStepL(); |
|
104 |
|
105 private: |
|
106 TBool iInstallByFileHandle; |
|
107 }; |
|
108 |
|
109 class CSifUninstallStep : public CSifOperationStep |
|
110 { |
|
111 public: |
|
112 CSifUninstallStep(); |
|
113 ~CSifUninstallStep(); |
|
114 virtual void ImplTestStepPreambleL(); |
|
115 virtual void ImplTestStepL(); |
|
116 }; |
|
117 |
|
118 class CSifActivateStep : public CSifOperationStep |
|
119 { |
|
120 public: |
|
121 CSifActivateStep(TBool aActivate); |
|
122 ~CSifActivateStep(); |
|
123 virtual void ImplTestStepPreambleL(); |
|
124 virtual void ImplTestStepL(); |
|
125 |
|
126 private: |
|
127 TBool iActivate; |
|
128 }; |
|
129 |
|
130 class CSifMultipleInstallStep : public CSifOperationStep |
|
131 { |
|
132 public: |
|
133 CSifMultipleInstallStep(); |
|
134 ~CSifMultipleInstallStep(); |
|
135 virtual void ImplTestStepPreambleL(); |
|
136 virtual void ImplTestStepL(); |
|
137 }; |
|
138 |
|
139 _LIT(KSifGetComponentInfoStep,"SifGetComponentInfoStep"); |
|
140 _LIT(KSifInstallStep,"SifInstallStep"); |
|
141 _LIT(KSifUninstallStep,"SifUninstallStep"); |
|
142 _LIT(KSifActivateStep,"SifActivateStep"); |
|
143 _LIT(KSifDeactivateStep,"SifDeactivateStep"); |
|
144 _LIT(KSifMultipleInstallStep,"SifMultipleInstallStep"); |
|
145 |
|
146 } // namespace Sif |
|
147 |
|
148 #endif |
|