os/ossrv/genericservices/systemagent/src/halsettings/haldebug.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef HALDEBUG_H
    17 #define HALDEBUG_H
    18 
    19 #include <e32debug.h>
    20 
    21 // Make sure release builds get a warning if 
    22 #ifndef _DEBUG
    23 #if (defined HALSETTINGS_TRACE)
    24 #warning "Use of RDebug::Print tracing in a release build, check MMP files"
    25 #endif
    26 #endif
    27 
    28 
    29 //
    30 // MACROs for trace statements in client/server code.
    31 //
    32 
    33 #ifdef HALSETTINGS_TRACE
    34 
    35 #define __HS_TRACE(_text)		RDebug::Print(_L(_text))
    36 #define __HS_TRACE1(_text, _a1)	RDebug::Print(_L(_text), (_a1))
    37 #define __HS_TRACE2(_text, _a1, _a2)	RDebug::Print(_L(_text), (_a1), (_a2))
    38 #define __HS_TRACE3(_text, _a1, _a2, _a3)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3))
    39 #define __HS_TRACE4(_text, _a1, _a2, _a3, _a4)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4))
    40 #define __HS_TRACE5(_text, _a1, _a2, _a3, _a4, _a5)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4), (_a5))
    41 #define __HS_TRACE6(_text, _a1, _a2, _a3, _a4, _a5, _a6)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4), (_a5), (_a6))
    42 
    43 #else
    44 
    45 #define __HS_TRACE(_text)			
    46 #define __HS_TRACE1(_text, _a1)		
    47 #define __HS_TRACE2(_text, _a1, _a2)
    48 #define __HS_TRACE3(_text, _a1, _a2, _a3)	
    49 #define __HS_TRACE4(_text, _a1, _a2, _a3, _a4)
    50 #define __HS_TRACE5(_text, _a1, _a2, _a3, _a4, _a5)
    51 #define __HS_TRACE6(_text, _a1, _a2, _a3, _a4, _a5, _a6)
    52 
    53 #endif
    54 
    55 
    56 
    57 #endif // HALDEBUG_H
    58