os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/shared/debug.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-2009 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 the License "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 /**
    17  @file
    18  @internalTechnology
    19 */
    20 
    21 #ifndef DEBUG_H
    22 #define DEBUG_H
    23 
    24 //#define _SCSI_DEBUG_PRINT_
    25 //#define _BOT_DEBUG_PRINT_
    26 //#define _HOST_DEBUG_PRINT_
    27 //#define _TESTREPORT_PRINT_
    28 
    29 #if (defined(_DEBUG) || defined(_DEBUG_RELEASE))
    30 #include <e32debug.h>
    31 #endif
    32 
    33 #if defined(_SCSI_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
    34 /** Trace - format string  */
    35 #define __SCSIPRINT(t) {RDebug::Print(t);}
    36 /** Trace - format string with 1 param */
    37 #define __SCSIPRINT1(t,a) {RDebug::Print(t,a);}
    38 /** Trace - format string with 2 params */
    39 #define __SCSIPRINT2(t,a,b) {RDebug::Print(t,a,b);}
    40 /** Trace - format string with 3 params */
    41 #define __SCSIPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
    42 /** Trace - format string with 4 params */
    43 #define __SCSIPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
    44 /** Trace - format string with 5 params */
    45 #define __SCSIPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
    46 #else
    47 /** NULL definition */
    48 #define __SCSIPRINT(t)
    49 /** NULL definition */
    50 #define __SCSIPRINT1(t,a)
    51 /** NULL definition */
    52 #define __SCSIPRINT2(t,a,b)
    53 /** NULL definition */
    54 #define __SCSIPRINT3(t,a,b,c)
    55 /** NULL definition */
    56 #define __SCSIPRINT4(t,a,b,c,d)
    57 /** NULL definition */
    58 #define __SCSIPRINT5(t,a,b,c,d,e)
    59 #endif
    60 
    61 
    62 #if defined(_BOT_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
    63 /** Trace - format string */
    64 #define __BOTPRINT(t) {RDebug::Print(t);}
    65 /** Trace - format string with 1 param */
    66 #define __BOTPRINT1(t,a) {RDebug::Print(t,a);}
    67 /** Trace - format string with 2 params */
    68 #define __BOTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
    69 /** Trace - format string with 3 params */
    70 #define __BOTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
    71 /** Trace - format string with 4 params */
    72 #define __BOTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
    73 /** Trace - format string with 5 params */
    74 #define __BOTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
    75 #else
    76 /** NULL definition */
    77 #define __BOTPRINT(t)
    78 /** NULL definition */
    79 #define __BOTPRINT1(t,a)
    80 /** NULL definition */
    81 #define __BOTPRINT2(t,a,b)
    82 /** NULL definition */
    83 #define __BOTPRINT3(t,a,b,c)
    84 /** NULL definition */
    85 #define __BOTPRINT4(t,a,b,c,d)
    86 /** NULL definition */
    87 #define __BOTPRINT5(t,a,b,c,d,e)
    88 #endif
    89 
    90 
    91 #if defined(_HOST_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
    92 /** Trace - format string */
    93 #define __HOSTPRINT(t) {RDebug::Print(t);}
    94 /** Trace - format string with 1 param */
    95 #define __HOSTPRINT1(t,a) {RDebug::Print(t,a);}
    96 /** Trace - format string with 2 params */
    97 #define __HOSTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
    98 /** Trace - format string with 3 params */
    99 #define __HOSTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
   100 /** Trace - format string with 4 params */
   101 #define __HOSTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
   102 /** Trace - format string with 5 params */
   103 #define __HOSTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
   104 #else
   105 /** NULL definition */
   106 #define __HOSTPRINT(t)
   107 /** NULL definition */
   108 #define __HOSTPRINT1(t,a)
   109 /** NULL definition */
   110 #define __HOSTPRINT2(t,a,b)
   111 /** NULL definition */
   112 #define __HOSTPRINT3(t,a,b,c)
   113 /** NULL definition */
   114 #define __HOSTPRINT4(t,a,b,c,d)
   115 /** NULL definition */
   116 #define __HOSTPRINT5(t,a,b,c,d,e)
   117 #endif
   118 
   119 
   120 #if defined(_TESTREPORT_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
   121 /** Trace - format string */
   122 #define __TESTREPORT(t) {RDebug::Print(t);}
   123 /** Trace - format string with 1 param */
   124 #define __TESTREPORT1(t,a) {RDebug::Print(t,a);}
   125 /** Trace - format string with 2 params */
   126 #define __TESTREPORT2(t,a,b) {RDebug::Print(t,a,b);}
   127 /** Trace - format string with 3 params */
   128 #define __TESTREPORT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
   129 /** Trace - format string with 4 params */
   130 #define __TESTREPORT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
   131 /** Trace - format string with 5 params */
   132 #define __TESTREPORT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
   133 #else
   134 /** NULL definition */
   135 #define __TESTREPORT(t)
   136 /** NULL definition */
   137 #define __TESTREPORT1(t,a)
   138 /** NULL definition */
   139 #define __TESTREPORT2(t,a,b)
   140 /** NULL definition */
   141 #define __TESTREPORT3(t,a,b,c)
   142 /** NULL definition */
   143 #define __TESTREPORT4(t,a,b,c,d)
   144 /** NULL definition */
   145 #define __TESTREPORT5(t,a,b,c,d,e)
   146 #endif
   147 
   148 #endif // DEBUG_H