|
1 // ssyreferencetrace.h |
|
2 |
|
3 /* |
|
4 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 * All rights reserved. |
|
6 * This component and the accompanying materials are made available |
|
7 * under the terms of "Eclipse Public License v1.0" |
|
8 * which accompanies this distribution, and is available |
|
9 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 * |
|
11 * Initial Contributors: |
|
12 * Nokia Corporation - initial contribution. |
|
13 * |
|
14 * Contributors: |
|
15 * |
|
16 * Description: |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @internalComponent |
|
26 */ |
|
27 #ifndef SSYREFERENCETRACE_H |
|
28 #define SSYREFERENCETRACE_H |
|
29 |
|
30 |
|
31 // INCLUDES |
|
32 #include <e32svr.h> |
|
33 |
|
34 |
|
35 // PC-LINT OPTIONS |
|
36 // Removes null statement not in line by itself warnings from |
|
37 // COMPONENT_TRACE macros |
|
38 //lint -esym(960,54) |
|
39 |
|
40 // Removes "area too small" pointer cast warnings. |
|
41 //lint -e826 |
|
42 |
|
43 |
|
44 |
|
45 // CONSTANTS |
|
46 // MACROS |
|
47 #ifdef _DEBUG |
|
48 |
|
49 #ifdef THREAD_TRACE_FLAG |
|
50 |
|
51 #define THREAD_TRACE RDebug::Print(RThread().Name()); |
|
52 |
|
53 #else |
|
54 |
|
55 #define THREAD_TRACE |
|
56 |
|
57 #endif // #ifdef THREAD_TRACE_FLAG |
|
58 |
|
59 #ifdef BUFFER_TRACE_FLAG |
|
60 |
|
61 #define BUFFER_TRACE_DEBUG |
|
62 #define DEBUG_PRINT_BUFFER DebugPrintBuffer(); |
|
63 #define BUFFER_TRACE( a ) RDebug::Print a |
|
64 |
|
65 #else |
|
66 |
|
67 #define DEBUG_PRINT_BUFFER |
|
68 #define BUFFER_TRACE( a ) |
|
69 |
|
70 #endif // #ifdef THREAD_TRACE_FLAG |
|
71 |
|
72 #ifdef COMPONENT_TRACE_FLAG |
|
73 |
|
74 #define COMPONENT_TRACE( a ) THREAD_TRACE;RDebug::Print a |
|
75 #define COMPONENT_TRACE_DEBUG |
|
76 |
|
77 #else // #ifdef COMPONENT_TRACE_FLAG |
|
78 |
|
79 #define COMPONENT_TRACE( a ) |
|
80 |
|
81 #endif //#ifdef COMPONENT_TRACE_FLAG |
|
82 |
|
83 #ifdef API_TRACE_FLAG |
|
84 |
|
85 #define API_TRACE( a ) THREAD_TRACE;RDebug::Print a |
|
86 #define API_TRACE_DEBUG |
|
87 |
|
88 #else //#ifdef API_TRACE_FLAG |
|
89 |
|
90 #define API_TRACE( a ) |
|
91 |
|
92 #endif //#ifdef API_TRACE_FLAG |
|
93 |
|
94 #ifdef ERROR_TRACE_FLAG |
|
95 |
|
96 #define ERROR_TRACE( a ) THREAD_TRACE;RDebug::Print a |
|
97 #define ERROR_TRACE_DEBUG |
|
98 |
|
99 #else //#ifdef ERROR_TRACE_FLAG |
|
100 |
|
101 #define ERROR_TRACE( a ) |
|
102 |
|
103 #endif //#ifdef ERROR_TRACE_FLAG |
|
104 |
|
105 #else // #ifdef _DEBUG |
|
106 |
|
107 #define COMPONENT_TRACE( a ) |
|
108 #define API_TRACE( a ) |
|
109 #define ERROR_TRACE( a ) |
|
110 #define BUFFER_TRACE( a ) |
|
111 #define THREAD_TRACE |
|
112 #define DEBUG_PRINT_BUFFER |
|
113 |
|
114 #endif //#ifdef _DEBUG |
|
115 |
|
116 #endif // SSYREFERENCETRACE_H |
|
117 |