sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: sl@0: #ifndef __T_CERTSTOREACTIONSCLIENT_H__ sl@0: #define __T_CERTSTOREACTIONSCLIENT_H__ sl@0: sl@0: #include "t_certstoreactions.h" sl@0: sl@0: class CInitCertificateAppInfoManager : public CCertStoreTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs &aFs, sl@0: CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec); sl@0: static CTestAction* NewLC(RFs &aFs, sl@0: CConsoleBase& aConsole, Output& aOut, const TTestActionSpec& aTestActionSpec); sl@0: virtual ~CInitCertificateAppInfoManager(); sl@0: virtual void PerformAction(TRequestStatus& aStatus); sl@0: virtual void PerformCancel(); sl@0: virtual void Reset(); sl@0: sl@0: private: sl@0: CInitCertificateAppInfoManager(RFs &aFs, sl@0: CConsoleBase& aConsole, Output& aOut); sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: sl@0: void HandleEInit(); sl@0: sl@0: void DoReportAction(); sl@0: void DoCheckResult(TInt aError); sl@0: sl@0: private: sl@0: enum TState sl@0: { sl@0: EInit, sl@0: EFinished sl@0: }; sl@0: sl@0: private: sl@0: TState iState; sl@0: RFs& iFs; sl@0: }; sl@0: sl@0: class CDeleteCertificateAppInfoManager : public CCertStoreTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, sl@0: const TTestActionSpec& aTestActionSpec); sl@0: ~CDeleteCertificateAppInfoManager(); sl@0: virtual void PerformAction(TRequestStatus& aStatus); sl@0: virtual void PerformCancel(); sl@0: virtual void Reset(); sl@0: sl@0: private: sl@0: CDeleteCertificateAppInfoManager(RFs& aFs, CConsoleBase& aConsole, Output& aOut); sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: void DoReportAction(); sl@0: void DoCheckResult(TInt aError); sl@0: sl@0: private: sl@0: enum TState sl@0: { sl@0: EDelete, sl@0: EFinished sl@0: }; sl@0: sl@0: private: sl@0: TState iState; sl@0: }; sl@0: sl@0: /** sl@0: * Client management tests sl@0: */ sl@0: class CAddClient : public CCertStoreTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, sl@0: const TTestActionSpec& aTestActionSpec); sl@0: ~CAddClient(); sl@0: virtual void PerformAction(TRequestStatus& aStatus); sl@0: virtual void PerformCancel(); sl@0: virtual void Reset(); sl@0: sl@0: private: sl@0: CAddClient(RFs& aFs, CConsoleBase& aConsole, Output& aOut); sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: void DoReportAction(); sl@0: void DoCheckResult(TInt aError); sl@0: sl@0: private: sl@0: enum TState sl@0: { sl@0: EAdd, sl@0: EFinished sl@0: }; sl@0: sl@0: private: sl@0: TState iState; sl@0: TCertificateAppInfo* iClientInfo; sl@0: }; sl@0: sl@0: class CGetClients : public CCertStoreTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, sl@0: const TTestActionSpec& aTestActionSpec); sl@0: ~CGetClients(); sl@0: virtual void PerformAction(TRequestStatus& aStatus); sl@0: virtual void PerformCancel(); sl@0: virtual void Reset(); sl@0: sl@0: private: sl@0: CGetClients(RFs& aFs, CConsoleBase& aConsole, Output& aOut); sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: void DoReportAction(); sl@0: void DoCheckResult(TInt aError); sl@0: sl@0: private: sl@0: enum TState sl@0: { sl@0: EGet, sl@0: EFinished sl@0: }; sl@0: sl@0: private: sl@0: TState iState; sl@0: const RArray* iClients; sl@0: RArray iExpectedClients; sl@0: }; sl@0: sl@0: class CRemoveClient : public CCertStoreTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, Output& aOut, sl@0: const TTestActionSpec& aTestActionSpec); sl@0: ~CRemoveClient(); sl@0: virtual void PerformAction(TRequestStatus& aStatus); sl@0: virtual void PerformCancel(); sl@0: virtual void Reset(); sl@0: sl@0: private: sl@0: CRemoveClient(RFs& aFs, CConsoleBase& aConsole, Output& aOut); sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: void DoReportAction(); sl@0: void DoCheckResult(TInt aError); sl@0: sl@0: private: sl@0: enum TState sl@0: { sl@0: ERemove, sl@0: EFinished sl@0: }; sl@0: sl@0: private: sl@0: TState iState; sl@0: TUid iUid; sl@0: }; sl@0: sl@0: #endif