mmserv/voipaudioservices/inc/debugtracemacros.h
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2006-2008 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:  Tracing utility.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef DEBUGTRACEMACROS_H
       
    19 #define DEBUGTRACEMACROS_H
       
    20 
       
    21 #define RET_ERR_IF_ERR(err) if ( err != KErrNone) return err;
       
    22 
       
    23 #ifdef _DEBUG
       
    24 #include "e32debug.h"
       
    25 
       
    26 #define TRACE_PRN_FN_ENT        RDebug::Printf("%s>ENTER", __PRETTY_FUNCTION__)
       
    27 #define TRACE_PRN_FN_EXT        RDebug::Printf("%s>EXIT", __PRETTY_FUNCTION__)
       
    28 #define TRACE_PRN_IF_ERR(err) if (err != KErrNone) RDebug::Printf( "%s>BREAK[%d]", __PRETTY_FUNCTION__, err )
       
    29 
       
    30 #define TRACE_PRN_0(str)              RDebug::Print(str, this)
       
    31 #define TRACE_PRN_1(str, val1)        RDebug::Print(str, this, val1)
       
    32 #define TRACE_PRN_2(str, val1, val2)  RDebug::Print(str, this, val1, val2)
       
    33 
       
    34 #define TRACE_PRN_N(str)              RDebug::Print(str)
       
    35 #define TRACE_PRN_N1(str, val1)       RDebug::Print(str, val1)
       
    36 #define TRACE_PRN_N2(str, val1, val2) RDebug::Print(str, val1, val2)
       
    37 
       
    38 #else
       
    39 
       
    40 #define TRACE_PRN_FN_ENT
       
    41 #define TRACE_PRN_FN_EXT
       
    42 #define TRACE_PRN_IF_ERR(err)
       
    43 #define TRACE_PRN_0(str)
       
    44 #define TRACE_PRN_1(str, val1)
       
    45 #define TRACE_PRN_2(str, val1, val2)
       
    46 #define TRACE_PRN_N(str)
       
    47 #define TRACE_PRN_N1(str, val1)
       
    48 #define TRACE_PRN_N2(str, val1, val2)
       
    49 #endif //_DEBUG
       
    50 #endif // DEBUGTRACEMACROS_H
       
    51 
       
    52 // End of file