diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-16 17:02:20 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-16 17:02:20 +0000 |
commit | 56e984e3a255e439e32ac32e131fd79aa61fad0f (patch) | |
tree | 1554b63ea339f423c659ccf1fc706a2f5cdd847b /bindings/xml/functypes.h | |
parent | 2a1201a40dd9645dba1b19fb085d3897615e6427 (diff) | |
download | libdom-56e984e3a255e439e32ac32e131fd79aa61fad0f.tar.gz libdom-56e984e3a255e439e32ac32e131fd79aa61fad0f.tar.bz2 |
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
Diffstat (limited to 'bindings/xml/functypes.h')
-rw-r--r-- | bindings/xml/functypes.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 + |