mw_debug.h
Go to the documentation of this file.
/*
Meanwhile - Unofficial Lotus Sametime Community Client Library
Copyright (C) 2004 Christopher (siege) O'Brien
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MW_DEBUG_H
#define _MW_DEBUG_H
#include <stdarg.h>
#include <glib.h>
#include "mw_common.h"
#define NSTR(str) ((str)? (str): "(null)")
#ifndef g_debug
#define g_debug(format...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
#endif
#ifndef g_info
#define g_info(format...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
#endif
#ifndef MW_MAILME_ADDRESS
#define MW_MAILME_ADDRESS "meanwhile-devel@lists.sourceforge.net"
#endif
#ifndef MW_MAILME_CUT_START
#define MW_MAILME_CUT_START "-------- begin copy --------"
#endif
#ifndef MW_MAILME_CUT_STOP
#define MW_MAILME_CUT_STOP "--------- end copy ---------"
#endif
#ifndef MW_MAILME_MESSAGE
#define MW_MAILME_MESSAGE "\n" \
" Greetings! It seems that you've run across protocol data that the\n" \
"Meanwhile library does not yet know about. As such, there may be\n" \
"some unexpected behaviour in this session. If you'd like to help\n" \
"resolve this issue, please copy and paste the following block into\n" \
"an email to the address listed below with a brief explanation of\n" \
"what you were doing at the time of this message. Thanks a lot!"
#endif
void mw_debug_datav(const guchar *buf, gsize len,
const char *info, va_list args);
void mw_debug_data(const guchar *buf, gsize len,
const char *info, ...);
void mw_debug_opaquev(struct mwOpaque *o, const char *info, va_list args);
void mw_debug_opaque(struct mwOpaque *o, const char *info, ...);
void mw_mailme_datav(const guchar *buf, gsize len,
const char *info, va_list args);
void mw_mailme_data(const guchar *buf, gsize len,
const char *info, ...);
void mw_mailme_opaquev(struct mwOpaque *o, const char *info, va_list args);
void mw_mailme_opaque(struct mwOpaque *o, const char *info, ...);
#endif
mw_common.h
Common data types and functions for handling those types.
mw_debug_opaquev
void mw_debug_opaquev(struct mwOpaque *o, const char *info, va_list args)
mw_mailme_data
void mw_mailme_data(const guchar *buf, gsize len, const char *info,...)
mw_debug_data
void mw_debug_data(const guchar *buf, gsize len, const char *info,...)
mw_mailme_opaque
void mw_mailme_opaque(struct mwOpaque *o, const char *info,...)
Outputs a hex dump of a mwOpaque with debugging info and a pre-defined message.
mw_mailme_datav
void mw_mailme_datav(const guchar *buf, gsize len, const char *info, va_list args)
mw_mailme_opaquev
void mw_mailme_opaquev(struct mwOpaque *o, const char *info, va_list args)
Outputs a hex dump of a mwOpaque with debugging info and a pre-defined message.
mw_debug_opaque
void mw_debug_opaque(struct mwOpaque *o, const char *info,...)
mw_debug_datav
void mw_debug_datav(const guchar *buf, gsize len, const char *info, va_list args)
mwOpaque
A length of binary data, not null-terminated.
Definition mw_common.h:79