os/security/cryptoservices/filebasedcertificateandkeystores/test/tfiletokens/t_filetokens.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.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
#ifndef __T_FILETOKENS_H__
sl@0
    20
#define __T_FILETOKENS_H__
sl@0
    21
sl@0
    22
#include "t_testaction.h"
sl@0
    23
sl@0
    24
_LIT8(KServerOOMTestStart, "startserveroom");
sl@0
    25
_LIT8(KServerOOMTestStop, "stopserveroom");
sl@0
    26
_LIT8(KCheckServerHeapError, "checkserverheaperror");
sl@0
    27
sl@0
    28
/**
sl@0
    29
 * A test action that turns on filetokens server-side OOM testing.
sl@0
    30
 */
sl@0
    31
NONSHARABLE_CLASS(CServerOOMTestStart) : public CTestAction
sl@0
    32
	{
sl@0
    33
public:
sl@0
    34
	IMPORT_C static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
sl@0
    35
									  const TTestActionSpec& aTestActionSpec);
sl@0
    36
	virtual ~CServerOOMTestStart();
sl@0
    37
	
sl@0
    38
	virtual void PerformAction(TRequestStatus& aStatus);
sl@0
    39
	virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
sl@0
    40
	virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
sl@0
    41
	virtual void PerformCancel();
sl@0
    42
	virtual void Reset();
sl@0
    43
sl@0
    44
private:
sl@0
    45
	CServerOOMTestStart(CConsoleBase& aConsole, Output& aOut);
sl@0
    46
	void ConstructL(const TTestActionSpec& aTestActionSpec);
sl@0
    47
	void DoReportAction();
sl@0
    48
	void DoCheckResult(TInt aError);
sl@0
    49
	};
sl@0
    50
sl@0
    51
/**
sl@0
    52
 * A test action that turns off filetokens server-side OOM testing.
sl@0
    53
 */
sl@0
    54
NONSHARABLE_CLASS(CServerOOMTestStop) : public CTestAction
sl@0
    55
	{
sl@0
    56
public:
sl@0
    57
	IMPORT_C static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
sl@0
    58
									  const TTestActionSpec& aTestActionSpec);
sl@0
    59
	virtual ~CServerOOMTestStop();
sl@0
    60
	
sl@0
    61
	virtual void PerformAction(TRequestStatus& aStatus);
sl@0
    62
	virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
sl@0
    63
	virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
sl@0
    64
	virtual void PerformCancel();
sl@0
    65
	virtual void Reset();
sl@0
    66
sl@0
    67
private:
sl@0
    68
	CServerOOMTestStop(CConsoleBase& aConsole, Output& aOut);
sl@0
    69
	void ConstructL(const TTestActionSpec& aTestActionSpec);
sl@0
    70
	void DoReportAction();
sl@0
    71
	void DoCheckResult(TInt aError);
sl@0
    72
	};
sl@0
    73
sl@0
    74
/**
sl@0
    75
 * A test actions to check whether the server has leaked memory.
sl@0
    76
 *
sl@0
    77
 * This works by checking for the presence of a file that the server writes when
sl@0
    78
 * shutting down, if it detects it has leaked memory.  This action must
sl@0
    79
 * therefore be called after the filetokens server has shut down - ie, there
sl@0
    80
 * must be an action to delete the keystore and an action to wait 3 seconds for
sl@0
    81
 * the server to shutdown, before this one.
sl@0
    82
 */
sl@0
    83
NONSHARABLE_CLASS(CCheckServerHeapError) : public CTestAction
sl@0
    84
	{
sl@0
    85
public:
sl@0
    86
	IMPORT_C static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
sl@0
    87
	virtual ~CCheckServerHeapError();
sl@0
    88
	
sl@0
    89
	virtual void PerformAction(TRequestStatus& aStatus);
sl@0
    90
	virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
sl@0
    91
	virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
sl@0
    92
	virtual void PerformCancel();
sl@0
    93
	virtual void Reset();
sl@0
    94
	
sl@0
    95
private:
sl@0
    96
	CCheckServerHeapError(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
sl@0
    97
	void ConstructL(const TTestActionSpec& aTestActionSpec);
sl@0
    98
	void DoReportAction();
sl@0
    99
	void DoCheckResult(TInt aError);
sl@0
   100
sl@0
   101
private:
sl@0
   102
	RFs& iFs;
sl@0
   103
	};
sl@0
   104
sl@0
   105
#endif