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 | 9accee270c4aaaade32e30ed9f3df3dcb2d3ea2e (patch) | |
tree | 1554b63ea339f423c659ccf1fc706a2f5cdd847b /bindings/xml/functypes.h | |
parent | 2e904b581eda165b2832ea363f7b86cf9170f098 (diff) | |
download | libdom-9accee270c4aaaade32e30ed9f3df3dcb2d3ea2e.tar.gz libdom-9accee270c4aaaade32e30ed9f3df3dcb2d3ea2e.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 + |