installationservices/swi/test/tsisregistrytest_legacy/sessionstep.h
changeset 0 ba25891c3a9e
child 4 3eebb1e54d3a
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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 
       
    20 
       
    21 /**
       
    22  @file
       
    23 */
       
    24 #ifndef __TSESSIONSTEP_H__
       
    25 #define __TSESSIONSTEP_H__
       
    26 
       
    27 #include "tsisregistryteststep.h"
       
    28 #include "sisregistrysession.h"
       
    29 #include "sisregistryentry.h"
       
    30 #include <x509cert.h>
       
    31 
       
    32 using namespace Swi;
       
    33 
       
    34 class CSisRegistrySessionStep : public CSisRegistryTestStepBase
       
    35 	{
       
    36 public:
       
    37 	virtual TVerdict doTestStepPreambleL();
       
    38 	virtual TVerdict doTestStepPostambleL();
       
    39 protected:
       
    40 	Swi::RSisRegistrySession iSisRegistry;
       
    41 	};
       
    42 
       
    43 // Check embedding package for a given package
       
    44 class CEmbeddingPackageStep : public CSisRegistrySessionStep
       
    45 	{
       
    46 public:
       
    47 	CEmbeddingPackageStep();
       
    48 	virtual TVerdict doTestStepL();
       
    49 	};
       
    50 
       
    51 // Check Uids
       
    52 class CInstalledUidsStep : public CSisRegistrySessionStep
       
    53 	{
       
    54 public:
       
    55 	CInstalledUidsStep();
       
    56 	virtual TVerdict doTestStepL();
       
    57 	};
       
    58 
       
    59 // Check filename for sid
       
    60 class CSidFileStep : public CSisRegistrySessionStep
       
    61 	{
       
    62 public:
       
    63 	CSidFileStep();
       
    64 	virtual TVerdict doTestStepL();
       
    65 	};
       
    66 	
       
    67 // Check whether a file is tagged as modifiable.
       
    68 class CModifiableFileStep : public CSisRegistrySessionStep
       
    69 	{
       
    70 public:
       
    71 	CModifiableFileStep();
       
    72 	virtual TVerdict doTestStepL();
       
    73 	};
       
    74 	
       
    75 // Checks the hash of a file.
       
    76 class CFileHashStep : public CSisRegistrySessionStep
       
    77 	{
       
    78 public:
       
    79 	CFileHashStep();
       
    80 	virtual TVerdict doTestStepL();
       
    81 	};
       
    82 
       
    83 // Check Packages
       
    84 class CInstalledPackagesStep : public CSisRegistrySessionStep
       
    85 	{
       
    86 public:
       
    87 	CInstalledPackagesStep();
       
    88 	virtual TVerdict doTestStepL();
       
    89 	};
       
    90 
       
    91 // Check Removable Packages
       
    92 class CRemovablePackagesStep : public CSisRegistrySessionStep
       
    93 	{
       
    94 public:
       
    95 	CRemovablePackagesStep();
       
    96 	virtual TVerdict doTestStepL();
       
    97 	};
       
    98 	
       
    99 // Check In ROM Non-Removable Packages
       
   100 class CInRomNonRemovablePackage : public CSisRegistrySessionStep
       
   101 	{
       
   102 public:
       
   103 	CInRomNonRemovablePackage();
       
   104 	virtual TVerdict doTestStepL();
       
   105 	};	
       
   106 	
       
   107 // Check Drives for installed application
       
   108 class CInstalledDrives : public CSisRegistrySessionStep
       
   109 	{
       
   110 public:
       
   111 	CInstalledDrives();
       
   112 	virtual TVerdict doTestStepL();
       
   113 	};
       
   114 	
       
   115 // Check installed UIDs	
       
   116 class CIsUidInstalledStep : public CSisRegistrySessionStep
       
   117 	{
       
   118 public:
       
   119 	CIsUidInstalledStep();
       
   120 	virtual TVerdict doTestStepL();
       
   121 	};
       
   122 	
       
   123 // Check installed Packages	
       
   124 class CIsPackageInstalledStep : public CSisRegistrySessionStep
       
   125 	{
       
   126 public:
       
   127 	CIsPackageInstalledStep();
       
   128 	virtual TVerdict doTestStepL();
       
   129 	};
       
   130 
       
   131 // check installed controllers by supplying a controller
       
   132 class CIsControllerInstalledStep : public CSisRegistrySessionStep
       
   133 	{
       
   134 public:
       
   135 	CIsControllerInstalledStep();
       
   136 	virtual TVerdict doTestStepL();
       
   137 	}; 
       
   138 	
       
   139 // check installed controllers by getting controllers
       
   140 class CGetControllersStep : public CSisRegistrySessionStep
       
   141 	{
       
   142 public:
       
   143 	CGetControllersStep();
       
   144 	virtual TVerdict doTestStepL();
       
   145 	}; 
       
   146 		
       
   147 //CEntryUidOpenCloseStep
       
   148 class CEntryUidOpenCloseStep : public CSisRegistrySessionStep
       
   149 	{
       
   150 public:
       
   151 	CEntryUidOpenCloseStep();
       
   152 	virtual TVerdict doTestStepL();
       
   153 	};
       
   154 	
       
   155 //CEntryPackageOpenCloseStep
       
   156 class CEntryPackageOpenCloseStep : public CSisRegistrySessionStep
       
   157 	{
       
   158 public:
       
   159 	CEntryPackageOpenCloseStep();
       
   160 	virtual TVerdict doTestStepL();
       
   161 	};
       
   162 	
       
   163 //CEntryNameOpenCloseStep
       
   164 class CEntryNameOpenCloseStep : public CSisRegistrySessionStep
       
   165 	{
       
   166 public:
       
   167 	CEntryNameOpenCloseStep();
       
   168 	virtual TVerdict doTestStepL();
       
   169 	};	
       
   170 
       
   171 class CEntryMethodsStep : public CSisRegistrySessionStep
       
   172 	{
       
   173 public:
       
   174 	CEntryMethodsStep();
       
   175 	virtual TVerdict doTestStepL();
       
   176 	};
       
   177 
       
   178 // CEntrySidsStep 
       
   179 class CEntrySidsStep : public CSisRegistrySessionStep
       
   180 	{
       
   181 public:
       
   182 	CEntrySidsStep();
       
   183 	virtual TVerdict doTestStepL();
       
   184 	};
       
   185 	
       
   186 
       
   187 class CIsSidPresentStep : public CSisRegistrySessionStep
       
   188 /**
       
   189 	Iterates through every installed package and tests that
       
   190 	its executables' SIDs are reported as present, as indicated by
       
   191 	RSisRegistrySession::IsSidPresentL.  Then tests non-present
       
   192 	SIDs are not reported as being present.
       
   193  */
       
   194 	{
       
   195 public:
       
   196 	CIsSidPresentStep();
       
   197 	virtual TVerdict doTestStepL();
       
   198 	};
       
   199 	
       
   200 
       
   201 class CIsPackagePresentStep : public CSisRegistrySessionStep
       
   202 	{
       
   203 public:
       
   204 	CIsPackagePresentStep();
       
   205 	virtual TVerdict doTestStepL();
       
   206 	};
       
   207 	
       
   208 // CIntegrityCheckStep	checks the sis controller for certificate validation
       
   209 class CIntegrityCheckStep : public CSisRegistrySessionStep
       
   210 	{
       
   211 public:
       
   212 	CIntegrityCheckStep();
       
   213 	~CIntegrityCheckStep();
       
   214  	void InitializeL();
       
   215 	RPointerArray<CX509Certificate>iCertArray;
       
   216 	virtual TVerdict doTestStepL();
       
   217 	HBufC8* ReadFileLC(const TDesC& aDatapath);
       
   218 	RFs fs;
       
   219 	};
       
   220 
       
   221 // CIntegrityDateAndTimeCheckStep checks the sis controller for certificate validation with the different error settings for validity period checks
       
   222 class CIntegrityDateAndTimeCheckStep : public CIntegrityCheckStep
       
   223 	{
       
   224 public:
       
   225 	CIntegrityDateAndTimeCheckStep();
       
   226 	virtual TVerdict doTestStepPreambleL();
       
   227 	virtual TVerdict doTestStepL();
       
   228 	virtual TVerdict doTestStepPostambleL();	
       
   229 	
       
   230 private:
       
   231 	TUid iPackageUid;
       
   232 	TInt iExpectedResult;
       
   233 	TTime iTime;	//The time the test is setting the system time to.
       
   234 	TTime iOriginalTime;	//The time just before the system time is changed.
       
   235 	};
       
   236 	
       
   237 class CLoggingFileInfoStep : public CSisRegistrySessionStep
       
   238 /**
       
   239 Test for logging file 
       
   240 */
       
   241 	{
       
   242 public:
       
   243 	CLoggingFileInfoStep();
       
   244  	virtual TVerdict doTestStepL();
       
   245 	};
       
   246 
       
   247 class CRomStubPerformanceStep : public CSisRegistrySessionStep
       
   248 	{
       
   249 public:
       
   250 	CRomStubPerformanceStep();
       
   251 	virtual TVerdict doTestStepL();
       
   252 	};
       
   253 	
       
   254 class CCorruptCacheStep : public CSisRegistrySessionStep
       
   255 	{
       
   256 public:
       
   257 	CCorruptCacheStep();
       
   258 	virtual TVerdict doTestStepL();
       
   259 	};
       
   260 
       
   261 class CCorruptCacheRecoverStep : public CSisRegistrySessionStep
       
   262 	{
       
   263 public:
       
   264 	CCorruptCacheRecoverStep();
       
   265 	virtual TVerdict doTestStepL();
       
   266 	};
       
   267 
       
   268 class CChangeLocaleStep : public CSisRegistrySessionStep
       
   269 	{
       
   270 public:
       
   271 	CChangeLocaleStep();
       
   272 	virtual TVerdict doTestStepL();
       
   273 	};
       
   274 
       
   275 #endif
       
   276