wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/am_debug.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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 the License "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 #ifndef AM_DEBUG_H
       
    20 #define AM_DEBUG_H
       
    21 
       
    22 #include <e32svr.h>
       
    23 
       
    24 #ifdef _DEBUG
       
    25 
       
    26 /**
       
    27 * Class for producing debug traces
       
    28 * @lib
       
    29 * @since Series 60 3.0
       
    30 */
       
    31 class Debug
       
    32     {
       
    33     public:
       
    34         static inline void PrintBuffer( TUint aLength, const TUint8* aData );
       
    35         static inline void PrintString( const TDesC& aString, TUint aLength, const TUint8* aData );
       
    36         static inline void PrintTimestamp( const TDesC& aString );
       
    37         static inline void PrintRates( const TDesC& aString, TUint aRates );
       
    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 DEBUG9(a,b,c,d,e,f,g,h,i,j) RDebug::Print(_L(a),b,c,d,e,f,g,h,i,j)
       
    50 #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])
       
    51 #define DEBUG_RATES(a,b)            Debug::PrintRates(_L(a),b)
       
    52 #define DEBUG_BUFFER(a,b)           Debug::PrintBuffer(a,b)
       
    53 #define DEBUG1S(a,b,c)              Debug::PrintString(_L(a),b,c)
       
    54 #define DEBUGT(a)                   Debug::PrintTimestamp(_L(a))
       
    55 
       
    56 #include "am_debug.inl"
       
    57 
       
    58 #else // _DEBUG
       
    59 
       
    60 #define DEBUG(a)                    /* _DEBUG is not defined. */
       
    61 #define DEBUG1(a,b)                 /* _DEBUG is not defined. */
       
    62 #define DEBUG2(a,b,c)               /* _DEBUG is not defined. */
       
    63 #define DEBUG3(a,b,c,d)             /* _DEBUG is not defined. */
       
    64 #define DEBUG4(a,b,c,d,e)           /* _DEBUG is not defined. */
       
    65 #define DEBUG5(a,b,c,d,e,f)         /* _DEBUG is not defined. */
       
    66 #define DEBUG6(a,b,c,d,e,f,g)       /* _DEBUG is not defined. */
       
    67 #define DEBUG7(a,b,c,d,e,f,g,h)     /* _DEBUG is not defined. */
       
    68 #define DEBUG8(a,b,c,d,e,f,g,h,i)   /* _DEBUG is not defined. */
       
    69 #define DEBUG9(a,b,c,d,e,f,g,h,i,j) /* _DEBUG is not defined. */
       
    70 #define DEBUG_MAC(a)                /* _DEBUG is not defined. */
       
    71 #define DEBUG_RATES(a,b)            /* _DEBUG is not defined. */
       
    72 #define DEBUG_BUFFER(a,b)           /* _DEBUG is not defined. */
       
    73 #define DEBUG1S(a,b,c)              /* _DEBUG is not defined. */
       
    74 #define DEBUGT(a)                   /* _DEBUG is not defined. */
       
    75 
       
    76 #endif // _DEBUG
       
    77 
       
    78 #endif // AM_DEBUG_H