securitydialogs/secuidialognotifiersrv/inc/secuidialogstrace.h
changeset 61 1cc4c46c2963
child 63 989397f9511c
equal deleted inserted replaced
56:25a3fbb5e4d3 61:1cc4c46c2963
       
     1 /*
       
     2 * Copyright (c) 2010 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:  TRACE macros for secui dialogs
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SECUIDIALOGSTRACE_H
       
    19 #define SECUIDIALOGSTRACE_H
       
    20 
       
    21 #include <e32debug.h>                   // RDebug
       
    22 
       
    23 
       
    24 // TODO: replace with OST tracing
       
    25 #ifdef _DEBUG
       
    26 #define TRACE( a, ARGS... ) { RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 );     DebugPrint( _L( a ), ##ARGS ) ; };
       
    27 #else
       
    28 #define TRACE( a, ARGS... )
       
    29 #endif
       
    30 
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // DebugPrint()
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 #ifdef _DEBUG
       
    37 const TInt KMaxPrintSize = 256;
       
    38 inline void DebugPrint( TRefByValue<const TDesC> aFmt, ... )
       
    39     {
       
    40     VA_LIST list;
       
    41     VA_START( list, aFmt );
       
    42     TBuf<KMaxPrintSize> buf;
       
    43     buf.AppendFormatList( aFmt, list );
       
    44     RDebug::Print( buf );
       
    45     }
       
    46 #endif
       
    47 
       
    48 
       
    49 #endif  // SECUIDIALOGSTRACE_H
       
    50