os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/shared/debug.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/shared/debug.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,148 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @internalTechnology
1.22 +*/
1.23 +
1.24 +#ifndef DEBUG_H
1.25 +#define DEBUG_H
1.26 +
1.27 +//#define _SCSI_DEBUG_PRINT_
1.28 +//#define _BOT_DEBUG_PRINT_
1.29 +//#define _HOST_DEBUG_PRINT_
1.30 +//#define _TESTREPORT_PRINT_
1.31 +
1.32 +#if (defined(_DEBUG) || defined(_DEBUG_RELEASE))
1.33 +#include <e32debug.h>
1.34 +#endif
1.35 +
1.36 +#if defined(_SCSI_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
1.37 +/** Trace - format string */
1.38 +#define __SCSIPRINT(t) {RDebug::Print(t);}
1.39 +/** Trace - format string with 1 param */
1.40 +#define __SCSIPRINT1(t,a) {RDebug::Print(t,a);}
1.41 +/** Trace - format string with 2 params */
1.42 +#define __SCSIPRINT2(t,a,b) {RDebug::Print(t,a,b);}
1.43 +/** Trace - format string with 3 params */
1.44 +#define __SCSIPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
1.45 +/** Trace - format string with 4 params */
1.46 +#define __SCSIPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
1.47 +/** Trace - format string with 5 params */
1.48 +#define __SCSIPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
1.49 +#else
1.50 +/** NULL definition */
1.51 +#define __SCSIPRINT(t)
1.52 +/** NULL definition */
1.53 +#define __SCSIPRINT1(t,a)
1.54 +/** NULL definition */
1.55 +#define __SCSIPRINT2(t,a,b)
1.56 +/** NULL definition */
1.57 +#define __SCSIPRINT3(t,a,b,c)
1.58 +/** NULL definition */
1.59 +#define __SCSIPRINT4(t,a,b,c,d)
1.60 +/** NULL definition */
1.61 +#define __SCSIPRINT5(t,a,b,c,d,e)
1.62 +#endif
1.63 +
1.64 +
1.65 +#if defined(_BOT_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
1.66 +/** Trace - format string */
1.67 +#define __BOTPRINT(t) {RDebug::Print(t);}
1.68 +/** Trace - format string with 1 param */
1.69 +#define __BOTPRINT1(t,a) {RDebug::Print(t,a);}
1.70 +/** Trace - format string with 2 params */
1.71 +#define __BOTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
1.72 +/** Trace - format string with 3 params */
1.73 +#define __BOTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
1.74 +/** Trace - format string with 4 params */
1.75 +#define __BOTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
1.76 +/** Trace - format string with 5 params */
1.77 +#define __BOTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
1.78 +#else
1.79 +/** NULL definition */
1.80 +#define __BOTPRINT(t)
1.81 +/** NULL definition */
1.82 +#define __BOTPRINT1(t,a)
1.83 +/** NULL definition */
1.84 +#define __BOTPRINT2(t,a,b)
1.85 +/** NULL definition */
1.86 +#define __BOTPRINT3(t,a,b,c)
1.87 +/** NULL definition */
1.88 +#define __BOTPRINT4(t,a,b,c,d)
1.89 +/** NULL definition */
1.90 +#define __BOTPRINT5(t,a,b,c,d,e)
1.91 +#endif
1.92 +
1.93 +
1.94 +#if defined(_HOST_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
1.95 +/** Trace - format string */
1.96 +#define __HOSTPRINT(t) {RDebug::Print(t);}
1.97 +/** Trace - format string with 1 param */
1.98 +#define __HOSTPRINT1(t,a) {RDebug::Print(t,a);}
1.99 +/** Trace - format string with 2 params */
1.100 +#define __HOSTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
1.101 +/** Trace - format string with 3 params */
1.102 +#define __HOSTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
1.103 +/** Trace - format string with 4 params */
1.104 +#define __HOSTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
1.105 +/** Trace - format string with 5 params */
1.106 +#define __HOSTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
1.107 +#else
1.108 +/** NULL definition */
1.109 +#define __HOSTPRINT(t)
1.110 +/** NULL definition */
1.111 +#define __HOSTPRINT1(t,a)
1.112 +/** NULL definition */
1.113 +#define __HOSTPRINT2(t,a,b)
1.114 +/** NULL definition */
1.115 +#define __HOSTPRINT3(t,a,b,c)
1.116 +/** NULL definition */
1.117 +#define __HOSTPRINT4(t,a,b,c,d)
1.118 +/** NULL definition */
1.119 +#define __HOSTPRINT5(t,a,b,c,d,e)
1.120 +#endif
1.121 +
1.122 +
1.123 +#if defined(_TESTREPORT_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
1.124 +/** Trace - format string */
1.125 +#define __TESTREPORT(t) {RDebug::Print(t);}
1.126 +/** Trace - format string with 1 param */
1.127 +#define __TESTREPORT1(t,a) {RDebug::Print(t,a);}
1.128 +/** Trace - format string with 2 params */
1.129 +#define __TESTREPORT2(t,a,b) {RDebug::Print(t,a,b);}
1.130 +/** Trace - format string with 3 params */
1.131 +#define __TESTREPORT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
1.132 +/** Trace - format string with 4 params */
1.133 +#define __TESTREPORT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
1.134 +/** Trace - format string with 5 params */
1.135 +#define __TESTREPORT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
1.136 +#else
1.137 +/** NULL definition */
1.138 +#define __TESTREPORT(t)
1.139 +/** NULL definition */
1.140 +#define __TESTREPORT1(t,a)
1.141 +/** NULL definition */
1.142 +#define __TESTREPORT2(t,a,b)
1.143 +/** NULL definition */
1.144 +#define __TESTREPORT3(t,a,b,c)
1.145 +/** NULL definition */
1.146 +#define __TESTREPORT4(t,a,b,c,d)
1.147 +/** NULL definition */
1.148 +#define __TESTREPORT5(t,a,b,c,d,e)
1.149 +#endif
1.150 +
1.151 +#endif // DEBUG_H