From: Mohamed Abbas <[email protected]>
Add new API to support http download.
---
gweb/gweb.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/gweb/gweb.h b/gweb/gweb.h
index 1ab2a9f..61e488c 100644
--- a/gweb/gweb.h
+++ b/gweb/gweb.h
@@ -38,10 +38,19 @@ typedef enum {
G_WEB_METHOD_GET,
} GWebMethod;
+typedef enum {
+ G_WEB_DATA_HEADER,
+ G_WEB_DATA_BODY,
+} GWebDataType;
+
typedef void (*GWebResultFunc)(uint16_t status, gpointer user_data);
typedef void (*GWebDebugFunc)(const char *str, gpointer user_data);
+typedef gboolean (*GWebReceivedFunc)(const guint8 *str, int len,
+ GWebDataType data_type,
+ gpointer user_data);
+
GWeb *g_web_new(int index);
GWeb *g_web_ref(GWeb *web);
@@ -51,7 +60,10 @@ void g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer
user_data);
gboolean g_web_add_nameserver(GWeb *web, const char *address);
+void g_web_allow_header(GWeb *web, gboolean allow);
+
guint g_web_request(GWeb *web, GWebMethod method, const char *url,
+ GWebReceivedFunc rec_func,
GWebResultFunc func, gpointer user_data);
gboolean g_web_cancel(GWeb *web, guint id);
--
1.7.2.3
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman