diff -r 5cc91383ab1e -r 7333d7932ef7 installationservices/swcomponentregistry/test/tscrapparc/inc/appreginfoapparcsteps.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/installationservices/swcomponentregistry/test/tscrapparc/inc/appreginfoapparcsteps.h Tue Aug 31 15:21:33 2010 +0300 @@ -0,0 +1,112 @@ +/* +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Defines the basic test step for the Software Component Registry test harness +* +*/ + +/** + @file + @internalComponent + @test +*/ +#ifndef APPREGINFOAPPARCSTEPS_H_ +#define APPREGINFOAPPARCSTEPS_H_ + +#include +#include + +using namespace Usif; + +class CScrApparcTestServer; + +_LIT(KScrApplicationRegistrationViewSubsessionStep,"ScrGetApplicationRegistrationView"); +_LIT(KScrMultipleSubsessionsForAppRegistryViewStep,"ScrMultipleSubsessionsForAppRegistryView"); + +class CScrGetApplicationRegistrationViewSubsessionStep : public COomTestStep +/** + TEF test step which exercises the SCR GetApplicationRegistrationView interface + */ + { +public: + CScrGetApplicationRegistrationViewSubsessionStep(); + ~CScrGetApplicationRegistrationViewSubsessionStep(); + + void MarkAsPerformanceStep(); + +protected: + void ImplTestStepPreambleL(); + void ImplTestStepL(); + void ImplTestStepPostambleL(); + + // Utility Functions + void PrintErrorL(const TDesC& aMsg, TInt aErrNum,...); + + static void GenerateIndexedAttributeNameL(TDes& aInitialAttributeName, TInt aIndex); + TBool GetUidFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUid& aUid); + // For reading data from ini file + Usif::CApplicationRegistrationData* GetAppRegInfoFromConfigLC(HBufC* aConfigSection = NULL); + void GetAppOwnedFilesL(RPointerArray& aOwnedFileArray, HBufC* aConfigSection = NULL); + void GetAppServiceInfoL(RPointerArray& aServiceInfoArray, HBufC* aConfigSection = NULL); + void GetAppLocalizableInfoL(RPointerArray& aLocalizableAppInfoArray, HBufC* aConfigSection = NULL); + void GetAppOpaqueDataInfoL(RPointerArray& aAppOpaqueDataInfoArray, HBufC* aConfigSection = NULL); + void GetServiceOpaqueDataInfoL(RPointerArray& aServiceOpaqueDataInfoArray, TInt aServiceOpaqueDataInfoCount, TInt aStartingIndex, HBufC* aConfigSection = NULL); + TBool Get64BitIntegerFromConfigL(const TDesC& aConfigKeyName, TInt64& aRetVal,HBufC* aConfigsection = NULL); + CPropertyEntry* GetPropertyFromConfigLC(TBool aIsSingle, TInt aIndex, TBool aSupportLocalized, HBufC* aConfigsection = NULL); + void GetAppPropertiesL(RPointerArray& aAppPropertyArray, TBool aSupportLocalized, HBufC* aConfigSection = NULL ); + void GetAppUidL(TUid& aAppUid, HBufC* aConfigsection = NULL); + + // For comparing data + TBool CompareApplicationRegistrationDataL(Usif::CApplicationRegistrationData *aActualData, Usif::CApplicationRegistrationData *aExpectedData); + TBool CompareFileOwnershipInfo(RPointerArray aActualData, RPointerArray aExpectedData); + TBool CompareServiceInfoL(RPointerArray aActualData, RPointerArray aExpectedData); + TBool CompareDataType(RPointerArray aActualData, RPointerArray aExpectedData); + TBool CompareLocalizableAppInfo(RPointerArray aActualData, RPointerArray aExpectedData); + TBool CompareCaptionandIconInfo(const CCaptionAndIconInfo* aActualData, const CCaptionAndIconInfo* aExpectedData); + TBool CompareViewData(RPointerArray aActualData, RPointerArray aExpectedData); + TBool CompareOpaqueDataL(RPointerArray aActualData, RPointerArray aExpectedData); + + void GetApplicationRegistrationDataFromConfigL(RPointerArray& aEntries); + + void StartTimer(); + void StopTimerAndPrintResultL(); + void PrintPerformanceLog(TTime aTime); + +protected: + Usif::RSoftwareComponentRegistry iScrSession; + TBool iIsPerformanceTest; + +private: + TTime iStartTime; + }; + + +class CScrMultipleSubsessionsForAppRegistryViewStep : public CScrGetApplicationRegistrationViewSubsessionStep +/** + TEF test step which exercises the SCR CScrAddConcurrentApplicationRegistrationViewEntryStep interface + */ + { +public: + CScrMultipleSubsessionsForAppRegistryViewStep(); + ~CScrMultipleSubsessionsForAppRegistryViewStep(); + +protected: + void ImplTestStepPreambleL(); + void ImplTestStepL(); + void ImplTestStepPostambleL(); + }; + +#endif /* APPREGINFOAPPARCSTEPS_H_ */ + +