os/security/cryptoservices/filebasedcertificateandkeystores/test/tfiletokens/t_filetokens.h
First public contribution.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef __T_FILETOKENS_H__
20 #define __T_FILETOKENS_H__
22 #include "t_testaction.h"
24 _LIT8(KServerOOMTestStart, "startserveroom");
25 _LIT8(KServerOOMTestStop, "stopserveroom");
26 _LIT8(KCheckServerHeapError, "checkserverheaperror");
29 * A test action that turns on filetokens server-side OOM testing.
31 NONSHARABLE_CLASS(CServerOOMTestStart) : public CTestAction
34 IMPORT_C static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
35 const TTestActionSpec& aTestActionSpec);
36 virtual ~CServerOOMTestStart();
38 virtual void PerformAction(TRequestStatus& aStatus);
39 virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
40 virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
41 virtual void PerformCancel();
45 CServerOOMTestStart(CConsoleBase& aConsole, Output& aOut);
46 void ConstructL(const TTestActionSpec& aTestActionSpec);
47 void DoReportAction();
48 void DoCheckResult(TInt aError);
52 * A test action that turns off filetokens server-side OOM testing.
54 NONSHARABLE_CLASS(CServerOOMTestStop) : public CTestAction
57 IMPORT_C static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
58 const TTestActionSpec& aTestActionSpec);
59 virtual ~CServerOOMTestStop();
61 virtual void PerformAction(TRequestStatus& aStatus);
62 virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
63 virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
64 virtual void PerformCancel();
68 CServerOOMTestStop(CConsoleBase& aConsole, Output& aOut);
69 void ConstructL(const TTestActionSpec& aTestActionSpec);
70 void DoReportAction();
71 void DoCheckResult(TInt aError);
75 * A test actions to check whether the server has leaked memory.
77 * This works by checking for the presence of a file that the server writes when
78 * shutting down, if it detects it has leaked memory. This action must
79 * therefore be called after the filetokens server has shut down - ie, there
80 * must be an action to delete the keystore and an action to wait 3 seconds for
81 * the server to shutdown, before this one.
83 NONSHARABLE_CLASS(CCheckServerHeapError) : public CTestAction
86 IMPORT_C static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
87 virtual ~CCheckServerHeapError();
89 virtual void PerformAction(TRequestStatus& aStatus);
90 virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
91 virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
92 virtual void PerformCancel();
96 CCheckServerHeapError(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
97 void ConstructL(const TTestActionSpec& aTestActionSpec);
98 void DoReportAction();
99 void DoCheckResult(TInt aError);