locationsystemui/locationsysui/locpsysettings/locpsysettingseng/inc/locpsyengdebug.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     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:  Contains debug macros.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LOCPSYENGDEBUG_H 
       
    20 #define LOCPSYENGDEBUG_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include "locpsyengdebugconfig.hrh"
       
    25 
       
    26 // MACROS
       
    27 
       
    28 /**
       
    29 * Contains debug macros. By using component specific debug macros unnecessary 
       
    30 * calls to LocUtils.dll can be avoided.
       
    31 */
       
    32 
       
    33 #ifdef LOC_ENABLE_DEBUG_PRINT
       
    34 #define LOCENGDEBUG(TEXT) DEBUG(TEXT);
       
    35 #define LOCENGDEBUG1(TEXT, ARG1) LOC(TEXT, ARG1);
       
    36 #define LOCENGDEBUG2(TEXT, ARG1, ARG2) LOC2(TEXT, ARG1, ARG2);
       
    37 #define LOCENGDEBUG3(TEXT, ARG1, ARG2, ARG3) LOC3(TEXT, ARG1, ARG2, ARG3);
       
    38 
       
    39 // MACROS
       
    40 #define DEBUG(TEXT) 				 { \
       
    41 									  _LIT( KText, #TEXT ); \
       
    42 									  Debug(KText); \
       
    43 									 }
       
    44 									 
       
    45 #define LOC(TEXT, ARG1) 			 { \
       
    46 									  _LIT( KText, #TEXT ); \
       
    47 									  Debug( KText, (ARG1) ); \
       
    48 									 }
       
    49 									 
       
    50 #define LOC2(TEXT, ARG1, ARG2) 		 { \
       
    51 									  _LIT( KText, #TEXT );\
       
    52 									  Debug( KText, (ARG1), (ARG2) );\
       
    53 									 }
       
    54 									 
       
    55 #define LOC3(TEXT, ARG1, ARG2, ARG3) { \
       
    56 									  _LIT( KText, #TEXT );  \
       
    57 									  Debug( KText, (ARG1), (ARG2), (ARG3) ); \
       
    58 									 }
       
    59 
       
    60 
       
    61 #else
       
    62 #define LOCENGDEBUG(TEXT);
       
    63 #define LOCENGDEBUG1(TEXT, ARG1);
       
    64 #define LOCENGDEBUG2(TEXT, ARG1, ARG2);
       
    65 #define LOCENGDEBUG3(TEXT, ARG1, ARG2, ARG3);
       
    66 #endif
       
    67 
       
    68 IMPORT_C void Debug( TRefByValue<const TDesC> aText, ...);
       
    69 
       
    70 #endif // LOCPSYENGDEBUG_H