os/security/cryptoservices/certificateandkeymgmt/tcertstore/t_concurrentcertstore.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 /**
    22  @file
    23  @internalTechnology
    24 */
    25 
    26 #ifndef __T_CONCURRENTCERTSTORE_H__
    27 #define __T_CONCURRENTCERTSTORE_H__
    28 
    29 #include "t_certstoreactions.h"
    30 #include "t_testactionspec.h"
    31 #include "t_output.h"
    32 
    33 //	This class can be used to flag concurrent certstore testing
    34 //	It inherits from CTestAction so it can be used in the script
    35 //	but otherwise doesn't carry out any test.
    36 //	When in a script and enabled, the concurrent tester singleton
    37 //	is initialised and can then be referenced by all following tests in
    38 //	various performance operations
    39 
    40 class CTestConcurrentCertStore : public CCertStoreTestAction
    41 {
    42 public:
    43 	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, 
    44 							 const TTestActionSpec& aTestActionSpec);
    45 	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole, Output& aOut, 
    46 							  const TTestActionSpec& aTestActionSpec);
    47 	~CTestConcurrentCertStore();
    48 public:
    49 	virtual void PerformAction(TRequestStatus& aStatus);
    50 protected:
    51 	CTestConcurrentCertStore(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
    52 private:
    53 	virtual void DoReportAction();
    54 	virtual void DoCheckResult(TInt aError);
    55 	virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
    56 	virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
    57 private:
    58 	void ConstructL(const TTestActionSpec& aTestActionSpec);
    59 };
    60 
    61 class CConcurrentTester : public CBase
    62 {
    63 public:
    64 	static void SetDoingConcurrentTesting(TBool aTestConcurrent);
    65 	static TBool IsDoingConcurrentTesting();
    66 public:
    67 	static void SanitizeTestResult(Output& aOut, TBool& aResult);
    68 private:
    69 	CConcurrentTester();
    70 	~CConcurrentTester();
    71 };
    72 
    73 
    74 
    75 
    76 
    77 
    78 
    79 #endif	//	__T_CONCURRENTCERTSTORE_H__