summaryrefslogtreecommitdiff
path: root/gweb/gweb.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-11-01 00:40:56 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2010-11-01 00:40:56 (GMT)
commit6cf48817436fdebf5a1995afd156d87512ed33e2 (patch)
tree88e34182930c1ac344a54048d3bd64b36572edd8 /gweb/gweb.h
parent278c3c7529d8440a65ff1a7c6a04b2bd27f426e9 (diff)
downloadconnman-6cf48817436fdebf5a1995afd156d87512ed33e2.zip
connman-6cf48817436fdebf5a1995afd156d87512ed33e2.tar.gz
connman-6cf48817436fdebf5a1995afd156d87512ed33e2.tar.bz2
Add really simple content token parser
Diffstat (limited to 'gweb/gweb.h')
-rw-r--r--gweb/gweb.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gweb/gweb.h b/gweb/gweb.h
index 24c84a0..cc2324c 100644
--- a/gweb/gweb.h
+++ b/gweb/gweb.h
@@ -32,9 +32,11 @@ extern "C" {
struct _GWeb;
struct _GWebResult;
+struct _GWebParser;
typedef struct _GWeb GWeb;
typedef struct _GWebResult GWebResult;
+typedef struct _GWebParser GWebParser;
typedef enum {
G_WEB_METHOD_GET,
@@ -72,6 +74,18 @@ guint16 g_web_result_get_status(GWebResult *result);
gboolean g_web_result_get_chunk(GWebResult *result,
const guint8 **chunk, gsize *length);
+typedef void (*GWebParserFunc)(const char *str, gpointer user_data);
+
+GWebParser *g_web_parser_new(const char *begin, const char *end,
+ GWebParserFunc func, gpointer user_data);
+
+GWebParser *g_web_parser_ref(GWebParser *parser);
+void g_web_parser_unref(GWebParser *parser);
+
+void g_web_parser_feed_data(GWebParser *parser,
+ const guint8 *data, gsize length);
+void g_web_parser_end_data(GWebParser *parser);
+
#ifdef __cplusplus
}
#endif