libcdio  0.82
logging.h
Go to the documentation of this file.
00001 /*
00002     $Id: logging.h,v 1.11 2008/03/25 15:59:09 karl Exp $
00003 
00004     Copyright (C) 2003, 2004, 2008 Rocky Bernstein <rocky@gnu.org>
00005     Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
00006 
00007     This program is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00025 
00026 #ifndef __LOGGING_H__
00027 #define __LOGGING_H__
00028 
00029 #include <cdio/types.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00038 typedef enum {
00039   CDIO_LOG_DEBUG = 1, 
00040   CDIO_LOG_INFO,      
00042   CDIO_LOG_WARN,      
00043   CDIO_LOG_ERROR,     
00044   CDIO_LOG_ASSERT     
00045 } cdio_log_level_t;
00046 
00052 extern cdio_log_level_t cdio_loglevel_default;
00053 
00065 typedef void (*cdio_log_handler_t) (cdio_log_level_t level, 
00066                                     const char message[]);
00067 
00078 cdio_log_handler_t cdio_log_set_handler (cdio_log_handler_t new_handler);
00079 
00092 void cdio_log (cdio_log_level_t level, 
00093                const char format[], ...) GNUC_PRINTF(2, 3);
00094     
00100 void cdio_debug (const char format[], ...) GNUC_PRINTF(1,2);
00101 
00107 void cdio_info (const char format[], ...) GNUC_PRINTF(1,2);
00108 
00114 void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2);
00115 
00121 void cdio_error (const char format[], ...) GNUC_PRINTF(1,2);
00122 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif /* __LOGGING_H__ */
00128 
00129 
00130 /* 
00131  * Local variables:
00132  *  c-file-style: "gnu"
00133  *  tab-width: 8
00134  *  indent-tabs-mode: nil
00135  * End:
00136  */

Generated for libcdio by doxygen 1.7.6.1