commsprocess/commsrootserverconfig/TE_rootserver/inc/TestStepRootServer.h
changeset 72 ae47d0499bee
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 //
       
    15 // This contains CTestCaseRootServer which is the base class for all 
       
    16 // the ROOTSERVER suite test cases
       
    17 
       
    18 #if (!defined __ROOTSERVERTESTSTEP_H__)
       
    19 #define __ROOTSERVERTESTSTEP_H__
       
    20 
       
    21 // EPOC includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // RootServer includes
       
    25 #include <es_mbman.h>
       
    26 
       
    27 #include "RootServerTest.h"
       
    28 #include "TestAsynchHandler.h"
       
    29 #include <comms-infras/commsdebugutility.h>
       
    30 #include "rsshared.h"
       
    31 #include "cfshared.h"
       
    32 #include "c32cmiutils.h"
       
    33 #include "TE_RootServerServer.h"
       
    34 
       
    35 _LIT8(KModule1, "module1");
       
    36 _LIT8(KModule2, "module2");
       
    37 _LIT8(KSubModule1, "Test Protocol1");
       
    38 _LIT8(KSubModule2, "Test Protocol2");
       
    39 
       
    40 class CTE_RootServerServer;
       
    41 class CTestAsynchHandler;
       
    42 
       
    43 class CTestStepRootServer : public CTestStep
       
    44 {
       
    45 public:
       
    46 	CTestStepRootServer(CTE_RootServerServer *aSuite);
       
    47 	~CTestStepRootServer();
       
    48 
       
    49 	// config file access - RootServer specific
       
    50 
       
    51 
       
    52 	// override pre and post ambles
       
    53 	TVerdict doTestStepPreambleL( void );
       
    54 	TVerdict doTestStepPostambleL( void );
       
    55 
       
    56 	// global methods
       
    57 	void GetTestStepServerName(const TDesC &aNamePostFix, TDes &aServerName);
       
    58 
       
    59 
       
    60 	// pointer to suite which owns this test 
       
    61 	CTE_RootServerServer * iRootServerSuite;
       
    62 
       
    63 	// expected test server lifetime in microsecs
       
    64 	static const TInt isTestServerLifeTime;
       
    65 
       
    66 	// time to wait for all test servers to die
       
    67 	static const TInt isTestServerWaitTime;
       
    68 
       
    69 	// time to delay testserver statrup rendezvous when required
       
    70 	static const TInt isRendezvousDelayTime;
       
    71 
       
    72 	// Narrow-char overloads; would be better in base class
       
    73 	enum { EMaxLogLength = 256 };
       
    74 	void Log( TRefByValue<const TDesC8> aFormat, ... );
       
    75 	void Log( TInt aSeverity, TRefByValue<const TDesC8> aFormat, ... );
       
    76 	void LogExtra(const TText8* aFile, TInt aLine, TInt aSeverity,
       
    77 		TRefByValue<const TDesC8> aFmt,...);
       
    78 
       
    79 	// And forwards to the base class, since the narrow overloads mask the usual ones
       
    80 	void Log( TRefByValue<const TDesC16> aFormat, ... );
       
    81 	void Log( TInt aSeverity, TRefByValue<const TDesC16> aFormat, ... );
       
    82 	void LogExtra(const TText8* aFile, TInt aLine, TInt aSeverity,
       
    83 		TRefByValue<const TDesC> aFmt,...);
       
    84 
       
    85 protected:
       
    86 	void DefaultStartParams(RootServer::TRSStartModuleParams& aStartParams, TTestModuleIniData& iIniData);
       
    87 	void LoadNormalModuleL(CTestAsynchHandler* aHandler, const TDesC8& aModule, TThreadPriority aPriority = EPriorityNormal);
       
    88 	TInt TryHierachicalBind(CTestAsynchHandler* aHandler, 
       
    89 							const TDesC8& aTopModule, const TDesC8& aTopSubModule, 
       
    90 							const TDesC8& aBottomModule, const TDesC8& aBottomSubModule);
       
    91 
       
    92 private:
       
    93 
       
    94 };
       
    95 
       
    96 #endif /* __ROOTSERVERTESTSTEP_H__ */