From bdff981eef4a7434291941e6bca662357498bc59 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 10 Jul 2012 11:23:57 -0600 Subject: Add ability to pause tokenisation --- include/hubbub/errors.h | 3 ++- include/hubbub/parser.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'include/hubbub') diff --git a/include/hubbub/errors.h b/include/hubbub/errors.h index ee7870a..8865246 100644 --- a/include/hubbub/errors.h +++ b/include/hubbub/errors.h @@ -16,9 +16,10 @@ extern "C" #include typedef enum hubbub_error { - HUBBUB_OK = 0, + HUBBUB_OK = 0, /**< No error */ HUBBUB_REPROCESS = 1, HUBBUB_ENCODINGCHANGE = 2, + HUBBUB_PAUSED = 3, /**< tokenisation is paused */ HUBBUB_NOMEM = 5, HUBBUB_BADPARM = 6, diff --git a/include/hubbub/parser.h b/include/hubbub/parser.h index 7d2fb1f..cd5d6b5 100644 --- a/include/hubbub/parser.h +++ b/include/hubbub/parser.h @@ -32,7 +32,8 @@ typedef enum hubbub_parser_opttype { HUBBUB_PARSER_CONTENT_MODEL, HUBBUB_PARSER_TREE_HANDLER, HUBBUB_PARSER_DOCUMENT_NODE, - HUBBUB_PARSER_ENABLE_SCRIPTING + HUBBUB_PARSER_ENABLE_SCRIPTING, + HUBBUB_PARSER_PAUSE } hubbub_parser_opttype; /** @@ -58,6 +59,8 @@ typedef union hubbub_parser_optparams { void *document_node; /**< Document node */ bool enable_scripting; /**< Whether to enable scripting */ + + bool pause_parse; /**< Pause parsing */ } hubbub_parser_optparams; /* Create a hubbub parser */ -- cgit v1.2.3