author | Pat Downey <patd@symbian.org> |
Wed, 01 Sep 2010 12:34:56 +0100 | |
branch | RCL_3 |
changeset 44 | 3e88ff8f41d5 |
parent 6 | 0173bcd7697c |
permissions | -rw-r--r-- |
0 | 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". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// f32test\loader\d_ldrtst.h |
|
15 |
// |
|
16 |
// |
|
17 |
||
18 |
#ifndef __D_LDRTST_H__ |
|
19 |
#define __D_LDRTST_H__ |
|
20 |
#include <e32ldr.h> |
|
6
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
21 |
#include <e32ldr_private.h> |
0 | 22 |
|
23 |
_LIT(KLdrTestLddName, "LdrTest"); |
|
24 |
||
25 |
||
26 |
#ifndef TMODULEHANDLE_DEFINED |
|
27 |
#define TMODULEHANDLE_DEFINED |
|
28 |
class TModuleHandle_dummy_class; |
|
29 |
typedef TModuleHandle_dummy_class* TModuleHandle; |
|
30 |
#endif |
|
31 |
||
32 |
/** |
|
33 |
@internalComponent |
|
34 |
*/ |
|
35 |
class TCapsTestV01 |
|
36 |
{ |
|
37 |
public: |
|
38 |
TVersion iVersion; |
|
39 |
}; |
|
40 |
||
41 |
/** |
|
42 |
@internalComponent |
|
43 |
*/ |
|
44 |
class RLdrTest : public RBusLogicalChannel |
|
45 |
{ |
|
46 |
public: |
|
47 |
enum TControl |
|
48 |
{ |
|
49 |
EControlGetCodeSegInfo, |
|
50 |
EControlProcessCodeSeg, |
|
51 |
EControlLibraryCodeSeg, |
|
52 |
EControlModuleCodeSeg, |
|
53 |
EControlGetCodeSegList, |
|
54 |
EControlCodeSegFromAddr, |
|
55 |
EControlModuleHandleFromAddr, |
|
56 |
EControlProcessSMPUnsafeCount, |
|
57 |
}; |
|
58 |
||
59 |
/** |
|
60 |
@internalComponent |
|
61 |
*/ |
|
62 |
struct SEntry |
|
63 |
{ |
|
64 |
TAny* iHandle; |
|
65 |
TUint32 iUid3; |
|
66 |
}; |
|
67 |
public: |
|
68 |
inline TInt Open(); |
|
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); |
|
77 |
}; |
|
78 |
||
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); } |
|
98 |
#endif |
|
99 |
||
100 |
#endif |
|
101 |