Update contrib.
1 // Copyright (c) 1998-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32test\loader\d_ldrtst.h
18 #ifndef __D_LDRTST_H__
19 #define __D_LDRTST_H__
21 #include <e32ldr_private.h>
23 _LIT(KLdrTestLddName, "LdrTest");
26 #ifndef TMODULEHANDLE_DEFINED
27 #define TMODULEHANDLE_DEFINED
28 class TModuleHandle_dummy_class;
29 typedef TModuleHandle_dummy_class* TModuleHandle;
44 class RLdrTest : public RBusLogicalChannel
49 EControlGetCodeSegInfo,
50 EControlProcessCodeSeg,
51 EControlLibraryCodeSeg,
52 EControlModuleCodeSeg,
53 EControlGetCodeSegList,
54 EControlCodeSegFromAddr,
55 EControlModuleHandleFromAddr,
56 EControlProcessSMPUnsafeCount,
69 inline TInt GetCodeSegInfo(TAny* aHandle, TCodeSegCreateInfo& aInfo);
70 inline TAny* ProcessCodeSeg(TInt aProcessHandle);
71 inline TAny* LibraryCodeSeg(TInt aLibraryHandle);
72 inline TAny* ModuleCodeSeg(TModuleHandle aModuleHandle);
73 inline TInt GetCodeSegList(SEntry* aList, TInt aMax);
74 inline TAny* CodeSegFromAddr(TLinAddr aAddr);
75 inline TModuleHandle ModuleHandleFromAddr(TLinAddr aAddr);
76 inline TInt ProcessSMPUnsafeCount(TInt aProcessHandle);
79 #ifndef __KERNEL_MODE__
80 inline TInt RLdrTest::Open()
81 { return DoCreate(KLdrTestLddName, TVersion(0,1,1), KNullUnit, NULL, NULL); }
82 inline TInt RLdrTest::GetCodeSegInfo(TAny* aHandle, TCodeSegCreateInfo& aInfo)
83 { return DoControl(EControlGetCodeSegInfo, aHandle, &aInfo); }
84 inline TAny* RLdrTest::ProcessCodeSeg(TInt aProcessHandle)
85 { return (TAny*)DoControl(EControlProcessCodeSeg, (TAny*)aProcessHandle); }
86 inline TAny* RLdrTest::LibraryCodeSeg(TInt aLibraryHandle)
87 { return (TAny*)DoControl(EControlLibraryCodeSeg, (TAny*)aLibraryHandle); }
88 inline TAny* RLdrTest::ModuleCodeSeg(TModuleHandle aModuleHandle)
89 { return (TAny*)DoControl(EControlModuleCodeSeg, (TAny*)aModuleHandle); }
90 inline TInt RLdrTest::GetCodeSegList(SEntry* aList, TInt aMax)
91 { return DoControl(EControlGetCodeSegList, aList, (TAny*)aMax); }
92 inline TAny* RLdrTest::CodeSegFromAddr(TLinAddr aAddr)
93 { return (TAny*)DoControl(EControlCodeSegFromAddr, (TAny*)aAddr); }
94 inline TModuleHandle RLdrTest::ModuleHandleFromAddr(TLinAddr aAddr)
95 { return (TModuleHandle)DoControl(EControlModuleHandleFromAddr, (TAny*)aAddr); }
96 inline TInt RLdrTest::ProcessSMPUnsafeCount(TInt aProcessHandle)
97 { return DoControl(EControlProcessSMPUnsafeCount, (TAny*)aProcessHandle); }