cryptoservices/certificateandkeymgmt/tx509/CorruptionTest.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 1998-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 * CCorruptionTest class implementation
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file 
       
    24  @internalTechnology
       
    25 */
       
    26  
       
    27 #ifndef __CCorruptionTest_H
       
    28 #define __CCorruptionTest_H
       
    29 
       
    30 #include "t_testaction.h"
       
    31 #include "tcertwriter.h"
       
    32 
       
    33 class CCorruptionTest : public CTestAction
       
    34 {
       
    35 public:
       
    36 	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, 
       
    37 		Output& aOut, const TTestActionSpec& aTestActionSpec);
       
    38 	static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
       
    39 		Output& aOut, const TTestActionSpec& aTestActionSpec);
       
    40 	void TestValidation(TRequestStatus& aStatus);
       
    41 	~CCorruptionTest();
       
    42 
       
    43 public:
       
    44 	virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
       
    45 	virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
       
    46 	virtual void PerformAction(TRequestStatus& aStatus);
       
    47 
       
    48 	virtual void DoReportAction();
       
    49 	virtual void DoCheckResult(TInt aError);
       
    50 
       
    51 private:
       
    52 	CCorruptionTest(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
       
    53 	void ConstructL(const TTestActionSpec& aTestActionSpec);
       
    54 	HBufC8* readCertLC(const TDesC &aFilename);
       
    55 	void RunCorruptionTestL(const TDesC &aFilename);
       
    56 
       
    57 private:
       
    58 	RFs& iFs;
       
    59 	CDir* iDirList;
       
    60 	TInt nFileNumber;
       
    61 	CertWriter* iWriter;
       
    62 	TBuf<128> iPath;
       
    63 	NullOutput* iNullOut;
       
    64 	TInt iIterations;
       
    65 	RFile iLogFile;
       
    66 	FileOutput* iCorruptOut;
       
    67 	static TInt nInstances;
       
    68 };
       
    69 
       
    70 #endif // !defined(AFX_CORRUPTIONTEST_H__6C3C42AD_9E21_11D6_ABA5_00080214A261__INCLUDED_)