systemswstubs/ssyreference/inc/ssyreferencetrace.h
changeset 46 e1758cbb96ac
parent 1 ffb8e2ddd8dc
equal deleted inserted replaced
43:e71858845f73 46:e1758cbb96ac
       
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SSYREFERENCETRACE_H
       
    20 #define SSYREFERENCETRACE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32svr.h>
       
    24 
       
    25 // PC-LINT OPTIONS
       
    26 // Removes null statement not in line by itself warnings from 
       
    27 // COMPONENT_TRACE macros
       
    28 //lint -esym(960,54)
       
    29 
       
    30 // Removes "area too small" pointer cast warnings.
       
    31 //lint -e826
       
    32 
       
    33 
       
    34 
       
    35 // CONSTANTS
       
    36 // MACROS
       
    37 #ifdef _DEBUG
       
    38 
       
    39     #ifdef THREAD_TRACE_FLAG
       
    40     
       
    41         #define THREAD_TRACE RDebug::Print(RThread().Name());
       
    42         
       
    43     #else
       
    44         
       
    45         #define THREAD_TRACE
       
    46         
       
    47     #endif // #ifdef THREAD_TRACE_FLAG
       
    48     
       
    49     #ifdef BUFFER_TRACE_FLAG
       
    50     
       
    51         #define BUFFER_TRACE_DEBUG
       
    52         #define DEBUG_PRINT_BUFFER DebugPrintBuffer();
       
    53         #define BUFFER_TRACE( a ) RDebug::Print a 
       
    54         
       
    55     #else
       
    56         
       
    57         #define DEBUG_PRINT_BUFFER
       
    58         #define BUFFER_TRACE( a )
       
    59         
       
    60     #endif // #ifdef THREAD_TRACE_FLAG
       
    61 
       
    62     #ifdef COMPONENT_TRACE_FLAG
       
    63 
       
    64         #define COMPONENT_TRACE( a ) THREAD_TRACE;RDebug::Print a 
       
    65         #define COMPONENT_TRACE_DEBUG   
       
    66         
       
    67     #else // #ifdef COMPONENT_TRACE_FLAG
       
    68 
       
    69         #define COMPONENT_TRACE( a )
       
    70 
       
    71     #endif //#ifdef COMPONENT_TRACE_FLAG
       
    72 
       
    73     #ifdef API_TRACE_FLAG
       
    74 
       
    75         #define API_TRACE( a ) THREAD_TRACE;RDebug::Print a
       
    76         #define API_TRACE_DEBUG
       
    77 
       
    78     #else //#ifdef API_TRACE_FLAG
       
    79 
       
    80         #define API_TRACE( a )
       
    81 
       
    82     #endif //#ifdef API_TRACE_FLAG
       
    83 
       
    84     #ifdef ERROR_TRACE_FLAG
       
    85 
       
    86         #define ERROR_TRACE( a ) THREAD_TRACE;RDebug::Print a
       
    87         #define ERROR_TRACE_DEBUG
       
    88 
       
    89     #else //#ifdef ERROR_TRACE_FLAG
       
    90 
       
    91         #define ERROR_TRACE( a )
       
    92 
       
    93     #endif //#ifdef ERROR_TRACE_FLAG
       
    94 
       
    95 #else // #ifdef _DEBUG
       
    96 
       
    97     #define COMPONENT_TRACE( a )
       
    98     #define API_TRACE( a )
       
    99     #define ERROR_TRACE( a )
       
   100     #define BUFFER_TRACE( a )
       
   101     #define THREAD_TRACE
       
   102     #define DEBUG_PRINT_BUFFER
       
   103 
       
   104 #endif //#ifdef _DEBUG
       
   105 
       
   106 #endif // SSYREFERENCETRACE_H
       
   107 
       
   108 
       
   109 //  End of File
       
   110