sl@0: /* sl@0: * Copyright (c) 2007-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 TUPSPLUGINS_H sl@0: #define TUPSPLUGINS_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #include "activewaiter.h" sl@0: #include "pluginmanager.h" sl@0: #include "policycache.h" sl@0: #include "util.h" sl@0: sl@0: class CTestPlugins : public CActiveTestFixture, public MActiveWaiterObserver sl@0: { sl@0: public: sl@0: // From CTestFixture sl@0: void SetupL(); sl@0: void TearDownL(); sl@0: sl@0: // Implement MActiveWaiterObserver sl@0: void DoCancel(); sl@0: sl@0: // Policy Evaluator Unit Test sl@0: void TestCacheL(); sl@0: void TestPluginManagerL(); sl@0: void TestLengthsL(); sl@0: void TestOOML(); sl@0: sl@0: // Create a suite of all the tests sl@0: static CTestSuite* CreateSuiteL(const TDesC& aName); sl@0: sl@0: private: sl@0: class TExpectedValue sl@0: { sl@0: public: sl@0: TInt iFlags; sl@0: TInt iMajorVersion; sl@0: TInt iMinorVersion; sl@0: TInt iPolicyEvaluator; sl@0: TBool iSilent; sl@0: TBuf8<32> iClientEntity; sl@0: }; sl@0: sl@0: TBool DoRequestL(const TExpectedValue& aExpected, const UserPromptService::CPromptRequest& aRequest); sl@0: TBool DoOomRequestL(const TExpectedValue& aExpected, const UserPromptService::CPromptRequest& aRequest); sl@0: sl@0: UserPromptService::CPromptRequest* GetRequestParamsLC(const TDesC& aSection, const TDesC8& aClientEntity); sl@0: void GetResponseL(const TDesC& aSection); sl@0: TBool CheckPolicyL(const TExpectedValue& aExpected, const UserPromptService::CPolicy* aPolicy); sl@0: void GetExpectedValuesL(const TDesC& aSection); sl@0: void LoadTestDataL(TInt aNumRequests); sl@0: sl@0: UserPromptService::CPolicy::TOptions iResponse; sl@0: UserPromptService::CDecisionRecord* iDecisionRecord; sl@0: sl@0: CActiveWaiter* iActiveWaiter; sl@0: TInt iExpectedError; sl@0: RFs iFs; sl@0: RPointerArray iRequests; sl@0: RPointerArray iExpectedValues; sl@0: TBool iOom; ///< Whether an OOM test is running sl@0: TBool iInteractive; ///< Whether to display the techview dialog sl@0: }; sl@0: sl@0: #endif // TUPSPLUGINS_H sl@0: