sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // ECom SWI test step declaration sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: */ sl@0: sl@0: #ifndef __INSTALL_STEP_H__ sl@0: #define __INSTALL_STEP_H__ sl@0: sl@0: #include sl@0: #include "tui.h" sl@0: sl@0: #include sl@0: #include "TE_EComSWITestSuiteStepBase.h" sl@0: sl@0: namespace Swi sl@0: { sl@0: class CInstallPrefs; sl@0: } sl@0: sl@0: class Cinstallers : public CTe_EComSWITestSuiteStepBase sl@0: { sl@0: protected: sl@0: Cinstallers(); sl@0: ~Cinstallers(); sl@0: void CheckFilesExistL(); sl@0: void CheckFilesNonExistL(); sl@0: void CheckFilesL(const TDesC&, const TDesC&, TBool); sl@0: void WaitForEComReDiscoveryL(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: * Installation test step class sl@0: * @test sl@0: * @internalComponent sl@0: */ sl@0: class CinstallStep : public Cinstallers sl@0: { sl@0: public: sl@0: enum TInstallType { EUseFileHandle, EUseMemory, EUseFileName, EUseCAF, EUseOpenFileName, ECheckExitValue}; sl@0: CinstallStep(TInstallType aInstallType, TBool aDoCancelTest = EFalse); sl@0: ~CinstallStep(); sl@0: virtual TVerdict doTestStepPreambleL(); sl@0: virtual TVerdict doTestStepPostambleL(); sl@0: virtual TVerdict doTestStepL(); sl@0: sl@0: private: sl@0: TInt DoInstallL(Swi::CInstallPrefs& aInstallPrefs); sl@0: sl@0: protected: sl@0: TFileName iSisFileName; // name of the file to install sl@0: TUI* iUi; // Minimal install framework sl@0: TInstallType iInstallType; // use file handle to install sl@0: TBool iDoCancelTest; sl@0: TPtrC iExpectedHash; sl@0: TBool iInstallSuccess; // indicate software installed sl@0: }; sl@0: sl@0: /** Custom resolver installation test step class sl@0: @test sl@0: @internalComponent sl@0: */ sl@0: class CResolverInstallStep : public CinstallStep // codescanner::missingcclass sl@0: { sl@0: public: sl@0: CResolverInstallStep(CinstallStep::TInstallType aInstallType); sl@0: ~CResolverInstallStep(); sl@0: virtual TVerdict doTestStepL(); sl@0: sl@0: private: sl@0: RLibrary iLibrary; sl@0: }; sl@0: sl@0: /** sl@0: * Uninstallation test step class sl@0: * @test sl@0: * @internalComponent sl@0: */ sl@0: class CuninstallStep : public Cinstallers sl@0: { sl@0: public: sl@0: enum TUninstallType { EByUid, EByPackage }; sl@0: CuninstallStep(TUninstallType aType, TBool aDoCancelTest = EFalse); sl@0: ~CuninstallStep(); sl@0: virtual TVerdict doTestStepPreambleL(); sl@0: virtual TVerdict doTestStepPostambleL(); sl@0: virtual TVerdict doTestStepL(); sl@0: private: sl@0: TInt DoUninstallL(); sl@0: sl@0: private: sl@0: TUid iUid; sl@0: TPtrC iVendorName; sl@0: sl@0: TUI* iUi; // Minimal install framework sl@0: TPtrC iPackageName; sl@0: TUninstallType iType; sl@0: TBool iDoCancelTest; sl@0: }; sl@0: sl@0: /** Custom resolver uninstallation test step class sl@0: * @test sl@0: * @internalComponent sl@0: */ sl@0: class CResolverUninstallStep : public CuninstallStep // codescanner::missingcclass sl@0: { sl@0: public: sl@0: CResolverUninstallStep(CuninstallStep::TUninstallType aType); sl@0: ~CResolverUninstallStep(); sl@0: virtual TVerdict doTestStepL(); sl@0: }; sl@0: sl@0: _LIT(KMMCNeeeded, "MMCNeeded"); sl@0: _LIT(KMMCHWDSys, "e:\\sys\\bin"); sl@0: _LIT(KMMCHWDPlg, "e:\\resource\\plugins\\"); sl@0: sl@0: _LIT(KMMCEmulSys, "x:\\sys\\bin"); sl@0: _LIT(KMMCEmulPlg, "x:\\resource\\plugins\\"); sl@0: sl@0: sl@0: _LIT(KNumNotifies, "NumNotifies"); sl@0: _LIT(KNotifyPrefix, "Notify"); sl@0: _LIT(KAffectedFile, "AffectedFile"); sl@0: sl@0: _LIT(KInstallStep, "InstallStep"); sl@0: _LIT(KResolverInstallStep, "ResolverInstallStep"); sl@0: _LIT(KResolverUninstallStep, "ResolverUninstallStep"); sl@0: _LIT(KExpectedError, "ExpectedError"); sl@0: _LIT(KInstallFHStep, "InstallFHStep"); // install using file handles sl@0: _LIT(KInstallMemStep, "InstallMemStep"); // install from memory sl@0: _LIT(KInstallCAFStep, "InstallCAFStep"); // install from CAF sl@0: _LIT(KInstallOpenFileStep, "InstallOpenFileStep"); // install with already opened file sl@0: _LIT(KCheckedInstallStep, "CheckedInstallStep"); sl@0: sl@0: // Cancel testing sl@0: _LIT(KInstallCancelStep, "InstallStepCancel"); sl@0: _LIT(KInstallFHCancelStep, "InstallFHStepCancel"); // install using file handles sl@0: _LIT(KInstallMemCancelStep, "InstallMemStepCancel"); // install from memory sl@0: _LIT(KInstallCAFCancelStep, "InstallCAFStepCancel"); // install from CAF sl@0: sl@0: _LIT(KUninstallStep, "UninstallStep"); sl@0: _LIT(KUninstallStepPackageName, "UninstallStepPackageName"); sl@0: sl@0: _LIT(KUninstallAugStep, "UninstallAugStep"); // uninstall of augmentation sl@0: _LIT(KTrustStatus, "TrustStatus"); sl@0: _LIT(KPirCheck, "PostInstallRevocationCheck"); sl@0: sl@0: _LIT(KUninstallCancelStep, "UninstallStepCancel"); sl@0: _LIT(KUninstallAugCancelStep, "UninstallAugStepCancel"); // uninstall of augmentation sl@0: _LIT(KNumExpectedSizes, "numExpectedSizes"); // This specifies that the test section sl@0: // has values for installation size(s). sl@0: sl@0: sl@0: #endif // __INSTALL_STEP_H__