os/ossrv/lowlevellibsandfws/pluginfw/TestExecute/EComSWITests/src/installStep.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/TestExecute/EComSWITests/src/installStep.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,170 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// ECom SWI test step declaration
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 +*/
    1.24 +
    1.25 +#ifndef __INSTALL_STEP_H__
    1.26 +#define __INSTALL_STEP_H__
    1.27 +
    1.28 +#include <test/testexecutestepbase.h>
    1.29 +#include "tui.h"
    1.30 +
    1.31 +#include <e32base.h>
    1.32 +#include "TE_EComSWITestSuiteStepBase.h"
    1.33 +
    1.34 +namespace Swi
    1.35 +        {
    1.36 +        class CInstallPrefs;
    1.37 +        }
    1.38 +
    1.39 +class Cinstallers :  public CTe_EComSWITestSuiteStepBase
    1.40 +    {
    1.41 +protected:
    1.42 +        Cinstallers();
    1.43 +        ~Cinstallers();
    1.44 +        void CheckFilesExistL();
    1.45 +        void CheckFilesNonExistL();
    1.46 +        void CheckFilesL(const TDesC&, const TDesC&, TBool);
    1.47 +		void WaitForEComReDiscoveryL();
    1.48 +    };
    1.49 +
    1.50 +
    1.51 +/**
    1.52 + * Installation test step class
    1.53 + * @test
    1.54 + * @internalComponent
    1.55 + */
    1.56 +class CinstallStep : public Cinstallers
    1.57 +        {
    1.58 +public:
    1.59 +        enum TInstallType { EUseFileHandle, EUseMemory, EUseFileName, EUseCAF, EUseOpenFileName, ECheckExitValue};
    1.60 +        CinstallStep(TInstallType aInstallType, TBool aDoCancelTest = EFalse);
    1.61 +        ~CinstallStep();
    1.62 +        virtual TVerdict doTestStepPreambleL();
    1.63 +        virtual TVerdict doTestStepPostambleL();
    1.64 +        virtual TVerdict doTestStepL();
    1.65 +
    1.66 +private:
    1.67 +        TInt DoInstallL(Swi::CInstallPrefs& aInstallPrefs);
    1.68 +
    1.69 +protected:
    1.70 +        TFileName iSisFileName; // name of the file to install
    1.71 +        TUI* iUi; // Minimal install framework
    1.72 +        TInstallType iInstallType; // use file handle to install
    1.73 +        TBool iDoCancelTest;
    1.74 +        TPtrC iExpectedHash;
    1.75 +        TBool iInstallSuccess; // indicate software installed
    1.76 +        };
    1.77 +
    1.78 +/** Custom resolver installation test step class
    1.79 +@test
    1.80 +@internalComponent
    1.81 +*/
    1.82 +class CResolverInstallStep : public CinstallStep // codescanner::missingcclass
    1.83 +	{
    1.84 +public:
    1.85 +	CResolverInstallStep(CinstallStep::TInstallType aInstallType);
    1.86 +	~CResolverInstallStep();
    1.87 +	virtual TVerdict doTestStepL();
    1.88 +
    1.89 +private:
    1.90 +	RLibrary iLibrary;
    1.91 +	};
    1.92 +
    1.93 +/**
    1.94 + * Uninstallation test step class
    1.95 + * @test
    1.96 + * @internalComponent
    1.97 + */
    1.98 +class CuninstallStep : public Cinstallers
    1.99 +        {
   1.100 +public:
   1.101 +        enum TUninstallType { EByUid, EByPackage };
   1.102 +        CuninstallStep(TUninstallType aType, TBool aDoCancelTest = EFalse);
   1.103 +        ~CuninstallStep();
   1.104 +        virtual TVerdict doTestStepPreambleL();
   1.105 +        virtual TVerdict doTestStepPostambleL();
   1.106 +        virtual TVerdict doTestStepL();
   1.107 +private:
   1.108 +        TInt DoUninstallL();
   1.109 +
   1.110 +private:
   1.111 +        TUid iUid;
   1.112 +        TPtrC iVendorName;
   1.113 +
   1.114 +        TUI* iUi; // Minimal install framework
   1.115 +        TPtrC iPackageName;
   1.116 +        TUninstallType iType;
   1.117 +        TBool iDoCancelTest;
   1.118 +        };
   1.119 +
   1.120 +/** Custom resolver uninstallation test step class
   1.121 + * @test
   1.122 + * @internalComponent
   1.123 + */
   1.124 +class CResolverUninstallStep : public CuninstallStep // codescanner::missingcclass
   1.125 +	{
   1.126 +public:
   1.127 +	CResolverUninstallStep(CuninstallStep::TUninstallType aType);
   1.128 +	~CResolverUninstallStep();
   1.129 +	virtual TVerdict doTestStepL();
   1.130 +	};
   1.131 +
   1.132 +_LIT(KMMCNeeeded, "MMCNeeded");
   1.133 +_LIT(KMMCHWDSys, "e:\\sys\\bin");
   1.134 +_LIT(KMMCHWDPlg, "e:\\resource\\plugins\\");
   1.135 +
   1.136 +_LIT(KMMCEmulSys, "x:\\sys\\bin");
   1.137 +_LIT(KMMCEmulPlg, "x:\\resource\\plugins\\");
   1.138 +
   1.139 +
   1.140 +_LIT(KNumNotifies, "NumNotifies");
   1.141 +_LIT(KNotifyPrefix, "Notify");
   1.142 +_LIT(KAffectedFile, "AffectedFile");
   1.143 +
   1.144 +_LIT(KInstallStep, "InstallStep");
   1.145 +_LIT(KResolverInstallStep, "ResolverInstallStep");
   1.146 +_LIT(KResolverUninstallStep, "ResolverUninstallStep");
   1.147 +_LIT(KExpectedError, "ExpectedError");
   1.148 +_LIT(KInstallFHStep, "InstallFHStep"); // install using file handles
   1.149 +_LIT(KInstallMemStep, "InstallMemStep"); // install from memory
   1.150 +_LIT(KInstallCAFStep, "InstallCAFStep"); // install from CAF
   1.151 +_LIT(KInstallOpenFileStep, "InstallOpenFileStep"); // install with already opened file
   1.152 +_LIT(KCheckedInstallStep, "CheckedInstallStep");
   1.153 +
   1.154 +// Cancel testing 
   1.155 +_LIT(KInstallCancelStep, "InstallStepCancel");
   1.156 +_LIT(KInstallFHCancelStep, "InstallFHStepCancel"); // install using file handles
   1.157 +_LIT(KInstallMemCancelStep, "InstallMemStepCancel"); // install from memory
   1.158 +_LIT(KInstallCAFCancelStep, "InstallCAFStepCancel"); // install from CAF
   1.159 +
   1.160 +_LIT(KUninstallStep, "UninstallStep");
   1.161 +_LIT(KUninstallStepPackageName, "UninstallStepPackageName");
   1.162 +
   1.163 +_LIT(KUninstallAugStep, "UninstallAugStep"); // uninstall of augmentation
   1.164 +_LIT(KTrustStatus, "TrustStatus");
   1.165 +_LIT(KPirCheck, "PostInstallRevocationCheck");
   1.166 +
   1.167 +_LIT(KUninstallCancelStep, "UninstallStepCancel");
   1.168 +_LIT(KUninstallAugCancelStep, "UninstallAugStepCancel"); // uninstall of augmentation
   1.169 +_LIT(KNumExpectedSizes, "numExpectedSizes"); // This specifies that the test section
   1.170 +// has values for installation size(s).
   1.171 +
   1.172 +
   1.173 +#endif //  __INSTALL_STEP_H__