os/kernelhwsrv/kerneltest/e32test/dll/d_ldrtst.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// f32test\loader\d_ldrtst.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef __D_LDRTST_H__
sl@0
    19
#define __D_LDRTST_H__
sl@0
    20
#include <e32ldr.h>
sl@0
    21
#include <e32ldr_private.h>
sl@0
    22
sl@0
    23
_LIT(KLdrTestLddName, "LdrTest");
sl@0
    24
sl@0
    25
sl@0
    26
#ifndef TMODULEHANDLE_DEFINED
sl@0
    27
#define TMODULEHANDLE_DEFINED
sl@0
    28
class TModuleHandle_dummy_class;
sl@0
    29
typedef TModuleHandle_dummy_class* TModuleHandle;
sl@0
    30
#endif
sl@0
    31
sl@0
    32
/**
sl@0
    33
@internalComponent
sl@0
    34
*/
sl@0
    35
class TCapsTestV01
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
	TVersion	iVersion;
sl@0
    39
	};
sl@0
    40
sl@0
    41
/**
sl@0
    42
@internalComponent
sl@0
    43
*/
sl@0
    44
class RLdrTest : public RBusLogicalChannel
sl@0
    45
	{
sl@0
    46
public:
sl@0
    47
	enum TControl
sl@0
    48
		{
sl@0
    49
		EControlGetCodeSegInfo,
sl@0
    50
		EControlProcessCodeSeg,
sl@0
    51
		EControlLibraryCodeSeg,
sl@0
    52
		EControlModuleCodeSeg,
sl@0
    53
		EControlGetCodeSegList,
sl@0
    54
		EControlCodeSegFromAddr,
sl@0
    55
		EControlModuleHandleFromAddr,
sl@0
    56
		EControlProcessSMPUnsafeCount,
sl@0
    57
		};
sl@0
    58
sl@0
    59
/**
sl@0
    60
@internalComponent
sl@0
    61
*/
sl@0
    62
	struct SEntry
sl@0
    63
		{
sl@0
    64
		TAny* iHandle;
sl@0
    65
		TUint32 iUid3;
sl@0
    66
		};
sl@0
    67
public:
sl@0
    68
	inline TInt Open();
sl@0
    69
	inline TInt GetCodeSegInfo(TAny* aHandle, TCodeSegCreateInfo& aInfo);
sl@0
    70
	inline TAny* ProcessCodeSeg(TInt aProcessHandle);
sl@0
    71
	inline TAny* LibraryCodeSeg(TInt aLibraryHandle);
sl@0
    72
	inline TAny* ModuleCodeSeg(TModuleHandle aModuleHandle);
sl@0
    73
	inline TInt GetCodeSegList(SEntry* aList, TInt aMax);
sl@0
    74
	inline TAny* CodeSegFromAddr(TLinAddr aAddr);
sl@0
    75
	inline TModuleHandle ModuleHandleFromAddr(TLinAddr aAddr);
sl@0
    76
	inline TInt ProcessSMPUnsafeCount(TInt aProcessHandle);
sl@0
    77
	};
sl@0
    78
sl@0
    79
#ifndef __KERNEL_MODE__
sl@0
    80
inline TInt RLdrTest::Open()
sl@0
    81
	{ return DoCreate(KLdrTestLddName, TVersion(0,1,1), KNullUnit, NULL, NULL); }
sl@0
    82
inline TInt RLdrTest::GetCodeSegInfo(TAny* aHandle, TCodeSegCreateInfo& aInfo)
sl@0
    83
	{ return DoControl(EControlGetCodeSegInfo, aHandle, &aInfo); }
sl@0
    84
inline TAny* RLdrTest::ProcessCodeSeg(TInt aProcessHandle)
sl@0
    85
	{ return (TAny*)DoControl(EControlProcessCodeSeg, (TAny*)aProcessHandle); }
sl@0
    86
inline TAny* RLdrTest::LibraryCodeSeg(TInt aLibraryHandle)
sl@0
    87
	{ return (TAny*)DoControl(EControlLibraryCodeSeg, (TAny*)aLibraryHandle); }
sl@0
    88
inline TAny* RLdrTest::ModuleCodeSeg(TModuleHandle aModuleHandle)
sl@0
    89
	{ return (TAny*)DoControl(EControlModuleCodeSeg, (TAny*)aModuleHandle); }
sl@0
    90
inline TInt RLdrTest::GetCodeSegList(SEntry* aList, TInt aMax)
sl@0
    91
	{ return DoControl(EControlGetCodeSegList, aList, (TAny*)aMax); }
sl@0
    92
inline TAny* RLdrTest::CodeSegFromAddr(TLinAddr aAddr)
sl@0
    93
	{ return (TAny*)DoControl(EControlCodeSegFromAddr, (TAny*)aAddr); }
sl@0
    94
inline TModuleHandle RLdrTest::ModuleHandleFromAddr(TLinAddr aAddr)
sl@0
    95
	{ return (TModuleHandle)DoControl(EControlModuleHandleFromAddr, (TAny*)aAddr); }
sl@0
    96
inline TInt RLdrTest::ProcessSMPUnsafeCount(TInt aProcessHandle)
sl@0
    97
	{ return DoControl(EControlProcessSMPUnsafeCount, (TAny*)aProcessHandle); }
sl@0
    98
#endif
sl@0
    99
sl@0
   100
#endif
sl@0
   101