sl@0: /* sl@0: * Copyright (c) 2005-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 the License "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: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef __T_CONCURRENTCERTSTORE_H__ sl@0: #define __T_CONCURRENTCERTSTORE_H__ sl@0: sl@0: #include "t_certstoreactions.h" sl@0: #include "t_testactionspec.h" sl@0: #include "t_output.h" sl@0: sl@0: // This class can be used to flag concurrent certstore testing sl@0: // It inherits from CTestAction so it can be used in the script sl@0: // but otherwise doesn't carry out any test. sl@0: // When in a script and enabled, the concurrent tester singleton sl@0: // is initialised and can then be referenced by all following tests in sl@0: // various performance operations sl@0: sl@0: class CTestConcurrentCertStore : public CCertStoreTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, sl@0: const TTestActionSpec& aTestActionSpec); sl@0: static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole, Output& aOut, sl@0: const TTestActionSpec& aTestActionSpec); sl@0: ~CTestConcurrentCertStore(); sl@0: public: sl@0: virtual void PerformAction(TRequestStatus& aStatus); sl@0: protected: sl@0: CTestConcurrentCertStore(RFs& aFs, CConsoleBase& aConsole, Output& aOut); sl@0: private: sl@0: virtual void DoReportAction(); sl@0: virtual void DoCheckResult(TInt aError); sl@0: virtual void DoPerformPrerequisite(TRequestStatus& aStatus); sl@0: virtual void DoPerformPostrequisite(TRequestStatus& aStatus); sl@0: private: sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: }; sl@0: sl@0: class CConcurrentTester : public CBase sl@0: { sl@0: public: sl@0: static void SetDoingConcurrentTesting(TBool aTestConcurrent); sl@0: static TBool IsDoingConcurrentTesting(); sl@0: public: sl@0: static void SanitizeTestResult(Output& aOut, TBool& aResult); sl@0: private: sl@0: CConcurrentTester(); sl@0: ~CConcurrentTester(); sl@0: }; sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: #endif // __T_CONCURRENTCERTSTORE_H__