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