cddb_error.h

Go to the documentation of this file.
00001 /*
00002     $Id: cddb_error.h,v 1.12 2005/05/29 08:11:04 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_ERROR_H
00023 #define CDDB_ERROR_H 1
00024 
00025 #ifdef __cplusplus
00026     extern "C" {
00027 #endif
00028 
00029 
00030 #include <stdio.h>
00031 
00032 
00036 typedef enum {
00037 
00038     CDDB_ERR_OK = 0,            
00040     /* --- general errors --- */
00041 
00042     CDDB_ERR_OUT_OF_MEMORY,     
00043     CDDB_ERR_LINE_SIZE,         
00044     CDDB_ERR_NOT_IMPLEMENTED,   
00045     CDDB_ERR_UNKNOWN,           
00047     /* --- connection errors --- */
00048 
00049     CDDB_ERR_SERVER_ERROR,      
00050     CDDB_ERR_UNKNOWN_HOST_NAME, 
00051     CDDB_ERR_CONNECT,           
00052     CDDB_ERR_PERMISSION_DENIED, 
00053     CDDB_ERR_NOT_CONNECTED,     
00056     /* --- response parsing errors --- */
00057 
00058     CDDB_ERR_UNEXPECTED_EOF,    
00059     CDDB_ERR_INVALID_RESPONSE,  
00060     CDDB_ERR_DISC_NOT_FOUND,    
00062     /* --- library errors --- */
00063 
00064     CDDB_ERR_DATA_MISSING,      
00066     CDDB_ERR_TRACK_NOT_FOUND,   
00067     CDDB_ERR_REJECTED,          
00068     CDDB_ERR_EMAIL_INVALID,     
00071     CDDB_ERR_INVALID_CHARSET,   
00073     CDDB_ERR_ICONV_FAIL,        
00075     /* --- new errors added to back of list for backward compatibility --- */
00076 
00077     CDDB_ERR_PROXY_AUTH,        
00078     CDDB_ERR_INVALID,           
00080     /* --- terminator --- */
00081 
00082     CDDB_ERR_LAST
00083 } cddb_error_t;
00084 
00085 
00086 /* --- error handling --- */
00087 
00088 
00094 const char *cddb_error_str(cddb_error_t errnum);
00095 
00103 void cddb_error_stream_print(FILE *stream, cddb_error_t errnum);
00104 
00111 void cddb_error_print(cddb_error_t errnum);
00112 
00113 
00114 #ifdef __cplusplus
00115     }
00116 #endif
00117 
00118 #endif /* CDDB_ERROR_H */

Generated on Sun Oct 15 14:49:14 2006 for libcddb by  doxygen 1.4.6