00001 /* 00002 $Id: cddb_log.h,v 1.4 2005/03/11 21:29:29 airborne Exp $ 00003 00004 Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with this library; if not, write to the 00018 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef CDDB_LOH_H 00023 #define CDDB_LOG_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00032 typedef enum { 00033 CDDB_LOG_DEBUG = 1, 00034 CDDB_LOG_INFO, 00035 CDDB_LOG_WARN, 00036 CDDB_LOG_ERROR, 00037 CDDB_LOG_CRITICAL, 00038 CDDB_LOG_NONE = 99 00039 } cddb_log_level_t; 00040 00041 00053 typedef void (*cddb_log_handler_t)(cddb_log_level_t level, const char *message); 00054 00065 cddb_log_handler_t cddb_log_set_handler(cddb_log_handler_t new_handler); 00066 00080 void cddb_log_set_level(cddb_log_level_t level); 00081 00082 00083 #ifdef __cplusplus 00084 } 00085 #endif 00086 00087 #endif /* CDDB_LOG_H */