testexecfw/stf/stfext/testmodules/teftestmod/teftestmodulefw/utils/inc/testserver2.h
changeset 2 8bb370ba6d1d
equal deleted inserted replaced
1:bbd31066657e 2:8bb370ba6d1d
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 * @file
       
    16 * This contains TestServer2.h
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __TEST_SERVER_2_H__
       
    23 #define __TEST_SERVER_2_H__
       
    24 
       
    25 #include <test/testexecuteserverbase.h>
       
    26 #include <test/blockitems.h>
       
    27 #include <test/activecallback.h>
       
    28 #include <test/testblockcontroller.h>
       
    29 #include <test/datadictionary.h>
       
    30 
       
    31 class CTestServer2 : public CTestServer, public MSharedData
       
    32 /**
       
    33  * @publishedPartner
       
    34  * @test
       
    35  *
       
    36  * @see		CTestServer
       
    37  * @see		MSharedData
       
    38  *
       
    39  * Test server that includes test block processing
       
    40  */
       
    41 	{
       
    42 private:
       
    43 	struct TDataElement
       
    44 		{
       
    45 		TAny*				iAny;
       
    46 		TCleanupOperation	iCleanupOperation;
       
    47 		};
       
    48 	typedef RHashMap<TDataDictionaryName, TDataElement>		RDataStore;
       
    49 	typedef THashMapIter<TDataDictionaryName, TDataElement>	TDataIter;
       
    50 
       
    51 public:
       
    52 	IMPORT_C				CTestServer2();
       
    53 	IMPORT_C virtual		~CTestServer2();
       
    54 	IMPORT_C void			ConstructL();
       
    55 
       
    56 	/**
       
    57 	 * Create a test block
       
    58 	 *
       
    59 	 * @see		CTestBlockController
       
    60 	 */
       
    61 	IMPORT_C virtual CTestBlockController*	CreateTestBlock() =0;
       
    62 
       
    63 	// CTestServer implementation
       
    64 	IMPORT_C virtual CTestStep*				CreateTestStep(const TDesC& aStepName);
       
    65 
       
    66 	// MSharedData implementation
       
    67 	IMPORT_C virtual void	CreateActiveSchedulerL();
       
    68 	IMPORT_C virtual void	DeleteActiveSchedulerL();
       
    69 	IMPORT_C virtual TAny*	GetObjectAndOwnL(const TDesC& aName);
       
    70 	IMPORT_C virtual void	PutAndDisownL(const TDesC& aName, TAny* aAny, TCleanupOperation aCleanupOperation);
       
    71 
       
    72 private:
       
    73 	static TUint32	Hash(const TDataDictionaryName& aName);
       
    74 	static TBool	Identity(const TDataDictionaryName& aName1, const TDataDictionaryName& aName2);
       
    75 
       
    76 private:
       
    77 	RDataStore			iStore;
       
    78 	CActiveScheduler*	iActiveScheduler;
       
    79 	};
       
    80 
       
    81 #endif // __TEST_SERVER_2_H__