diff -r 000000000000 -r af10295192d8 networksecurity/tlsprovider/Test/ttlsoom/tlsoomstepbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/networksecurity/tlsprovider/Test/ttlsoom/tlsoomstepbase.h Tue Jan 26 15:23:49 2010 +0200 @@ -0,0 +1,75 @@ +/** +* 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 +#include + +#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__ */