hotspotfw/hsbrowser/inc/am_debug.h
branchRCL_3
changeset 24 63be7eb3fc78
parent 23 b852595f5cbe
child 25 f28ada11abbf
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
     1 /*
       
     2 * Copyright (c) 2007 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 utilities
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef AM_DEBUG_H
       
    21 #define AM_DEBUG_H
       
    22 
       
    23 #include <e32svr.h>
       
    24 
       
    25 #ifdef _DEBUG
       
    26 
       
    27 /**
       
    28 * Class for producing debug traces
       
    29 * @lib
       
    30 * @since Series 60 3.0
       
    31 */
       
    32 class Debug
       
    33     {
       
    34     public:
       
    35         static inline void PrintBuffer( TUint aLength, const TUint8* aData );
       
    36         static inline void PrintString( const TDesC& aString, TUint aLength, const TUint8* aData );
       
    37         static inline void PrintTimestamp( const TDesC& aString );
       
    38     };
       
    39 
       
    40 #define DEBUG(a)		            RDebug::Print(_L(a))
       
    41 #define DEBUG1(a,b)		            RDebug::Print(_L(a),b)
       
    42 #define DEBUG2(a,b,c)	            RDebug::Print(_L(a),b,c)
       
    43 #define DEBUG3(a,b,c,d)	            RDebug::Print(_L(a),b,c,d)
       
    44 #define DEBUG4(a,b,c,d,e)	        RDebug::Print(_L(a),b,c,d,e)
       
    45 #define DEBUG5(a,b,c,d,e,f)	        RDebug::Print(_L(a),b,c,d,e,f)
       
    46 #define DEBUG6(a,b,c,d,e,f,g)	    RDebug::Print(_L(a),b,c,d,e,f,g)
       
    47 #define DEBUG7(a,b,c,d,e,f,g,h) 	RDebug::Print(_L(a),b,c,d,e,f,g,h)
       
    48 #define DEBUG8(a,b,c,d,e,f,g,h,i)	RDebug::Print(_L(a),b,c,d,e,f,g,h,i)
       
    49 #define DEBUG_MAC(a)	            RDebug::Print(_L("%02X%02X%02X%02X%02X%02X"),a[0],a[1],a[2],a[3],a[4],a[5])
       
    50 #define DEBUG_RATES(a)	            RDebug::Print(_L("%d %d %d %d %d %d %d %d"),a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7])
       
    51 #define DEBUG_BUFFER(a,b)           Debug::PrintBuffer(a,b);
       
    52 #define DEBUG1S(a,b,c)		        Debug::PrintString(_L(a),b,c);
       
    53 #define DEBUGT(a)                   Debug::PrintTimestamp(_L(a));
       
    54 
       
    55 #include "am_debug.inl"
       
    56 
       
    57 #else // _DEBUG
       
    58 
       
    59 #define DEBUG(a)                    /* _DEBUG is not defined. */
       
    60 #define DEBUG1(a,b)                 /* _DEBUG is not defined. */
       
    61 #define DEBUG2(a,b,c)               /* _DEBUG is not defined. */
       
    62 #define DEBUG3(a,b,c,d)             /* _DEBUG is not defined. */
       
    63 #define DEBUG4(a,b,c,d,e)           /* _DEBUG is not defined. */
       
    64 #define DEBUG5(a,b,c,d,e,f)	        /* _DEBUG is not defined. */
       
    65 #define DEBUG6(a,b,c,d,e,f,g)       /* _DEBUG is not defined. */
       
    66 #define DEBUG7(a,b,c,d,e,f,g,h)     /* _DEBUG is not defined. */
       
    67 #define DEBUG8(a,b,c,d,e,f,g,h,i)	/* _DEBUG is not defined. */
       
    68 #define DEBUG_MAC(a)                /* _DEBUG is not defined. */
       
    69 #define DEBUG_RATES(a)              /* _DEBUG is not defined. */
       
    70 #define DEBUG_BUFFER(a,b)           /* _DEBUG is not defined. */
       
    71 #define DEBUG1S(a,b,c)		        /* _DEBUG is not defined. */
       
    72 #define DEBUGT(a)                   /* _DEBUG is not defined. */
       
    73 
       
    74 #endif // _DEBUG
       
    75 
       
    76 #endif // AM_DEBUG_H