commsprocess/commsrootserverconfig/ts_rootserver/TestStepRootServer.h
changeset 72 ae47d0499bee
parent 68 5da8188e392b
child 77 c9776eadbffd
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This contains CTestCaseRootServer which is the base class for all 
       
    15 // the ROOTSERVER suite test cases
       
    16 // 
       
    17 //
       
    18 
       
    19 #if (!defined __ROOTSERVERTESTSTEP_H__)
       
    20 #define __ROOTSERVERTESTSTEP_H__
       
    21 
       
    22 #include "RootServerTest.h"
       
    23 #include <rsshared.h>
       
    24 
       
    25 _LIT8(KModule1, "module1");
       
    26 _LIT8(KModule2, "module2");
       
    27 _LIT8(KSubModule1, "Test Protocol1");
       
    28 _LIT8(KSubModule2, "Test Protocol2");
       
    29 
       
    30 class CTestSuiteRootServer;
       
    31 class CTestAsynchHandler;
       
    32 
       
    33 class CTestStepRootServer : public CTestStep
       
    34 {
       
    35 public:
       
    36 	CTestStepRootServer();
       
    37 	~CTestStepRootServer();
       
    38 
       
    39 	// config file access - RootServer specific
       
    40 
       
    41 
       
    42 	// override pre and post ambles
       
    43 	TVerdict doTestStepPreambleL( void );
       
    44 	TVerdict doTestStepPostambleL( void );
       
    45 
       
    46 	// global methods
       
    47 	void GetTestStepServerName(const TDesC &aNamePostFix, TDes &aServerName);
       
    48 
       
    49 
       
    50 	// pointer to suite which owns this test 
       
    51 	CTestSuiteRootServer * iRootServerSuite;
       
    52 
       
    53 	// expected test server lifetime in microsecs
       
    54 	static const TInt isTestServerLifeTime;
       
    55 
       
    56 	// time to wait for all test servers to die
       
    57 	static const TInt isTestServerWaitTime;
       
    58 
       
    59 	// time to delay testserver statrup rendezvous when required
       
    60 	static const TInt isRendezvousDelayTime;
       
    61 
       
    62 	// Narrow-char overloads; would be better in base class
       
    63 	enum { EMaxLogLength = 256 };
       
    64 	void Log( TRefByValue<const TDesC8> aFormat, ... );
       
    65 	void Log( TInt aSeverity, TRefByValue<const TDesC8> aFormat, ... );
       
    66 	void LogExtra(const TText8* aFile, TInt aLine, TInt aSeverity,
       
    67 		TRefByValue<const TDesC8> aFmt,...);
       
    68 
       
    69 	// And forwards to the base class, since the narrow overloads mask the usual ones
       
    70 	void Log( TRefByValue<const TDesC16> aFormat, ... );
       
    71 	void Log( TInt aSeverity, TRefByValue<const TDesC16> aFormat, ... );
       
    72 	void LogExtra(const TText8* aFile, TInt aLine, TInt aSeverity,
       
    73 		TRefByValue<const TDesC> aFmt,...);
       
    74 
       
    75 protected:
       
    76 	void DefaultStartParams(RootServer::TRSStartModuleParams& aStartParams, TTestModuleIniData& iIniData);
       
    77 	void LoadNormalModuleL(CTestAsynchHandler* aHandler, const TDesC8& aModule, TThreadPriority aPriority = EPriorityNormal);
       
    78 	TInt TryHierachicalBind(CTestAsynchHandler* aHandler, 
       
    79 							const TDesC8& aTopModule, const TDesC8& aTopSubModule, 
       
    80 							const TDesC8& aBottomModule, const TDesC8& aBottomSubModule);
       
    81 
       
    82 private:
       
    83 
       
    84 };
       
    85 
       
    86 #endif /* __ROOTSERVERTESTSTEP_H__ */
       
    87