lowlevellibsandfws/pluginfw/TestExecute/EComSWITests/src/installStep.h
changeset 0 e4d67989cc36
child 44 97b0fb8a2cc2
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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 "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 // ECom SWI test step declaration
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20 */
       
    21 
       
    22 #ifndef __INSTALL_STEP_H__
       
    23 #define __INSTALL_STEP_H__
       
    24 
       
    25 #include <test/testexecutestepbase.h>
       
    26 #include "tui.h"
       
    27 
       
    28 #include <e32base.h>
       
    29 #include "TE_EComSWITestSuiteStepBase.h"
       
    30 
       
    31 namespace Swi
       
    32         {
       
    33         class CInstallPrefs;
       
    34         }
       
    35 
       
    36 class Cinstallers :  public CTe_EComSWITestSuiteStepBase
       
    37     {
       
    38 protected:
       
    39         Cinstallers();
       
    40         ~Cinstallers();
       
    41         void CheckFilesExistL();
       
    42         void CheckFilesNonExistL();
       
    43         void CheckFilesL(const TDesC&, const TDesC&, TBool);
       
    44 		void WaitForEComReDiscoveryL();
       
    45     };
       
    46 
       
    47 
       
    48 /**
       
    49  * Installation test step class
       
    50  * @test
       
    51  * @internalComponent
       
    52  */
       
    53 class CinstallStep : public Cinstallers
       
    54         {
       
    55 public:
       
    56         enum TInstallType { EUseFileHandle, EUseMemory, EUseFileName, EUseCAF, EUseOpenFileName, ECheckExitValue};
       
    57         CinstallStep(TInstallType aInstallType, TBool aDoCancelTest = EFalse);
       
    58         ~CinstallStep();
       
    59         virtual TVerdict doTestStepPreambleL();
       
    60         virtual TVerdict doTestStepPostambleL();
       
    61         virtual TVerdict doTestStepL();
       
    62 
       
    63 private:
       
    64         TInt DoInstallL(Swi::CInstallPrefs& aInstallPrefs);
       
    65 
       
    66 protected:
       
    67         TFileName iSisFileName; // name of the file to install
       
    68         TUI* iUi; // Minimal install framework
       
    69         TInstallType iInstallType; // use file handle to install
       
    70         TBool iDoCancelTest;
       
    71         TPtrC iExpectedHash;
       
    72         TBool iInstallSuccess; // indicate software installed
       
    73         };
       
    74 
       
    75 /** Custom resolver installation test step class
       
    76 @test
       
    77 @internalComponent
       
    78 */
       
    79 class CResolverInstallStep : public CinstallStep
       
    80 	{
       
    81 public:
       
    82 	CResolverInstallStep(CinstallStep::TInstallType aInstallType);
       
    83 	~CResolverInstallStep();
       
    84 	virtual TVerdict doTestStepL();
       
    85 
       
    86 private:
       
    87 	RLibrary iLibrary;
       
    88 	};
       
    89 
       
    90 /**
       
    91  * Uninstallation test step class
       
    92  * @test
       
    93  * @internalComponent
       
    94  */
       
    95 class CuninstallStep : public Cinstallers
       
    96         {
       
    97 public:
       
    98         enum TUninstallType { EByUid, EByPackage };
       
    99         CuninstallStep(TUninstallType aType, TBool aDoCancelTest = EFalse);
       
   100         ~CuninstallStep();
       
   101         virtual TVerdict doTestStepPreambleL();
       
   102         virtual TVerdict doTestStepPostambleL();
       
   103         virtual TVerdict doTestStepL();
       
   104 private:
       
   105         TInt DoUninstallL();
       
   106 
       
   107 private:
       
   108         TUid iUid;
       
   109         TPtrC iVendorName;
       
   110 
       
   111         TUI* iUi; // Minimal install framework
       
   112         TPtrC iPackageName;
       
   113         TUninstallType iType;
       
   114         TBool iDoCancelTest;
       
   115         };
       
   116 
       
   117 /** Custom resolver uninstallation test step class
       
   118  * @test
       
   119  * @internalComponent
       
   120  */
       
   121 class CResolverUninstallStep : public CuninstallStep
       
   122 	{
       
   123 public:
       
   124 	CResolverUninstallStep(CuninstallStep::TUninstallType aType);
       
   125 	~CResolverUninstallStep();
       
   126 	virtual TVerdict doTestStepL();
       
   127 	};
       
   128 
       
   129 _LIT(KMMCNeeeded, "MMCNeeded");
       
   130 _LIT(KMMCHWDSys, "e:\\sys\\bin");
       
   131 _LIT(KMMCHWDPlg, "e:\\resource\\plugins\\");
       
   132 
       
   133 _LIT(KMMCEmulSys, "x:\\sys\\bin");
       
   134 _LIT(KMMCEmulPlg, "x:\\resource\\plugins\\");
       
   135 
       
   136 
       
   137 _LIT(KNumNotifies, "NumNotifies");
       
   138 _LIT(KNotifyPrefix, "Notify");
       
   139 _LIT(KAffectedFile, "AffectedFile");
       
   140 
       
   141 _LIT(KInstallStep, "InstallStep");
       
   142 _LIT(KResolverInstallStep, "ResolverInstallStep");
       
   143 _LIT(KResolverUninstallStep, "ResolverUninstallStep");
       
   144 _LIT(KExpectedError, "ExpectedError");
       
   145 _LIT(KInstallFHStep, "InstallFHStep"); // install using file handles
       
   146 _LIT(KInstallMemStep, "InstallMemStep"); // install from memory
       
   147 _LIT(KInstallCAFStep, "InstallCAFStep"); // install from CAF
       
   148 _LIT(KInstallOpenFileStep, "InstallOpenFileStep"); // install with already opened file
       
   149 _LIT(KCheckedInstallStep, "CheckedInstallStep");
       
   150 
       
   151 // Cancel testing 
       
   152 _LIT(KInstallCancelStep, "InstallStepCancel");
       
   153 _LIT(KInstallFHCancelStep, "InstallFHStepCancel"); // install using file handles
       
   154 _LIT(KInstallMemCancelStep, "InstallMemStepCancel"); // install from memory
       
   155 _LIT(KInstallCAFCancelStep, "InstallCAFStepCancel"); // install from CAF
       
   156 
       
   157 _LIT(KUninstallStep, "UninstallStep");
       
   158 _LIT(KUninstallStepPackageName, "UninstallStepPackageName");
       
   159 
       
   160 _LIT(KUninstallAugStep, "UninstallAugStep"); // uninstall of augmentation
       
   161 _LIT(KTrustStatus, "TrustStatus");
       
   162 _LIT(KPirCheck, "PostInstallRevocationCheck");
       
   163 
       
   164 _LIT(KUninstallCancelStep, "UninstallStepCancel");
       
   165 _LIT(KUninstallAugCancelStep, "UninstallAugStepCancel"); // uninstall of augmentation
       
   166 _LIT(KNumExpectedSizes, "numExpectedSizes"); // This specifies that the test section
       
   167 // has values for installation size(s).
       
   168 
       
   169 
       
   170 #endif //  __INSTALL_STEP_H__