|
1 /* |
|
2 * Copyright (c) 2004-2009 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 #ifndef T_REVOCATION_STEP_H |
|
20 #define T_REVOCATION_STEP_H |
|
21 |
|
22 #include <test/testexecutestepbase.h> |
|
23 #include "trevocationServer.h" |
|
24 |
|
25 _LIT(KTStepInstall, "INSTALL"); |
|
26 _LIT(KTStepUninstall, "UNINSTALL"); |
|
27 //Following 5 lines will be removed |
|
28 _LIT(KTStepBackup, "BACKUP"); |
|
29 _LIT(KTStepRestore, "RESTORE"); |
|
30 _LIT(KTStepRestoreNoCommit, "RESTORENOCOMMIT"); |
|
31 _LIT(KTStepRestoreCorruptController,"RESTORECORRUPTCONTROLLER"); |
|
32 _LIT(KTStepRestoreExtraExecutable, "RESTOREEXTRAEXECUTABLE"); |
|
33 |
|
34 _LIT(KTStepCheckPresent, "PRESENT"); |
|
35 _LIT(KTStepCheckAbsent, "ABSENT"); |
|
36 _LIT(KTStepClean, "CLEAN"); |
|
37 _LIT(KTStepPirCheck, "PIRCHECK"); |
|
38 _LIT(KTStepSisRegCheck, "SISREGCHECK"); |
|
39 |
|
40 |
|
41 class CTRevocationStepBase : public CTestStep |
|
42 { |
|
43 protected: |
|
44 CTRevocationStepBase(); |
|
45 ~CTRevocationStepBase(); |
|
46 virtual TVerdict doTestStepPreambleL(); |
|
47 virtual TVerdict doTestStepPostambleL(); |
|
48 // Iterates through SIS files within a step |
|
49 TBool NextPackage(); |
|
50 // The UID of the current SIS file |
|
51 TUid PackageUID(); |
|
52 // The filename of the current SIS file |
|
53 TPtrC SISFileNameL(); |
|
54 // Iterates through files within a SIS file |
|
55 TBool NextFile(); |
|
56 TFileName BackupFileName(); |
|
57 // The location where the current file is [to be] installed |
|
58 TPtrC InstalledFileName(); |
|
59 // The location where the current file is not [to be] installed |
|
60 TPtrC WrongInstalledFileName(); |
|
61 // Utility method |
|
62 TBool Exists(TPtrC aFileName); |
|
63 // Utility method |
|
64 void CopyFileL(TPtrC aSourceFileName, TPtrC aDestFileName); |
|
65 // Utility method for storing backup metadata |
|
66 void WriteMetaDataL(HBufC8* aMetaData); |
|
67 // Utility method for recovering backup metadata |
|
68 HBufC8* ReadMetaDataL(); |
|
69 |
|
70 private: |
|
71 TInt iCurrentPackageNumber; |
|
72 TInt iCurrentFileNumber; |
|
73 |
|
74 RFs iFs; |
|
75 }; |
|
76 |
|
77 class CTStepInstall : public CTRevocationStepBase |
|
78 { |
|
79 public: |
|
80 CTStepInstall(); |
|
81 virtual TVerdict doTestStepL(); |
|
82 }; |
|
83 |
|
84 class CTStepUninstall : public CTRevocationStepBase |
|
85 { |
|
86 public: |
|
87 CTStepUninstall(); |
|
88 virtual TVerdict doTestStepL(); |
|
89 }; |
|
90 |
|
91 class CTStepBackup : public CTRevocationStepBase |
|
92 { |
|
93 public: |
|
94 CTStepBackup(); |
|
95 virtual TVerdict doTestStepL(); |
|
96 }; |
|
97 |
|
98 class CTStepRestore : public CTRevocationStepBase |
|
99 { |
|
100 public: |
|
101 CTStepRestore(); |
|
102 virtual TVerdict doTestStepL(); |
|
103 }; |
|
104 |
|
105 class CTStepRestoreNoCommit : public CTRevocationStepBase |
|
106 { |
|
107 public: |
|
108 CTStepRestoreNoCommit(); |
|
109 virtual TVerdict doTestStepL(); |
|
110 }; |
|
111 |
|
112 class CTStepRestoreCorruptController : public CTRevocationStepBase |
|
113 { |
|
114 public: |
|
115 CTStepRestoreCorruptController(); |
|
116 virtual TVerdict doTestStepL(); |
|
117 }; |
|
118 |
|
119 class CTStepRestoreExtraExecutable : public CTRevocationStepBase |
|
120 { |
|
121 public: |
|
122 CTStepRestoreExtraExecutable(); |
|
123 virtual TVerdict doTestStepL(); |
|
124 }; |
|
125 |
|
126 class CTStepCheckPresent : public CTRevocationStepBase |
|
127 { |
|
128 public: |
|
129 CTStepCheckPresent(); |
|
130 virtual TVerdict doTestStepL(); |
|
131 }; |
|
132 |
|
133 class CTStepCheckAbsent : public CTRevocationStepBase |
|
134 { |
|
135 public: |
|
136 CTStepCheckAbsent(); |
|
137 virtual TVerdict doTestStepL(); |
|
138 }; |
|
139 |
|
140 class CTStepClean : public CTRevocationStepBase |
|
141 { |
|
142 public: |
|
143 CTStepClean(); |
|
144 virtual TVerdict doTestStepL(); |
|
145 }; |
|
146 |
|
147 class CTStepPirCheck : public CTRevocationStepBase |
|
148 { |
|
149 public: |
|
150 CTStepPirCheck(); |
|
151 virtual TVerdict doTestStepL(); |
|
152 }; |
|
153 |
|
154 class CTStepSisRegCheck : public CTRevocationStepBase |
|
155 { |
|
156 public: |
|
157 CTStepSisRegCheck(); |
|
158 virtual TVerdict doTestStepL(); |
|
159 //Utility method for converting the ValidationValue to a string |
|
160 TBufC<40> GetEnumValidationValue (TInt input); |
|
161 //Utility method for converting the RevocationValue to a string |
|
162 TBufC<40> GetEnumRevocationValue (TInt input); |
|
163 }; |
|
164 |
|
165 #endif /* T_REVOCATION_STEP_H */ |