56
|
1 |
// Copyright (c) 2007-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 |
//
|
|
15 |
|
|
16 |
#ifndef __TRACEONACTIVATIONIF_H__
|
|
17 |
#define __TRACEONACTIVATIONIF_H__
|
|
18 |
|
|
19 |
|
|
20 |
//- Include Files ----------------------------------------------------------
|
|
21 |
|
|
22 |
#include <e32ver.h>
|
|
23 |
#include <e32cmn.h>
|
|
24 |
#include <TraceCoreSubscriber.h>
|
|
25 |
|
|
26 |
//- Constants ---------------------------------------------------------------
|
|
27 |
|
|
28 |
/** Name of logical driver */
|
|
29 |
_LIT( KTraceOnActivationDriverName, "TraceOnActivation" );
|
|
30 |
|
|
31 |
|
|
32 |
/**
|
|
33 |
|
|
34 |
TTraceOnActivationParams
|
|
35 |
|
|
36 |
Parameters for activation/notification requests
|
|
37 |
|
|
38 |
*/
|
|
39 |
class TTraceOnActivationParams
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
TUint32 iComponentId;
|
|
43 |
TUint32 iGroupId;
|
|
44 |
};
|
|
45 |
|
|
46 |
/**
|
|
47 |
|
|
48 |
RTraceOnActivation
|
|
49 |
|
|
50 |
User side interface
|
|
51 |
|
|
52 |
*/
|
|
53 |
class RTraceOnActivation : public RBusLogicalChannel
|
|
54 |
{
|
|
55 |
public:
|
|
56 |
enum TVer
|
|
57 |
{
|
|
58 |
EMajorVersionNumber = 1,
|
|
59 |
EMinorVersionNumber = 1,
|
|
60 |
EBuildVersionNumber = KE32BuildVersionNumber
|
|
61 |
};
|
|
62 |
|
|
63 |
/** A set of bits identifying the request numbers which are valid */
|
|
64 |
enum TControl
|
|
65 |
{
|
|
66 |
ERegisterNotificationReceiver,
|
|
67 |
EUnregisterNotificationReceiver
|
|
68 |
};
|
|
69 |
|
|
70 |
public:
|
|
71 |
#ifndef __KERNEL_MODE__
|
|
72 |
|
|
73 |
|
|
74 |
/**
|
|
75 |
Create the logical channel for the current thread and open a handle to it
|
|
76 |
|
|
77 |
@param aUnit Parameter that contains unit info
|
|
78 |
|
|
79 |
@return KErrNone, if successful
|
|
80 |
*/
|
|
81 |
inline TInt Open(TInt aUnit = KNullUnit)
|
|
82 |
{ return DoCreate( KTraceOnActivationDriverName, VersionRequired(), aUnit, NULL, NULL ); };
|
|
83 |
|
|
84 |
/**
|
|
85 |
Returns version information
|
|
86 |
|
|
87 |
@return Version information
|
|
88 |
*/
|
|
89 |
inline TVersion VersionRequired() const
|
|
90 |
{ return TVersion( EMajorVersionNumber, EMinorVersionNumber, EBuildVersionNumber ); };
|
|
91 |
|
|
92 |
|
|
93 |
/**
|
|
94 |
Register notification receiver
|
|
95 |
|
|
96 |
@param aParameters Contains component ID and group ID
|
|
97 |
|
|
98 |
@return KErrNone, if successful
|
|
99 |
*/
|
|
100 |
inline TInt RegisterNotificationReceiver( TTraceOnActivationParams& aParameters )
|
|
101 |
{ return DoControl( ERegisterNotificationReceiver, static_cast<TAny*>(&aParameters) ); };
|
|
102 |
|
|
103 |
|
|
104 |
/**
|
|
105 |
Unregister notification receiver
|
|
106 |
|
|
107 |
@param aParameters Contains component ID and group ID
|
|
108 |
|
|
109 |
@return KErrNone, if successful
|
|
110 |
*/
|
|
111 |
inline TInt UnregisterNotificationReceiver( TTraceOnActivationParams& aParameters )
|
|
112 |
{ return DoControl( EUnregisterNotificationReceiver, static_cast<TAny*>(&aParameters) ); };
|
|
113 |
|
|
114 |
#endif
|
|
115 |
};
|
|
116 |
|
|
117 |
#endif // __TRACEONACTIVATIONIF_H__
|
|
118 |
|
|
119 |
// End of File
|