56
|
1 |
// Copyright (c) 2006-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 "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\debug\d_tracecore.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#ifndef D_TRACECORE_H
|
|
19 |
#define D_TRACECORE_H
|
|
20 |
|
|
21 |
#include <e32cmn.h>
|
|
22 |
#include <e32ver.h>
|
|
23 |
#ifndef __KERNEL_MODE__
|
|
24 |
#include <e32std.h>
|
|
25 |
#include <e32debug.h>
|
|
26 |
#endif
|
|
27 |
|
|
28 |
/**
|
|
29 |
|
|
30 |
TcDriverParameters
|
|
31 |
|
|
32 |
Parameters for activation/notification requests
|
|
33 |
|
|
34 |
*/
|
|
35 |
class TcDriverParameters
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
TUint32 iComponentId;
|
|
39 |
TUint32 iGroupId;
|
|
40 |
};
|
|
41 |
|
|
42 |
/**
|
|
43 |
Interface to the trace activation/deactivation mechanism
|
|
44 |
*/
|
|
45 |
class RTraceCoreTest : public RBusLogicalChannel
|
|
46 |
{
|
|
47 |
public:
|
|
48 |
|
|
49 |
enum TControl
|
|
50 |
{
|
|
51 |
EActivateTrace
|
|
52 |
, EDeactivateTrace
|
|
53 |
, ERefreshActivations
|
|
54 |
, ERequestTraceData
|
|
55 |
, EValidateFilterSync
|
|
56 |
, EDropNextTrace
|
|
57 |
, ERegisterActivationNotification
|
|
58 |
, ECheckActivationNotificationOk
|
|
59 |
};
|
|
60 |
|
|
61 |
#ifndef __KERNEL_MODE__
|
|
62 |
inline TInt Open()
|
|
63 |
{
|
|
64 |
return DoCreate(Name(),TVersion(0,1,1),KNullUnit,NULL,NULL,EOwnerThread);
|
|
65 |
}
|
|
66 |
|
|
67 |
inline TInt ActivateTrace(const TcDriverParameters& aDriverParameters, TInt aNumTraces=1)
|
|
68 |
{
|
|
69 |
return DoControl( EActivateTrace, (TAny*) &aDriverParameters, (TAny*)(aNumTraces));
|
|
70 |
}
|
|
71 |
|
|
72 |
inline TInt DeactivateTrace(const TcDriverParameters& aDriverParameters, TInt aNumTraces=1)
|
|
73 |
{
|
|
74 |
return DoControl( EDeactivateTrace, (TAny*) &aDriverParameters, (TAny*)(aNumTraces) );
|
|
75 |
}
|
|
76 |
|
|
77 |
inline TInt RefreshActivations()
|
|
78 |
{
|
|
79 |
return DoControl( ERefreshActivations );
|
|
80 |
}
|
|
81 |
|
|
82 |
inline TInt ValidateFilterSync(const TcDriverParameters& aParams)
|
|
83 |
{
|
|
84 |
return DoControl( EValidateFilterSync, (TAny*)&aParams);
|
|
85 |
}
|
|
86 |
|
|
87 |
inline TInt DropNextTrace(TBool aDrop)
|
|
88 |
{
|
|
89 |
return DoControl( EDropNextTrace, (TAny*)(aDrop));
|
|
90 |
}
|
|
91 |
|
|
92 |
inline TInt RegisterActivationNotification(const TcDriverParameters& aParams, TBool aRegister)
|
|
93 |
{
|
|
94 |
return DoControl( ERegisterActivationNotification, (TAny*) &aParams, (TAny*)(aRegister));
|
|
95 |
}
|
|
96 |
|
|
97 |
inline TInt CheckActivationNotificationOk(TBool aShouldBeNotified)
|
|
98 |
{
|
|
99 |
return DoControl( ECheckActivationNotificationOk, (TAny*)(aShouldBeNotified));
|
|
100 |
}
|
|
101 |
|
|
102 |
inline void RequestTraceData(TRequestStatus& aStatus, TDes8& aDes, TInt aFrameCount = 1)
|
|
103 |
{
|
|
104 |
TDes8* p = &aDes;
|
|
105 |
DoRequest( ERequestTraceData, aStatus, (TAny*) p, (TAny*)aFrameCount);
|
|
106 |
}
|
|
107 |
|
|
108 |
#endif //__KERNEL_MODE__
|
|
109 |
|
|
110 |
inline static const TDesC& Name();
|
|
111 |
|
|
112 |
};
|
|
113 |
|
|
114 |
inline const TDesC& RTraceCoreTest::Name()
|
|
115 |
{
|
|
116 |
_LIT(KTraceCoreName,"d_tracecore");
|
|
117 |
return KTraceCoreName;
|
|
118 |
}
|
|
119 |
|
|
120 |
#endif //D_TRACECORE_H
|