psmservices/psmserver/inc/util/psmtrace.h
author William Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:45:41 +0100
branchGCC_SURGE
changeset 49 00076e39386f
parent 0 4e1aa6a622a0
permissions -rw-r--r--
Catchup to latest Symbian^4

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Trace macro definitions file
*
*/

#ifndef PSMTRACE_H
#define PSMTRACE_H

// INCLUDES
#include <e32svr.h>

// PC-LINT OPTIONS
// Removes null statement not in line by itself warnings from 
// COMPONENT_TRACE macros
//lint -esym(960,54)

// Removes "area too small" pointer cast warnings.
//lint -e826

/**
* "NULL" string for tracing
*/
_LIT( KSensrvNullString, "NULL");


#ifdef _DEBUG

    #define THREAD_TRACE

    #ifdef COMPONENT_TRACE_FLAG

        #define COMPONENT_TRACE( a ) THREAD_TRACE;RDebug::Print a 
        #define COMPONENT_TRACE_DEBUG   
        
    #else // #ifdef COMPONENT_TRACE_FLAG

        #define COMPONENT_TRACE( a )

    #endif //#ifdef COMPONENT_TRACE_FLAG

    #ifdef ERROR_TRACE_FLAG

        #define ERROR_TRACE( a ) THREAD_TRACE;RDebug::Print a
        #define ERROR_TRACE_DEBUG

    #else //#ifdef ERROR_TRACE_FLAG

        #define ERROR_TRACE( a )

    #endif //#ifdef ERROR_TRACE_FLAG

    #ifdef MEMORY_TRACE_FLAG

        #define MEMORY_TRACE( a ) THREAD_TRACE;RDebug::Print a
        #define MEMORY_TRACE_DEBUG

    #else //#ifdef MEMORY_TRACE_FLAG

        #define MEMORY_TRACE( a )

    #endif //#ifdef MEMORY_TRACE_FLAG

#else // #ifdef _DEBUG

    #define COMPONENT_TRACE( a )
    #define ERROR_TRACE( a )
    #define THREAD_TRACE
    #define MEMORY_TRACE( a )

#endif //#ifdef _DEBUG

#endif // PSMTRACE_H


//  End of File