gnutls_errors.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
00003  *
00004  * Author: Nikos Mavrogiannopoulos
00005  *
00006  * This file is part of GNUTLS.
00007  *
00008  * The GNUTLS library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00021  * USA
00022  *
00023  */
00024 
00025 #include <defines.h>
00026 
00027 #define GNUTLS_E_INT_RET_0 -1251
00028 
00029 #ifdef __FILE__
00030 # ifdef __LINE__
00031 #  define MHD_gnutls_assert() MHD__gnutls_debug_log( "ASSERT: %s:%d\n", __FILE__,__LINE__);
00032 # else
00033 #  define MHD_gnutls_assert()
00034 # endif
00035 #else /* __FILE__ not defined */
00036 # define MHD_gnutls_assert()
00037 #endif
00038 
00039 int MHD_gtls_asn2err (int asn_err);
00040 void MHD_gtls_log (int, const char *fmt, ...);
00041 
00042 extern int MHD__gnutls_log_level;
00043 
00044 #ifdef C99_MACROS
00045 #define LEVEL(l, ...) if (MHD__gnutls_log_level >= l || MHD__gnutls_log_level > 9) \
00046         MHD_gtls_log( l, __VA_ARGS__)
00047 
00048 #define LEVEL_EQ(l, ...) if (MHD__gnutls_log_level == l || MHD__gnutls_log_level > 9) \
00049         MHD_gtls_log( l, __VA_ARGS__)
00050 
00051 # define MHD__gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
00052 # define MHD__gnutls_handshake_log(...) LEVEL(3, __VA_ARGS__)
00053 # define MHD__gnutls_buffers_log(...) LEVEL_EQ(6, __VA_ARGS__)
00054 # define MHD__gnutls_hard_log(...) LEVEL(9, __VA_ARGS__)
00055 # define MHD__gnutls_record_log(...) LEVEL(4, __VA_ARGS__)
00056 # define MHD__gnutls_read_log(...) LEVEL_EQ(7, __VA_ARGS__)
00057 # define MHD__gnutls_write_log(...) LEVEL_EQ(7, __VA_ARGS__)
00058 # define MHD__gnutls_x509_log(...) LEVEL(1, __VA_ARGS__)
00059 #else
00060 # define MHD__gnutls_debug_log MHD__gnutls_null_log
00061 # define MHD__gnutls_handshake_log MHD__gnutls_null_log
00062 # define MHD__gnutls_buffers_log MHD__gnutls_null_log
00063 # define MHD__gnutls_hard_log MHD__gnutls_null_log
00064 # define MHD__gnutls_record_log MHD__gnutls_null_log
00065 # define MHD__gnutls_read_log MHD__gnutls_null_log
00066 # define MHD__gnutls_write_log MHD__gnutls_null_log
00067 # define MHD__gnutls_x509_log MHD__gnutls_null_log
00068 
00069 void MHD__gnutls_null_log (void *, ...);
00070 
00071 #endif /* C99_MACROS */

Generated on Fri Feb 27 18:31:58 2009 for GNU libmicrohttpd by  doxygen 1.5.7.1