summaryrefslogtreecommitdiff
path: root/gweb/gweb.h
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-07-17 02:37:39 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-07-17 02:37:39 (GMT)
commit1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (patch)
tree6e991827d28537f7f40f20786c2354fd04a9fdad /gweb/gweb.h
parentfbe905ab58ecc31fe64c410c5f580cadc30e7f04 (diff)
downloadconnman-upstream/1.24.zip
connman-upstream/1.24.tar.gz
connman-upstream/1.24.tar.bz2
Imported Upstream version 1.24upstream/1.24
Diffstat (limited to 'gweb/gweb.h')
-rw-r--r--gweb/gweb.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/gweb/gweb.h b/gweb/gweb.h
index 104345e..6c28542 100644
--- a/gweb/gweb.h
+++ b/gweb/gweb.h
@@ -22,6 +22,7 @@
#ifndef __G_WEB_H
#define __G_WEB_H
+#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
@@ -38,12 +39,12 @@ typedef struct _GWeb GWeb;
typedef struct _GWebResult GWebResult;
typedef struct _GWebParser GWebParser;
-typedef gboolean (*GWebResultFunc)(GWebResult *result, gpointer user_data);
+typedef bool (*GWebResultFunc)(GWebResult *result, gpointer user_data);
-typedef gboolean (*GWebRouteFunc)(const char *addr, int ai_family,
+typedef bool (*GWebRouteFunc)(const char *addr, int ai_family,
int if_index, gpointer user_data);
-typedef gboolean (*GWebInputFunc)(const guint8 **data, gsize *length,
+typedef bool (*GWebInputFunc)(const guint8 **data, gsize *length,
gpointer user_data);
typedef void (*GWebDebugFunc)(const char *str, gpointer user_data);
@@ -55,24 +56,24 @@ void g_web_unref(GWeb *web);
void g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer user_data);
-gboolean g_web_supports_tls(void);
+bool g_web_supports_tls(void);
-gboolean g_web_set_proxy(GWeb *web, const char *proxy);
+bool g_web_set_proxy(GWeb *web, const char *proxy);
-gboolean g_web_set_address_family(GWeb *web, int family);
+bool g_web_set_address_family(GWeb *web, int family);
-gboolean g_web_add_nameserver(GWeb *web, const char *address);
+bool g_web_add_nameserver(GWeb *web, const char *address);
-gboolean g_web_set_accept(GWeb *web, const char *format, ...)
+bool g_web_set_accept(GWeb *web, const char *format, ...)
__attribute__((format(printf, 2, 3)));
-gboolean g_web_set_user_agent(GWeb *web, const char *format, ...)
+bool g_web_set_user_agent(GWeb *web, const char *format, ...)
__attribute__((format(printf, 2, 3)));
-gboolean g_web_set_ua_profile(GWeb *web, const char *profile);
+bool g_web_set_ua_profile(GWeb *web, const char *profile);
-gboolean g_web_set_http_version(GWeb *web, const char *version);
+bool g_web_set_http_version(GWeb *web, const char *version);
-void g_web_set_close_connection(GWeb *web, gboolean enabled);
-gboolean g_web_get_close_connection(GWeb *web);
+void g_web_set_close_connection(GWeb *web, bool enabled);
+bool g_web_get_close_connection(GWeb *web);
guint g_web_request_get(GWeb *web, const char *url,
GWebResultFunc func, GWebRouteFunc route,
@@ -84,13 +85,13 @@ guint g_web_request_post_file(GWeb *web, const char *url,
const char *type, const char *file,
GWebResultFunc func, gpointer user_data);
-gboolean g_web_cancel_request(GWeb *web, guint id);
+bool g_web_cancel_request(GWeb *web, guint id);
guint16 g_web_result_get_status(GWebResult *result);
-gboolean g_web_result_get_header(GWebResult *result,
+bool g_web_result_get_header(GWebResult *result,
const char *header, const char **value);
-gboolean g_web_result_get_chunk(GWebResult *result,
+bool g_web_result_get_chunk(GWebResult *result,
const guint8 **chunk, gsize *length);
typedef void (*GWebParserFunc)(const char *str, gpointer user_data);