bluetoothengine/btnotif/btdevicedialogplugin/inc/btdevicedialogplugintrace.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2009 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:  Tracing macros
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BTDEVICEDIALOGPLUGINTRACE_H
       
    19 #define BTDEVICEDIALOGPLUGINTRACE_H
       
    20 
       
    21 #include <QDebug>   // QDebug
       
    22 #include <QtGlobal> // qDebug()
       
    23 
       
    24 
       
    25 #ifdef ENABLE_TRACE_OUTPUT
       
    26     #define INSTALL_MESSAGE_HANDLER HbDeviceDialogMessageHandler::installMessageHandler(QString(TRACE_OUTPUT_FILE), TRACE_OUTPUT_FILE_REQUIRED);
       
    27     #define UNINSTALL_MESSAGE_HANDLER HbDeviceDialogMessageHandler::uninstallMessageHandler();
       
    28     #define TRACE_UNUSED(name)
       
    29     #define TRACE_STATIC_ENTRY qDebug() << __PRETTY_FUNCTION__ << "entry";
       
    30     #define TRACE_STATIC_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "entry," << args;
       
    31     #define TRACE_ENTRY qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this << "entry";
       
    32     #define TRACE_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "this" << (void *)this << "entry," << args;
       
    33     #define TRACE_EXIT qDebug() << __PRETTY_FUNCTION__ << "exit";
       
    34     #define TRACE_EXIT_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "exit," << args;
       
    35     #define TRACE(args) qDebug() << __PRETTY_FUNCTION__ << args;
       
    36 #else
       
    37     #define INSTALL_MESSAGE_HANDLER
       
    38     #define UNINSTALL_MESSAGE_HANDLER
       
    39     #define TRACE_UNUSED(name) Q_UNUSED(name)
       
    40     #define TRACE_STATIC_ENTRY
       
    41     #define TRACE_STATIC_ENTRY_ARGS(args)
       
    42     #define TRACE_ENTRY
       
    43     #define TRACE_ENTRY_ARGS(args)
       
    44     #define TRACE_EXIT
       
    45     #define TRACE_EXIT_ARGS(args)
       
    46     #define TRACE(args)
       
    47 #endif // ENABLE_TRACE_OUTPUT
       
    48 
       
    49 #endif // BTDEVICEDIALOGPLUGINTRACE_H