gst_plugins_symbian/gst/devsound/debugtracemacros.h
changeset 2 5505e8908944
equal deleted inserted replaced
1:4c282e7dd6d3 2:5505e8908944
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
       
     3 *
       
     4 * This library is free software; you can redistribute it and/or
       
     5 * modify it under the terms of the GNU Lesser General Public
       
     6 * License as published by the Free Software Foundation; either
       
     7 * version 2 of the License, or (at your option) any later version.
       
     8 *
       
     9 * This library is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12 * Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public
       
    15 * License along with this library; if not, write to the
       
    16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17 * Boston, MA 02111-1307, USA.
       
    18 *
       
    19 * Description:
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 #ifndef DEBUGTRACEMACROS_H
       
    25 #define DEBUGTRACEMACROS_H
       
    26 
       
    27 #define RET_ERR_IF_ERR(err) if ( err != KErrNone) return err;
       
    28 
       
    29 #ifdef _DEBUG
       
    30 #include "e32debug.h"
       
    31 
       
    32 #define TRACE_PRN_FN_ENT        RDebug::Printf("%s>ENTER", __PRETTY_FUNCTION__)
       
    33 #define TRACE_PRN_FN_EXT        RDebug::Printf("%s>EXIT", __PRETTY_FUNCTION__)
       
    34 #define TRACE_PRN_IF_ERR(err) if (err != KErrNone) RDebug::Printf( "%s>BREAK[%d]", __PRETTY_FUNCTION__, err )
       
    35 
       
    36 #define TRACE_PRN_0(str)              RDebug::Print(str, this)
       
    37 #define TRACE_PRN_1(str, val1)        RDebug::Print(str, this, val1)
       
    38 #define TRACE_PRN_2(str, val1, val2)  RDebug::Print(str, this, val1, val2)
       
    39 
       
    40 #define TRACE_PRN_N(str)              RDebug::Print(str)
       
    41 #define TRACE_PRN_N1(str, val1)       RDebug::Print(str, val1)
       
    42 #define TRACE_PRN_N2(str, val1, val2) RDebug::Print(str, val1, val2)
       
    43 
       
    44 #else
       
    45 
       
    46 #define TRACE_PRN_FN_ENT
       
    47 #define TRACE_PRN_FN_EXT
       
    48 #define TRACE_PRN_IF_ERR(err)
       
    49 #define TRACE_PRN_0(str)
       
    50 #define TRACE_PRN_1(str, val1)
       
    51 #define TRACE_PRN_2(str, val1, val2)
       
    52 #define TRACE_PRN_N(str)
       
    53 #define TRACE_PRN_N1(str, val1)
       
    54 #define TRACE_PRN_N2(str, val1, val2)
       
    55 #endif //_DEBUG
       
    56 
       
    57 #endif // DEBUGTRACEMACROS_H
       
    58 
       
    59 // End of file