phoneapp/phoneuiview/inc/phoneuiviewtrace.h
branchRCL_3
changeset 15 2a26698d78ba
equal deleted inserted replaced
14:24062c24fe38 15:2a26698d78ba
       
     1 /*
       
     2 * ============================================================================
       
     3 *  Name        : phoneuiviewtrace.h
       
     4 *  Part of     : PhoneUI / PhoneUIView
       
     5 *  Description : Macros for tracing.
       
     6 *  Version     : 
       
     7 *
       
     8 *  Copyright © 2010 Nokia.  All rights reserved.
       
     9 *  This material, including documentation and any related computer
       
    10 *  programs, is protected by copyright controlled by Nokia.  All
       
    11 *  rights are reserved.  Copying, including reproducing, storing,
       
    12 *  adapting or translating, any or all of this material requires the
       
    13 *  prior written consent of Nokia.  This material also contains
       
    14 *  confidential information which may not be disclosed to others
       
    15 *  without the prior written consent of Nokia.
       
    16 * ============================================================================
       
    17 * Template version: 4.1
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef PHONEUIVIEWTRACE_H
       
    22 #define PHONEUIVIEWTRACE_H
       
    23 
       
    24 //#define __RINGINGTONE_LOGGING
       
    25 #ifdef __RINGINGTONE_LOGGING
       
    26 
       
    27 // INCLUDES
       
    28 #include <e32svr.h>
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 const TInt KPhoneUiViewDebugBufferSize = 100;
       
    33 
       
    34 // MACROS
       
    35 
       
    36 typedef TBuf<KPhoneUiViewDebugBufferSize> TPhoneUiViewDebBuf;
       
    37 
       
    38 #define PHONEUIVIEW_PRINT(x) { _LIT( KPhoneUiViewDebugPrintPrefix, "PhoneUiView: ");\
       
    39     TPhoneUiViewDebBuf buf( KPhoneUiViewDebugPrintPrefix);\
       
    40     if ((_L(x).Length()) + buf.Length() <= KPhoneUiViewDebugBufferSize )\
       
    41         buf.Append(_L(x)); RDebug::Print(buf); }
       
    42 
       
    43 #define PHONEUIVIEW_PRINTF(x,y) { _LIT( KPhoneUiViewDebugPrintPrefix, "PhoneUiView: ");\
       
    44     TPhoneUiViewDebBuf buf( KPhoneUiViewDebugPrintPrefix);\
       
    45     if ((_L(x).Length()) + buf.Length() <= KPhoneUiViewDebugBufferSize )\
       
    46         buf.Append(_L(x)); RDebug::Print(buf,y);}
       
    47 
       
    48 #define PHONEUIVIEW_PRINTF2(x,y,z) { _LIT( KPhoneUiViewDebugPrintPrefix, "PhoneUiView: ");\
       
    49     TPhoneUiViewDebBuf buf( KPhoneUiViewDebugPrintPrefix);\
       
    50     if ((_L(x).Length()) + buf.Length() <= KPhoneUiViewDebugBufferSize )\
       
    51         buf.Append(_L(x)); RDebug::Print(buf,y,z); }
       
    52 
       
    53 #define PHONEUIVIEW_PRINTF3(v,x,y,z) { _LIT( KPhoneUiViewDebugPrintPrefix, "PhoneUiView: ");\
       
    54     TPhoneUiViewDebBuf buf( KPhoneUiViewDebugPrintPrefix);\
       
    55     if ((_L(v).Length()) + buf.Length() <= KPhoneUiViewDebugBufferSize )\
       
    56         buf.Append(_L(v)); RDebug::Print(buf,x,y,z); }
       
    57 
       
    58 #else // !_DEBUG
       
    59 
       
    60 #define PHONEUIVIEW_PRINT(x)
       
    61 #define PHONEUIVIEW_PRINTF(x,y)
       
    62 #define PHONEUIVIEW_PRINTF2(x,y,z)
       
    63 #define PHONEUIVIEW_PRINTF3(v,x,y,z)
       
    64 
       
    65 #endif      // _DEBUG
       
    66 
       
    67 #endif      // PHONEUIVIEWTRACE_H
       
    68 
       
    69 // End of File