diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-12-06 16:16:01 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-12-06 16:16:59 +0000 |
commit | 2f8d84b8961315d3531608b2d3d36b23979d3e15 (patch) | |
tree | 13dcd636d0d7565a7a0264e7862fde69d92d4b22 /bindings/hubbub/parser.h | |
parent | 77efdb615b56e66fcdd4fc49efac37a460196fc3 (diff) | |
download | libdom-2f8d84b8961315d3531608b2d3d36b23979d3e15.tar.gz libdom-2f8d84b8961315d3531608b2d3d36b23979d3e15.tar.bz2 |
make the hubbub binding creation take a parameter struct and return standard error codes
Diffstat (limited to 'bindings/hubbub/parser.h')
-rw-r--r-- | bindings/hubbub/parser.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/bindings/hubbub/parser.h b/bindings/hubbub/parser.h index ef0a745..132cc86 100644 --- a/bindings/hubbub/parser.h +++ b/bindings/hubbub/parser.h @@ -48,10 +48,23 @@ typedef enum dom_hubbub_encoding_source { * The client must not call any method of this parser after destruction. */ +/** + * Parameter block for dom_hubbub_parser_create + */ +typedef struct dom_hubbub_parser_params { + const char *enc; /**< Source charset, or NULL */ + bool fix_enc; /**< Whether fix the encoding */ + + bool enable_script; /**< Whether scripting should be enabled. */ + dom_script script; /**< Script callback function */ + + dom_msg msg; /**< Informational message function */ + void *ctx; /**< Pointer to client-specific private data */ +} dom_hubbub_parser_params; + /* Create a Hubbub parser instance */ -dom_hubbub_parser *dom_hubbub_parser_create(const char *enc, bool fix_enc, - bool enable_script, dom_msg msg, - dom_script script, void *mctx, +dom_hubbub_error dom_hubbub_parser_create(dom_hubbub_parser_params *params, + dom_hubbub_parser **parser, dom_document **document); /* Destroy a Hubbub parser instance */ |