|
1 /* |
|
2 * Copyright (c) 2002 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: Debug File. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _LBTMGMTDEBUG_H_ |
|
20 #define _LBTMGMTDEBUG_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include "lbtmgmtdebugconfig.hrh" |
|
25 |
|
26 // MACROS |
|
27 #define DEBUG(TEXT) { \ |
|
28 _LIT( KText, #TEXT ); \ |
|
29 Debug(KText); \ |
|
30 } |
|
31 |
|
32 #define LBTMGMTUI(TEXT, ARG1) { \ |
|
33 _LIT( KText, #TEXT ); \ |
|
34 Debug( KText, (ARG1) ); \ |
|
35 } |
|
36 |
|
37 #define LBTMGMTUI2(TEXT, ARG1, ARG2) { \ |
|
38 _LIT( KText, #TEXT ); \ |
|
39 Debug( KText,(ARG1), (ARG2) ); \ |
|
40 } |
|
41 |
|
42 #define LBTMGMTUI3(TEXT, ARG1, ARG2, ARG3) { \ |
|
43 _LIT( KText, #TEXT ); \ |
|
44 Debug( KText, (ARG1), (ARG2), (ARG3) ); \ |
|
45 } |
|
46 |
|
47 void Debug( TRefByValue<const TDesC> aText, ...); |
|
48 |
|
49 /** |
|
50 * By using component specific debug macros unnecessary |
|
51 * debug prints can be avoided. |
|
52 * Also component specific debugging is possible by compiling |
|
53 * only certain components when LBTMGMTUI_ENABLE_DEBUG_PRINT is defined. |
|
54 */ |
|
55 |
|
56 #ifdef LBTMGMTUI_ENABLE_DEBUG_PRINT |
|
57 |
|
58 #define LBTMGMTUIDEBUG(TEXT) DEBUG(TEXT); |
|
59 #define LBTMGMTUIDEBUG1(TEXT, ARG1) LBTMGMTUI(TEXT, ARG1); |
|
60 #define LBTMGMTUIDEBUG2(TEXT, ARG1, ARG2) LBTMGMTUI2(TEXT, ARG1, ARG2); |
|
61 #define LBTMGMTUIDEBUG3(TEXT, ARG1, ARG2, ARG3) LBTMGMTUI3(TEXT, ARG1, ARG2, ARG3); |
|
62 |
|
63 #else |
|
64 |
|
65 #define LBTMGMTUIDEBUG(TEXT) ; |
|
66 #define LBTMGMTUIDEBUG1(TEXT, ARG1) ; |
|
67 #define LBTMGMTUIDEBUG2(TEXT, ARG1, ARG2) ; |
|
68 #define LBTMGMTUIDEBUG3(TEXT, ARG1, ARG2, ARG3) ; |
|
69 |
|
70 #endif |
|
71 |
|
72 #endif // _LBTMGMTDEBUG_H_ |