diff -r 000000000000 -r 3553901f7fa8 telephonyserverplugins/simtsy/test/Te_Sim/Te_SimTestStepBase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/telephonyserverplugins/simtsy/test/Te_Sim/Te_SimTestStepBase.h Tue Feb 02 01:41:59 2010 +0200 @@ -0,0 +1,130 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "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: +// + +#ifndef __TE_SIM_TESTSTEP_BASE__ +#define __TE_SIM_TESTSTEP_BASE__ + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "SimTsy.h" +#include +#include "Te_SimConstants.h" +#include "Simlog.h" + + +class CTestConfig; +class CTestConfigSection; +class CSimPhone; + +#define CHECKPOINTL(code,expected,msg){\ + if((code)!=(expected)){\ + INFO_PRINTF1(msg);\ + SetTestStepResult(EFail);\ + User::Leave(KErrGeneral);\ + }\ + } +#define CHECKPOINT_EXL(boolexpr,msg){\ + if(!(boolexpr)){\ + INFO_PRINTF1(msg);\ + SetTestStepResult(EFail);\ + User::Leave(KErrGeneral);\ + }\ + } + +_LIT(KSimtsyName,"SIM"); + +class CSimTestsTestStepBase : public CTestStep + { +public: + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + +protected: + void SetTestNumberL(TInt aTestNumber); + void CreateConfigFileL(const TDesC& aConfigFileName); + void DeleteConfigFileL(); + +protected: + RTelServer iTelServer; + RMobilePhone iPhone; + +private: + CActiveScheduler* iActiveScheduler; + }; + +class CPhBkAndPacketTestsTestStepBase : public CTestStep + { +public: + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + +protected: + void SetTestNumberL(TInt aTestNumber); + void CreateConfigFileL(const TDesC& aConfigFileName); + void WaitWithTimeout(TRequestStatus& aStatus, TInt aNumberOfMicroSeconds); + void SignalSimTsyToReduceTimerL(TInt aTimerEventId = ETimerIdAllTimers); + +protected: + RTelServer iTelServer; + RMobilePhone iPhone; + }; + +class CSimUSimRel6TestsTestStepBase : public CTestStep + { +public: + virtual TVerdict doTestStepPreambleL(); + virtual TVerdict doTestStepPostambleL(); + const CTestConfigSection* CfgFile(); // < Accessor function for the configuration file. + const CTestConfigSection* DefaultCfgFile(); // < Accessor function for the default configuration file. + void TestSmartCardAuthenticate(); +protected: + void SetTestNumberL(TInt aTestNumber); + void CreateConfigFileL(const TDesC& aConfigFileName); + void DeleteConfigFileL(); + +protected: + RTelServer iTelServer; + +public: + CActiveScheduler* iActiveScheduler; + RMobilePhone iPhone; + RFs iFs; //< Connection to file server for config file access + CTestConfig* iConfigFile; //< Pointer to the Configuration file reader + TBuf8 iSectionName; + CArrayFixFlat* iMessageWaiting; //< Array containing the Message Waiting Indicators + CArrayFixFlat* iVoiceMailIds; //< Array containing MailBox Numbers + CArrayFixFlat* iWlanData; //< Array containing Wlan Data. + CArrayFixFlat* iWlanSid; + CArrayFixFlat* iPreferredNetworks; + CMobilePhoneStoredWlanSIDList* iWlanList; + CMobilePhoneStoredNetworkList* iNetworkList; + }; + +#endif // __TE_SIM_TESTSTEP_BASE__