diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/quickmedia/HtmlSearch.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/quickmedia/HtmlSearch.h b/include/quickmedia/HtmlSearch.h index e3bea33..568e101 100644 --- a/include/quickmedia/HtmlSearch.h +++ b/include/quickmedia/HtmlSearch.h @@ -13,6 +13,10 @@ typedef struct { void *text; } QuickMediaHtmlNode; +typedef struct { + const void *doc; +} QuickMediaHtmlSearch; + /* Returns NULL if attribute doesn't exist or if it doesn't have any value */ const char* quickmedia_html_node_get_attribute_value(QuickMediaHtmlNode *self, const char *attribute_name); @@ -22,7 +26,10 @@ const QuickMediaStringView quickmedia_html_node_get_text(QuickMediaHtmlNode *sel /* @node is only valid within the callback function scope */ typedef void (*QuickMediaHtmlSearchResultCallback)(QuickMediaHtmlNode *node, void *userdata); -int quickmedia_html_find_nodes_xpath(const char *html_source, const char *xpath, QuickMediaHtmlSearchResultCallback result_callback, void *userdata); +int quickmedia_html_search_init(QuickMediaHtmlSearch *self, const char *html_source); +void quickmedia_html_search_deinit(QuickMediaHtmlSearch *self); + +int quickmedia_html_find_nodes_xpath(QuickMediaHtmlSearch *self, const char *xpath, QuickMediaHtmlSearchResultCallback result_callback, void *userdata); #ifdef __cplusplus } |