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 __KEYTOOL_ENGINE_H_ sl@0: #define __KEYTOOL_ENGINE_H_ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "keytool_commands.h" sl@0: sl@0: class CKeyToolController; sl@0: sl@0: class CKeyToolEngine : public CActive sl@0: { sl@0: public: sl@0: static CKeyToolEngine* NewLC(CKeyToolController* aController); sl@0: static CKeyToolEngine* NewL(CKeyToolController* aController); sl@0: ~CKeyToolEngine(); sl@0: void ConstructL(); sl@0: sl@0: public: // Actual commands sl@0: void ListL(CKeyToolParameters* aParam); sl@0: void ImportL(CKeyToolParameters* aParam); sl@0: void RemoveL(CKeyToolParameters* aParam); sl@0: void DisplayUsageL(CKeyToolParameters* aParam); sl@0: void ListStoresL(CKeyToolParameters* aParam); sl@0: void SetPolicyL(CKeyToolParameters* aParam); sl@0: #ifdef KEYTOOL sl@0: void MigrateStoreL(CKeyToolParameters* aParam); sl@0: #endif // KEYTOOL 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: protected: sl@0: void InitializeL(); sl@0: sl@0: private: sl@0: CKeyToolEngine(CKeyToolController* aController); sl@0: sl@0: private: sl@0: enum sl@0: { 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: ESetPolicy, sl@0: #ifdef KEYTOOL sl@0: EMigrateStore, sl@0: #endif // KEYTOOL sl@0: } iCurrentAction; sl@0: sl@0: TBool iInitialized; sl@0: TBool iActiveStarted; sl@0: CKeyToolCommand* iHandler; sl@0: CKeyToolParameters* iParam; sl@0: CKeyToolController* iController; sl@0: sl@0: RFs iFs; sl@0: CUnifiedKeyStore* iKeyStore; sl@0: CActiveScheduler* iScheduler; sl@0: #ifdef KEYTOOL sl@0: CKeytoolMigrateStore* iMigrateStoreHandler; sl@0: #endif // KEYTOOL sl@0: }; sl@0: sl@0: #endif sl@0: