summaryrefslogtreecommitdiff
path: root/gweb/gweb.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-08-01 16:41:44 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-08-01 16:41:44 -0700
commit21277c943191120d84839713caefb762ca918016 (patch)
treeb36261385fa44b3433b5b0ae51c0e328ba4675da /gweb/gweb.h
parent2509163e47302bef6afe494b11720d510760a0ed (diff)
downloadconnman-21277c943191120d84839713caefb762ca918016.tar.gz
connman-21277c943191120d84839713caefb762ca918016.tar.bz2
connman-21277c943191120d84839713caefb762ca918016.zip
Add some initial support for HTTP to web service library
Diffstat (limited to 'gweb/gweb.h')
-rw-r--r--gweb/gweb.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gweb/gweb.h b/gweb/gweb.h
index c0814310..0b997d5b 100644
--- a/gweb/gweb.h
+++ b/gweb/gweb.h
@@ -22,6 +22,8 @@
#ifndef __G_WEB_H
#define __G_WEB_H
+#include <stdint.h>
+
#include <glib.h>
#ifdef __cplusplus
@@ -32,15 +34,26 @@ struct _GWeb;
typedef struct _GWeb GWeb;
+typedef enum {
+ G_WEB_METHOD_GET,
+} GWebMethod;
+
+typedef void (*GWebResultFunc)(uint16_t status, gpointer user_data);
+
typedef void (*GWebDebugFunc)(const char *str, gpointer user_data);
-GWeb *g_web_new(void);
+GWeb *g_web_new(int index);
GWeb *g_web_ref(GWeb *web);
void g_web_unref(GWeb *web);
void g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer user_data);
+guint g_web_request(GWeb *web, GWebMethod method, const char *url,
+ GWebResultFunc func, gpointer user_data);
+
+gboolean g_web_cancel(GWeb *web, guint id);
+
#ifdef __cplusplus
}
#endif