epoc32/include/test/testexecuteserverbase.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h) This is the epoc32/include tree with the "platform" subtrees removed, and all but a selected few mbg and rsg files removed.

/*
* 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
* which accompanies this distribution, and is available
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* This contains CTestServer which is the base class for all test servers
*
*/


/**
 @file TestExecuteServerBase.h
*/
#if (!defined __TESTEXECUTE_SERVER_BASE_H__)
#define __TESTEXECUTE_SERVER_BASE_H__

#include <e32base.h>
#include <test/testexecutestepbase.h>

class CTestServer : public CServer2
/**
@publishedPartner
@test
*/
	{
public:
	IMPORT_C virtual ~CTestServer();
	IMPORT_C CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
	IMPORT_C virtual void ConstructL(const TDesC& aName);
	void StartLoggerL();

	/**
	 * Creates the test step.
	 *
	 * @param aStepName - test step name to run.
	 *
	 * @return - A CTestStep derived instance
	 */
	virtual CTestStep* CreateTestStep(const TDesC& aStepName) = 0;

	void SessionClosed();
	TInt64& RandSeed() {return iSeed;};
	inline CTestExecuteLogger& Logger() {return iLogger;};
	inline const TDesC& Name() const {return iServerName;};
	inline TBool LoggerStarted() { return iLoggerStarted; };
protected:
	IMPORT_C CTestServer();
	inline void IncSessionCount() {++iSessionCount;};
protected:
private:
	TInt64	iSeed;
	TInt	iSessionCount;
	CTestExecuteLogger iLogger;
	TBool iLoggerStarted;
	TBuf<KMaxTestExecuteNameLength> iServerName;
	};

#endif