mw_debug.h File Reference

#include <stdarg.h>
#include <glib.h>
#include "mw_common.h"

Go to the source code of this file.

Defines

#define g_debug(format...)   g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
#define g_info(format...)   g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
#define MW_MAILME_ADDRESS   "meanwhile-devel@lists.sourceforge.net"
 email address used in mw_debug_mailme.
#define MW_MAILME_CUT_START   "-------- begin copy --------"
#define MW_MAILME_CUT_STOP   "--------- end copy ---------"
#define MW_MAILME_MESSAGE
 message used in mw_debug_mailme instructing user on what to do with the debugging output produced from that function
#define NSTR(str)   ((str)? (str): "(null)")
 replaces NULL strings with "(null)".

Functions

void mw_debug_data (const guchar *buf, gsize len, const char *info,...)
void mw_debug_datav (const guchar *buf, gsize len, const char *info, va_list args)
void mw_debug_opaque (struct mwOpaque *o, const char *info,...)
void mw_debug_opaquev (struct mwOpaque *o, const char *info, va_list args)
void mw_mailme_data (const guchar *buf, gsize len, const char *info,...)
void mw_mailme_datav (const guchar *buf, gsize len, const char *info, va_list args)
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.
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.


Define Documentation

#define g_debug ( format...   )     g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)

#define g_info ( format...   )     g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)

#define MW_MAILME_ADDRESS   "meanwhile-devel@lists.sourceforge.net"

email address used in mw_debug_mailme.

#define MW_MAILME_CUT_START   "-------- begin copy --------"

#define MW_MAILME_CUT_STOP   "--------- end copy ---------"

#define MW_MAILME_MESSAGE

Value:

"\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!"
message used in mw_debug_mailme instructing user on what to do with the debugging output produced from that function

#define NSTR ( str   )     ((str)? (str): "(null)")

replaces NULL strings with "(null)".

useful for printf where you're unsure that the s will be non-NULL. Note that while the linux printf will do this automatically, not all will. The others will instead segfault


Function Documentation

void mw_debug_data ( const guchar *  buf,
gsize  len,
const char *  info,
  ... 
)

void mw_debug_datav ( const guchar *  buf,
gsize  len,
const char *  info,
va_list  args 
)

void mw_debug_opaque ( struct mwOpaque o,
const char *  info,
  ... 
)

void mw_debug_opaquev ( struct mwOpaque o,
const char *  info,
va_list  args 
)

void mw_mailme_data ( const guchar *  buf,
gsize  len,
const char *  info,
  ... 
)

void mw_mailme_datav ( const guchar *  buf,
gsize  len,
const char *  info,
va_list  args 
)

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.

if MW_MAILME is undefined or false, this function acts the same as mw_mailme_opaque.

The resulting message is in the following format:

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.

Identical to mw_mailme_opaque, but taking a va_list argument


Generated on Wed May 23 23:43:23 2007 for meanwhile by  doxygen 1.5.2