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