297
|
1 |
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
0
|
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 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalTechnology
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef DEBUG_H
|
|
24 |
#define DEBUG_H
|
|
25 |
|
|
26 |
|
|
27 |
#include <e32debug.h>
|
|
28 |
|
|
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_
|
|
35 |
|
|
36 |
#if (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
37 |
#include <e32debug.h>
|
|
38 |
#endif
|
|
39 |
|
|
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);}
|
|
50 |
|
|
51 |
_LIT(KMsgIn, ">>%S\n");
|
|
52 |
_LIT(KMsgOut,"<<%S\n");
|
|
53 |
|
|
54 |
#else
|
|
55 |
#define __PRINT(t)
|
|
56 |
#define __PRINT1(t,a)
|
|
57 |
#define __PRINT2(t,a,b)
|
|
58 |
#define __PRINT3(t,a,b,c)
|
|
59 |
#define __PRINT4(t,a,b,c,d)
|
|
60 |
#define __PRINT5(t,a,b,c,d,e)
|
|
61 |
#define __PRINT8BIT1(t,a)
|
|
62 |
#define __PRINT1TEMP(t,a)
|
|
63 |
#define __PRINTERR(txt,err)
|
|
64 |
#endif
|
|
65 |
|
|
66 |
|
|
67 |
#if defined(_SCSI_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
68 |
#define __SCSIPRINT(t) {RDebug::Print(t);}
|
|
69 |
#define __SCSIPRINT1(t,a) {RDebug::Print(t,a);}
|
|
70 |
#define __SCSIPRINT2(t,a,b) {RDebug::Print(t,a,b);}
|
|
71 |
#define __SCSIPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
|
|
72 |
#define __SCSIPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
|
|
73 |
#define __SCSIPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
|
|
74 |
#else
|
|
75 |
#define __SCSIPRINT(t)
|
|
76 |
#define __SCSIPRINT1(t,a)
|
|
77 |
#define __SCSIPRINT2(t,a,b)
|
|
78 |
#define __SCSIPRINT3(t,a,b,c)
|
|
79 |
#define __SCSIPRINT4(t,a,b,c,d)
|
|
80 |
#define __SCSIPRINT5(t,a,b,c,d,e)
|
|
81 |
#endif
|
|
82 |
|
|
83 |
|
|
84 |
#if defined(_BOT_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
85 |
#define __BOTPRINT(t) {RDebug::Print(t);}
|
|
86 |
#define __BOTPRINT1(t,a) {RDebug::Print(t,a);}
|
|
87 |
#define __BOTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
|
|
88 |
#define __BOTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
|
|
89 |
#define __BOTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
|
|
90 |
#define __BOTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
|
|
91 |
#else
|
|
92 |
#define __BOTPRINT(t)
|
|
93 |
#define __BOTPRINT1(t,a)
|
|
94 |
#define __BOTPRINT2(t,a,b)
|
|
95 |
#define __BOTPRINT3(t,a,b,c)
|
|
96 |
#define __BOTPRINT4(t,a,b,c,d)
|
|
97 |
#define __BOTPRINT5(t,a,b,c,d,e)
|
|
98 |
#endif
|
|
99 |
|
|
100 |
|
|
101 |
#if defined(_CLIENT_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
102 |
#define __CLIENTPRINT(t) {RDebug::Print(t);}
|
|
103 |
#define __CLIENTPRINT1(t,a) {RDebug::Print(t,a);}
|
|
104 |
#define __CLIENTPRINT2(t,a,b) {RDebug::Print(t,a,b);}
|
|
105 |
#define __CLIENTPRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
|
|
106 |
#define __CLIENTPRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
|
|
107 |
#define __CLIENTPRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
|
|
108 |
#else
|
|
109 |
#define __CLIENTPRINT(t)
|
|
110 |
#define __CLIENTPRINT1(t,a)
|
|
111 |
#define __CLIENTPRINT2(t,a,b)
|
|
112 |
#define __CLIENTPRINT3(t,a,b,c)
|
|
113 |
#define __CLIENTPRINT4(t,a,b,c,d)
|
|
114 |
#define __CLIENTPRINT5(t,a,b,c,d,e)
|
|
115 |
#endif
|
|
116 |
|
|
117 |
|
|
118 |
#if defined(_TESTREPORT_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
119 |
#define __TESTREPORT(t) {RDebug::Print(t);}
|
|
120 |
#define __TESTREPORT1(t,a) {RDebug::Print(t,a);}
|
|
121 |
#define __TESTREPORT2(t,a,b) {RDebug::Print(t,a,b);}
|
|
122 |
#define __TESTREPORT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
|
|
123 |
#define __TESTREPORT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
|
|
124 |
#define __TESTREPORT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
|
|
125 |
#else
|
|
126 |
#define __TESTREPORT(t)
|
|
127 |
#define __TESTREPORT1(t,a)
|
|
128 |
#define __TESTREPORT2(t,a,b)
|
|
129 |
#define __TESTREPORT3(t,a,b,c)
|
|
130 |
#define __TESTREPORT4(t,a,b,c,d)
|
|
131 |
#define __TESTREPORT5(t,a,b,c,d,e)
|
|
132 |
#endif
|
|
133 |
|
|
134 |
|
|
135 |
#if defined(_TESTMODE_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
136 |
#define PREFIX(aMsg) TPtrC( (const TText*)L"[TM]: " L##aMsg )
|
|
137 |
|
|
138 |
#define __TESTMODEPRINT(t) {RDebug::Print(PREFIX(t));}
|
|
139 |
#define __TESTMODEPRINT1(t,a) {RDebug::Print(PREFIX(t),a);}
|
|
140 |
#define __TESTMODEPRINT2(t,a,b) {RDebug::Print(PREFIX(t),a,b);}
|
|
141 |
#define __TESTMODEPRINT3(t,a,b,c) {RDebug::Print(PREFIX(t),a,b,c);}
|
|
142 |
#define __TESTMODEPRINT4(t,a,b,c,d) {RDebug::Print(PREFIX(t),a,b,c,d);}
|
|
143 |
#define __TESTMODEPRINT5(t,a,b,c,d,e) {RDebug::Print(PREFIX(t),a,b,c,d,e);}
|
|
144 |
#else
|
|
145 |
#define __TESTMODEPRINT(t)
|
|
146 |
#define __TESTMODEPRINT1(t,a)
|
|
147 |
#define __TESTMODEPRINT2(t,a,b)
|
|
148 |
#define __TESTMODEPRINT3(t,a,b,c)
|
|
149 |
#define __TESTMODEPRINT4(t,a,b,c,d)
|
|
150 |
#define __TESTMODEPRINT5(t,a,b,c,d,e)
|
|
151 |
#endif
|
|
152 |
|
|
153 |
#endif // DEBUG_H
|