debugsrv/runmodedebug/rmdebug_test/rm_debug/multi_target_tests/t_multi_target.h
author hgs
Fri, 27 Aug 2010 11:37:29 +0300
changeset 42 0ff24a8f6ca2
permissions -rw-r--r--
201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42
hgs
parents:
diff changeset
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     2
// All rights reserved.
hgs
parents:
diff changeset
     3
// This component and the accompanying materials are made available
hgs
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     5
// which accompanies this distribution, and is available
hgs
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     7
//
hgs
parents:
diff changeset
     8
// Initial Contributors:
hgs
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    10
//
hgs
parents:
diff changeset
    11
// Contributors:
hgs
parents:
diff changeset
    12
//
hgs
parents:
diff changeset
    13
// Description:
hgs
parents:
diff changeset
    14
// Definitions for the run mode debug tests
hgs
parents:
diff changeset
    15
// 
hgs
parents:
diff changeset
    16
//
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
/**
hgs
parents:
diff changeset
    19
 @file
hgs
parents:
diff changeset
    20
 @internalTechnology
hgs
parents:
diff changeset
    21
 @released
hgs
parents:
diff changeset
    22
*/
hgs
parents:
diff changeset
    23
hgs
parents:
diff changeset
    24
#ifndef RMDEBUG_MULTI_TARGET_H
hgs
parents:
diff changeset
    25
#define RMDEBUG_MULTI_TARGET_H
hgs
parents:
diff changeset
    26
hgs
parents:
diff changeset
    27
#include "t_rmdebug_app.h"
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
#include <rm_debug_api.h>
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
class CMultiTargetAgent;
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
//
hgs
parents:
diff changeset
    34
// class CRunModeAgent
hgs
parents:
diff changeset
    35
//
hgs
parents:
diff changeset
    36
// The basic run mode agent.
hgs
parents:
diff changeset
    37
//
hgs
parents:
diff changeset
    38
class CMultiTargetAgent : public CBase
hgs
parents:
diff changeset
    39
	{
hgs
parents:
diff changeset
    40
public:
hgs
parents:
diff changeset
    41
	static CMultiTargetAgent* NewL();
hgs
parents:
diff changeset
    42
	~CMultiTargetAgent();
hgs
parents:
diff changeset
    43
	void ClientAppL();
hgs
parents:
diff changeset
    44
	
hgs
parents:
diff changeset
    45
    TInt LaunchProcess(RProcess& aProcess, TDesC & aExeName, TDesC & aCommandLine );
hgs
parents:
diff changeset
    46
    
hgs
parents:
diff changeset
    47
private:
hgs
parents:
diff changeset
    48
	CMultiTargetAgent();
hgs
parents:
diff changeset
    49
	void ConstructL();
hgs
parents:
diff changeset
    50
hgs
parents:
diff changeset
    51
	void ReportPerformance(void);
hgs
parents:
diff changeset
    52
hgs
parents:
diff changeset
    53
	TInt HelpTicksPerSecond(void);
hgs
parents:
diff changeset
    54
hgs
parents:
diff changeset
    55
	enum TTestMode 
hgs
parents:
diff changeset
    56
		{
hgs
parents:
diff changeset
    57
		//run all the tests
hgs
parents:
diff changeset
    58
		EModeAll = 1<<0,
hgs
parents:
diff changeset
    59
		//run the specified tests in reverse order
hgs
parents:
diff changeset
    60
		EModeReverse = 1<<1,
hgs
parents:
diff changeset
    61
		//print out help
hgs
parents:
diff changeset
    62
		EModeHelp = 1<<2,
hgs
parents:
diff changeset
    63
		//print out help
hgs
parents:
diff changeset
    64
		EModeVersion = 1<<3
hgs
parents:
diff changeset
    65
		};
hgs
parents:
diff changeset
    66
	
hgs
parents:
diff changeset
    67
	TInt LaunchTargetsInOrderL();
hgs
parents:
diff changeset
    68
	void SetupDebugServerL();
hgs
parents:
diff changeset
    69
hgs
parents:
diff changeset
    70
private:
hgs
parents:
diff changeset
    71
hgs
parents:
diff changeset
    72
#if defined(KERNEL_OOM_TESTING)
hgs
parents:
diff changeset
    73
	RKernelLowMemorySecuritySvrSession iServSession;
hgs
parents:
diff changeset
    74
#elif defined (USER_OOM_TESTING)
hgs
parents:
diff changeset
    75
	RUserLowMemorySecuritySvrSession iServSession;
hgs
parents:
diff changeset
    76
#else
hgs
parents:
diff changeset
    77
	Debug::RSecuritySvrSession iServSession;
hgs
parents:
diff changeset
    78
#endif
hgs
parents:
diff changeset
    79
	RSemaphore iAddressGlobSem;
hgs
parents:
diff changeset
    80
hgs
parents:
diff changeset
    81
	TUid iMySid;
hgs
parents:
diff changeset
    82
hgs
parents:
diff changeset
    83
	// Timing information
hgs
parents:
diff changeset
    84
	TInt iStartTick;
hgs
parents:
diff changeset
    85
	TInt iStopTick;
hgs
parents:
diff changeset
    86
hgs
parents:
diff changeset
    87
	RArray<RBuf> iTargets;
hgs
parents:
diff changeset
    88
  TRequestStatus iStatus;
hgs
parents:
diff changeset
    89
  Debug::TEventInfo iEventInfo;
hgs
parents:
diff changeset
    90
  TPtr8 iEventPtr;
hgs
parents:
diff changeset
    91
	};
hgs
parents:
diff changeset
    92
hgs
parents:
diff changeset
    93
#endif // RMDEBUG_MULTI_TARGET_H