sl@0
|
1 |
// Copyright (c) 2002-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 |
// e32test\debug\d_schedhook.h
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __D_SCHEDHOOK_H__
|
sl@0
|
19 |
#define __D_SCHEDHOOK_H__
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <e32cmn.h>
|
sl@0
|
22 |
#ifndef __KERNEL_MODE__
|
sl@0
|
23 |
#include <e32std.h>
|
sl@0
|
24 |
#endif
|
sl@0
|
25 |
#include <kernel/arm/arm_types.h>
|
sl@0
|
26 |
|
sl@0
|
27 |
class TCapsTestV01
|
sl@0
|
28 |
{
|
sl@0
|
29 |
public:
|
sl@0
|
30 |
TVersion iVersion;
|
sl@0
|
31 |
};
|
sl@0
|
32 |
|
sl@0
|
33 |
class RSchedhookTest : public RBusLogicalChannel
|
sl@0
|
34 |
{
|
sl@0
|
35 |
public:
|
sl@0
|
36 |
enum TControl
|
sl@0
|
37 |
{
|
sl@0
|
38 |
EInstall,
|
sl@0
|
39 |
EUninstall,
|
sl@0
|
40 |
EInsertHooks,
|
sl@0
|
41 |
ERemoveHooks,
|
sl@0
|
42 |
EEnableCallback,
|
sl@0
|
43 |
EDisableCallback,
|
sl@0
|
44 |
ESetTestThread,
|
sl@0
|
45 |
EGetTestCount,
|
sl@0
|
46 |
EGetThreadContext,
|
sl@0
|
47 |
};
|
sl@0
|
48 |
enum TRequest
|
sl@0
|
49 |
{
|
sl@0
|
50 |
};
|
sl@0
|
51 |
public:
|
sl@0
|
52 |
#ifndef __KERNEL_MODE__
|
sl@0
|
53 |
inline TInt Open();
|
sl@0
|
54 |
inline TInt Install();
|
sl@0
|
55 |
inline TInt Uninstall();
|
sl@0
|
56 |
inline TInt InsertHooks();
|
sl@0
|
57 |
inline TInt RemoveHooks();
|
sl@0
|
58 |
inline TInt EnableCallback();
|
sl@0
|
59 |
inline TInt DisableCallback();
|
sl@0
|
60 |
inline TInt SetTestThread(TThreadId aThreadId);
|
sl@0
|
61 |
inline TInt GetTestCount();
|
sl@0
|
62 |
inline TInt GetThreadContext(TThreadId aThreadId,TDes8& aContext);
|
sl@0
|
63 |
#endif
|
sl@0
|
64 |
};
|
sl@0
|
65 |
|
sl@0
|
66 |
#ifndef __KERNEL_MODE__
|
sl@0
|
67 |
inline TInt RSchedhookTest::Open()
|
sl@0
|
68 |
{ return DoCreate(_L("D_SCHEDHOOK"),TVersion(0,1,1),KNullUnit,NULL,NULL); }
|
sl@0
|
69 |
inline TInt RSchedhookTest::Install()
|
sl@0
|
70 |
{ return DoControl(EInstall); }
|
sl@0
|
71 |
inline TInt RSchedhookTest::Uninstall()
|
sl@0
|
72 |
{ return DoControl(EUninstall); }
|
sl@0
|
73 |
inline TInt RSchedhookTest::InsertHooks()
|
sl@0
|
74 |
{ return DoControl(EInsertHooks); }
|
sl@0
|
75 |
inline TInt RSchedhookTest::RemoveHooks()
|
sl@0
|
76 |
{ return DoControl(ERemoveHooks); }
|
sl@0
|
77 |
inline TInt RSchedhookTest::EnableCallback()
|
sl@0
|
78 |
{ return DoControl(EEnableCallback); }
|
sl@0
|
79 |
inline TInt RSchedhookTest::DisableCallback()
|
sl@0
|
80 |
{ return DoControl(EDisableCallback); }
|
sl@0
|
81 |
inline TInt RSchedhookTest::SetTestThread(TThreadId aThreadId)
|
sl@0
|
82 |
{ return DoControl(ESetTestThread,(TAny*)(TUint)aThreadId); }
|
sl@0
|
83 |
inline TInt RSchedhookTest::GetTestCount()
|
sl@0
|
84 |
{ return DoControl(EGetTestCount); }
|
sl@0
|
85 |
inline TInt RSchedhookTest::GetThreadContext(TThreadId aThreadId,TDes8& aContext)
|
sl@0
|
86 |
{ return DoControl(EGetThreadContext,(TAny*)(TUint)aThreadId,&aContext); }
|
sl@0
|
87 |
#endif
|
sl@0
|
88 |
|
sl@0
|
89 |
#endif
|
sl@0
|
90 |
|