231
|
1 |
// Copyright (c) 2010 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 |
// e32test\system\d_khal.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#if !defined(__D_KHAL_H__)
|
|
19 |
#define __D_KHAL_H__
|
|
20 |
|
|
21 |
#include <e32cmn.h>
|
|
22 |
#ifndef __KERNEL_MODE__
|
|
23 |
#include <e32std.h>
|
|
24 |
#endif
|
|
25 |
|
|
26 |
_LIT(KLddName,"D_KHAL.LDD");
|
|
27 |
|
|
28 |
class RLddKHalTest : public RBusLogicalChannel
|
|
29 |
{
|
|
30 |
public:
|
|
31 |
|
|
32 |
enum TControl
|
|
33 |
{
|
|
34 |
EAddHalEntryDevice0 = 1,
|
|
35 |
EAddHalEntryDeviceX,
|
|
36 |
EAddHalEntryForExistingFixed,
|
|
37 |
ERemoveHalEntryDevice0,
|
|
38 |
ERemoveHalEntryDeviceX,
|
|
39 |
ERemoveHalEntryExistingFixed,
|
|
40 |
EGetRegisteredDeviceNumber,
|
|
41 |
EFindHalEntryDevice0,
|
|
42 |
EFindHalEntryDevice0Other,
|
|
43 |
EFindHalEntryDeviceX
|
|
44 |
};
|
|
45 |
|
|
46 |
enum THalFunc
|
|
47 |
{
|
|
48 |
ETestHalFunc
|
|
49 |
};
|
|
50 |
|
|
51 |
public:
|
|
52 |
inline TInt Open();
|
|
53 |
inline TInt AddHalEntryDevice0();
|
|
54 |
inline TInt AddHalEntryDeviceX();
|
|
55 |
inline TInt AddHalEntryForExistingFixed();
|
|
56 |
inline TInt RemoveHalEntryDevice0();
|
|
57 |
inline TInt RemoveHalEntryDeviceX();
|
|
58 |
inline TInt RemoveHalEntryExistingFixed();
|
|
59 |
inline TInt GetRegisteredDeviceNumber();
|
|
60 |
inline TInt FindHalEntryDevice0();
|
|
61 |
inline TInt FindHalEntryDevice0Other();
|
|
62 |
inline TInt FindHalEntryDeviceX();
|
|
63 |
};
|
|
64 |
|
|
65 |
|
|
66 |
#ifndef __KERNEL_MODE__
|
|
67 |
inline TInt RLddKHalTest::Open()
|
|
68 |
{
|
|
69 |
return DoCreate(KLddName,TVersion(0,1,0),KNullUnit,NULL,NULL);
|
|
70 |
}
|
|
71 |
|
|
72 |
inline TInt RLddKHalTest::AddHalEntryDevice0()
|
|
73 |
{
|
|
74 |
return DoControl(EAddHalEntryDevice0);
|
|
75 |
}
|
|
76 |
|
|
77 |
inline TInt RLddKHalTest::AddHalEntryDeviceX()
|
|
78 |
{
|
|
79 |
return DoControl(EAddHalEntryDeviceX);
|
|
80 |
}
|
|
81 |
|
|
82 |
inline TInt RLddKHalTest::AddHalEntryForExistingFixed()
|
|
83 |
{
|
|
84 |
return DoControl(EAddHalEntryForExistingFixed);
|
|
85 |
}
|
|
86 |
|
|
87 |
inline TInt RLddKHalTest::RemoveHalEntryDevice0()
|
|
88 |
{
|
|
89 |
return DoControl(ERemoveHalEntryDevice0);
|
|
90 |
}
|
|
91 |
|
|
92 |
inline TInt RLddKHalTest::RemoveHalEntryDeviceX()
|
|
93 |
{
|
|
94 |
return DoControl(ERemoveHalEntryDeviceX);
|
|
95 |
}
|
|
96 |
|
|
97 |
inline TInt RLddKHalTest::RemoveHalEntryExistingFixed()
|
|
98 |
{
|
|
99 |
return DoControl(ERemoveHalEntryExistingFixed);
|
|
100 |
}
|
|
101 |
|
|
102 |
inline TInt RLddKHalTest::GetRegisteredDeviceNumber()
|
|
103 |
{
|
|
104 |
return DoControl(EGetRegisteredDeviceNumber);
|
|
105 |
}
|
|
106 |
|
|
107 |
inline TInt RLddKHalTest::FindHalEntryDevice0()
|
|
108 |
{
|
|
109 |
return DoControl(EFindHalEntryDevice0);
|
|
110 |
}
|
|
111 |
|
|
112 |
inline TInt RLddKHalTest::FindHalEntryDevice0Other()
|
|
113 |
{
|
|
114 |
return DoControl(EFindHalEntryDevice0Other);
|
|
115 |
}
|
|
116 |
|
|
117 |
inline TInt RLddKHalTest::FindHalEntryDeviceX()
|
|
118 |
{
|
|
119 |
return DoControl(EFindHalEntryDeviceX);
|
|
120 |
}
|
|
121 |
#endif //__KERNEL_MODE__
|
|
122 |
|
|
123 |
#endif //__D_KHAL_H__
|