phoneuis/dialer/inc/dialertrace.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     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:  Macros for tracing.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef DIALERTRACE_H
       
    21 #define DIALERTRACE_H
       
    22 
       
    23 #ifdef _DEBUG
       
    24 
       
    25 // INCLUDES
       
    26 #include <e32svr.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 const TInt KDialerDebugBufferSize = 60;
       
    31 
       
    32 // MACROS
       
    33 
       
    34 typedef TBuf<KDialerDebugBufferSize> TDialerDebBuf;
       
    35 
       
    36 #define DIALER_PRINT(x) { _LIT( KDialerDebugPrintPrefix, "Dialer: ");\
       
    37     TDialerDebBuf buf( KDialerDebugPrintPrefix);\
       
    38     if ((_L(x).Length()) + buf.Length() <= KDialerDebugBufferSize )\
       
    39         buf.Append(_L(x)); RDebug::Print(buf); }
       
    40 
       
    41 #define DIALER_PRINTF(x,y) { _LIT( KDialerDebugPrintPrefix, "Dialer: ");\
       
    42     TDialerDebBuf buf( KDialerDebugPrintPrefix);\
       
    43     if ((_L(x).Length()) + buf.Length() <= KDialerDebugBufferSize )\
       
    44         buf.Append(_L(x)); RDebug::Print(buf,y);}
       
    45 
       
    46 #define DIALER_PRINTF2(x,y,z) { _LIT( KDialerDebugPrintPrefix, "Dialer: ");\
       
    47     TDialerDebBuf buf( KDialerDebugPrintPrefix);\
       
    48     if ((_L(x).Length()) + buf.Length() <= KDialerDebugBufferSize )\
       
    49         buf.Append(_L(x)); RDebug::Print(buf,y,z); }
       
    50 
       
    51 #else // !_DEBUG
       
    52 
       
    53 #define DIALER_PRINT(x)
       
    54 #define DIALER_PRINTF(x,y)
       
    55 #define DIALER_PRINTF2(x,y,z)
       
    56 
       
    57 #endif      // _DEBUG
       
    58 
       
    59 #endif      // DIALERTRACE_H
       
    60 
       
    61 // End of File