installationservices/swi/test/tintegrityservices/tintegrityservicesstep.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:50:16 +0300
branchRCL_3
changeset 36 f9033e605ee2
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201019 Kit: 2010121

/*
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/




/**
 @file
*/
#ifndef __TINTEGRITYSERVICESSTEP_H__
#define __TINTEGRITYSERVICESSTEP_H__
#include <test/testexecutestepbase.h>
#include "tintegrityservicesclientserver.h"

namespace Swi
{
namespace Test
{
// Step names
_LIT(KInstall, "Install");
_LIT(KRecover, "Recover");
_LIT(KCleanup, "Cleanup");
_LIT(KOOM, "OOM");
_LIT(KCheck, "Check");

class CDummyIntegrityServices;

// Base class for all steps
class CIntegrityServicesStepBase : public CTestStep
	{
public:
	virtual TVerdict doTestStepPreambleL();
	virtual TVerdict doTestStepPostambleL();

private:
	void ReadFailureSettings();

protected:
	// Extension of config parser to allow you to get array of descriptors
	void GetStringArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TPtrC>& aArray);

	TBool CheckFilesL();
	void doInstallL();
	void doRecoverL();
	void doCleanupL();

protected:
	RIntegrityServicesServerSession iIntegritySession;
	};

// Step which starts installation
class CInstallStep : public CIntegrityServicesStepBase
	{
public:
	CInstallStep();
	virtual TVerdict doTestStepL();
	};

// Step which recovers a previous failed installation
class CRecoverStep : public CIntegrityServicesStepBase
	{
public:
	CRecoverStep();
	virtual TVerdict doTestStepL();
	};

// Step which cleans up files between test cases
class CCleanupStep : public CIntegrityServicesStepBase
	{
public:
	CCleanupStep();
	virtual TVerdict doTestStepL();
	};

// OOM test step
class COOMStep : public CIntegrityServicesStepBase
	{
public:
	COOMStep();
	virtual TVerdict doTestStepL();
	};
	
// Step which checks for files
class CCheckStep : public CIntegrityServicesStepBase
	{
public:
	CCheckStep();
	virtual TVerdict doTestStepL();
	};

} //namespace
} //namespace
#endif