networksecurity/tlsprovider/Test/ttlsoom/tlsoomstepbase.h
author William Roberts <williamr@symbian.org>
Wed, 10 Nov 2010 13:36:07 +0000
branchRCL_3
changeset 79 4b172931a477
parent 0 af10295192d8
permissions -rw-r--r--
Make configchange.pl run ceddump.exe with -dtextshell - Bug 3932

/**
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "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 __TLSOOMSTEPBASE_H__
#define __TLSOOMSTEPBASE_H__

#include <e32base.h>
#include <TestExecuteStepBase.h>

#include "tlsprovinterface.h"

/*
 * This is an active object to assist with async
 * tlsprovider calls, these are handled syncronously
 * using CActiveScheduler::Start() and Stop() calls
 */

class CTlsOOMStepBase : public CActive
	{	

public:
	TVerdict Start();
	
protected:
	CTlsOOMStepBase(CTestExecuteLogger& aLogger, const TDesC& aConfigPath);
	void RunL();	
	void DoCancel();
	virtual void DoTestStepL() = 0;
	
	void InitTlsProviderLC(CTLSProvider*& aTlsProvider, CTlsCryptoAttributes*& aCryptoAttributes,
		HBufC8*& aServerCert);
	
private:
	inline CTestExecuteLogger& Logger();
	void ReadFileDataL(TDes8& aDest, const TDesC& aFileName, RFs& aFileServer);
	
private:

	enum  
		{
		KMaxOOMSteps = 500	
		};
	
	TInt iCurrentStep;
	CTestExecuteLogger& iLogger;
	const TDesC& iConfigPath;
	
	};
	
inline CTestExecuteLogger& CTlsOOMStepBase::Logger()
	{
	return iLogger;
	}

#endif /* __TLSOOMSTEPBASE_H__ */