sl@0: /* sl@0: * Copyright (c) 2004-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: #ifndef __CERTTOOL_ENGINE_H_ sl@0: #define __CERTTOOL_ENGINE_H_ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "certtool_commands.h" sl@0: #include "keytool_commands.h" sl@0: sl@0: class CCertToolController; sl@0: sl@0: class CCertToolEngine : public CActive sl@0: { sl@0: public: sl@0: static CCertToolEngine* NewLC(CCertToolController* aController); sl@0: static CCertToolEngine* NewL(CCertToolController* aController); sl@0: ~CCertToolEngine(); sl@0: void ConstructL(); sl@0: sl@0: public: // Actual commands sl@0: void ListL(CKeyToolParameters* aParam); sl@0: void ImportPrivateL(CKeyToolParameters* aParam); sl@0: void RemovePrivateL(CKeyToolParameters* aParam); sl@0: void ImportL(CKeyToolParameters* aParam); sl@0: void RemoveL(CKeyToolParameters* aParam); sl@0: void SetAppsL(CKeyToolParameters* aParam); sl@0: void ListStoresL(CKeyToolParameters* aParam); sl@0: void AddAppsL(CKeyToolParameters* aParam); sl@0: void RemoveAppsL(CKeyToolParameters* aParam); sl@0: void DisplayUsageL(CKeyToolParameters* aParam); sl@0: void SetManagerPolicyL(CKeyToolParameters* aParam); sl@0: sl@0: public: // From CActive sl@0: void RunL(); sl@0: void DoCancel(); sl@0: TInt RunError(TInt aError); sl@0: sl@0: private: sl@0: CCertToolEngine(CCertToolController* aController); sl@0: void SetupUidCommandL(CKeyToolParameters* aParam); sl@0: sl@0: private: sl@0: enum sl@0: { sl@0: EInitialiseKeyStore, sl@0: EInitialise, sl@0: EExecuting, sl@0: EDone sl@0: } iState; sl@0: enum sl@0: { sl@0: EIdle, sl@0: EList, sl@0: EImport, sl@0: ERemove, sl@0: EAddApps, sl@0: ESetApps, sl@0: ERemoveApps, sl@0: ESetPolicy sl@0: } iCurrentAction; sl@0: sl@0: CCertToolCommand* iHandler; sl@0: CKeyToolParameters* iParam; sl@0: CCertToolController* iController; sl@0: sl@0: RFs iFs; sl@0: CUnifiedCertStore* iCertStore; sl@0: sl@0: RFs iFsKeyStore; sl@0: CUnifiedKeyStore* iKeyStore; sl@0: CKeyToolCommand* iKeyHandler; sl@0: CKeyToolController* iKeyController; sl@0: sl@0: CActiveScheduler* iScheduler; sl@0: }; sl@0: sl@0: #endif sl@0: