installationservices/swinstallationfw/test/tusif/source/tsifoperationstep.h
changeset 24 84a16765cd86
child 25 98b66e4fb0be
equal deleted inserted replaced
6:aba6b8104af3 24:84a16765cd86
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalTechnology 
       
    22 */
       
    23 
       
    24 #if (!defined TSIFOPERATIONSTEP_H)
       
    25 #define TSIFOPERATIONSTEP_H
       
    26 #include <test/testexecutestepbase.h>
       
    27 #include "tsifsuitestepbase.h"
       
    28 #include <usif/sif/sif.h>
       
    29 
       
    30 namespace Usif
       
    31 	{
       
    32 	class CSifOperationStep : public CSifSuiteStepBase
       
    33 		{
       
    34 	public:
       
    35 		CSifOperationStep();
       
    36 		~CSifOperationStep();
       
    37 		virtual void ImplTestStepPreambleL();
       
    38 		virtual void ImplTestStepPostambleL();
       
    39 #ifdef _DEBUG
       
    40 		virtual RScsClientBase* ClientHandle() { return &(iSif.iTransport);}
       
    41 #endif
       
    42 		// Used by a non-member function
       
    43 		void ClearOpaqueParams();
       
    44 		
       
    45 	protected:
       
    46 		TBool CompareOpaqueResultsL();
       
    47 		TBool CheckOpaqueResultsL();
       
    48 		void PrintOpaqueParamsL(const COpaqueNamedParams& aOpaqueParams);
       
    49 		void CancelableWait();
       
    50 
       
    51 		void LoadExclusiveOperationFlagFromConfigL();
       
    52 		void LoadFileNameFromConfigL();
       
    53 		void LoadComponentIdFromConfigL();
       
    54 		void LoadComponentInfoFromConfigL();
       
    55 		void LoadPluginOpaqueParamsFromConfigL(const TDesC& aNamePattern, const TDesC& aTypePattern, const TDesC& aValuePattern, Usif::COpaqueNamedParams& aOpaqueParams);
       
    56 		void LoadOpaqueParamsL();
       
    57 
       
    58 		TBool iUseEnhancedApi;
       
    59 		TBool iExclusiveOperation;
       
    60 		TPtrC iFileName;
       
    61 		Usif::TComponentId iComponentId;
       
    62 		Usif::CComponentInfo* iComponentInfo;
       
    63 		Usif::COpaqueNamedParams* iPluginOpaqueArguments;
       
    64 		Usif::COpaqueNamedParams* iPluginOpaqueResults;
       
    65 		Usif::COpaqueNamedParams* iPluginRefOpaqueResults;
       
    66 
       
    67 		Usif::RSoftwareInstall iSif;
       
    68 		TRequestStatus iStatus;
       
    69 
       
    70 	private:
       
    71 		TInt iCancelAfter;
       
    72 		};
       
    73 
       
    74 	class CSifGetComponentInfoStep : public CSifOperationStep
       
    75 		{
       
    76 	public:
       
    77 		CSifGetComponentInfoStep();
       
    78 		~CSifGetComponentInfoStep();
       
    79 		virtual void ImplTestStepPreambleL();
       
    80 		virtual void ImplTestStepL();
       
    81 
       
    82 	private:
       
    83 		void LoadComponentInfoL();
       
    84 		TPtrC LoadCompInfoNodeStringParamL(const TDesC& aNodePrefix, const TDesC& aParamName);
       
    85 		TInt LoadCompInfoNodeIntParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory = ETrue);
       
    86 		TBool LoadCompInfoNodeBoolParamL(const TDesC& aNodePrefix, const TDesC& aParamName, TBool aMandatory = ETrue);
       
    87 		CComponentInfo::CNode* LoadCompInfoNodeLC(const TDesC& aNodeName);
       
    88 		TBool CompareCompInfoNodeL(const CComponentInfo::CNode& aExpectedNode, const CComponentInfo::CNode& aObtainedNode);
       
    89 
       
    90 		TBool iOperationByFileHandle;
       
    91 		TBool iCompareMaxInstalledSize;
       
    92 		};
       
    93 
       
    94 	class CSifInstallStep : public CSifOperationStep
       
    95 		{
       
    96 	public:
       
    97 		CSifInstallStep();
       
    98 		~CSifInstallStep();
       
    99 		virtual void ImplTestStepPreambleL();
       
   100 		virtual void ImplTestStepL();
       
   101 
       
   102 	private:
       
   103 		TBool iInstallByFileHandle;
       
   104 		};
       
   105 
       
   106 	class CSifUninstallStep : public CSifOperationStep
       
   107 		{
       
   108 	public:
       
   109 		CSifUninstallStep();
       
   110 		~CSifUninstallStep();
       
   111 		virtual void ImplTestStepPreambleL();
       
   112 		virtual void ImplTestStepL();
       
   113 		};
       
   114 
       
   115 	class CSifActivateStep : public CSifOperationStep
       
   116 		{
       
   117 	public:
       
   118 		CSifActivateStep(TBool aActivate);
       
   119 		~CSifActivateStep();
       
   120 		virtual void ImplTestStepPreambleL();
       
   121 		virtual void ImplTestStepL();
       
   122 		
       
   123 	private:
       
   124 		TBool iActivate;
       
   125 		};
       
   126 		
       
   127 	class CSifMultipleInstallStep : public CSifOperationStep
       
   128 		{
       
   129 	public:
       
   130 		CSifMultipleInstallStep();
       
   131 		~CSifMultipleInstallStep();
       
   132 		virtual void ImplTestStepPreambleL();
       
   133 		virtual void ImplTestStepL();
       
   134 		};
       
   135 
       
   136 	_LIT(KSifGetComponentInfoStep,"SifGetComponentInfoStep");
       
   137 	_LIT(KSifInstallStep,"SifInstallStep");
       
   138 	_LIT(KSifUninstallStep,"SifUninstallStep");
       
   139 	_LIT(KSifActivateStep,"SifActivateStep");
       
   140 	_LIT(KSifDeactivateStep,"SifDeactivateStep");
       
   141 	_LIT(KSifMultipleInstallStep,"SifMultipleInstallStep");
       
   142 
       
   143 	} // namespace Sif
       
   144 	
       
   145 #endif