|
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 // Base class for notification receivers of TraceCore |
|
15 // |
|
16 |
|
17 #ifndef __TRACECORENOTIFICATIONRECEIVER_H__ |
|
18 #define __TRACECORENOTIFICATIONRECEIVER_H__ |
|
19 |
|
20 // Include files |
|
21 #include <kernel/kernel.h> |
|
22 #include <opensystemtrace_types.h> |
|
23 |
|
24 |
|
25 |
|
26 /** |
|
27 * Base class for notification receivers of TraceCore |
|
28 */ |
|
29 class MTraceCoreNotificationReceiver |
|
30 { |
|
31 public: |
|
32 |
|
33 /** |
|
34 * Constructor |
|
35 */ |
|
36 IMPORT_C MTraceCoreNotificationReceiver(); |
|
37 |
|
38 /** |
|
39 * Destructor |
|
40 */ |
|
41 IMPORT_C virtual ~MTraceCoreNotificationReceiver(); |
|
42 |
|
43 /** |
|
44 * Register notification receiver by component id |
|
45 * |
|
46 * @param aComponentId The component ID |
|
47 */ |
|
48 IMPORT_C TInt RegisterNotificationReceiver( TUint32 aComponentId ); |
|
49 |
|
50 /** |
|
51 * Register notification receiver |
|
52 * |
|
53 * @param aComponentId The component ID |
|
54 * @param aGroupId The group ID |
|
55 */ |
|
56 IMPORT_C TInt RegisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId ); |
|
57 |
|
58 /** |
|
59 * Unregister notification receiver |
|
60 * |
|
61 * @param aComponentId |
|
62 */ |
|
63 IMPORT_C void UnregisterNotificationReceiver( TUint32 aComponentId ); |
|
64 |
|
65 /** |
|
66 * Unregister notification receiver |
|
67 * |
|
68 * @param aComponentId The component ID |
|
69 * @param aGroupId The group ID |
|
70 */ |
|
71 IMPORT_C void UnregisterNotificationReceiver( TUint32 aComponentId, TInt32 aGroupId ); |
|
72 |
|
73 /** |
|
74 * Callback function for Trace Activation |
|
75 * |
|
76 * @param aComponentId |
|
77 * @param aGroupId |
|
78 */ |
|
79 virtual void TraceActivated( TUint32 aComponentId, TUint16 aGroupId ) = 0; |
|
80 |
|
81 /** |
|
82 * Callback function for Trace Deactivation |
|
83 * |
|
84 * @param aComponentId The component ID |
|
85 * @param aGroupId The group ID |
|
86 */ |
|
87 virtual void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId ) = 0; |
|
88 |
|
89 /** |
|
90 * Callback function for trace error |
|
91 * |
|
92 * @param aComponentId The component ID |
|
93 * @param aGroupId The group ID |
|
94 * @param aError The reason for error |
|
95 */ |
|
96 IMPORT_C virtual void TraceError( TUint32 aComponentId, TUint32 aGroupId, TInt aError ); |
|
97 |
|
98 private: |
|
99 |
|
100 /** |
|
101 * Unregister all components of this receiver. Called from destructor. |
|
102 */ |
|
103 void UnregisterNotificationReceiver(); |
|
104 |
|
105 }; |
|
106 |
|
107 /** |
|
108 * @deprecated Please use MTraceCoreNotificationReceiver instead |
|
109 */ |
|
110 class DTraceCoreNotificationReceiver : public DBase, public MTraceCoreNotificationReceiver |
|
111 { |
|
112 }; |
|
113 |
|
114 #endif |
|
115 |
|
116 // End of File |