From 56e984e3a255e439e32ac32e131fd79aa61fad0f Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 16 Sep 2007 17:02:20 +0000 Subject: Add callback for informational messaging (with variable severity, a la syslog) Use it to log interesting things during parsing. This needs to grow some i18n at some point. svn path=/trunk/dom/; revision=3540 --- bindings/xml/functypes.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'bindings/xml/functypes.h') diff --git a/bindings/xml/functypes.h b/bindings/xml/functypes.h index d0706b8..9cb15ee 100644 --- a/bindings/xml/functypes.h +++ b/bindings/xml/functypes.h @@ -13,4 +13,24 @@ */ typedef void *(*xml_alloc)(void *ptr, size_t len, void *pw); +/** + * Severity levels for xml_msg function, based on syslog(3) + */ +enum { + XML_MSG_DEBUG, + XML_MSG_INFO, + XML_MSG_NOTICE, + XML_MSG_WARNING, + XML_MSG_ERROR, + XML_MSG_CRITICAL, + XML_MSG_ALERT, + XML_MSG_EMERGENCY +}; + +/** + * Type of XML parser message function + */ +typedef void (*xml_msg)(uint32_t severity, void *ctx, const char *msg, ...); + #endif + -- cgit v1.2.3