00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _MW_DEBUG_H
00022 #define _MW_DEBUG_H
00023
00024
00025 #include <stdarg.h>
00026 #include <glib.h>
00027
00028 #include "mw_common.h"
00029
00030
00035 #define NSTR(str) ((str)? (str): "(null)")
00036
00037
00038 #ifndef g_debug
00039 #define g_debug(format...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
00040 #endif
00041
00042
00043 #ifndef g_info
00044 #define g_info(format...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
00045 #endif
00046
00047
00048 #ifndef MW_MAILME_ADDRESS
00049
00050 #define MW_MAILME_ADDRESS "meanwhile-devel@lists.sourceforge.net"
00051 #endif
00052
00053
00054 #ifndef MW_MAILME_CUT_START
00055 #define MW_MAILME_CUT_START "-------- begin copy --------"
00056 #endif
00057
00058
00059 #ifndef MW_MAILME_CUT_STOP
00060 #define MW_MAILME_CUT_STOP "--------- end copy ---------"
00061 #endif
00062
00063
00064 #ifndef MW_MAILME_MESSAGE
00065
00067 #define MW_MAILME_MESSAGE "\n" \
00068 " Greetings! It seems that you've run across protocol data that the\n" \
00069 "Meanwhile library does not yet know about. As such, there may be\n" \
00070 "some unexpected behaviour in this session. If you'd like to help\n" \
00071 "resolve this issue, please copy and paste the following block into\n" \
00072 "an email to the address listed below with a brief explanation of\n" \
00073 "what you were doing at the time of this message. Thanks a lot!"
00074 #endif
00075
00076
00077 void mw_debug_datav(const guchar *buf, gsize len,
00078 const char *info, va_list args);
00079
00080
00081 void mw_debug_data(const guchar *buf, gsize len,
00082 const char *info, ...);
00083
00084
00085 void mw_debug_opaquev(struct mwOpaque *o, const char *info, va_list args);
00086
00087
00088 void mw_debug_opaque(struct mwOpaque *o, const char *info, ...);
00089
00090
00091 void mw_mailme_datav(const guchar *buf, gsize len,
00092 const char *info, va_list args);
00093
00094 void mw_mailme_data(const guchar *buf, gsize len,
00095 const char *info, ...);
00096
00097
00101 void mw_mailme_opaquev(struct mwOpaque *o, const char *info, va_list args);
00102
00103
00104
00124 void mw_mailme_opaque(struct mwOpaque *o, const char *info, ...);
00125
00126
00127 #endif
00128