os/security/cryptoservices/certificateandkeymgmt/tcertstore/t_certstoreactionsclient.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tcertstore/t_certstoreactionsclient.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,181 @@
     1.4 +/*
     1.5 +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +
    1.24 +/**
    1.25 + @file
    1.26 + @internalTechnology
    1.27 +*/
    1.28 +
    1.29 +
    1.30 +#ifndef __T_CERTSTOREACTIONSCLIENT_H__
    1.31 +#define __T_CERTSTOREACTIONSCLIENT_H__
    1.32 +
    1.33 +#include "t_certstoreactions.h"
    1.34 +
    1.35 +class CInitCertificateAppInfoManager : public CCertStoreTestAction
    1.36 +	{
    1.37 +public:
    1.38 +	static CTestAction* NewL(RFs &aFs,
    1.39 +		CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
    1.40 +	static CTestAction* NewLC(RFs &aFs, 
    1.41 +		CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec);
    1.42 +	virtual ~CInitCertificateAppInfoManager();
    1.43 +	virtual void PerformAction(TRequestStatus& aStatus);
    1.44 +	virtual void PerformCancel();
    1.45 +	virtual void Reset();
    1.46 +
    1.47 +private:
    1.48 +	CInitCertificateAppInfoManager(RFs &aFs, 
    1.49 +		CConsoleBase& aConsole, Output& aOut);
    1.50 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
    1.51 +
    1.52 +	void HandleEInit();
    1.53 +
    1.54 +	void DoReportAction();
    1.55 +	void DoCheckResult(TInt aError);
    1.56 +
    1.57 +private:
    1.58 +	enum TState
    1.59 +		{
    1.60 +		EInit,
    1.61 +		EFinished
    1.62 +		};
    1.63 +
    1.64 +private:
    1.65 +	TState iState;
    1.66 +	RFs& iFs;
    1.67 +	};
    1.68 +
    1.69 +class CDeleteCertificateAppInfoManager : public CCertStoreTestAction
    1.70 +	{
    1.71 +public:
    1.72 +	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, 
    1.73 +		const TTestActionSpec& aTestActionSpec);
    1.74 +	~CDeleteCertificateAppInfoManager();
    1.75 +	virtual void PerformAction(TRequestStatus& aStatus);
    1.76 +	virtual void PerformCancel();
    1.77 +	virtual void Reset();
    1.78 +
    1.79 +private:
    1.80 +	CDeleteCertificateAppInfoManager(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
    1.81 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
    1.82 +	void DoReportAction();
    1.83 +	void DoCheckResult(TInt aError);
    1.84 +
    1.85 +private:
    1.86 +	enum TState
    1.87 +		{
    1.88 +		EDelete,
    1.89 +		EFinished
    1.90 +		};
    1.91 +
    1.92 +private:
    1.93 +	TState iState;
    1.94 +	};
    1.95 +
    1.96 +/**
    1.97 + * Client management tests
    1.98 + */
    1.99 +class CAddClient : public CCertStoreTestAction
   1.100 +	{
   1.101 +public:
   1.102 +	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, 
   1.103 +		const TTestActionSpec& aTestActionSpec);
   1.104 +	~CAddClient();
   1.105 +	virtual void PerformAction(TRequestStatus& aStatus);
   1.106 +	virtual void PerformCancel();
   1.107 +	virtual void Reset();
   1.108 +
   1.109 +private:
   1.110 +	CAddClient(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
   1.111 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
   1.112 +	void DoReportAction();
   1.113 +	void DoCheckResult(TInt aError);
   1.114 +
   1.115 +private:
   1.116 +	enum TState
   1.117 +		{
   1.118 +		EAdd,
   1.119 +		EFinished
   1.120 +		};
   1.121 +
   1.122 +private:
   1.123 +	TState iState;
   1.124 +	TCertificateAppInfo* iClientInfo;
   1.125 +	};
   1.126 +
   1.127 +class CGetClients : public CCertStoreTestAction
   1.128 +	{
   1.129 +public:
   1.130 +	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, 
   1.131 +		const TTestActionSpec& aTestActionSpec);
   1.132 +	~CGetClients();
   1.133 +	virtual void PerformAction(TRequestStatus& aStatus);
   1.134 +	virtual void PerformCancel();
   1.135 +	virtual void Reset();
   1.136 +
   1.137 +private:
   1.138 +	CGetClients(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
   1.139 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
   1.140 +	void DoReportAction();
   1.141 +	void DoCheckResult(TInt aError);
   1.142 +
   1.143 +private:
   1.144 +	enum TState
   1.145 +		{
   1.146 +		EGet,
   1.147 +		EFinished
   1.148 +		};
   1.149 +
   1.150 +private:
   1.151 +	TState iState;
   1.152 +	const RArray<TCertificateAppInfo>* iClients;
   1.153 +	RArray<TUid> iExpectedClients;
   1.154 +	};
   1.155 +
   1.156 +class CRemoveClient : public CCertStoreTestAction
   1.157 +	{
   1.158 +public:
   1.159 +	static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut,
   1.160 +		const TTestActionSpec& aTestActionSpec);
   1.161 +	~CRemoveClient();
   1.162 +	virtual void PerformAction(TRequestStatus& aStatus);
   1.163 +	virtual void PerformCancel();
   1.164 +	virtual void Reset();
   1.165 +
   1.166 +private:
   1.167 +	CRemoveClient(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
   1.168 +	void ConstructL(const TTestActionSpec& aTestActionSpec);
   1.169 +	void DoReportAction();
   1.170 +	void DoCheckResult(TInt aError);
   1.171 +
   1.172 +private:
   1.173 +	enum TState
   1.174 +		{
   1.175 +		ERemove,
   1.176 +		EFinished
   1.177 +		};
   1.178 +
   1.179 +private:
   1.180 +	TState iState;
   1.181 +	TUid iUid;
   1.182 +	};
   1.183 +
   1.184 +#endif