/***************************************************************************
 *   Copyright (C) 2006 by Jens Koehler                                    *
 *   irimi_at_gmx_de                                                       *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef DEBUGTRACER_H
#define DEBUGTRACER_H

#define AMAROK_DEBUG
#define USING_VDR_DEBUG

extern int AMAROK_TRACER_LEVEL_THRESHOLD;

enum AMAROK_TRACE_LEVEL {
    AMAROK_TRACE_NONE=0,
    AMAROK_TRACE_ERROR=10,
    AMAROK_TRACE_INFO=100,
    AMAROK_TRACE_DEBUG=1000
};

class DebugTracer
{
public:
    DebugTracer()
    {}
    ;

    virtual ~DebugTracer()
    {}
    ;
    void infoOut (const char* text) const;
    void errorOut (const char* text) const;
    void debugOut (const char* text) const;

protected:
    virtual void out (AMAROK_TRACE_LEVEL level, const char* text) const;

    void setTraceLevel (AMAROK_TRACE_LEVEL);
    int getTraceLevel () const;
};

//#ifndef USING_VDR_DEBUG
//extern DebugTracer AmarokTracer;
//#endif

#endif
