os/kernelhwsrv/kerneltest/f32test/shostmassstorage/testclient/usbtestmsclient/inc/debug.h
Update contrib.
1 // Copyright (c) 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
29 //#define _USBMS_DEBUG_PRINT_
30 //#define _SCSI_DEBUG_PRINT_
31 //#define _BOT_DEBUG_PRINT_
32 //#define _CLIENT_DEBUG_PRINT_
33 //#define _TESTREPORT_PRINT_
34 #define _TESTMODE_PRINT_
36 #if (defined(_DEBUG) || defined(_DEBUG_RELEASE))
40 #if defined(_USBMS_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
41 #define __PRINT(t) {RDebug::Print(t);}
42 #define __PRINT1(t,a) {RDebug::Print(t,a);}
43 #define __PRINT2(t,a,b) {RDebug::Print(t,a,b);}
44 #define __PRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
45 #define __PRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
46 #define __PRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
47 #define __PRINT8BIT1(t,a) {TFileName temp;temp.Copy(a);RDebug::Print(t,&temp);}
48 #define __PRINT1TEMP(t,a) {TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}
49 #define __PRINTERR(txt, err) {if(KErrNone != err) __PRINT1(txt, err);}
51 _LIT(KMsgIn, ">>%S\n");
52 _LIT(KMsgOut,"<<%S\n");
60 TMSLogFn(const TDesC& aName){iName = aName; RDebug::Print(KMsgIn, &iName);};
61 ~TMSLogFn(){RDebug::Print(KMsgOut, &iName);};
64 #define __FNLOG(name) TMSLogFn __fn_log__(_L(name))
69 #define __PRINT2(t,a,b)
70 #define __PRINT3(t,a,b,c)
71 #define __PRINT4(t,a,b,c,d)
72 #define __PRINT5(t,a,b,c,d,e)
73 #define __PRINT8BIT1(t,a)
74 #define __PRINT1TEMP(t,a)
75 #define __PRINTERR(txt,err)
80 #if defined(_SCSI_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
81 #define __SCSIPRINT(t) {RDebug::Print(t);}
82 #define __SCSIPRINT1(t,a) {RDebug::Print(t,a);}
83 #define __SCSIPRINT2(t,a,b) {RDebug::Print(t,a,b);}
84 #define __SCSIPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
85 #define __SCSIPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
86 #define __SCSIPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
88 #define __SCSIPRINT(t)
89 #define __SCSIPRINT1(t,a)
90 #define __SCSIPRINT2(t,a,b)
91 #define __SCSIPRINT3(t,a,b,c)
92 #define __SCSIPRINT4(t,a,b,c,d)
93 #define __SCSIPRINT5(t,a,b,c,d,e)
97 #if defined(_BOT_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
98 #define __BOTPRINT(t) {RDebug::Print(t);}
99 #define __BOTPRINT1(t,a) {RDebug::Print(t,a);}
100 #define __BOTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
101 #define __BOTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
102 #define __BOTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
103 #define __BOTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
105 #define __BOTPRINT(t)
106 #define __BOTPRINT1(t,a)
107 #define __BOTPRINT2(t,a,b)
108 #define __BOTPRINT3(t,a,b,c)
109 #define __BOTPRINT4(t,a,b,c,d)
110 #define __BOTPRINT5(t,a,b,c,d,e)
114 #if defined(_CLIENT_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
115 #define __CLIENTPRINT(t) {RDebug::Print(t);}
116 #define __CLIENTPRINT1(t,a) {RDebug::Print(t,a);}
117 #define __CLIENTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
118 #define __CLIENTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
119 #define __CLIENTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
120 #define __CLIENTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
122 #define __CLIENTPRINT(t)
123 #define __CLIENTPRINT1(t,a)
124 #define __CLIENTPRINT2(t,a,b)
125 #define __CLIENTPRINT3(t,a,b,c)
126 #define __CLIENTPRINT4(t,a,b,c,d)
127 #define __CLIENTPRINT5(t,a,b,c,d,e)
131 #if defined(_TESTREPORT_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
132 #define __TESTREPORT(t) {RDebug::Print(t);}
133 #define __TESTREPORT1(t,a) {RDebug::Print(t,a);}
134 #define __TESTREPORT2(t,a,b) {RDebug::Print(t,a,b);}
135 #define __TESTREPORT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
136 #define __TESTREPORT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
137 #define __TESTREPORT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
139 #define __TESTREPORT(t)
140 #define __TESTREPORT1(t,a)
141 #define __TESTREPORT2(t,a,b)
142 #define __TESTREPORT3(t,a,b,c)
143 #define __TESTREPORT4(t,a,b,c,d)
144 #define __TESTREPORT5(t,a,b,c,d,e)
148 #if defined(_TESTMODE_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
149 #define PREFIX(aMsg) TPtrC( (const TText*)L"[TM]: " L##aMsg )
151 #define __TESTMODEPRINT(t) {RDebug::Print(PREFIX(t));}
152 #define __TESTMODEPRINT1(t,a) {RDebug::Print(PREFIX(t),a);}
153 #define __TESTMODEPRINT2(t,a,b) {RDebug::Print(PREFIX(t),a,b);}
154 #define __TESTMODEPRINT3(t,a,b,c) {RDebug::Print(PREFIX(t),a,b,c);}
155 #define __TESTMODEPRINT4(t,a,b,c,d) {RDebug::Print(PREFIX(t),a,b,c,d);}
156 #define __TESTMODEPRINT5(t,a,b,c,d,e) {RDebug::Print(PREFIX(t),a,b,c,d,e);}
158 #define __TESTMODEPRINT(t)
159 #define __TESTMODEPRINT1(t,a)
160 #define __TESTMODEPRINT2(t,a,b)
161 #define __TESTMODEPRINT3(t,a,b,c)
162 #define __TESTMODEPRINT4(t,a,b,c,d)
163 #define __TESTMODEPRINT5(t,a,b,c,d,e)